Mass spectrometer parameter optimization method and device, equipment and storage medium
The improved differential evolution algorithm optimizes the mass spectrometer parameters, which solves the complex and time-consuming problem of mass spectrometer tuning process, achieves more efficient parameter optimization, and improves debug optimization efficiency and results.
Patent Information
- Application Number
- CN202510331303.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-20
- Publication Date
- 2025-04-18
- Estimated Expiration
- 2045-03-20
AI Technical Summary
The tuning process of mass spectrometer is complicated, time-consuming and labor-intensive, and the multi-parameters are correlated with each other and have a great impact, resulting in the complex problem of multi-objective optimization.
The improved differential evolution algorithm is used to iteratively update the mass spectrometer parameters. By obtaining the initial target population, sub-population division and mutation operations are performed, combining cross and selection operations until the iterative update end condition is met.
The speed and accuracy of mass spectrometer parameter optimization are improved, the time and personnel cost of the tuning process are reduced, and the debugging optimization efficiency and results are improved.
Smart Images

Figure CN119849541A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of analytical instruments, and in particular to a mass spectrometer parameter optimization method, device, equipment and storage medium. Background Art
[0002] A mass spectrometer is an instrument that separates and detects the composition of substances based on the mass-to-charge ratio of ions. It has the characteristics of high sensitivity and strong specificity. It can be widely used in organic chemistry, biology, geochemistry, nuclear industry, materials science, environmental science, medicine and health, food chemistry, petrochemical industry, as well as special analysis such as space technology and public security work.
[0003] Mass spectrometers are relatively complex large instruments. During their production and use, they often need to adjust multiple electrical and gas path parameters in order to obtain the best state of the instrument. This process is called the tuning process of the mass spectrometer. During the debugging of the mass spectrometer, the multiple parameters that need to be adjusted are interrelated and have an impact on each other. This problem can be summarized as a multi-objective (i.e., multi-parameter combination) optimization problem. Multi-objective optimization problems often have a complex optimization process, which is time-consuming and labor-intensive. Summary of the invention
[0004] In view of this, the present invention provides a mass spectrometer parameter optimization method, device, equipment and storage medium to solve the problem that the mass spectrometer tuning process is complicated, time-consuming and labor-intensive.
[0005] In a first aspect, the present invention provides a method for optimizing mass spectrometer parameters, the method comprising: Acquire an initialized target population, wherein the individuals in the target population are multidimensional vectors, and the multidimensional vector is a vector composed of a combination of multiple mass spectrometer parameters; Using an improved differential evolution algorithm, iteratively updating the individuals in the target population until one of the following iterative update termination conditions is met: the number of iterations reaches a first set value, and the number of times the optimal fitness value is not updated continuously reaches a second set value; wherein the optimal fitness value is the optimal value among the fitness values corresponding to each of the individuals in the latest target population, and the fitness value corresponding to the individual is determined based on the mass spectrum peak intensity value corresponding to the individual; The mass spectrometer parameters in the optimal individual corresponding to the optimal fitness value are determined as the optimal mass spectrometer parameters.
[0006] In an optional embodiment, the mass spectrum peak intensity value corresponding to the individual is calculated by the following method: Get the initial value of the mass axis and the initial value of the mass resolution; Based on the target value and the initial value of the mass axis, adjust the first voltage value corresponding to the mass axis; based on the adjusted first voltage value, obtain the corresponding current value of the mass axis; if the deviation between the current value of the mass axis and the target value of the mass axis does not satisfy the first termination condition, continue to adjust the first voltage value based on the target value of the mass axis and the current value of the mass axis until the deviation between the latest current value of the mass axis and the target value of the mass axis satisfies the first termination condition; Based on the target value and the initial value of the mass resolution, adjust the second voltage value corresponding to the mass resolution; based on the adjusted second voltage value, obtain the corresponding current value of the mass resolution; if the deviation between the current value of the mass resolution and the target value of the mass resolution does not satisfy the second termination condition, continue to adjust the second voltage value based on the target value of the mass resolution and the current value of the mass resolution until the deviation between the latest current value of the mass resolution and the target value of the mass resolution satisfies the second termination condition; When the deviation between the current value of the mass axis and the target value of the mass axis satisfies the first termination condition, and the deviation between the current value of the mass resolution and the target value of the mass resolution satisfies the second termination condition, the corresponding mass spectrum peak intensity value is acquired based on the current value of the mass axis and the current value of the mass resolution.
[0007] In an optional embodiment, the mass spectrum peak intensity value is the intensity value of a single typical mass spectrum peak; or, The mass spectrum peak intensity values include intensity values of typical mass spectrum peaks in multiple different mass number ranges.
[0008] In an optional implementation, the iterative updating of individuals in the target population using an improved differential evolution algorithm includes: In the current iterative update process, the individuals in the target population are divided into sub-populations according to the fitness values corresponding to the individuals to obtain multiple sub-populations; A mutation operation is performed on a target individual to obtain a corresponding mutant individual; the mutation operation used is different for different subpopulations to which the target individual belongs; Performing a crossover operation on the variant individual and the target individual corresponding to the variant individual to obtain a corresponding test individual; If the fitness value corresponding to the test individual is better than the corresponding target individual, the test individual is used to replace the target individual.
[0009] In an optional implementation, in the current iterative update process, the individuals in the target population are divided into subpopulations according to the fitness values corresponding to the individuals to obtain multiple subpopulations, including: Determine the number of individuals corresponding to each of the subpopulations based on the iteration stage to which the current iteration update belongs; the iteration stage is a stage divided according to the number of iterations; According to the number of individuals corresponding to each of the sub-populations and the fitness values corresponding to the individuals, the individuals in the target population are divided into the corresponding sub-populations.
[0010] In an optional implementation, as the iteration phase progresses, the number of the individuals of the first subpopulation in the subpopulation gradually increases, and the fitness values of the individuals of the first subpopulation are better than the fitness values of the individuals of other subpopulations.
[0011] In an optional implementation, in subpopulations other than the first subpopulation, the number of individuals in the final iteration stage is less than that in the initial iteration stage.
[0012] In an optional implementation, the multiple subpopulations include a first subpopulation, a second subpopulation, and a third subpopulation, and the fitness value of the individuals in the first subpopulation is better than the fitness value of the individuals in the second subpopulation, and the fitness value of the individuals in the second subpopulation is better than the fitness value of the individuals in the third subpopulation; The step of performing a mutation operation on a target individual to obtain a corresponding mutant individual includes: If the target individual belongs to the first subpopulation, a first mutation operation is adopted, wherein the first mutation operation is: randomly searching near the current optimal individual, and as the iteration process proceeds, the range of the random search near the current optimal individual is gradually reduced; If the target individual belongs to the second subpopulation, a second mutation operation is adopted, wherein the second mutation operation is: moving toward the direction of the current optimal individual while taking into account random direction search; If the target individual belongs to the third sub-population, a third mutation operation is adopted, and the third mutation operation is: randomly generating a new individual in the global scope.
[0013] In an optional implementation, the formula corresponding to the first mutation operation is:
[0014] in, For the The first iteration The variant individuals corresponding to the target individuals, is the current optimal individual, For the The first iteration , individual; , , is a constant coefficient, For is a decreasing function of the independent variable.
[0015] In an optional embodiment, ,in, is the first set value.
[0016] In an optional implementation, the formula corresponding to the second mutation operation is:
[0017] in, For the The first iteration The target individual The corresponding variant individuals, is the current optimal individual, For the The first iteration , Individuals, is a constant coefficient, For is a function of the independent variable.
[0018] In a second aspect, the present invention provides a mass spectrometer parameter optimization device, the device comprising: An initialization population acquisition module is used to acquire an initialized target population, wherein the individuals in the target population are multidimensional vectors, and the multidimensional vector is a vector composed of a combination of multiple mass spectrometer parameters; An individual updating module, used to iteratively update the individuals in the target population using an improved differential evolution algorithm until one of the following iterative update termination conditions is met: the number of iterations reaches a first set value, and the number of times the optimal fitness value is continuously not updated reaches a second set value; wherein the optimal fitness value is the optimal value among the fitness values corresponding to each of the individuals in the latest target population, and the fitness value corresponding to the individual is determined based on the mass spectrum peak intensity value corresponding to the individual; The determination module is used to determine the mass spectrometer parameters in the optimal individual corresponding to the optimal fitness value as the optimal mass spectrometer parameters.
[0019] In a third aspect, the present invention provides a computer device, comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the mass spectrometer parameter optimization method of the first aspect or any corresponding embodiment thereof by executing the computer instructions.
[0020] In a fourth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the mass spectrometer parameter optimization method of the first aspect or any corresponding embodiment thereof.
[0021] In a fifth aspect, the present invention provides a computer program product, comprising computer instructions for causing a computer to execute the mass spectrometer parameter optimization method of the first aspect or any corresponding embodiment thereof.
[0022] The mass spectrometer parameter optimization method, device, equipment and storage medium provided in the embodiments of the present invention realize multi-parameter combination optimization by introducing an intelligent optimization algorithm, specifically an improved differential evolution algorithm, thereby improving the speed and accuracy of parameter optimization and saving time and personnel costs. The embodiments of the present invention can be used in the debugging and optimization process of mass spectrometer test devices, as well as in functional modules such as automatic tuning in mass spectrometer product software, to improve debugging and optimization efficiency and debugging and optimization results, and have high practical value and industrialization value. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the related technologies, the drawings required for use in the specific embodiments or the related technical descriptions will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0024] Figure 1 is a schematic flow chart of a mass spectrometer parameter optimization method according to an embodiment of the present invention; Figure 2 is a trend graph showing how the maximum value of the mass spectrum peak intensity value of an individual in a target population changes with the number of iterations according to an embodiment of the present invention; Figure 3 is a process schematic diagram of another mass spectrometer parameter optimization method according to an embodiment of the present invention; Figure 4 is a structural block diagram of a mass spectrometer parameter optimization device according to an embodiment of the present invention; Figure 5 It is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0025] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0026] According to an embodiment of the present invention, an embodiment of a mass spectrometer parameter optimization method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of executable computer instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0027] In this embodiment, a mass spectrometer parameter optimization method is provided, which can be used in various computer devices. Figure 1 is a flow chart of a method for optimizing mass spectrometer parameters according to an embodiment of the present invention. Figure 1 As shown, the process includes the following steps: Step S101, obtaining an initialized target population, where individuals in the target population are multidimensional vectors, and the multidimensional vector is a vector composed of a combination of multiple mass spectrometer parameters, that is, a parameter vector.
[0028] Specifically, the number of individuals in the target population can be N , an individual can be a D dimensional vector, that is, the individual is composed of D The parameter vector composed of the mass spectrometer parameters ( , is the number of iterations currently completed). The initialized target population can be randomly generated, that is, randomly selected from the given boundary constraints, which can be expressed as:
[0029] in, For the The first The initial value of the dimension parameter, For the The upper and lower limits of the dimension parameter, rand[0,1] represents a uniform random number generated before [0,1].
[0030] In an optional embodiment, the plurality of mass spectrometer parameters may be a plurality of ion lens (ie, ion transmission system) parameters, for example, including a declustering voltage V DP , Interface guide DC voltage VQ , interface guide output voltage V EXIT , ion guide lens voltage V EP In other embodiments, the mass spectrometer parameters are not limited to ion lens parameters, and may be, for example, parameters of a quadrupole ion guide structure.
[0031] Step S102, using an improved differential evolution algorithm, iteratively update the individuals in the target population until one of the following iterative update termination conditions is met: the number of iterations reaches a first set value, and the number of times the optimal fitness value has not been updated continuously reaches a second set value; wherein the optimal fitness value is the optimal value among the fitness values corresponding to each individual in the latest target population, and the fitness value corresponding to the individual is determined based on the mass spectrum peak intensity value corresponding to the individual. The first set value is the maximum number of iterations G. Figure 2 The trend graph shown is a graph of the maximum value of the mass spectrum peak intensity value changing with the number of iterations. During the iterative optimization process of the target population, the overall trend of the maximum value of the mass spectrum peak intensity value becomes larger with the increase of the number of iterations.
[0032] For each individual, each update needs to calculate the corresponding fitness value to determine the optimal fitness value after each iterative update. In some specific implementations, the calculation of the individual fitness value is also an iterative cycle process, as follows: Step S102a, obtaining the initial value of the mass axis and the initial value of the mass resolution. Specifically, the initial value of the mass axis and the mass resolution may be the mass axis value and the mass resolution value corresponding to when the mass axis and the resolution of the back-end mass analyzer have been debugged.
[0033] Step S102b, based on the target value and initial value of the mass axis, adjust the first voltage value corresponding to the mass axis; based on the adjusted first voltage value, obtain the corresponding current value of the mass axis; if the deviation between the current value of the mass axis and the target value of the mass axis does not meet the first termination condition, continue to adjust the first voltage value based on the target value of the mass axis and the current value of the mass axis until the deviation between the latest current value of the mass axis and the target value of the mass axis meets the first termination condition.
[0034] Based on the target value of the mass axis and the current value of the mass axis, the process of adjusting the first voltage value is expressed by the following formula:
[0035] in, is the first voltage value after current adjustment, i.e. A first voltage value obtained by iterative adjustment; is the current first voltage value, that is, A first voltage value obtained by iterative adjustment; is the coefficient; is the target value of the mass axis; For the The mass axis value after iteration adjustment.
[0036] In addition, the first termination condition may be, for example: or etc., among which, is the current value of the quality axis obtained based on the adjusted first voltage, i.e. The mass axis value after iteration adjustment.
[0037] The target value of the mass axis and the first termination condition may be determined based on the factory requirements of the mass spectrometer.
[0038] Step S102c, based on the target value and initial value of the mass resolution, adjusting the second voltage value corresponding to the mass resolution; based on the adjusted second voltage value, obtaining the corresponding current value of the mass resolution; if the deviation between the current value of the mass resolution and the target value of the mass resolution does not satisfy the second termination condition, continuing to adjust the second voltage value based on the target value of the mass resolution and the current value of the mass resolution until the deviation between the latest current value of the mass resolution and the target value of the mass resolution satisfies the second termination condition.
[0039] Based on the target value of the mass resolution and the current value of the mass resolution, the process of adjusting the second voltage value is expressed by the following formula:
[0040] in, is the second voltage value after current adjustment, i.e. A second voltage value obtained by iterative adjustment; is the current second voltage value, i.e. A second voltage value obtained by iterative adjustment; is the coefficient; is the target value of mass resolution; For the The mass resolution value after the iteration adjustment.
[0041] In addition, the second termination condition may be, for example: or, etc., among which, is the current value of the mass resolution obtained based on the adjusted second voltage, i.e. The mass resolution value after the iteration adjustment. The target value of mass resolution For example, it may be 0.7 or 0.75.
[0042] The target value of the mass resolution and the second termination condition may be determined based on the factory requirements of the mass spectrometer.
[0043] The execution order of the iterative adjustment step of the mass axis and the iterative adjustment step of the mass resolution is not limited, and they can be executed one after the other or simultaneously.
[0044] Step S102d, when the deviation between the current value of the mass axis and the target value of the mass axis satisfies the first termination condition, and the deviation between the current value of the mass resolution and the target value of the mass resolution satisfies the second termination condition, the corresponding mass spectrum peak intensity value is obtained based on the current value of the mass axis and the current value of the mass resolution.
[0045] Step S102e, determining the corresponding fitness value based on the mass spectrum peak intensity value.
[0046] The calculation method of the individual fitness value provided in the embodiment of the present invention is applicable to the automatic optimization process of the mass spectrometer ion lens parameters. Before starting the automatic optimization process of the mass spectrometer ion lens parameters, the mass axis and resolution of the back-end mass analyzer have been debugged.
[0047] In addition, the fitness value acquisition process provided by the embodiment of the present invention requires synchronous fine-tuning of the mass axis and mass resolution of the typical peak of the mass spectrometer. In some embodiments, the above method can be used only when obtaining the fitness value for the test individual. When obtaining the fitness value for the initialized individual, the mass axis and mass resolution can be fine-tuned asynchronously, but the corresponding mass spectrum peak intensity value is directly obtained based on the initial value of the mass axis and the initial value of the mass resolution when the mass analyzer is debugged. In other embodiments, the mass axis and mass resolution can also be fine-tuned asynchronously in the process of calculating the fitness value of the individual.
[0048] In some optional specific implementations, the mass spectrum peak intensity value is the intensity value of a single typical mass spectrum peak. In this case, the fitness value corresponding to the individual It can be calculated according to the following formula: ; or, ; in, is the individual (a vector consisting of a combination of multiple mass spectrometer parameters), is the intensity value of a single typical mass spectrum peak.
[0049] In the embodiments of the present invention, a single-objective evaluation method is adopted to evaluate the fitness of an individual.
[0050] In some other alternative specific embodiments, the mass spectrometry peak intensity value includes the intensity values of typical mass spectrometry peaks in multiple different mass number segments. At this time, the fitness value corresponding to the individual can be calculated according to the following formula:
[0051] where I 1, I 2, I 3 are respectively the intensity values of typical mass spectrometry peaks in the low, medium, and high mass number segments, λ 1, λ 1, λ 1 are respectively the weight coefficients of typical mass spectrometry peaks in the low, medium, and high mass number segments.
[0052] In the embodiments of the present invention, a multi-objective evaluation method is adopted to evaluate the fitness of an individual. Multi-objective evaluation refers to finding the optimal combination state of multiple mass spectrometry peaks to achieve the best data interpretation and analysis results.
[0053] The optimization of mass spectrometer parameters is a process of maximizing the intensity value of the mass spectrometry peak, that is to say, the larger the intensity value of the mass spectrometry peak, the better. However, the optimization process of the differential evolution algorithm is a process of minimizing the fitness value. Therefore, in the above embodiments, the intensity value of the mass spectrometry peak is converted into the corresponding fitness value through an inverse proportional function or a linear function with a negative slope. Of course, other decreasing functions, such as exponential functions (base 0 < a < 1), power functions (negative exponents), etc., can also be used to convert the intensity value of the mass spectrometry peak into the corresponding fitness value.
[0054] In some alternative specific embodiments, as Figure 3 shown, step S102, that is, using the improved differential evolution algorithm to iteratively update the individuals in the target population, specifically includes: Step S1021, in the current iterative update process, divide the individuals in the target population into subpopulations according to the fitness value corresponding to the individual, and obtain multiple subpopulations. In the embodiments of the present invention, in each round of iteration of the target population, the subpopulations need to be re-divided based on the fitness value of the individual.
[0055] Specifically, the individuals in the target population can be sorted in ascending order according to the fitness value. Then, the sorted individuals are divided into subpopulations.
[0056] In some specific implementations, step S1021, i.e., in the current iterative update process, dividing the individuals in the target population into sub-populations according to the fitness values corresponding to the individuals to obtain multiple sub-populations, includes: Step S10211, based on the iteration stage to which the current iteration update belongs, determine the number of individuals corresponding to each of the sub-populations; the iteration stage is a stage divided according to the number of iterations, for example, including an initial stage, an intermediate stage and a final stage.
[0057] In the embodiment of the present invention, when the iteration stage to which the current iteration update belongs is different, the number of individuals in each subpopulation may also be different. For example, there are three subpopulations in total: a better subpopulation, an intermediate subpopulation, and a worse subpopulation. In the initial stage of the iteration process (for example, g≤G / 3, g is the current iteration number, and G is the maximum iteration number), the ratio of the number of individuals in the better subpopulation, the intermediate subpopulation, and the worse subpopulation is 1:1:1; in the middle stage of the iteration process (for example, G / 3<g≤2G / 3), the ratio of the number of individuals in the better subpopulation, the intermediate subpopulation, and the worse subpopulation is 3:2:1; in the final stage of the iteration process (for example, g>2G / 3), the ratio of the number of individuals in the better subpopulation, the intermediate subpopulation, and the worse subpopulation is 4:1:1.
[0058] In some embodiments, as the iteration stage progresses, the number of individuals in the first subpopulation in the subpopulation gradually increases, and the fitness value of the individuals in the first subpopulation is better than the fitness of the individuals in other subpopulations. In the subpopulations other than the first subpopulation, the number of individuals in the final iteration stage is less than that in the initial iteration stage. Specifically, in the subpopulations other than the first subpopulation, the number of individuals decreases as the iteration stage progresses from the overall trend. That is, in the embodiment of the present invention, the sizes of several subpopulations are gradually adjusted during the iteration process.
[0059] Step S10212: Divide the individuals in the target population into corresponding sub-populations according to the number of individuals corresponding to each sub-population and the fitness value corresponding to the individual.
[0060] Step S1022, a mutation operation is performed on the target individual to obtain a corresponding mutant individual; the mutation operation used is different depending on the sub-population to which the target individual belongs.
[0061] In the embodiment of the present invention, in each round of iteration of the target population, each individual needs to be taken as a target individual and subjected to a mutation operation.
[0062] In the embodiment of the present invention, individuals are divided into sub-populations according to their fitness values, so that different mutation operations can be adopted for different performances of individuals. The following example illustrates that different mutation operations are adopted for target individuals in different sub-populations.
[0063] In some embodiments, the multiple subpopulations include a first subpopulation, a second subpopulation, and a third subpopulation, and the fitness value of the individuals in the first subpopulation is better than the fitness value of the individuals in the second subpopulation, and the fitness value of the individuals in the second subpopulation is better than the fitness value of the individuals in the third subpopulation. That is, the first subpopulation, the second subpopulation, and the third subpopulation are respectively a better subpopulation, an intermediate subpopulation, and a worse subpopulation.
[0064] like Figure 3 As shown, step S1022, i.e., applying a mutation operation to the target individual to obtain a corresponding mutant individual, includes: If the target individual belongs to the first subpopulation (i.e., the better subpopulation), the first mutation operation is adopted, which is: randomly searching near the current best individual (i.e., the current global optimal solution), and as the iteration process proceeds, the range of random search near the current best individual gradually decreases. The current best individual is the individual with the best fitness value in the target population after the last round of iteration.
[0065] Specifically, the formula corresponding to the first mutation operation may be, for example:
[0066] in, For the The first iteration The variant individuals corresponding to the target individuals, is the current optimal individual, i.e. The best individual after iterations, For the The first iteration , individual; , is [1, N ] Randomly select an integer in the range is the mutation operator, , is a constant coefficient, for example, it can be 0.5, For is a decreasing function of the independent variable.
[0067] In the embodiment of the present invention, by continuously reducing the proportionality coefficient ( ) to control the gradual narrowing of the random search range near the current optimal individual. For is a decreasing function of the independent variable, so in the later stages of the iteration Gradually decrease, so as to retain more optimal individuals information, increasing the probability of converging to the optimal solution.
[0068] in, ,in, is the first set value.
[0069] If the target individual belongs to the second sub-population (ie, the middle sub-population), a second mutation operation is adopted, and the second mutation operation is: moving toward the direction of the current optimal individual while taking into account random direction search.
[0070] Specifically, the formula corresponding to the second mutation operation is:
[0071] in, For the The first iteration The target individual The corresponding variant individuals, is the current optimal individual, For the The first iteration , Individuals, is a constant coefficient, such as , For is a function of the independent variable. For example, .
[0072] In the embodiment of the present invention, It can be is a decreasing function of the independent variable, so as to maintain a larger mutation operator in the early stage of iteration to maintain individual diversity and avoid falling into the local optimal solution.
[0073] If the target individual belongs to the third subpopulation (i.e., the inferior subpopulation), the third mutation operation is adopted, and the third mutation operation is: randomly regenerate a new individual as a mutation individual in the global scope. This process is consistent with the individual initialization process and is expressed by the formula:
[0074] in, For the The first iteration The first The variation value of the dimension parameter, For the The upper and lower limits of the dimension parameter.
[0075] In the embodiment of the present invention, during the parameter optimization process, individuals in the third subpopulation are mutated by randomly taking values, so that the parameters are not easily trapped in a local optimal solution.
[0076] Step S1023, performing a crossover operation on the variant individual and the target individual corresponding to the variant individual to obtain a corresponding test individual.
[0077] In the embodiment of the present invention, in order to increase the diversity of the interference parameter vector, a crossover operation is introduced to adjust the parameter vector (ie, individual):
[0078] Among them, randb( j ) represents the first random number sequence generated between [0,1] j values; CR represents the crossover operator, and its value range is [0,1]; rnbr( i ) means from [1, D ] to generate a random number sequence between From the mutation parameter vector (i.e. mutation individual) At least one parameter value is obtained from , so that the parameter vector is updated instead of being kept unchanged.
[0079] In addition, after obtaining the test individuals, it is necessary to compare the parameters in the test individuals with the boundary conditions, and replace the parameters in the test individuals that exceed the boundary with the adjacent boundary values, that is, boundary absorption processing, which can be expressed as follows: like ,but ; like ,but .
[0080] In the embodiment of the present invention, the newly generated test individuals can be located in the feasible domain space without exceeding the boundary through boundary absorption processing.
[0081] In other embodiments, after the variant individuals are obtained, the variant individuals may be subjected to boundary absorption processing, so that subsequent test individuals obtained based on the variant individuals will not exceed the boundary.
[0082] Step S1024: if the fitness value corresponding to the test individual is better than the corresponding target individual, the test individual is used to replace the target individual, that is, a selection operation.
[0083] In the embodiment of the present invention, in order to verify the test individual Is it compared to The better solution is stored in In the experiment, the individual The fitness value of Calculate. Please refer to the above for the calculation process of the fitness value of the test individual and the fitness value of the target individual. Then, the obtained fitness value of the test individual is compared with the fitness value of the previous generation individual. If the test individual The corresponding fitness value is better, then To update, the formula is as follows: .
[0084] In addition, there are two conditions for judging whether the iterative update is finished: 1. The number of iterations reaches the first set value, and 2. The number of times the optimal fitness value has not been updated continuously reaches the second set value. The specific judgment process is: First, determine whether the number of iterations has ended, that is, whether it has reached the first set value. If it has not ended, compare the current result with the previous result. If the optimal fitness value still has a continuous and obvious optimization, that is: , is the smaller value set; Then the newly generated Carry out a new round of iteration.
[0085] If the optimal fitness value has not been updated for several consecutive times (such as no update for 2 consecutive times), , it is considered to have reached the optimal value and the iteration ends early.
[0086] The embodiment of the present invention adopts an improved differential evolution algorithm to automatically optimize mass spectrometer parameters. Based on the traditional differential evolution algorithm, the algorithm divides individual groups according to individual performance and adopts different optimization directions for different individual groups.
[0087] In addition, the mutation operator in the basic differential evolution algorithm is generally a real constant. In the iterative optimization process, the value of the mutation operator has a great influence. If the mutation operator is too large, the algorithm search tends to be more of a random iteration process, resulting in low search efficiency; if the mutation operator is too small, the population diversity is low and it is easy to fall into a local optimal solution. The embodiment of the present invention introduces a certain idea of the adaptive differential evolution algorithm, and adjusts some mutation operators ( , ) Perform adaptive adjustments based on iterative progress.
[0088] Step S103, determining the mass spectrometer parameters in the optimal individual corresponding to the optimal fitness value as the optimal mass spectrometer parameters.
[0089] The mass spectrometer parameter optimization method provided in this embodiment realizes multi-parameter combination optimization by introducing an intelligent optimization algorithm, specifically an improved differential evolution algorithm, thereby improving the speed and accuracy of parameter optimization and saving time and personnel costs. The embodiment of the present invention can be used in the debugging and optimization process of a mass spectrometer test device, as well as in functional modules such as automatic tuning in mass spectrometer product software, to improve debugging and optimization efficiency and debugging and optimization results, and has high practical value and industrialization value.
[0090] In the present embodiment, a mass spectrometer parameter optimization device is also provided, and the device is used to implement the above-mentioned embodiment and preferred implementation mode, and the description that has been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the device described in the following embodiments is preferably implemented with software, the implementation of hardware, or a combination of software and hardware is also possible and conceived.
[0091] This embodiment provides a mass spectrometer parameter optimization device, such as Figure 4 As shown, including: An initialization population acquisition module 401 is used to acquire an initialized target population, where individuals in the target population are multidimensional vectors, and the multidimensional vector is a vector composed of a combination of multiple mass spectrometer parameters; The individual updating module 402 is used to iteratively update the individuals in the target population using an improved differential evolution algorithm until one of the following iterative update termination conditions is met: the number of iterations reaches a first set value, and the number of times the optimal fitness value is continuously not updated reaches a second set value; wherein the optimal fitness value is the optimal value among the fitness values corresponding to each of the individuals in the latest target population, and the fitness value corresponding to the individual is determined based on the mass spectrum peak intensity value corresponding to the individual; The determination module 403 is used to determine the mass spectrometer parameters in the optimal individual corresponding to the optimal fitness value as the optimal mass spectrometer parameters.
[0092] In some optional implementations, the individual update module 402 includes: An initial value acquisition unit, used for acquiring an initial value of a mass axis and an initial value of a mass resolution; A quality axis adjustment unit, configured to adjust a first voltage value corresponding to the quality axis based on a target value and an initial value of the quality axis; obtain a corresponding current value of the quality axis based on the adjusted first voltage value; if a deviation between the current value of the quality axis and the target value of the quality axis does not satisfy a first termination condition, continue to adjust the first voltage value based on the target value of the quality axis and the current value of the quality axis until the deviation between the latest current value of the quality axis and the target value of the quality axis satisfies the first termination condition; A mass resolution adjustment unit, configured to adjust a second voltage value corresponding to the mass resolution based on a target value and an initial value of the mass resolution; obtain a corresponding current value of the mass resolution based on the adjusted second voltage value; if a deviation between the current value of the mass resolution and the target value of the mass resolution does not satisfy a second termination condition, continue to adjust the second voltage value based on the target value of the mass resolution and the current value of the mass resolution until the deviation between the latest current value of the mass resolution and the target value of the mass resolution satisfies the second termination condition; A mass spectrum peak intensity value acquisition unit is used to acquire the corresponding mass spectrum peak intensity value based on the mass axis current value and the mass resolution current value when the deviation between the mass axis current value and the mass resolution target value meets the first termination condition and the deviation between the mass resolution current value and the mass resolution target value meets the second termination condition.
[0093] In some optional embodiments, the mass spectrum peak intensity value is the intensity value of a single typical mass spectrum peak; or, The mass spectrum peak intensity values include intensity values of typical mass spectrum peaks in multiple different mass number ranges.
[0094] In some optional implementations, the individual update module 402 includes: A subpopulation division unit is used to divide the individuals in the target population into subpopulations according to the fitness values corresponding to the individuals in the current iterative update process to obtain multiple subpopulations; A mutation operation unit, used for performing a mutation operation on a target individual to obtain a corresponding mutant individual; different mutation operations are performed according to the sub-population to which the target individual belongs; A crossover operation unit, used for performing a crossover operation on the variant individual and a target individual corresponding to the variant individual to obtain a corresponding test individual; A selection unit is used to replace the target individual with the test individual if the fitness value corresponding to the test individual is better than the corresponding target individual.
[0095] In some optional embodiments, the subpopulation division unit is specifically used to determine the number of individuals corresponding to each subpopulation based on the iteration stage to which the current iterative update belongs; the iteration stage is a stage divided according to the number of individuals corresponding to each subpopulation and the fitness value corresponding to the individual, the individuals in the target population are divided into corresponding subpopulations.
[0096] In some optional implementations, as the iteration phase progresses, the number of the individuals of the first subpopulation in the subpopulation gradually increases, and the fitness values of the individuals of the first subpopulation are better than the fitness values of the individuals of other subpopulations.
[0097] In some optional embodiments, in subpopulations other than the first subpopulation, the number of individuals in the final iteration stage is less than that in the initial iteration stage.
[0098] In some optional embodiments, the multiple subpopulations include a first subpopulation, a second subpopulation, and a third subpopulation, and the fitness value of the individuals in the first subpopulation is better than the fitness value of the individuals in the second subpopulation, and the fitness value of the individuals in the second subpopulation is better than the fitness value of the individuals in the third subpopulation; The mutation operation unit is specifically used for: If the target individual belongs to the first subpopulation, a first mutation operation is adopted, wherein the first mutation operation is: randomly searching near the current optimal individual, and as the iteration process proceeds, the range of the random search near the current optimal individual is gradually reduced; If the target individual belongs to the second subpopulation, a second mutation operation is adopted, wherein the second mutation operation is: moving toward the direction of the current optimal individual while taking into account random direction search; If the target individual belongs to the third sub-population, a third mutation operation is adopted, and the third mutation operation is: randomly generating a new individual in the global scope.
[0099] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.
[0100] The mass spectrometer parameter optimization device in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.
[0101] The embodiment of the present invention also provides a computer device having the above Figure 4 The mass spectrometer parameter optimization apparatus is shown.
[0102] See also Figure 5 , Figure 5 is a schematic diagram of the structure of a computer device provided by an optional embodiment of the present invention, such as Figure 5As shown, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the computer device, including instructions stored in or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 5 A processor 10 is taken as an example.
[0103] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.
[0104] The memory 20 stores instructions executable by at least one processor 10, so that the at least one processor 10 executes the method shown in the above embodiment.
[0105] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0106] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.
[0107] The computer device also includes an input device 30 and an output device 40. The processor 10, the memory 20, the input device 30 and the output device 40 may be connected via a bus or other means. Figure 5 The example of connecting through bus is taken in the following.
[0108] The input device 30 can receive input digital or character information, and generate key signal input related to the user settings and function control of the computer device, such as a touch screen, a keypad, a mouse, a track pad, a touch pad, an indicator bar, one or more mouse buttons, a trackball, a joystick, etc. The output device 40 may include a display device, an auxiliary lighting device (e.g., an LED) and a tactile feedback device (e.g., a vibration motor), etc. The above-mentioned display device includes but is not limited to a liquid crystal display, a light emitting diode, a display and a plasma display. In some optional embodiments, the display device may be a touch screen.
[0109] The computer device also includes a communication interface, which is used for the computer device to communicate with other devices or a communication network.
[0110] The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.
[0111] A part of the present invention may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present invention through the operation of the computer. Those skilled in the art should understand that the existence of the computer program instruction in a computer-readable medium includes, but is not limited to, a source file, an executable file, an installation package file, etc., and accordingly, the way in which the computer program instruction is executed by the computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium may be any available computer-readable storage medium or communication medium accessible to the computer.
[0112] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the appended claims.
Claims
1. A method for optimizing mass spectrometer parameters, characterized in that: The method comprises: Acquire an initialized target population, wherein the individuals in the target population are multidimensional vectors, and the multidimensional vector is a vector composed of a combination of multiple mass spectrometer parameters; Using an improved differential evolution algorithm, iteratively updating the individuals in the target population until one of the following iterative update termination conditions is met: the number of iterations reaches a first set value, and the number of times the optimal fitness value is not updated continuously reaches a second set value; wherein the optimal fitness value is the optimal value among the fitness values corresponding to each of the individuals in the latest target population, and the fitness value corresponding to the individual is determined based on the mass spectrum peak intensity value corresponding to the individual; The mass spectrometer parameters in the optimal individual corresponding to the optimal fitness value are determined as the optimal mass spectrometer parameters.
2. The method according to claim 1, characterized in that The mass spectrum peak intensity value corresponding to the individual is calculated by the following method: Get the initial value of the mass axis and the initial value of the mass resolution; Based on the target value and the initial value of the mass axis, adjusting a first voltage value corresponding to the mass axis; Based on the adjusted first voltage value, a corresponding current value of the quality axis is obtained; if the deviation between the current value of the quality axis and the target value of the quality axis does not satisfy a first termination condition, the first voltage value is continuously adjusted based on the target value of the quality axis and the current value of the quality axis until the deviation between the latest current value of the quality axis and the target value of the quality axis satisfies the first termination condition; Based on the target value and the initial value of the mass resolution, adjusting a second voltage value corresponding to the mass resolution; Based on the adjusted second voltage value, a corresponding current value of mass resolution is obtained; if the deviation between the current value of mass resolution and the target value of mass resolution does not satisfy a second termination condition, the second voltage value is continuously adjusted based on the target value of mass resolution and the current value of mass resolution until the deviation between the latest current value of mass resolution and the target value of mass resolution satisfies the second termination condition; When the deviation between the current value of the mass axis and the target value of the mass axis satisfies the first termination condition, and the deviation between the current value of the mass resolution and the target value of the mass resolution satisfies the second termination condition, the corresponding mass spectrum peak intensity value is acquired based on the current value of the mass axis and the current value of the mass resolution.
3. The method according to claim 1, characterized in that The mass spectrum peak intensity value is the intensity value of a single typical mass spectrum peak; or, The mass spectrum peak intensity values include intensity values of typical mass spectrum peaks in multiple different mass number ranges.
4. The method according to claim 1, characterized in that: The improved differential evolution algorithm is used to iteratively update the individuals in the target population, including: In the current iterative update process, the individuals in the target population are divided into sub-populations according to the fitness values corresponding to the individuals to obtain multiple sub-populations; A mutation operation is performed on a target individual to obtain a corresponding mutant individual; the mutation operation used is different for different subpopulations to which the target individual belongs; Performing a crossover operation on the variant individual and the target individual corresponding to the variant individual to obtain a corresponding test individual; If the fitness value corresponding to the test individual is better than the corresponding target individual, the test individual is used to replace the target individual.
5. The method according to claim 4, characterized in that In the current iterative update process, the individuals in the target population are divided into sub-populations according to the fitness values corresponding to the individuals to obtain multiple sub-populations, including: Determine the number of individuals corresponding to each of the subpopulations based on the iteration stage to which the current iteration update belongs; the iteration stage is a stage divided according to the number of iterations; According to the number of individuals corresponding to each of the sub-populations and the fitness values corresponding to the individuals, the individuals in the target population are divided into the corresponding sub-populations.
6. The method according to claim 5, characterized in that As the iteration phase proceeds, the number of the individuals of the first subpopulation in the subpopulation gradually increases, and the fitness values of the individuals of the first subpopulation are better than the fitness values of the individuals of other subpopulations.
7. The method according to claim 6, characterized in that In subpopulations other than the first subpopulation, the number of the individuals in the final iteration stage is less than that in the initial iteration stage.
8. The method according to any one of claims 4 to 7, characterized in that: The multiple subpopulations include a first subpopulation, a second subpopulation, and a third subpopulation, and the fitness value of the individuals in the first subpopulation is better than the fitness value of the individuals in the second subpopulation, and the fitness value of the individuals in the second subpopulation is better than the fitness value of the individuals in the third subpopulation; The step of performing a mutation operation on a target individual to obtain a corresponding mutant individual includes: If the target individual belongs to the first subpopulation, a first mutation operation is adopted, wherein the first mutation operation is: randomly searching near the current optimal individual, and as the iteration process proceeds, the range of the random search near the current optimal individual is gradually reduced; If the target individual belongs to the second subpopulation, a second mutation operation is adopted, wherein the second mutation operation is: moving toward the direction of the current optimal individual while taking into account random direction search; If the target individual belongs to the third sub-population, a third mutation operation is adopted, and the third mutation operation is: randomly regenerating a new individual in the global scope.
9. The method according to claim 8, characterized in that The formula corresponding to the first mutation operation is: in, For the The first iteration The variant individuals corresponding to the target individuals, is the current optimal individual, For the The first iteration , individual; , , is a constant coefficient, For is a decreasing function of the independent variable.
10. The method according to claim 9, characterized in that ,in, is the first set value.
11. The method according to claim 8, characterized in that The formula corresponding to the second mutation operation is: in, For the The first iteration The target individual The corresponding variant individuals, is the current optimal individual, For the The first iteration , Individuals, is a constant coefficient, For is a function of the independent variable.
12. A mass spectrometer parameter optimization device, characterized in that: The device comprises: An initialization population acquisition module is used to acquire an initialized target population, wherein the individuals in the target population are multidimensional vectors, and the multidimensional vector is a vector composed of a combination of multiple mass spectrometer parameters; An individual updating module, used to iteratively update the individuals in the target population using an improved differential evolution algorithm until one of the following iterative update termination conditions is met: the number of iterations reaches a first set value, and the number of times the optimal fitness value is continuously not updated reaches a second set value; wherein the optimal fitness value is the optimal value among the fitness values corresponding to each of the individuals in the latest target population, and the fitness value corresponding to the individual is determined based on the mass spectrum peak intensity value corresponding to the individual; The determination module is used to determine the mass spectrometer parameters in the optimal individual corresponding to the optimal fitness value as the optimal mass spectrometer parameters.
13. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the mass spectrometer parameter optimization method according to any one of claims 1 to 11 by executing the computer instructions.
14. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the mass spectrometer parameter optimization method according to any one of claims 1 to 11.
15. A computer program product, characterized in that The method comprises computer instructions for causing a computer to execute the mass spectrometer parameter optimization method according to any one of claims 1 to 11.
Citation Information
Patent Citations
Image segmenting method based on dynamic multi-population integrated differential evolution algorithm
CN108564592A
Triple quadrupole mass spectrometer parameter optimization method based on simulated annealing
CN112947332A
Mass spectrometer parameter adaptive dynamic adjustment method and device and storage medium
CN114740078A
Triple quadrupole mass spectrum automatic tuning method and device based on improved PSO (Particle Swarm Optimization) and medium
CN115879382A
Image segmentation method based on differential evolution algorithm of clustering division and OTSU algorithm
CN116883672A