Spectral overlapping peak decomposition method, device, equipment and medium
By obtaining the initial parameters of X-ray fluorescence spectra using the APU-PSO algorithm and optimizing them using the EM algorithm, the problems of initial parameter sensitivity and local optima in overlapping peak decomposition are solved, achieving accurate decomposition of overlapping peaks and improving the accuracy and reliability of spectral analysis.
Patent Information
- Application Number
- CN202511488346.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-17
- Publication Date
- 2025-11-18
- Estimated Expiration
- 2045-10-17
AI Technical Summary
Existing X-ray fluorescence spectroscopy analysis methods for decomposing overlapping peaks suffer from the problems of initial parameter sensitivity and easy getting trapped in local optima, resulting in insufficient accuracy in characteristic peak identification and elemental content calculation, making it difficult to meet the decomposition requirements of complex overlapping peaks.
The particle swarm optimization algorithm with an adaptive parameter update strategy (APU-PSO) is used to perform a global search to obtain the initial parameters of the Gaussian mixture model (GMM), and then combined with the expectation-maximization algorithm (EM) for iterative optimization to optimize the parameters of each Gaussian characteristic peak.
It significantly improves the accuracy and reliability of overlapping peak decomposition, accurately extracts the peak position, variance and weight of each Gaussian characteristic peak, provides high-quality elemental analysis data, and is suitable for the decomposition of severely overlapping peaks in X-ray fluorescence spectroscopy.
Smart Images

Figure CN120971470A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of X-ray fluorescence spectroscopy analysis technology, and in particular to a method, apparatus, device and medium for decomposing spectral overlapping peaks. Background Technology
[0002] In X-ray fluorescence spectroscopy, accurately acquiring the characteristic peak information of elements is crucial for qualitative and quantitative analysis of material composition. However, due to the complex composition of mineral samples, matrix effects between elements, limitations in instrument resolution, and random noise interference during measurement, the acquired X-ray fluorescence spectra often exhibit severe characteristic peak overlap. This overlap masks key information such as peak position and intensity, directly affecting the identification of elemental types and the accurate calculation of their content, posing a significant challenge to practical applications in fields such as geological exploration and materials analysis. Therefore, effectively decomposing overlapping peaks in X-ray fluorescence spectra and extracting accurate parameters of each characteristic peak has become a core step in improving the accuracy of spectral analysis.
[0003] Currently, methods for decomposing overlapping spectral peaks mainly include curve fitting, derivative methods, and metaheuristic algorithms. Curve fitting fits overlapping peaks using a pre-defined function model, but it is sensitive to initial parameter settings and easily affected by the degree of overlap. While derivative methods can enhance peak position identification, they amplify noise interference. Traditional metaheuristic algorithms, such as particle swarm optimization, are prone to premature convergence when dealing with complex overlapping peaks, leading to insufficient decomposition accuracy. Meanwhile, the expectation-maximization (EM) algorithm combined with a Gaussian mixture model (GMM) has advantages in probabilistic modeling, but the EM algorithm is highly dependent on initial parameters; if the initial values are not chosen properly, it is prone to getting trapped in local optima, making it difficult to meet the decomposition requirements of severely overlapping peaks. Therefore, developing an overlapping peak decomposition method that can effectively overcome the sensitivity to initial parameters and improve global optimization capabilities has become an urgent problem to be solved in this field. Summary of the Invention
[0004] In view of this, embodiments of this application provide a method, apparatus, device, and medium for decomposing overlapping peaks in X-ray fluorescence spectra. This method can optimize the initial parameters of GMM through APU-PSO and combine iterative optimization with the EM algorithm, effectively improving the accuracy and reliability of decomposing overlapping peaks in X-ray fluorescence spectra. It is applicable to the decomposition of various severely overlapping peaks.
[0005] The technical solution of this application embodiment is implemented as follows: In a first aspect, embodiments of this application provide a method for decomposing spectral overlapping peaks, the method comprising: For X-ray fluorescence spectra, a global search is performed using the particle swarm optimization algorithm (APU-PSO) with an adaptive parameter update strategy to obtain the initial parameters of a Gaussian mixture model (GMM). These initial parameters represent the globally optimal position obtained through the global search and include the peak position, variance, and weight of each sub-peak relative to the total peak area among the overlapping peaks. The Gaussian characteristic peaks represent the characteristic peaks in the X-ray fluorescence spectrum, and the Gaussian mixture model is used to model the overlapping peaks in the X-ray fluorescence spectrum as a superposition of multiple Gaussian characteristic peaks. Based on the initial parameters, the parameters of the Gaussian mixture model are iteratively optimized using the expectation-maximization (EM) algorithm to obtain the optimal parameters for each Gaussian characteristic peak. The optimal parameter set is determined based on the optimal parameters of each Gaussian characteristic peak; wherein, the optimal parameter set includes the peak position, variance, and weight of each sub-peak relative to the total peak area of each Gaussian characteristic peak.
[0006] Secondly, embodiments of this application also provide a spectral overlapping peak decomposition device, the device comprising: The acquisition module is used to perform a global search on X-ray fluorescence spectra using a particle swarm optimization algorithm (APU-PSO) with an adaptive parameter update strategy to obtain the initial parameters of a Gaussian mixture model (GMM). The initial parameters represent the globally optimal position obtained through the global search and include the peak position, variance, and weight of each sub-peak relative to the total peak area of the overlapping peaks. The Gaussian characteristic peaks represent the characteristic peaks in the X-ray fluorescence spectrum, and the Gaussian mixture model is used to model the overlapping peaks in the X-ray fluorescence spectrum as a superposition of multiple Gaussian characteristic peaks. The iterative module is used to iteratively optimize the parameters of the Gaussian mixture model based on the initial parameters using the expectation-maximization algorithm (EM) to obtain the optimal parameters of each Gaussian characteristic peak. The determination module is used to determine the optimal parameter set based on the optimal parameters of each Gaussian characteristic peak; wherein, the optimal parameter set includes the peak position, variance, and weight of each sub-peak relative to the total peak area of each Gaussian characteristic peak.
[0007] Thirdly, embodiments of this application also provide an electronic device, including: a processor, a storage medium, and a bus, wherein the storage medium stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor communicates with the storage medium via the bus, and the processor executes the machine-readable instructions to perform the spectral overlap peak decomposition method described in any of the first aspects.
[0008] Fourthly, embodiments of this application also provide a computer-readable storage medium storing a computer program, which, when executed by a processor, performs the spectral overlapping peak decomposition method described in any one of the first aspects.
[0009] The embodiments of this application have the following beneficial effects: The APU-PSO algorithm is used to perform a global search for overlapping peaks in X-ray fluorescence spectra to obtain the initial parameters of the Gaussian Mixture Model (GMM). This solves the problem that the EM algorithm is sensitive to initial parameters and is prone to getting trapped in local optima. Combined with the iterative optimization of GMM parameters by the EM algorithm, the peak position, variance and weight of each Gaussian characteristic peak can be accurately extracted, which significantly improves the accuracy and reliability of overlapping peak decomposition. It can be effectively applied to the decomposition of severely overlapping peaks in X-ray fluorescence spectra, providing high-quality data support for subsequent qualitative and quantitative elemental analysis. Attached Figure Description
[0010] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0011] Figure 1 This is a flowchart illustrating steps S101-S103 provided in the embodiments of this application; Figure 2 This is a flowchart illustrating steps S201-S205 provided in the embodiments of this application; Figure 3 This is a schematic diagram of the spectral overlap peak decomposition device provided in the embodiments of this application; Figure 4 This is a schematic diagram of the composition structure of the electronic device provided in the embodiments of this application. Detailed Implementation
[0012] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. It should be understood that the accompanying drawings in this application are for illustrative and descriptive purposes only and are not intended to limit the scope of protection of this application. Furthermore, it should be understood that the schematic drawings are not drawn to scale. The flowcharts used in this application illustrate operations implemented according to some embodiments of this application. It should be understood that the operations in the flowcharts may not be implemented in sequence, and steps without logical contextual relationships may be reversed or implemented simultaneously. In addition, those skilled in the art, guided by the content of this application, may add one or more other operations to the flowcharts, or remove one or more operations from the flowcharts.
[0013] In the following description, references are made to “some embodiments,” which describe a subset of all possible embodiments. However, it is understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.
[0014] Furthermore, the described embodiments are merely some, not all, of the embodiments of this application. The components of the embodiments of this application described and illustrated herein can typically be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely to illustrate selected embodiments of the application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.
[0015] In the following description, the terms "first, second, third" are used merely to distinguish similar objects and do not represent a specific ordering of objects. It is understood that "first, second, third" may be interchanged in a specific order or sequence where permitted, so that the embodiments of this application described herein can be implemented in an order other than that illustrated or described herein.
[0016] It should be noted that the term "comprising" will be used in the embodiments of this application to indicate the presence of the features declared thereafter, but does not exclude the addition of other features.
[0017] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application and is not intended to limit this application.
[0018] See Figure 1 , Figure 1 This is a flowchart illustrating steps S101-S103 of the spectral overlapping peak decomposition method provided in this application embodiment, which will be combined with... Figure 1 Steps S101-S103 shown will be explained.
[0019] In step S101, for the X-ray fluorescence spectrum, a global search is performed using the particle swarm optimization algorithm with an adaptive parameter update strategy (APU-PSO) to obtain the initial parameters of the Gaussian mixture model (GMM). The initial parameters represent the globally optimal position obtained through the global search. These initial parameters include the peak position, variance, and weight of each sub-peak relative to the total peak area of the overlapping peaks. The Gaussian characteristic peaks represent the characteristic peaks in the X-ray fluorescence spectrum. The Gaussian mixture model is used to model the overlapping peaks in the X-ray fluorescence spectrum as a superposition of multiple Gaussian characteristic peaks.
[0020] X-ray fluorescence spectroscopy is the spectrum formed by the characteristic X-rays emitted when an atom is excited by X-rays, creating vacancies in its inner-shell electrons, and then being filled by outer-shell electrons. In actual measurements, due to the aforementioned interference factors, the characteristic peaks in the spectrum often overlap. This application employs a Gaussian Mixture Model (GMM) to model these overlapping peaks. Because a single characteristic peak in an X-ray fluorescence spectrum can be approximated as a Gaussian peak, overlapping peaks can be considered as the superposition of multiple Gaussian characteristic peaks. For example, in samples containing iron and cobalt, the characteristic peaks of iron and cobalt may partially overlap in their X-ray fluorescence spectra. Using GMM, this overlapping peak can be represented as a superposition of the Gaussian characteristic peaks of iron and cobalt.
[0021] Particle Swarm Optimization (PSO) is a swarm intelligence-based optimization algorithm that simulates the foraging behavior of bird flocks. Traditional PSO algorithms are prone to getting trapped in local optima during the search process, while the APU-PSO algorithm used in this invention solves this problem by introducing an adaptive parameter update strategy.
[0022] When decomposing overlapping peaks in X-ray fluorescence spectroscopy, the APU-PSO algorithm first randomly initializes a swarm of particles. Each particle represents a set of initial parameter guesses for the Gaussian characteristic peaks in the overlapping peaks (i.e., the energy position of the characteristic peak in the spectrum, corresponding to the characteristic energy of the element), variance (reflecting the peak width, related to factors such as instrument resolution), and the weight of each sub-peak relative to the total peak area (related to elemental content). Then, the particles search the solution space by continuously adjusting their velocity and position. During the search, the APU-PSO algorithm adaptively adjusts parameters such as inertia weight and learning factor based on the particle fitness. For example, when the fitness values of the particle swarm tend to be concentrated, indicating a possible local optimum, increasing the inertia weight gives the particles a greater chance to escape the local region, enhancing global search capability; when the particle swarm is more dispersed, decreasing the inertia weight accelerates convergence. Simultaneously, the individual learning factor decreases with the number of iterations, encouraging particles to explore the global space more extensively; the social learning factor increases with the number of iterations, strengthening the tendency of particles to move towards the swarm optimum position, improving local search accuracy. When the maximum number of iterations is reached, the parameters corresponding to the globally optimal position found are the initial parameters of the GMM.
[0023] In step S102, based on the initial parameters, the parameters of the Gaussian mixture model are iteratively optimized using the expectation-maximization algorithm (EM) to obtain the optimal parameters for each Gaussian characteristic peak.
[0024] After obtaining the initial parameters of the Gaussian Mixture Model (GMM), the Expectation-Maximization (EM) algorithm is used for further optimization. The EM algorithm is an iterative algorithm suitable for estimating the parameters of probabilistic models containing latent variables. In overlapping peak decomposition, the Gaussian characteristic peak to which each data point belongs is unknown; this is the latent variable.
[0025] The EM algorithm consists of an E-step (expectation step) and an M-step (maximization step). In the E-step, latent variables are introduced to represent the probability that the i-th data point belongs to the k-th Gaussian peak. The posterior probabilities of these latent variables are calculated using the current Gaussian Mixture Model (GMM) parameters, thus estimating the likelihood of each data point belonging to each Gaussian peak based on the existing parameters. In the M-step, the posterior probabilities obtained in the E-step are used as weights to update the GMM parameters by maximizing the log-likelihood function. This includes recalculating the peak position of each Gaussian characteristic peak (using a weighted average of the data points to obtain a more accurate peak position estimate), the variance (updated based on the deviation between the weighted average data points and the peak position), and the weights (adjusted according to the proportion of the sum of the posterior probabilities corresponding to that Gaussian peak). The E-step and M-step are repeated until the maximum number of iterations is reached; the parameters obtained at this point are the optimal parameters for each Gaussian characteristic peak.
[0026] In step S103, an optimal parameter set is determined based on the optimal parameters of each Gaussian characteristic peak; wherein, the optimal parameter set includes the peak position, variance, and weight of each sub-peak relative to the total peak area of each Gaussian characteristic peak.
[0027] The initial parameters are obtained using the APU-PSO algorithm, and then optimized using the EM algorithm. The resulting optimal parameter set comprises the best parameters for each Gaussian characteristic peak. This optimal parameter set includes the accurate peak position, variance, and weight of each sub-peak relative to the total peak area for each Gaussian characteristic peak. These parameters are crucial for accurately decomposing overlapping peaks. For example, peak position clarifies the location of each element's characteristic peak, variance reflects peak broadening, and weights can be used to calculate the relative abundance of elements in subsequent quantitative analyses.
[0028] The above method can accurately decompose complex overlapping peaks into individual Gaussian characteristic peaks, providing a reliable data foundation for subsequent qualitative and quantitative analysis of X-ray fluorescence spectrometry, greatly improving the accuracy and reliability of the analysis results, and has broad application prospects in many fields that rely on X-ray fluorescence spectroscopy analysis, such as materials analysis, environmental monitoring, and geological exploration.
[0029] In some embodiments, the parameter settings of the particle swarm optimization algorithm APU-PSO include: particle population size P=50, and the parameter corresponding to the overlapping peak of the particle search space dimension. The peak positions of each Gaussian characteristic peak in the overlapping peaks are based on In other words, variance is expressed as... This indicates that the weight of each sub-peak in the total peak area is... This indicates that the position of each particle represents the peak position, variance, and weight of each sub-peak relative to the total peak area; the maximum number of iterations. Max_iter =50; Maximum inertia weight w max =0.9, minimum inertia weight w min =0.4; the maximum individual learning factor and maximum social learning factor are set to 2; the minimum individual learning factor and minimum social learning factor are set to 0.5; the maximum particle velocity is V max The value is 5, and the minimum speed is V min It is -5.
[0030] The population size P=50, representing the number of particles participating in the search. Setting it to 50 is a result that balances search efficiency and solution diversity. Too few particles may limit the search scope, making it difficult to find the global optimum; too many particles will increase computation and reduce algorithm efficiency. 50 particles ensure a certain search breadth, covering more possible parameter combinations, while completing iterations within an acceptable computational time.
[0031] The dimension is consistent with the parameter dimension of the Gaussian Mixture Model (GMM). The position of each particle corresponds to a set of GMM parameters, including the peak position, variance, and weight of each sub-peak in the total peak area of each Gaussian characteristic peak. This allows the particle search to directly target the key parameters required for the decomposition of overlapping peaks, ensuring that the search target is clear.
[0032] Maximum number of iterations Max_iter =50, the number of iterations determines the search depth of the algorithm. Setting it to 50 is a choice that balances computational cost while ensuring search effectiveness. Too few iterations may cause the algorithm to stop searching before finding a better solution; too many iterations will waste computational resources. 50 iterations allow the particle to fully explore the search space and gradually approach the globally optimal initial parameters.
[0033] Maximum inertia weight w max =0.9, minimum inertia weight w min =0.4, the inertia weight is used to balance the global exploration and local exploitation capabilities of particles. A larger inertia weight (e.g., 0.9) makes particles more likely to maintain their previous velocity, which is beneficial for expanding the search range, exploring new regions, and avoiding getting trapped in local optima; a smaller inertia weight (e.g., 0.4) makes particles more susceptible to the influence of group information, accelerating the convergence speed towards the optimal solution. By adaptively adjusting within the range of 0.4-0.9, the APU-PSO algorithm can flexibly switch between exploration and exploitation modes according to the search state.
[0034] The maximum individual learning factor and the maximum social learning factor are both 2, while the minimum individual learning factor and the minimum social learning factor are both 0.5. The individual learning factor reflects a particle's ability to learn from its own historical experience, while the social learning factor reflects a particle's ability to learn from the optimal experience of the group. Setting their range between 0.5 and 2 ensures that in the early stages of the search, the individual learning factor is larger, allowing particles to rely more on their own exploration of unknown regions; as iterations progress, the social learning factor increases, enabling particles to better utilize group information for localized, refined searches, thereby improving search efficiency and accuracy.
[0035] The maximum speed of the particle is V max The value is 5, and the minimum speed is V min The velocity limit of -5 prevents particles from escaping valuable search areas due to excessive speed or becoming stuck in local stagnation due to insufficient speed. A velocity range of ±5 ensures that particles have sufficient mobility to explore different parameter combinations while avoiding instability caused by excessive jumping, thus ensuring the algorithm searches efficiently within a reasonable range.
[0036] In some embodiments, see Figure 2 , Figure 2 This is a flowchart illustrating steps S201-S205 provided in the embodiments of this application. The step of performing a global search using the particle swarm optimization algorithm APU-PSO with an adaptive parameter update strategy to obtain the initial parameters of the Gaussian mixture model (GMM) can be achieved through steps S201-S205, which will be explained in conjunction with each step.
[0037] In step S201, particle positions and velocities are randomly initialized, the fitness value of each particle is calculated based on the log-likelihood function, and the initial particle position is set to the individual's historical best value. P best After sorting the particle fitness values, the position of the particle with the highest fitness value is selected as the initial global optimum position. g best ; Here, the random initialization of particle positions and velocities is the starting point of the APU-PSO algorithm. Particle positions correspond to a set of parameters in the GMM (peak position, variance, weights), while velocity represents the particle's movement trend in the parameter space. The initialization process ensures that particles are uniformly distributed within the search space, laying the foundation for the global search.
[0038] The fitness value of each particle is calculated based on the log-likelihood function. This function quantifies how well the current parameter combination fits the spectral data. The higher the fitness value, the more accurately the parameter combination describes the distribution characteristics of overlapping peaks. For example, when the Gaussian mixture model corresponding to the parameters of a certain particle is in high agreement with the measured overlapping peak data, its log-likelihood value will be significantly higher than that of other particles.
[0039] Set the initial particle position to the individual's historical best value. P best This means that each particle initially believes its own position is the current optimal solution; after sorting the fitness values of all particles, the position of the particle with the highest fitness value is selected as the initial global optimal position. g best This determines the optimal search direction for the entire particle swarm in the initial stage, providing a reference for subsequent iterations.
[0040] In step S202, the inertia weight is adaptively adjusted according to a specific formula. w When the fitness values of the particle swarm tend to be consistent, the inertia weight is increased to escape the local optimum; when the particle swarm disperses, the inertia weight is decreased to speed up the optimization process. Inertia weight ( wThe fitness value (QF) is a core parameter balancing the global exploration and local exploitation capabilities of the particle swarm. When the fitness values of the particle swarm tend to be consistent, it indicates that the algorithm may be trapped in a local optimum. In this case, increasing the QF weight allows the particles to retain more of their previous motion trends, thus increasing the probability of escaping the local optimum and exploring new parameter spaces. When the particle swarm disperses, decreasing the QF weight makes the particles more susceptible to being guided by individual and global optima, accelerating the convergence speed towards the optimal solution. This dynamic adjustment mechanism allows the APU-PSO algorithm to flexibly switch strategies according to the search state, avoiding both the inefficiency caused by blind exploration and the insufficient solution accuracy caused by premature convergence.
[0041] In step S203, the individual learning factors are adaptively updated. c 1. Social learning factor c 2. To enable the factor to change dynamically during the iteration process; Individual learning factors c 1. Social learning factor c The adaptive update in step 2 enables the factors to change dynamically throughout the iteration process. The individual learning factor reflects the particle's emphasis on its own historical experience, while the social learning factor reflects the particle's ability to learn from the group's optimal experience. In the early stages of iteration, the individual learning factor is larger and the social learning factor is smaller, indicating that particles tend to explore independently and expand the search range. As iteration progresses, the individual learning factor gradually decreases while the social learning factor gradually increases, indicating that particles tend to move closer to the group's optimal position and perform localized refined searches. This pattern of change allows the algorithm to efficiently cover potential optimal regions in the early stages of the search and to accurately optimize parameters in the later stages, significantly improving search efficiency and the quality of the final solution.
[0042] In step S204, the velocity and position of the particles are updated, and the fitness value of each particle is calculated after the update. Based on the updated fitness value of each particle, the optimal position of each particle is updated. P best and global optimal position g best ; The particle's velocity and position are updated based on its current velocity and its optimal individual position. P best ) and global optimal position ( g best Velocity updates integrate the particle's inertial motion, learning towards its own optimal position, and learning towards the swarm's optimal position. Position updates are determined by both the current position and the new velocity. This process allows the particle swarm to continuously adjust its trajectory in the parameter space, gradually approaching the global optimum. After each update, the fitness value of each particle is recalculated, and its individual optimal position is updated accordingly. P best ) and global optimal position ( gbest If a particle's current fitness value is better than its historical best, then update. P best If the maximum fitness value among all particles is better than the current fitness value... g best Then update g best This "survival of the fittest" mechanism ensures that the particle swarm always evolves in a better direction.
[0043] In step S205, when the number of iterations reaches the set maximum number of iterations, the global optimal position is output. g best Global optimal position g best The peak position, variance, and weight of each sub-peak in the overlapping peaks of the corresponding X-ray fluorescence spectrum are determined.
[0044] When the number of iterations reaches the set maximum number of iterations, the algorithm stops searching and outputs the current global optimum position. g best The parameters corresponding to this position are the peak position, variance, and weight of each sub-peak in the overlapping peaks of the X-ray fluorescence spectrum, which are the initial parameters of the GMM. These parameters are globally optimized by the APU-PSO algorithm, effectively avoiding the local optimum trap that may be caused by traditional random initialization, providing a reliable starting point for the subsequent fine optimization of parameters in the EM algorithm, and are a key prerequisite for ensuring the accuracy of overlapping peak decomposition.
[0045] In some embodiments, the log-likelihood function of the complete data is: ; in, Y This refers to the complete data, which is the training output sample set. N This indicates the number of samples in the training set. The likelihood function representing the complete data , Z im Indicates the first i Spectral data points belong to the first m The probability of a Gaussian characteristic peak, each data point originating from... k The sum of the probabilities of the Gaussian characteristic peaks is 1, that is... .
[0046] In some embodiments, the inertia weight is adaptively adjusted. w : ; in, f This represents the current particle's fitness value.f avg This represents the average fitness value of the particle swarm. f min This represents the minimum fitness value of the particle swarm.
[0047] In some embodiments, individual learning factors c 1. Social learning factor c 2. Perform adaptive updates in the following ways: ;
[0048] in, c 1max Represents the maximum individual learning factor. c 1min Represents the smallest individual learning factor. c 2max Represents the maximum social learning factor. c 2min Represents the minimum social learning factor. iter Indicates the number of iterations.
[0049] In some embodiments, the velocity and position of the particles are updated in the following manner: ; .
[0050] in, For the first i The particle in the first iter The speed is increased by 1 iteration; For the first i The particle in the first iter The speed of the number of iterations; For the first i The particle in the first iter Position with +1 iteration count; For the first i The particle in the first iter The position of the next iteration number; For the first i The particle to the first iter The optimal position of the individual found up to the nth iteration; For the first i The particle to the first iter The globally optimal position found up to the nth iteration; r 1 and r 2 is a random number in [0,1].
[0051] In some embodiments, the step of iteratively optimizing the parameters of the Gaussian mixture model using the expectation-maximization (EM) algorithm based on the initial parameters to obtain the optimal parameters for each Gaussian characteristic peak includes: The initial parameters are used as the starting point for iteration, and latent variables are introduced. Z Latent variables Z Used to indicate overlapping peak data x N Which Gaussian characteristic peak does it belong to? ; in, , Indicates the first i The spectral data point belongs to the _th ... m The probability of a Gaussian characteristic peak, each data point originating from... k The sum of the probabilities of the Gaussian characteristic peaks is 1, that is... .
[0052] The complete data is represented as [ x N , Z The likelihood function of the complete data is expressed as: ; The log-likelihood function for the complete data is: ; In the E-step, the objective cost function is expressed as: ; in, Indicates the first t The parameter set estimated in each iteration, wherein the objective cost function is based on the posterior probabilities of the latent variables. get; Under the parameters of the previous iteration, each sample data point x i Belongs to the m The posterior probability of a Gaussian characteristic peak r im Represented as: ; In the M-step, the process of maximizing the objective cost function to update the GMM parameters is defined as: ; Taking the partial derivative of the cost function with respect to the GMM parameters and setting the derivative to zero yields a new round of iterative values for each parameter, thus completing the M-step process; where the peak position of each Gaussian characteristic peak is... ,variance The weight of the Gaussian characteristic peak in the total peak area The iterative estimation formulas are expressed as follows: ; ; ; When the number of iterations reaches the set maximum number of iterations, the optimal parameters of each Gaussian characteristic peak are output.
[0053] In summary, the embodiments of this application have the following beneficial effects: (1) Improve the accuracy and reliability of parameter analysis.
[0054] Traditional EM algorithms are highly sensitive to initial parameters. Inappropriate initial values can easily lead to local optima, causing the decomposition results of overlapping peaks to deviate from the true characteristics. This application introduces the APU-PSO algorithm for global search, providing high-quality initial parameters for the EM algorithm. APU-PSO adaptively adjusts inertia weights, individual learning factors, and social learning factors. This allows it to increase inertia weights to escape local optima when particle swarm fitness converges, and decrease inertia weights to accelerate convergence when particles disperse. Simultaneously, the dynamic change of the learning factors balances global exploration and local exploitation capabilities. This optimization mechanism ensures that the searched initial parameters are closer to the global optimum, laying the foundation for accurate iteration of the EM algorithm. Ultimately, it significantly improves the accuracy and reliability of overlapping peak parameter (peak position, variance, weight) analysis, achieving accurate separation even for severely overlapping peaks with minimal energy differences.
[0055] (2) Overcome the defects of traditional optimization algorithms and enhance stability and efficiency.
[0056] Standard Particle Swarm Optimization (PSO) algorithms often suffer from premature convergence when dealing with complex optimization problems due to fixed parameters, leading to local optima and preventing the search from finding the global optimum. The APU-PSO algorithm proposed in this application overcomes this deficiency by dynamically adjusting the inertia weights and learning factors through an adaptive parameter update strategy. During the search process, the particle swarm maintains sufficient diversity to explore a wider solution space while converging quickly near the optimal solution, significantly improving the algorithm's stability and search efficiency. Compared to PSO, APU-PSO can find better initial parameters faster with the same number of iterations, reducing unnecessary computations and saving time for subsequent parameter optimization in the EM algorithm.
[0057] (3) It has strong universality and is applicable to spectral analysis in multiple scenarios.
[0058] This application combines the probabilistic modeling capabilities of Gaussian Mixture Models (GMMs) with the optimization capabilities of APU-PSO and EM algorithms to form a universal framework for decomposing overlapping peaks. It is applicable not only to X-ray fluorescence spectroscopy but also to other spectral analysis scenarios with peak overlap problems (such as Raman spectroscopy and fluorescence spectroscopy). Effective decomposition can be achieved simply by adjusting the parameter dimensions and range of the Gaussian mixture model according to the specific spectral characteristics. In practical applications, whether it's mineral composition analysis in mining resource exploration, pollutant detection in environmental monitoring, or material quality control in industrial production, this method can accurately extract characteristic information from overlapping peaks, providing reliable data support for qualitative and quantitative analysis of material composition, demonstrating strong versatility and scalability.
[0059] Based on the same inventive concept, this application also provides a spectral overlapping peak decomposition device corresponding to the spectral overlapping peak decomposition method in the first embodiment. Since the principle of the device in this application is similar to the above-mentioned spectral overlapping peak decomposition method, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be described again.
[0060] like Figure 3 As shown, Figure 3 This is a schematic diagram of the spectral overlapping peak decomposition device 300 provided in an embodiment of this application. The spectral overlapping peak decomposition device 300 includes: The acquisition module 301 is used to perform a global search on the X-ray fluorescence spectrum using a particle swarm optimization algorithm (APU-PSO) with an adaptive parameter update strategy to obtain the initial parameters of a Gaussian mixture model (GMM). The initial parameters represent the globally optimal position obtained through the global search, and include the peak position, variance, and weight of each sub-peak relative to the total peak area of the overlapping peaks. The Gaussian characteristic peaks represent the characteristic peaks in the X-ray fluorescence spectrum, and the Gaussian mixture model is used to model the overlapping peaks in the X-ray fluorescence spectrum as a superposition of multiple Gaussian characteristic peaks. The iteration module 302 is used to iteratively optimize the parameters of the Gaussian mixture model based on the initial parameters using the expectation-maximization algorithm (EM) to obtain the optimal parameters of each Gaussian characteristic peak. The determination module 303 is used to determine the optimal parameter set based on the optimal parameters of each Gaussian characteristic peak; wherein, the optimal parameter set includes the peak position, variance and weight of each sub-peak in the total peak area of each Gaussian characteristic peak.
[0061] Those skilled in the art should understand that Figure 3 The functions of each unit in the spectral overlapping peak decomposition device 300 shown can be understood by referring to the relevant description of the aforementioned spectral overlapping peak decomposition method. Figure 3The functions of each unit in the spectral overlap peak decomposition device 300 shown can be implemented by a program running on a processor or by specific logic circuits.
[0062] In one possible implementation, the parameter settings of the particle swarm optimization algorithm APU-PSO include: particle population size P=50, and the particle search space dimension corresponding to the overlapping peak parameter. The peak positions of each Gaussian characteristic peak in the overlapping peaks are based on In other words, variance is expressed as... This indicates that the weight of each sub-peak in the total peak area is... This indicates that the position of each particle represents the peak position, variance, and weight of each sub-peak relative to the total peak area; the maximum number of iterations. Max_iter =50; Maximum inertia weight w max =0.9, minimum inertia weight w min =0.4; the maximum individual learning factor and maximum social learning factor are set to 2; the minimum individual learning factor and minimum social learning factor are set to 0.5; the maximum particle velocity is V max The value is 5, and the minimum speed is V min It is -5.
[0063] In one possible implementation, the acquisition module 301 performs a global search using the particle swarm optimization algorithm APU-PSO with an adaptive parameter update strategy to acquire the initial parameters of the Gaussian mixture model (GMM), including: Randomly initialize particle positions and velocities, calculate the fitness value of each particle based on the log-likelihood function, and set the initial particle position to the individual's historical best value. P best After sorting the particle fitness values, the position of the particle with the highest fitness value is selected as the initial global optimum position. g best ; The inertia weight is adaptively adjusted according to a specific formula. w When the fitness values of the particle swarm tend to be consistent, the inertia weight is increased to escape the local optimum; when the particle swarm disperses, the inertia weight is decreased to speed up the optimization process. Adaptive update of individual learning factors c 1. Social learning factor c 2. To enable the factor to change dynamically during the iteration process; Update the velocity and position of the particles, calculate the updated fitness value of each particle, and update the optimal position of each particle based on the updated fitness value. P best and global optimal positiong best ; When the number of iterations reaches the set maximum number of iterations, output the globally optimal position. g best Global optimal position g best The peak position, variance, and weight of each sub-peak in the overlapping peaks of the corresponding X-ray fluorescence spectrum are determined.
[0064] In one possible implementation, the log-likelihood function of the complete data is: ; in, Y This refers to the complete data, which is the training output sample set. N This indicates the number of samples in the training set. The likelihood function representing the complete data , Z im Indicates the first i Spectral data points belong to the first m The probability of a Gaussian characteristic peak, each data point originating from... k The sum of the probabilities of the Gaussian characteristic peaks is 1, that is... .
[0065] In one possible implementation, the inertial weight w : ; in, f This represents the current particle's fitness value. f avg This represents the average fitness value of the particle swarm. f min This represents the minimum fitness value of the particle swarm.
[0066] In one possible implementation, the individual learning factor c 1. Social learning factor c 2. Perform adaptive updates in the following ways: ;
[0067] in, c 1max Represents the maximum individual learning factor. c 1min Represents the smallest individual learning factor. c 2max Represents the maximum social learning factor. c 2minRepresents the minimum social learning factor. iter Indicates the number of iterations.
[0068] In one possible implementation, the velocity and position of the particle are updated in the following way: ; .
[0069] in, For the first i The particle in the first iter The speed is increased by 1 iteration; For the first i The particle in the first iter The speed of the number of iterations; For the first i The particle in the first iter Position with +1 iteration count; For the first i The particle in the first iter The position of the next iteration number; For the first i The particle to the first iter The optimal position of the individual found up to the nth iteration; For the first i The particle to the first iter The globally optimal position found up to the nth iteration; r 1 and r 2 is a random number in [0,1].
[0070] In one possible implementation, the iteration module 302, based on the initial parameters, iteratively optimizes the parameters of the Gaussian mixture model using the expectation-maximization (EM) algorithm to obtain the optimal parameters for each Gaussian characteristic peak, including: The initial parameters are used as the starting point for iteration, and latent variables are introduced. Z Latent variables Z Used to indicate overlapping peak data x N Which Gaussian characteristic peak does it belong to? ; in, , Indicates the first i The spectral data point belongs to the _th ... m The probability of a Gaussian characteristic peak, each data point originating from... k The sum of the probabilities of the Gaussian characteristic peaks is 1, that is... .
[0071] The complete data is represented as [ xN , Z The likelihood function of the complete data is expressed as: ; The log-likelihood function for the complete data is: ; In the E-step, the objective cost function is expressed as: ; in, Indicates the first t The parameter set estimated in each iteration, wherein the objective cost function is based on the posterior probabilities of the latent variables. get; Under the parameters of the previous iteration, each sample data point x i Belongs to the m The posterior probability of a Gaussian characteristic peak r im Represented as: ; In the M-step, the process of maximizing the objective cost function to update the GMM parameters is defined as: ; Taking the partial derivative of the cost function with respect to the GMM parameters and setting the derivative to zero yields a new round of iterative values for each parameter, thus completing the M-step process; where the peak position of each Gaussian characteristic peak is... ,variance The weight of the Gaussian characteristic peak in the total peak area The iterative estimation formulas are expressed as follows: ; ; ; When the number of iterations reaches the set maximum number of iterations, the optimal parameters of each Gaussian characteristic peak are output.
[0072] The above-mentioned spectral overlap peak decomposition device has the following beneficial effects: (1) Improve the accuracy and reliability of parameter analysis.
[0073] Traditional EM algorithms are highly sensitive to initial parameters. Inappropriate initial values can easily lead to local optima, causing the decomposition results of overlapping peaks to deviate from the true characteristics. This application introduces the APU-PSO algorithm for global search, providing high-quality initial parameters for the EM algorithm. APU-PSO adaptively adjusts inertia weights, individual learning factors, and social learning factors. This allows it to increase inertia weights to escape local optima when particle swarm fitness converges, and decrease inertia weights to accelerate convergence when particles disperse. Simultaneously, the dynamic change of the learning factors balances global exploration and local exploitation capabilities. This optimization mechanism ensures that the searched initial parameters are closer to the global optimum, laying the foundation for accurate iteration of the EM algorithm. Ultimately, it significantly improves the accuracy and reliability of overlapping peak parameter (peak position, variance, weight) analysis, achieving accurate separation even for severely overlapping peaks with minimal energy differences.
[0074] (2) Overcome the defects of traditional optimization algorithms and enhance stability and efficiency.
[0075] Standard Particle Swarm Optimization (PSO) algorithms often suffer from premature convergence when dealing with complex optimization problems due to fixed parameters, leading to local optima and preventing the search from finding the global optimum. The APU-PSO algorithm proposed in this application overcomes this deficiency by dynamically adjusting the inertia weights and learning factors through an adaptive parameter update strategy. During the search process, the particle swarm maintains sufficient diversity to explore a wider solution space while converging quickly near the optimal solution, significantly improving the algorithm's stability and search efficiency. Compared to PSO, APU-PSO can find better initial parameters faster with the same number of iterations, reducing unnecessary computations and saving time for subsequent parameter optimization in the EM algorithm.
[0076] (3) It has strong universality and is applicable to spectral analysis in multiple scenarios.
[0077] This application combines the probabilistic modeling capabilities of Gaussian Mixture Models (GMMs) with the optimization capabilities of APU-PSO and EM algorithms to form a universal framework for decomposing overlapping peaks. It is applicable not only to X-ray fluorescence spectroscopy but also to other spectral analysis scenarios with peak overlap problems (such as Raman spectroscopy and fluorescence spectroscopy). Effective decomposition can be achieved simply by adjusting the parameter dimensions and range of the Gaussian mixture model according to the specific spectral characteristics. In practical applications, whether it's mineral composition analysis in mining resource exploration, pollutant detection in environmental monitoring, or material quality control in industrial production, this method can accurately extract characteristic information from overlapping peaks, providing reliable data support for qualitative and quantitative analysis of material composition, demonstrating strong versatility and scalability.
[0078] like Figure 4 As shown, Figure 4This is a schematic diagram of the composition structure of the electronic device 400 provided in the embodiments of this application. The electronic device 400 includes: The device 400 includes a processor 401, a storage medium 402, and a bus 403. The storage medium 402 stores machine-readable instructions that can be executed by the processor 401. When the electronic device 400 is running, the processor 401 communicates with the storage medium 402 via the bus 403. The processor 401 executes the machine-readable instructions to perform the steps of the spectral overlapping peak decomposition method described in the embodiments of this application.
[0079] In practical applications, the various components in the electronic device 400 are coupled together via a bus 403. It is understood that the bus 403 is used to achieve communication between these components. In addition to a data bus, the bus 403 also includes a power bus, a control bus, and a status signal bus. However, for clarity, in... Figure 4 The general designated all buses as Bus 403.
[0080] The above-mentioned electronic devices have the following beneficial effects: (1) Improve the accuracy and reliability of parameter analysis.
[0081] Traditional EM algorithms are highly sensitive to initial parameters. Inappropriate initial values can easily lead to local optima, causing the decomposition results of overlapping peaks to deviate from the true characteristics. This application introduces the APU-PSO algorithm for global search, providing high-quality initial parameters for the EM algorithm. APU-PSO adaptively adjusts inertia weights, individual learning factors, and social learning factors. This allows it to increase inertia weights to escape local optima when particle swarm fitness converges, and decrease inertia weights to accelerate convergence when particles disperse. Simultaneously, the dynamic change of the learning factors balances global exploration and local exploitation capabilities. This optimization mechanism ensures that the searched initial parameters are closer to the global optimum, laying the foundation for accurate iteration of the EM algorithm. Ultimately, it significantly improves the accuracy and reliability of overlapping peak parameter (peak position, variance, weight) analysis, achieving accurate separation even for severely overlapping peaks with minimal energy differences.
[0082] (2) Overcome the defects of traditional optimization algorithms and enhance stability and efficiency.
[0083] Standard Particle Swarm Optimization (PSO) algorithms often suffer from premature convergence when dealing with complex optimization problems due to fixed parameters, leading to local optima and preventing the search from finding the global optimum. The APU-PSO algorithm proposed in this application overcomes this deficiency by dynamically adjusting the inertia weights and learning factors through an adaptive parameter update strategy. During the search process, the particle swarm maintains sufficient diversity to explore a wider solution space while converging quickly near the optimal solution, significantly improving the algorithm's stability and search efficiency. Compared to PSO, APU-PSO can find better initial parameters faster with the same number of iterations, reducing unnecessary computations and saving time for subsequent parameter optimization in the EM algorithm.
[0084] (3) It has strong universality and is applicable to spectral analysis in multiple scenarios.
[0085] This application combines the probabilistic modeling capabilities of Gaussian Mixture Models (GMMs) with the optimization capabilities of APU-PSO and EM algorithms to form a universal framework for decomposing overlapping peaks. It is applicable not only to X-ray fluorescence spectroscopy but also to other spectral analysis scenarios with peak overlap problems (such as Raman spectroscopy and fluorescence spectroscopy). Effective decomposition can be achieved simply by adjusting the parameter dimensions and range of the Gaussian mixture model according to the specific spectral characteristics. In practical applications, whether it's mineral composition analysis in mining resource exploration, pollutant detection in environmental monitoring, or material quality control in industrial production, this method can accurately extract characteristic information from overlapping peaks, providing reliable data support for qualitative and quantitative analysis of material composition, demonstrating strong versatility and scalability.
[0086] This application also provides a computer-readable storage medium storing executable instructions, which, when executed by at least one processor 401, implement the spectral overlap peak decomposition method described in this application.
[0087] In some embodiments, the storage medium may be a magnetic random access memory (FRAM), a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a flash memory, a magnetic surface memory, an optical disc, or a compact disc read-only memory (CD-ROM), etc.; or it may be a device that includes one or any combination of the above-mentioned memories.
[0088] In some embodiments, executable instructions may take the form of a program, software, software module, script, or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as a standalone program or as a module, component, subroutine, or other unit suitable for use in a computing environment.
[0089] As an example, executable instructions may, but do not necessarily, correspond to files in the file system. They may be stored as part of a file that holds other programs or data, for example, in one or more scripts in a HyperText Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple collaborating files (e.g., a file that stores one or more modules, subroutines, or code sections).
[0090] As an example, executable instructions can be deployed to execute on a single computing device, or on multiple computing devices located in one location, or on multiple computing devices distributed across multiple locations and interconnected via a communication network.
[0091] The aforementioned computer-readable storage media have the following beneficial effects: (1) Improve the accuracy and reliability of parameter analysis.
[0092] Traditional EM algorithms are highly sensitive to initial parameters. Inappropriate initial values can easily lead to local optima, causing the decomposition results of overlapping peaks to deviate from the true characteristics. This application introduces the APU-PSO algorithm for global search, providing high-quality initial parameters for the EM algorithm. APU-PSO adaptively adjusts inertia weights, individual learning factors, and social learning factors. This allows it to increase inertia weights to escape local optima when particle swarm fitness converges, and decrease inertia weights to accelerate convergence when particles disperse. Simultaneously, the dynamic change of the learning factors balances global exploration and local exploitation capabilities. This optimization mechanism ensures that the searched initial parameters are closer to the global optimum, laying the foundation for accurate iteration of the EM algorithm. Ultimately, it significantly improves the accuracy and reliability of overlapping peak parameter (peak position, variance, weight) analysis, achieving accurate separation even for severely overlapping peaks with minimal energy differences.
[0093] (2) Overcome the defects of traditional optimization algorithms and enhance stability and efficiency.
[0094] Standard Particle Swarm Optimization (PSO) algorithms often suffer from premature convergence when dealing with complex optimization problems due to fixed parameters, leading to local optima and preventing the search from finding the global optimum. The APU-PSO algorithm proposed in this application overcomes this deficiency by dynamically adjusting the inertia weights and learning factors through an adaptive parameter update strategy. During the search process, the particle swarm maintains sufficient diversity to explore a wider solution space while converging quickly near the optimal solution, significantly improving the algorithm's stability and search efficiency. Compared to PSO, APU-PSO can find better initial parameters faster with the same number of iterations, reducing unnecessary computations and saving time for subsequent parameter optimization in the EM algorithm.
[0095] (3) It has strong universality and is applicable to spectral analysis in multiple scenarios.
[0096] This application combines the probabilistic modeling capabilities of Gaussian Mixture Models (GMMs) with the optimization capabilities of APU-PSO and EM algorithms to form a universal framework for decomposing overlapping peaks. It is applicable not only to X-ray fluorescence spectroscopy but also to other spectral analysis scenarios with peak overlap problems (such as Raman spectroscopy and fluorescence spectroscopy). Effective decomposition can be achieved simply by adjusting the parameter dimensions and range of the Gaussian mixture model according to the specific spectral characteristics. In practical applications, whether it's mineral composition analysis in mining resource exploration, pollutant detection in environmental monitoring, or material quality control in industrial production, this method can accurately extract characteristic information from overlapping peaks, providing reliable data support for qualitative and quantitative analysis of material composition, demonstrating strong versatility and scalability.
[0097] In the several embodiments provided in this application, it should be understood that the disclosed methods and electronic devices can be implemented in other ways. The device embodiments described above are merely illustrative. For example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods, such as: multiple units or components may be combined, or integrated into another system, or some features may be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the various components shown or discussed may be through some interfaces, and the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.
[0098] The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0099] In addition, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0100] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a processor-executable, non-volatile, computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, a platform server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, ROM, RAM, magnetic disks, or optical disks.
[0101] The above are merely specific embodiments of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A method for decomposing spectral overlapping peaks, characterized in that, The method includes: For X-ray fluorescence spectra, a global search is performed using the particle swarm optimization algorithm (APU-PSO) with an adaptive parameter update strategy to obtain the initial parameters of a Gaussian mixture model (GMM). These initial parameters represent the globally optimal position obtained through the global search and include the peak position, variance, and weight of each sub-peak relative to the total peak area among the overlapping peaks. The Gaussian characteristic peaks represent the characteristic peaks in the X-ray fluorescence spectrum, and the Gaussian mixture model is used to model the overlapping peaks in the X-ray fluorescence spectrum as a superposition of multiple Gaussian characteristic peaks. Based on the initial parameters, the parameters of the Gaussian mixture model are iteratively optimized using the expectation-maximization (EM) algorithm to obtain the optimal parameters for each Gaussian characteristic peak. The optimal parameter set is determined based on the optimal parameters of each Gaussian characteristic peak; wherein, the optimal parameter set includes the peak position, variance, and weight of each sub-peak relative to the total peak area of each Gaussian characteristic peak.
2. The method according to claim 1, characterized in that, The parameter settings for the particle swarm optimization algorithm APU-PSO include: particle population size P=50, and the parameter corresponding to the overlapping peak of the particle search space dimension. The peak positions of each Gaussian characteristic peak in the overlapping peaks are based on In other words, variance is expressed as... This indicates that the weight of each sub-peak in the total peak area is... This indicates that the position of each particle represents the peak position, variance, and weight of each sub-peak relative to the total peak area of the characteristic peak; the maximum number of iterations Max_iter=50; and the maximum inertia weight w. max =0.9, minimum inertia weight w min =0.4; the maximum individual learning factor and the maximum social learning factor are set to 2; the minimum individual learning factor and the minimum social learning factor are set to 0.5; the maximum particle velocity is V. max The value is 5, and the minimum speed is V. min It is -5.
3. The method according to claim 2, characterized in that, The initial parameters of the Gaussian Mixture Model (GMM) are obtained through a global search using the Particle Swarm Optimization (APU-PSO) algorithm with an adaptive parameter update strategy, including: Randomly initialize particle positions and velocities, calculate the fitness value of each particle based on the log-likelihood function, and set the initial particle position to the individual's historical best value. P best After sorting the particle fitness values, the position of the particle with the highest fitness value is selected as the initial global optimum position. g best ; The inertia weight is adaptively adjusted according to a specific formula. w When the fitness values of the particle swarm tend to be consistent, the inertia weight is increased to escape the local optimum; when the particle swarm disperses, the inertia weight is decreased to speed up the optimization process. Adaptive update of individual learning factors c 1. Social learning factor c 2. To enable the factor to change dynamically during the iteration process; Update the velocity and position of the particles, calculate the updated fitness value of each particle, and update the optimal position of each particle based on the updated fitness value. P best and global optimal position g best ; When the number of iterations reaches the set maximum number of iterations, output the globally optimal position. g best Global optimal position g best The peak position, variance, and weight of each sub-peak in the overlapping peaks of the corresponding X-ray fluorescence spectrum are determined.
4. The method according to claim 3, characterized in that, The log-likelihood function for the complete data is: ; in, Y This refers to the complete data, which is the training output sample set. N This indicates the number of samples in the training set. The likelihood function representing the complete data , Z im Indicates the first i Spectral data points belong to the first m The probability of a Gaussian characteristic peak, each data point originating from... k The sum of the probabilities of the Gaussian characteristic peaks is 1, that is... .
5. The method according to claim 3, characterized in that, The inertial weight w : ; in, f This represents the current particle's fitness value. f avg This represents the average fitness value of the particle swarm. f min This represents the minimum fitness value of the particle swarm.
6. The method according to claim 3, characterized in that, The individual learning factor c 1. Social learning factor c 2. Perform adaptive updates in the following ways: ; in, c 1max Represents the maximum individual learning factor. c 1min Represents the smallest individual learning factor. c 2max Represents the maximum social learning factor. c 2min Represents the minimum social learning factor. iter Indicates the number of iterations.
7. The method according to claim 3, characterized in that, The velocity and position of the particles are updated in the following way: ; ; in, For the first i The particle in the first iter The speed of +1 iterations; For the first i The particle in the first iter The speed of the number of iterations; For the first i The particle in the first iter Position with +1 iteration count; For the first i The particle in the first iter The position of the next iteration number; For the first i The particle to the first iter The optimal position of the individual found up to the nth iteration; For the first i The particle to the first iter The globally optimal position found up to the nth iteration; r 1 and r 2 is a random number in [0,1].
8. The method according to claim 3, characterized in that, Based on the initial parameters, the parameters of the Gaussian mixture model are iteratively optimized using the expectation-maximization (EM) algorithm to obtain the optimal parameters for each Gaussian characteristic peak, including: The initial parameters are used as the starting point for iteration, and latent variables are introduced. Z Latent variables Z Used to indicate overlapping peak data x N Which Gaussian characteristic peak does it belong to? ; in, , Indicates the first i The spectral data point belongs to the _th ... m The probability of a Gaussian characteristic peak, each data point originating from... k The sum of the probabilities of the Gaussian characteristic peaks is 1, that is... ; The complete data is represented as [ x N , Z The likelihood function of the complete data is expressed as: ; The log-likelihood function for the complete data is: ; In the E-step, the objective cost function is expressed as: ; in, Indicates the first t The parameter set estimated in each iteration, wherein the objective cost function is based on the posterior probabilities of the latent variables. get; Under the parameters of the previous iteration, each sample data point x i Belongs to the m The posterior probability of a Gaussian characteristic peak r im Represented as: ; In the M-step, the process of maximizing the objective cost function to update the GMM parameters is defined as: ; Taking the partial derivative of the cost function with respect to the GMM parameters and setting the derivative to zero yields a new round of iterative values for each parameter, thus completing the M-step process; where the peak position of each Gaussian characteristic peak is... ,variance The weight of the Gaussian characteristic peak in the total peak area The iterative estimation formulas are expressed as follows: ; ; ; When the number of iterations reaches the set maximum number of iterations, the optimal parameters of each Gaussian characteristic peak are output.
9. A device for decomposing spectral overlapping peaks, characterized in that, The device includes: The acquisition module is used to perform a global search on X-ray fluorescence spectra using a particle swarm optimization algorithm (APU-PSO) with an adaptive parameter update strategy to obtain the initial parameters of a Gaussian mixture model (GMM). The initial parameters represent the globally optimal position obtained through the global search and include the peak position, variance, and weight of each sub-peak relative to the total peak area of the overlapping peaks. The Gaussian characteristic peaks represent the characteristic peaks in the X-ray fluorescence spectrum, and the Gaussian mixture model is used to model the overlapping peaks in the X-ray fluorescence spectrum as a superposition of multiple Gaussian characteristic peaks. The iterative module is used to iteratively optimize the parameters of the Gaussian mixture model based on the initial parameters using the expectation-maximization algorithm (EM) to obtain the optimal parameters of each Gaussian characteristic peak. The determination module is used to determine the optimal parameter set based on the optimal parameters of each Gaussian characteristic peak; wherein, the optimal parameter set includes the peak position, variance and weight of each sub-peak in the total peak area of each Gaussian characteristic peak.
10. An electronic device, characterized in that, include: The device includes a processor, a storage medium, and a bus, wherein the storage medium stores machine-readable instructions executable by the processor, and when the electronic device is in operation, the processor communicates with the storage medium via the bus, and the processor executes the machine-readable instructions to perform the spectral overlap peak decomposition method as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Particle swarm optimization based spectral overlapping peak decomposition method
CN107871155A
Grey wolf optimization algorithm based on clustering multi-strategy ensemble learning
CN117808033A
Distribution transformer load prediction method based on multi-scale fluctuation mode adaptive decomposition
CN119740016A
Neural architecture searching method based on diffusion evolutionary algorithm
CN119886226A
RFID tag positioning error correction method based on deep learning
CN120671695A