Method and system for detecting components of finished pharmaceutical products based on sample spectral data
Through the detection method based on sample spectral data, the parameters of the spectral detection equipment are adjusted and the detection results are secondary tested, which solves the problem of difficult detection of trace components in finished pharmaceutical products, and improves the accuracy and quality pass rate of detection.
Patent Information
- Application Number
- CN202411896820.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-23
- Publication Date
- 2025-03-11
- Estimated Expiration
- 2044-12-23
AI Technical Summary
In the ingredient detection of finished pharmaceutical products, trace ingredients are difficult to detect, resulting in misjudgment of drug quality, which in turn leads to waste of resources and loss of enterprises.
The detection method based on sample spectral data is adopted, and sample data with known component content is collected, the parameters of the spectral detection equipment are adjusted, the detection accuracy is improved, and samples with data 0 in the detection result are secondary detection to ensure the accuracy of the detection.
It improves the detection accuracy of spectral detection equipment, reduces misjudgment of the quality of finished pharmaceutical products, ensures the quality pass rate of finished pharmaceutical products, and reduces the losses of enterprises.
Smart Images

Figure CN119354896B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of component detection, and in particular, relates to a method and system for detecting components of finished pharmaceutical products based on sample spectral data. Background Art
[0002] When testing the ingredients of finished pharmaceutical products, there will be corresponding trace ingredients in the finished pharmaceutical products. Trace ingredients are difficult to detect due to their extremely low content, and trace ingredients in drugs may be active ingredients or excipients, which have an important impact on the efficacy of drugs. If trace ingredients are not detected when testing the ingredients of finished pharmaceutical products, it may lead to misjudgment of drug quality, resulting in the elimination of finished pharmaceutical products that meet quality standards, causing losses to the company. Summary of the invention
[0003] In view of the problems in the related art, the present invention proposes a method and system for detecting ingredients of finished pharmaceutical products based on sample spectral data to overcome the above-mentioned technical problems existing in the existing related art.
[0004] In order to solve the above technical problems, the present invention is achieved through the following technical solutions:
[0005] The present invention is a method for detecting components of a finished pharmaceutical product based on sample spectral data, comprising the following steps:
[0006] S1. Collect pharmaceutical ingredient content data corresponding to a number of pharmaceutical finished product samples with known contents of various ingredients corresponding to various types of pharmaceutical finished products, and obtain a dataset matrix of actual contents of known pharmaceutical finished product ingredients;
[0007] S2. Use multiple initial spectral detection devices to perform component detection on each known pharmaceutical finished product sample in conjunction with a known pharmaceutical finished product component actual content data set matrix to obtain a known pharmaceutical finished product component detection content data set matrix; adjust the parameters of each initial spectral detection device according to the known pharmaceutical finished product component detection content data set matrix and the known pharmaceutical finished product component actual content data set matrix to obtain a final spectral detection device parameter data set matrix;
[0008] S3, performing component content detection on each of the pharmaceutical finished product samples to be detected in the pharmaceutical finished product sample set in cooperation with the final spectrum detection equipment parameter data set matrix, to obtain a pharmaceutical finished product component content data matrix;
[0009] S4. Determine whether the quality of each pharmaceutical product sample in the pharmaceutical product sample set is qualified according to the pharmaceutical product ingredient content data matrix; perform secondary testing on the pharmaceutical product samples in the pharmaceutical product sample set according to the pharmaceutical product ingredient content data matrix and determine whether the quality of the pharmaceutical product samples subjected to secondary testing is qualified;
[0010] First, pharmaceutical products of various types and with known content data of various ingredients are collected, and these pharmaceutical products are tested by using multiple spectral detection devices without adjusted parameters. After the test is completed, the test results are compared with the actual component content data, and the parameters of the multiple spectral detection devices are feedback-adjusted according to the comparison results, so that the error between the result of the pharmaceutical product tested by the spectral detection device after the parameter adjustment and the actual data is less than a preset threshold, thereby improving the detection accuracy of the spectral detection device; then the spectral detection device after the parameter adjustment is used to test the pharmaceutical products that need to be tested, thereby improving the credibility of the component content data obtained after the test; when the pharmaceutical products that need to be tested are tested and the test results have content data of 0, firstly, the quality of the pharmaceutical products may not meet the requirements, and secondly, the component with data of 0 is a trace component, and the detection accuracy of the currently used spectral detection equipment and detection method cannot detect the specific content data of the trace component; based on this, in this scheme, the corresponding pharmaceutical products with data of 0 in the test results are tested again, thereby improving the accuracy of the test and reducing the possibility of misjudging the quality of the pharmaceutical products.
[0011] Preferably, the S1 comprises the following steps:
[0012] S11, setting a plurality of samples of finished pharmaceutical products to be tested, and obtaining a sample set of finished pharmaceutical products to be tested a 1i represents the i-th pharmaceutical finished product sample to be tested, a1′ represents the total number of pharmaceutical finished product samples to be tested; then the component types that need to be tested in multiple pharmaceutical finished product types are set to obtain the pharmaceutical component type matrix a2; as follows,
[0013]
[0014] Wherein, a′2 represents the total number of types of pharmaceutical products to be tested; a 2ij Indicates the jth type of ingredient to be tested corresponding to the i-th type of pharmaceutical product to be tested, a3′ i Indicates the total number of component types that need to be tested corresponding to the set i-th pharmaceutical product type to be tested;
[0015] S12, in conjunction with the pharmaceutical finished product sample set to be tested and the pharmaceutical ingredient type matrix, collect a number of pharmaceutical finished product samples with known contents of various ingredients and corresponding pharmaceutical ingredient content data corresponding to each pharmaceutical finished product type to be tested, to obtain a known pharmaceutical finished product sample matrix and a known pharmaceutical finished product ingredient actual content data set matrix a3; a3 is as follows,
[0016]
[0017] Among them, a 3ij represents the actual content data set of the ingredients of the jth known finished pharmaceutical product sample corresponding to the i-th type of finished pharmaceutical product to be tested, and a′4 represents the total number of corresponding known finished pharmaceutical product samples collected for each type of finished pharmaceutical product to be tested; a 3ijk Indicates the actual content data of the kth type of ingredient in the jth known finished pharmaceutical product sample corresponding to the ith type of finished pharmaceutical product to be tested;
[0018] The pharmaceutical ingredient type matrix includes active pharmaceutical ingredients, diluents, fillers, disintegrants, lubricants, glidants, wetting agents, effervescent agents, colorants, natural extracts, chemically synthesized ingredients, peptides, proteins and nucleic acids, etc. The content of the above ingredients can more comprehensively reflect the quality of the finished pharmaceutical product.
[0019] Preferably, S2 comprises the following steps:
[0020] S21, setting a plurality of identical initial spectral detection devices to obtain an initial spectral detection device set; matching the pharmaceutical ingredient type matrix and using each initial spectral detection device in the initial spectral detection device set to perform ingredient detection on each known pharmaceutical finished product sample in the known pharmaceutical finished product sample matrix, to obtain a known pharmaceutical finished product ingredient detection content data set matrix a4; as follows,
[0021]
[0022] Among them, a 4ij represents the component detection content data set obtained by spectral detection of the jth known pharmaceutical product sample corresponding to the i-th type of pharmaceutical product to be detected. a 4ijk represents the k-th type of component detection content data obtained by performing spectral detection on the j-th known pharmaceutical product sample corresponding to the i-th type of pharmaceutical product to be detected;
[0023] S22, setting parameter types that need to be adjusted for multiple initial spectral detection devices in the initial spectral detection device set when performing spectral detection, and obtaining a spectral detection device parameter type set; adjusting the parameters of the initial spectral detection devices in combination with the spectral detection device parameter type set, a known pharmaceutical finished product component actual content data set matrix, and a known pharmaceutical finished product component detection content data set matrix; after the adjustment is completed, obtaining a final spectral detection device parameter data set matrix as follows,
[0024]
[0025] in, represents that the final parameter data set is obtained after adjusting the j-th parameter data of the i-th initial spectrum detection device in the initial spectrum detection device set, Indicates the total number of spectrum detection device parameter types in the spectrum detection device parameter type set;
[0026] The spectral detection equipment parameter type set includes wavelength selection, absorbance range, and scanning speed, which refers to the speed of scanning within a certain wavelength range; integration time refers to the signal acquisition time of the spectral detection equipment at each wavelength point, etc.; the parameters of the initial spectral detection equipment are adjusted by coordinating the spectral detection equipment parameter type set, the actual content data set matrix of known pharmaceutical finished product ingredients, and the known pharmaceutical finished product ingredient detection content data set matrix, so that the error between the test results of known pharmaceutical finished products and the actual data is minimized, thereby improving the detection accuracy of the spectral detection equipment, and thereby improving the accuracy of subsequent detection of pharmaceutical finished products to be detected using these spectral detection equipment.
[0027] Preferably, the types of the spectrum detection equipment include ultraviolet-visible spectrometers, etc.;
[0028] Preferably, adjusting the parameters of the initial spectral detection device in S22 in coordination with the spectral detection device parameter type set, the known pharmaceutical finished product component actual content data set matrix, and the known pharmaceutical finished product component detection content data set matrix comprises the following steps:
[0029] S221, calculating the Euclidean distance data between the actual content data set matrix of the known pharmaceutical finished product ingredients and the detected content data set matrix of the known pharmaceutical finished product ingredients Recorded as known detection error data; the calculation formula is as follows,
[0030]
[0031] S222, setting a component content detection error threshold; when the known detection error data is greater than or equal to the component content detection error threshold, adjusting the parameters of each initial spectrum detection device in the initial spectrum detection device set; otherwise, there is no need to adjust the parameters of each initial spectrum detection device in the initial spectrum detection device set;
[0032] By setting the component content detection error threshold, a quantitative basis is provided for determining whether the error between the detection result of the spectrum detection equipment without adjusting parameters and the actual data meets the requirements.
[0033] Preferably, adjusting the parameters of each initial spectrum detection device in the initial spectrum detection device set in S222 comprises the following steps:
[0034] S2221. Construct spectral detection equipment parameters to regulate krill population b 1i represents the i-th krill in the krill population adjusted by the spectrum detection device parameters, b1′ represents the scale of the krill population adjusted by the spectrum detection device parameters; the maximum number of iterations of the spectrum detection device parameters adjusting the krill population is set to And the current iteration number is They are respectively recorded as the maximum number of iterations of device parameter adjustment and the current number of iterations of device parameter adjustment; the search space dimension of the spectral detection device parameter adjustment krill population is
[0035] S2222, setting the value interval of parameter data corresponding to each spectrum detection device parameter type in the spectrum detection device parameter type set to obtain a device parameter value interval set c; as follows,
[0036]
[0037] in, respectively represent the lower limit and the upper limit of the value of the parameter data corresponding to the i-th spectrum detection device parameter type in the spectrum detection device parameter type set;
[0038] The spectrum detection equipment parameters are set according to the equipment parameter value interval set to adjust the initial position matrix of each krill in the krill population, and a first initial position matrix set is obtained. c1′ k The initial position matrix of the kth krill in the krill population is represented by the parameters of the spectrum detection device; as follows,
[0039]
[0040] Among them, c1′ kij It represents the position component of the initial position matrix of the ith krill in the krill population adjusted by the spectrum detection device parameters on the jth parameter data dimension of the ith initial spectrum detection device in the initial spectrum detection device set; the calculation formula is as follows:
[0041]
[0042] Among them, rand 1kij Indicates that for c1′ kij Generate a random number between 0 and 1;
[0043] S2223, based on the known detection error data Constructing a fitness function for adjusting krill populations using spectral detection equipment parameters as follows,
[0044]
[0045] S2224, start iteration, before iteration, set the current iteration number of the device parameter adjustment to 1; in the first round of iteration, use the spectrum detection device parameters to adjust the fitness function of the krill population Calculate the fitness value of the initial position matrix of each krill in the first initial position matrix set to obtain a first fitness value set; use the maximum fitness in the first fitness value set and the initial position matrix of the corresponding krill as the first global optimal fitness and the first global optimal position respectively; update the initial position matrix of each krill in the first initial position matrix set according to the first global optimal fitness and the first global optimal position; after the update is completed, add 1 to the current iteration number of the device parameter adjustment and enter the next iteration;
[0046] In each other round of iteration, the fitness function c~1 of the spectral detection device parameter adjustment krill population is used to calculate the fitness value of the position matrix of each krill in the spectral detection device parameter adjustment krill population updated in the previous round of iteration to obtain a second fitness value set; the maximum fitness in the second fitness value set and the corresponding krill position matrix are respectively used as the second global optimal fitness and the second global optimal position; the position matrix of each krill in the spectral detection device parameter adjustment krill population updated in the previous round of iteration is updated according to the second global optimal fitness and the second global optimal position; after the update is completed, the current iteration number of the device parameter adjustment is increased by 1 and the next iteration is entered;
[0047] S2225, when When , stop the iteration and get the first final global optimal position; otherwise, continue to iterate until until the time; taking the first final global optimal position as the optimized spectral detection equipment parameter data set matrix; setting the parameter data of each initial spectral detection equipment in the initial spectral detection equipment set according to the optimized spectral detection equipment parameter data set matrix, and obtaining the optimized spectral detection equipment set after the setting is completed; cooperating with the pharmaceutical ingredient type matrix and using the spectral detection equipment in the optimized spectral detection equipment set to perform ingredient detection on each known pharmaceutical finished product sample in the known pharmaceutical finished product sample matrix, to obtain the optimized known pharmaceutical finished product ingredient detection content data set matrix; calculating the Euclidean distance data between the optimized known pharmaceutical finished product ingredient detection content data set matrix and the known pharmaceutical finished product ingredient actual content data set matrix, to obtain the optimized known detection error data;
[0048] When the known detection error data after optimization is less than the component content detection error threshold, the optimized spectrum detection device parameter data set matrix is used as the final spectrum detection device parameter data set matrix; otherwise, return to S2224 to continue iterating until the known detection error data after optimization is less than the component content detection error threshold;
[0049] The krill optimization algorithm has become an effective tool for solving complex optimization problems due to its advantages such as strong convergence, simple programming, strong global search capability, strong adaptability and good scalability. Based on the above advantages of the krill optimization algorithm, the krill optimization algorithm is used in this scheme to iteratively adjust the parameters of multiple initial spectral detection devices at the same time, and the Euclidean distance between the detection results of the initial spectral detection device for known pharmaceutical products and the actual data is used as the fitness function. Therefore, as the iteration proceeds, the Euclidean distance between the detection results of the initial spectral detection device for known pharmaceutical products and the actual data becomes smaller and smaller, which indicates that the detection results of the initial spectral detection device for known pharmaceutical products are becoming more and more accurate.
[0050] Preferably, S3 comprises the following steps:
[0051] S31, using the final spectrum detection device parameter data set matrix to set the parameters of each initial spectrum detection device in the initial spectrum detection device set to obtain a final spectrum detection device set;
[0052] S32, cooperate with the pharmaceutical ingredient type matrix and use each final spectral detection device in the final spectral detection device set to detect the ingredient content of each pharmaceutical finished product sample to be detected in the pharmaceutical finished product sample set to obtain the pharmaceutical finished product ingredient content data matrix d; as follows,
[0053]
[0054] Among them, d ij represents the component content data of the jth type of the i-th pharmaceutical product sample to be tested in the pharmaceutical product sample set to be tested, d i ′ represents the total number of component types of the i-th pharmaceutical finished product sample to be tested in the pharmaceutical finished product sample set to be tested;
[0055] The finished pharmaceutical products to be tested are tested using spectral testing equipment with adjusted parameters, which improves the accuracy of the test; thereby improving the accuracy of the subsequent determination of whether a secondary test is needed.
[0056] Preferably, S4 comprises the following steps:
[0057] S41. When there is component content data of 0 in the component content data matrix of the pharmaceutical finished product to be tested, the pharmaceutical finished product to be tested corresponding to the component content data of 0 in the component content data matrix of the pharmaceutical finished product to be tested is recorded as a secondary pharmaceutical finished product to be tested; otherwise, the component content data matrix of the pharmaceutical finished product to be tested is compared with the component content data of the corresponding standard pharmaceutical finished product, and the quality of each pharmaceutical finished product to be tested sample set is determined to be qualified according to the comparison result;
[0058] S42, performing secondary testing on the secondary finished pharmaceutical product to be tested to obtain a data set of component content of the secondary finished pharmaceutical product to be tested; comparing the data set of component content of the secondary finished pharmaceutical product to be tested with the component content data of the corresponding standard finished pharmaceutical product, and determining whether the quality of the secondary finished pharmaceutical product to be tested is qualified according to the comparison result;
[0059] Since there are two reasons why the content data of a certain ingredient in the finished pharmaceutical product to be tested is detected to be 0, namely, a detection problem or the finished pharmaceutical product does not contain the ingredient, based on this, this solution makes separate judgments on these two situations, thereby improving the accuracy of the final test results.
[0060] Preferably, performing a secondary test on the secondary to-be-tested finished pharmaceutical product in S42 to obtain a data set of component contents of the secondary to-be-tested finished pharmaceutical product comprises the following steps:
[0061] S421, evaporate and ionize a tiny area on the surface of the secondary pharmaceutical product to be tested by high-energy laser pulses to generate plasma; set an initial spectrometer; use the initial spectrometer to detect and analyze the spectrum emitted by the plasma to obtain an initial secondary pharmaceutical product component content data set represents the component content data of the i-th type obtained by detecting the spectrum emitted by the plasma using the initial spectrometer, Indicates the total number of component types of the secondary pharmaceutical product to be tested;
[0062] S422: Setting a secondary component content error threshold and setting the content data of the standard finished pharmaceutical product corresponding to the secondary finished pharmaceutical product to be tested to obtain a secondary standard finished pharmaceutical product content data set Represents the component content data of the i-th type of the standard pharmaceutical product corresponding to the secondary pharmaceutical product to be tested; calculates the Euclidean distance between the secondary standard pharmaceutical product content data set and the initial secondary pharmaceutical product component content data set to obtain the initial secondary component content Euclidean distance e; the calculation formula is as follows,
[0063]
[0064] S423, setting a number of spectrometer measurement accuracy influencing parameter types, and obtaining a set of spectrometer measurement accuracy influencing parameter types. e i ′ represents the type of parameters affecting the measurement accuracy of the i-th spectrometer. Indicates the total number of parameter types that are set to affect the measurement accuracy of the spectrometer; when the Euclidean distance of the secondary component content is less than the secondary component content error threshold, the quality of the secondary pharmaceutical product to be tested is qualified; otherwise, the parameters of the initial spectrometer are adjusted in accordance with the parameter type set affecting the measurement accuracy of the spectrometer; after the adjustment is completed, the final spectrometer is obtained; the spectrum emitted by the plasma is detected and analyzed using the final spectrometer to obtain a final secondary pharmaceutical product component content data set; the Euclidean distance between the secondary standard pharmaceutical product content data set and the final secondary pharmaceutical product component content data set to be tested is calculated to obtain the final secondary component content Euclidean distance;
[0065] When the final secondary component content Euclidean distance is less than the secondary component content error threshold, the quality of the secondary pharmaceutical product to be tested is qualified; otherwise, the quality of the secondary pharmaceutical product to be tested is unqualified;
[0066] When a high-energy laser pulse is focused on a tiny area on the surface of a sample, its energy density is extremely high. This high energy can quickly overcome the binding force between atoms or molecules in the sample, causing the material on the surface of the sample to evaporate instantly, transforming from a solid or liquid state to a gaseous state; at the same time, the high energy of the laser pulse will further ionize the gaseous atoms or molecules, causing them to lose or gain electrons to form a plasma; the ions and atoms in the excited plasma will transition to a low energy state, emitting photons of a specific wavelength in the process. Different elements have different energy level structures, so the wavelengths of the photons they emit during the transition are also different; by collecting and analyzing the spectrum emitted by the plasma, it is possible to determine which elements are present in the sample, and based on the intensity and other characteristics of the spectrum, the content of the elements can also be quantitatively analyzed, thereby realizing the detection of trace components; based on the above principles, in this scheme, a high-energy laser pulse is used to evaporate and ionize a tiny area on the surface of the secondary pharmaceutical product to be tested, generating a plasma, and then a spectrometer is used to detect the spectral data of the plasma to detect trace components;
[0067] The types of parameters that affect the measurement accuracy of the spectrometer include resolution, etc.
[0068] Preferably, in S423, adjusting the parameters of the initial spectrometer in accordance with the spectrometer measurement accuracy influencing parameter type set; after the adjustment is completed, obtaining the final spectrometer includes the following steps:
[0069] S4231, construct spectrometer parameters to regulate krill population b 2i represents the i-th krill in the krill population adjusted by the spectrometer parameters, b2′ represents the scale of the krill population adjusted by the spectrometer parameters; the maximum number of iterations of the spectrometer parameter adjustment krill population is set to And the current iteration number is They are respectively recorded as the maximum number of iterations of spectrometer parameter adjustment and the current number of iterations of spectrometer parameter adjustment; the search space dimension of the spectrometer parameter adjustment krill population is
[0070] S4232, setting the value interval of the parameter corresponding to each parameter type in the parameter type set affecting the measurement accuracy of the spectrometer, and obtaining the value interval set of the parameter affecting the measurement accuracy of the spectrometer. as follows,
[0071]
[0072] in, They respectively represent the lower limit and upper limit of the value of the parameter corresponding to the i-th parameter type in the parameter type set affecting the measurement accuracy of the spectrometer;
[0073] The spectrometer parameters are set according to the parameter value interval set affecting the measurement accuracy of the spectrometer to adjust the initial position of each krill in the krill population, and a second initial position matrix c′2 is obtained; as follows,
[0074]
[0075] Among them, c′ 2ji It represents the position component of the initial position of the j-th krill in the krill population adjusted by the spectrometer parameter on the parameter data dimension corresponding to the parameter type affecting the measurement accuracy of the i-th spectrometer; the calculation formula is as follows:
[0076]
[0077] Among them, rand 2ji Indicates that for c′ 2ji Generate a random number between 0 and 1;
[0078] S4233, constructing a fitness function for adjusting the krill population using spectrometer parameters according to the Euclidean distance e of the initial secondary component content as follows,
[0079]
[0080] S4234, start iteration, before iteration, set the current iteration number of the spectrometer parameter adjustment to 1; in the first round of iteration, use the spectrometer parameter to adjust the fitness function of the krill population Calculate the fitness value of the initial position of each krill in the second initial position matrix to obtain a third fitness value set; use the maximum fitness in the third fitness value set and the initial position of the corresponding krill as the third global optimal fitness and the third global optimal position respectively; update the initial position of each krill in the second initial position matrix according to the third global optimal fitness and the third global optimal position; after the update is completed, add 1 to the current iteration number of the spectrometer parameter adjustment and enter the next iteration;
[0081] In each other iteration, the spectrometer parameters are used to adjust the fitness function of the krill population. Calculate the fitness value of each krill position in the krill population adjusted by the spectrometer parameters obtained in the last iteration process to obtain a fourth fitness value set; use the maximum fitness in the fourth fitness value set and the corresponding krill position as the fourth global optimal fitness and the fourth global optimal position respectively; update each krill position in the krill population adjusted by the spectrometer parameters obtained in the last iteration process according to the fourth global optimal fitness and the fourth global optimal position; after the update is completed, add 1 to the current iteration number of the spectrometer parameter adjustment and enter the next iteration;
[0082] S4235, when When , the iteration is stopped to obtain a second final global optimal position; the parameters of the initial spectrometer are set using the second final global optimal position to obtain a final spectrometer;
[0083] By using the krill optimization algorithm to iteratively adjust the various influencing parameters of the spectrometer when detecting plasma, the content data of the trace components detected is made closest to the content of the corresponding trace components in the standard pharmaceutical products. In this way, the true content data of the trace components in the pharmaceutical products to be tested can be detected, thereby providing a data basis for the subsequent determination of whether the content of the trace components in the pharmaceutical products to be tested meets the requirements.
[0084] The pharmaceutical finished product component detection system based on sample spectral data includes a pharmaceutical finished product setting module to be detected, a pharmaceutical component type setting module to be detected, a known pharmaceutical finished product actual component content data acquisition module, an initial spectral detection equipment setting module, a known pharmaceutical finished product initial detection data acquisition module, a spectral detection equipment parameter adjustment module, a spectral detection equipment parameter setting module, a pharmaceutical finished product component content data detection module to be detected, a primary pharmaceutical qualified judgment module, a secondary detection module and a secondary pharmaceutical qualified judgment module.
[0085] The present invention has the following beneficial effects:
[0086] 1. In the present invention, the accuracy of detection is improved by performing one and two tests on the content data of the finished pharmaceutical product to be detected; wherein the parameters of multiple spectral detection devices are feedback-adjusted so that the error between the result of the detection of the finished pharmaceutical product by the spectral detection device after the adjustment of the parameters and the actual data is less than a preset threshold value, thereby improving the detection accuracy of the spectral detection device; when the finished pharmaceutical product to be detected is detected and the content data with data of 0 is obtained in the test result, firstly, the quality of the finished pharmaceutical product may not meet the requirements, and secondly, the component with data of 0 is a trace component, and therefore the corresponding finished pharmaceutical product with data of 0 in the test result is subjected to a secondary test, thereby improving the accuracy of detection and reducing the possibility of misjudgment of the quality of the finished pharmaceutical product.
[0087] 2. In the present invention, by using a spectral detection device with adjusted parameters to detect the finished pharmaceutical product to be detected, the accuracy of the detection is improved; thereby improving the accuracy of the subsequent determination of whether a secondary detection is required.
[0088] 3. In the present invention, the krill optimization algorithm is used to iteratively adjust the various influencing parameters of the spectrometer when detecting plasma, so that the content data of the trace components detected is closest to the content of the corresponding trace components in the standard pharmaceutical product, thereby detecting the true content data of the trace components in the pharmaceutical product to be detected, thereby providing a data basis for the subsequent determination of whether the content of the trace components in the pharmaceutical product to be detected meets the requirements.
[0089] Of course, any product implementing the present invention does not necessarily need to achieve all of the advantages described above at the same time. BRIEF DESCRIPTION OF THE DRAWINGS
[0090] In order to more clearly illustrate the technical solutions of the embodiments of the invention, the drawings required for describing the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the invention. For ordinary technicians in this field, they can also obtain drawings based on these drawings without paying creative work.
[0091] Figure 1 The figure is a schematic diagram of the process of the method for detecting ingredients in finished pharmaceutical products based on sample spectral data of the present invention. DETAILED DESCRIPTION
[0092] The following will be combined with the drawings in the embodiments of the invention to clearly and completely describe the technical solutions in the embodiments of the invention. Obviously, the described embodiments are only part of the embodiments of the invention, not all of the embodiments. Based on the embodiments in the invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the invention.
[0093] Embodiment 1
[0094] See also Figure 1 This embodiment is a method for detecting ingredients in finished pharmaceutical products based on sample spectral data, comprising the following steps:
[0095] S1. Collect pharmaceutical ingredient content data corresponding to a number of pharmaceutical finished product samples with known contents of various ingredients corresponding to various types of pharmaceutical finished products, and obtain a dataset matrix of actual contents of known pharmaceutical finished product ingredients;
[0096] The S1 comprises the following steps:
[0097] S11, setting a plurality of samples of finished pharmaceutical products to be tested, and obtaining a sample set of finished pharmaceutical products to be tested a 1i represents the i-th pharmaceutical finished product sample to be tested, a1′ represents the total number of pharmaceutical finished product samples to be tested; then the component types that need to be tested in multiple pharmaceutical finished product types are set to obtain the pharmaceutical component type matrix a2; as follows,
[0098]
[0099] Wherein, a′2 represents the total number of types of pharmaceutical products to be tested; a 2ij Indicates the jth type of ingredient to be tested corresponding to the i-th type of pharmaceutical product to be tested, a3′ i Indicates the total number of component types that need to be tested corresponding to the set i-th pharmaceutical product type to be tested;
[0100] S12, in conjunction with the pharmaceutical finished product sample set to be tested and the pharmaceutical ingredient type matrix, collect a number of pharmaceutical finished product samples with known contents of various ingredients and corresponding pharmaceutical ingredient content data corresponding to each pharmaceutical finished product type to be tested, to obtain a known pharmaceutical finished product sample matrix and a known pharmaceutical finished product ingredient actual content data set matrix a3; a3 is as follows,
[0101]
[0102] Among them, a 3ij represents the actual content data set of the ingredients of the jth known finished pharmaceutical product sample corresponding to the i-th type of finished pharmaceutical product to be tested, and a′4 represents the total number of corresponding known finished pharmaceutical product samples collected for each type of finished pharmaceutical product to be tested; a 3ijk Indicates the actual content data of the kth type of ingredient in the jth known finished pharmaceutical product sample corresponding to the ith type of finished pharmaceutical product to be tested;
[0103] S2. Use multiple initial spectral detection devices to perform component detection on each known pharmaceutical finished product sample in conjunction with a known pharmaceutical finished product component actual content data set matrix to obtain a known pharmaceutical finished product component detection content data set matrix; adjust the parameters of each initial spectral detection device according to the known pharmaceutical finished product component detection content data set matrix and the known pharmaceutical finished product component actual content data set matrix to obtain a final spectral detection device parameter data set matrix;
[0104] The S2 comprises the following steps:
[0105] S21, setting a plurality of identical initial spectral detection devices to obtain an initial spectral detection device set; matching the pharmaceutical ingredient type matrix and using each initial spectral detection device in the initial spectral detection device set to perform ingredient detection on each known pharmaceutical finished product sample in the known pharmaceutical finished product sample matrix, to obtain a known pharmaceutical finished product ingredient detection content data set matrix a4; as follows,
[0106]
[0107] Among them, a 4ij represents the component detection content data set obtained by spectral detection of the jth known pharmaceutical product sample corresponding to the i-th type of pharmaceutical product to be detected. a 4ijk represents the k-th type of component detection content data obtained by performing spectral detection on the j-th known pharmaceutical product sample corresponding to the i-th type of pharmaceutical product to be detected;
[0108] The S21 comprises the following steps:
[0109] S211, traversing the known pharmaceutical finished product sample matrix; if the currently traversed known pharmaceutical finished product sample is a solid sample, grinding it into powder and dissolving it in a solvent; if it is a liquid sample, mixing it with a solvent; when all the known pharmaceutical finished product samples in the known pharmaceutical finished product sample matrix are mixed, obtaining a mixed known pharmaceutical finished product sample matrix;
[0110] S212, preheating each initial spectrum detection device in the initial spectrum detection device set and performing wavelength and light region correction to stabilize the light source of each initial spectrum detection device, thereby obtaining a corrected initial spectrum detection device set;
[0111] S213, setting a corresponding sample pool for each known pharmaceutical finished product sample in the known pharmaceutical finished product sample matrix and checking it to ensure that the sample windows of all sample pools are adsorbed bubbles; if there are bubbles, tap the sample pool to release the bubbles; when all sample pools have been checked, insert each known pharmaceutical finished product sample in the known pharmaceutical finished product sample matrix into the corresponding sample pool;
[0112] S214, setting the temperature of the surrounding environment during detection, generally to 25°C; and setting the corresponding reference pool; after the setting is completed, using each corrected initial spectrum detection device in the corrected initial spectrum detection device set to measure the component content data of the same type of known pharmaceutical finished product samples in the known pharmaceutical finished product sample matrix, to obtain a known pharmaceutical finished product component detection content data set matrix;
[0113] S22, setting parameter types that need to be adjusted for multiple initial spectral detection devices in the initial spectral detection device set when performing spectral detection, and obtaining a spectral detection device parameter type set; adjusting the parameters of the initial spectral detection devices in combination with the spectral detection device parameter type set, a known pharmaceutical finished product component actual content data set matrix, and a known pharmaceutical finished product component detection content data set matrix; after the adjustment is completed, obtaining a final spectral detection device parameter data set matrix as follows,
[0114]
[0115] in, represents that the final parameter data set is obtained after adjusting the j-th parameter data of the i-th initial spectrum detection device in the initial spectrum detection device set, Indicates the total number of spectrum detection device parameter types in the spectrum detection device parameter type set;
[0116] In S22, adjusting the parameters of the initial spectral detection device in combination with the spectral detection device parameter type set, the known pharmaceutical finished product component actual content data set matrix, and the known pharmaceutical finished product component detection content data set matrix includes the following steps:
[0117] S221, calculating the Euclidean distance data between the actual content data set matrix of the known pharmaceutical finished product ingredients and the detected content data set matrix of the known pharmaceutical finished product ingredients Recorded as known detection error data; the calculation formula is as follows,
[0118]
[0119] S222, setting a component content detection error threshold; when the known detection error data is greater than or equal to the component content detection error threshold, adjusting the parameters of each initial spectrum detection device in the initial spectrum detection device set; otherwise, there is no need to adjust the parameters of each initial spectrum detection device in the initial spectrum detection device set;
[0120] In S222, adjusting the parameters of each initial spectrum detection device in the initial spectrum detection device set includes the following steps:
[0121] S2221. Construct spectral detection equipment parameters to regulate krill population b 1i represents the i-th krill in the krill population adjusted by the spectrum detection device parameters, b1′ represents the scale of the krill population adjusted by the spectrum detection device parameters; the maximum number of iterations of the spectrum detection device parameters adjusting the krill population is set to And the current iteration number is They are respectively recorded as the maximum number of iterations of device parameter adjustment and the current number of iterations of device parameter adjustment; the search space dimension of the spectral detection device parameter adjustment krill population is
[0122] S2222, setting the value interval of parameter data corresponding to each spectrum detection device parameter type in the spectrum detection device parameter type set to obtain a device parameter value interval set c; as follows,
[0123]
[0124] in, respectively represent the lower limit and the upper limit of the value of the parameter data corresponding to the i-th spectrum detection device parameter type in the spectrum detection device parameter type set;
[0125] The spectrum detection equipment parameters are set according to the equipment parameter value interval set to adjust the initial position matrix of each krill in the krill population, and a first initial position matrix set is obtained. c1′ k The initial position matrix of the kth krill in the krill population is represented by the parameters of the spectrum detection device; as follows,
[0126]
[0127] Among them, c1′ kij It represents the position component of the initial position matrix of the ith krill in the krill population adjusted by the spectrum detection device parameters on the jth parameter data dimension of the ith initial spectrum detection device in the initial spectrum detection device set; the calculation formula is as follows:
[0128]
[0129] Among them, rand 1kij Indicates that for c1′ kij Generate a random number between 0 and 1;
[0130] S2223, based on the known detection error data Constructing a fitness function for adjusting krill populations using spectral detection equipment parameters as follows,
[0131]
[0132] S2224, start iteration, before iteration, set the current iteration number of the device parameter adjustment to 1; in the first round of iteration, use the spectrum detection device parameters to adjust the fitness function of the krill population Calculate the fitness value of the initial position matrix of each krill in the first initial position matrix set to obtain a first fitness value set; use the maximum fitness in the first fitness value set and the initial position matrix of the corresponding krill as the first global optimal fitness and the first global optimal position respectively; update the initial position matrix of each krill in the first initial position matrix set according to the first global optimal fitness and the first global optimal position; after the update is completed, add 1 to the current iteration number of the device parameter adjustment and enter the next iteration;
[0133] In each other iteration process, the spectral detection device parameters are used to adjust the fitness function of the krill population. Calculate the fitness value of the position matrix of each krill in the krill population adjusted by the spectral detection device parameters updated in the previous iteration process to obtain a second fitness value set; use the maximum fitness in the second fitness value set and the corresponding krill position matrix as the second global optimal fitness and the second global optimal position respectively; update the position matrix of each krill in the krill population adjusted by the spectral detection device parameters updated in the previous iteration process according to the second global optimal fitness and the second global optimal position; after the update is completed, add 1 to the current iteration number of the device parameter adjustment and enter the next iteration;
[0134] S2225, when When , stop the iteration and get the first final global optimal position; otherwise, continue to iterate until until the time; taking the first final global optimal position as the optimized spectral detection equipment parameter data set matrix; setting the parameter data of each initial spectral detection equipment in the initial spectral detection equipment set according to the optimized spectral detection equipment parameter data set matrix, and obtaining the optimized spectral detection equipment set after the setting is completed; cooperating with the pharmaceutical ingredient type matrix and using the spectral detection equipment in the optimized spectral detection equipment set to perform ingredient detection on each known pharmaceutical finished product sample in the known pharmaceutical finished product sample matrix, to obtain the optimized known pharmaceutical finished product ingredient detection content data set matrix; calculating the Euclidean distance data between the optimized known pharmaceutical finished product ingredient detection content data set matrix and the known pharmaceutical finished product ingredient actual content data set matrix, to obtain the optimized known detection error data;
[0135] When the known detection error data after optimization is less than the component content detection error threshold, the optimized spectrum detection device parameter data set matrix is used as the final spectrum detection device parameter data set matrix; otherwise, return to S2224 to continue iterating until the known detection error data after optimization is less than the component content detection error threshold;
[0136] S3, performing component content detection on each of the pharmaceutical finished product samples to be detected in the pharmaceutical finished product sample set in cooperation with the final spectrum detection equipment parameter data set matrix, to obtain a pharmaceutical finished product component content data matrix;
[0137] The S3 comprises the following steps:
[0138] S31, using the final spectrum detection device parameter data set matrix to set the parameters of each initial spectrum detection device in the initial spectrum detection device set to obtain a final spectrum detection device set;
[0139] S32, cooperate with the pharmaceutical ingredient type matrix and use each final spectral detection device in the final spectral detection device set to detect the ingredient content of each pharmaceutical finished product sample to be detected in the pharmaceutical finished product sample set to obtain the pharmaceutical finished product ingredient content data matrix d; as follows,
[0140]
[0141] Among them, d ij represents the component content data of the jth type of the i-th pharmaceutical product sample to be tested in the pharmaceutical product sample set to be tested, d i ′ represents the total number of component types of the i-th pharmaceutical finished product sample to be tested in the pharmaceutical finished product sample set to be tested;
[0142] S4. Determine whether the quality of each pharmaceutical product sample in the pharmaceutical product sample set is qualified according to the pharmaceutical product ingredient content data matrix; perform secondary testing on the pharmaceutical product samples in the pharmaceutical product sample set according to the pharmaceutical product ingredient content data matrix and determine whether the quality of the pharmaceutical product samples subjected to secondary testing is qualified;
[0143] The S4 comprises the following steps:
[0144] S41. When there is component content data of 0 in the component content data matrix of the pharmaceutical finished product to be tested, the pharmaceutical finished product to be tested corresponding to the component content data of 0 in the component content data matrix of the pharmaceutical finished product to be tested is recorded as a secondary pharmaceutical finished product to be tested; otherwise, the component content data matrix of the pharmaceutical finished product to be tested is compared with the component content data of the corresponding standard pharmaceutical finished product, and the quality of each pharmaceutical finished product to be tested sample set is determined to be qualified according to the comparison result;
[0145] S42, performing secondary testing on the secondary finished pharmaceutical product to be tested to obtain a data set of component content of the secondary finished pharmaceutical product to be tested; comparing the data set of component content of the secondary finished pharmaceutical product to be tested with the component content data of the corresponding standard finished pharmaceutical product, and determining whether the quality of the secondary finished pharmaceutical product to be tested is qualified according to the comparison result;
[0146] In S42, performing a secondary test on the pharmaceutical product to be tested for a second time to obtain a data set of component contents of the pharmaceutical product to be tested for a second time comprises the following steps:
[0147] S421, evaporate and ionize a tiny area on the surface of the secondary pharmaceutical product to be tested by high-energy laser pulses to generate plasma; set an initial spectrometer; use the initial spectrometer to detect and analyze the spectrum emitted by the plasma to obtain an initial secondary pharmaceutical product component content data set represents the component content data of the i-th type obtained by detecting the spectrum emitted by the plasma using the initial spectrometer, Indicates the total number of component types of the secondary pharmaceutical product to be tested;
[0148] S422: Setting a secondary component content error threshold and setting the content data of the standard finished pharmaceutical product corresponding to the secondary finished pharmaceutical product to be tested to obtain a secondary standard finished pharmaceutical product content data set Represents the component content data of the i-th type of the standard pharmaceutical product corresponding to the secondary pharmaceutical product to be tested; calculates the Euclidean distance between the secondary standard pharmaceutical product content data set and the initial secondary pharmaceutical product component content data set to obtain the initial secondary component content Euclidean distance e; the calculation formula is as follows,
[0149]
[0150] S423, setting a number of spectrometer measurement accuracy influencing parameter types, and obtaining a set of spectrometer measurement accuracy influencing parameter types. e i ′ represents the type of parameters affecting the measurement accuracy of the i-th spectrometer. Indicates the total number of parameter types that are set to affect the measurement accuracy of the spectrometer; when the Euclidean distance of the secondary component content is less than the secondary component content error threshold, the quality of the secondary pharmaceutical product to be tested is qualified; otherwise, the parameters of the initial spectrometer are adjusted in accordance with the parameter type set affecting the measurement accuracy of the spectrometer; after the adjustment is completed, the final spectrometer is obtained; the spectrum emitted by the plasma is detected and analyzed using the final spectrometer to obtain a final secondary pharmaceutical product component content data set; the Euclidean distance between the secondary standard pharmaceutical product content data set and the final secondary pharmaceutical product component content data set to be tested is calculated to obtain the final secondary component content Euclidean distance;
[0151] When the final secondary component content Euclidean distance is less than the secondary component content error threshold, the quality of the secondary pharmaceutical product to be tested is qualified; otherwise, the quality of the secondary pharmaceutical product to be tested is unqualified;
[0152] In S423, the parameters of the initial spectrometer are adjusted in accordance with the spectrometer measurement accuracy influencing parameter type set; after the adjustment is completed, obtaining the final spectrometer includes the following steps:
[0153] S4231, construct spectrometer parameters to regulate krill population b 2i represents the i-th krill in the krill population adjusted by the spectrometer parameters, b2′ represents the scale of the krill population adjusted by the spectrometer parameters; the maximum number of iterations of the spectrometer parameter adjustment krill population is set to And the current iteration number is They are respectively recorded as the maximum number of iterations of spectrometer parameter adjustment and the current number of iterations of spectrometer parameter adjustment; the search space dimension of the spectrometer parameter adjustment krill population is
[0154] S4232, setting the value interval of the parameter corresponding to each parameter type in the parameter type set affecting the measurement accuracy of the spectrometer, and obtaining the value interval set of the parameter affecting the measurement accuracy of the spectrometer. as follows,
[0155]
[0156] in, They respectively represent the lower limit and upper limit of the value of the parameter corresponding to the i-th parameter type in the parameter type set affecting the measurement accuracy of the spectrometer;
[0157] The spectrometer parameters are set according to the parameter value interval set affecting the measurement accuracy of the spectrometer to adjust the initial position of each krill in the krill population, and a second initial position matrix c′2 is obtained; as follows,
[0158]
[0159] Among them, c′ 2ji It represents the position component of the initial position of the j-th krill in the krill population adjusted by the spectrometer parameter on the parameter data dimension corresponding to the parameter type affecting the measurement accuracy of the i-th spectrometer; the calculation formula is as follows:
[0160]
[0161] Among them, rand 2ji Indicates that for c′ 2ji Generate a random number between 0 and 1;
[0162] S4233, constructing a fitness function for adjusting the krill population using spectrometer parameters according to the Euclidean distance e of the initial secondary component content as follows,
[0163]
[0164] S4234, start iteration, before iteration, set the current iteration number of the spectrometer parameter adjustment to 1; in the first round of iteration, use the spectrometer parameter to adjust the fitness function of the krill population Calculate the fitness value of the initial position of each krill in the second initial position matrix to obtain a third fitness value set; use the maximum fitness in the third fitness value set and the initial position of the corresponding krill as the third global optimal fitness and the third global optimal position respectively; update the initial position of each krill in the second initial position matrix according to the third global optimal fitness and the third global optimal position; after the update is completed, add 1 to the current iteration number of the spectrometer parameter adjustment and enter the next iteration;
[0165] In each other iteration, the spectrometer parameters are used to adjust the fitness function of the krill population. Calculate the fitness value of each krill position in the krill population adjusted by the spectrometer parameters obtained in the last iteration process to obtain a fourth fitness value set; use the maximum fitness in the fourth fitness value set and the corresponding krill position as the fourth global optimal fitness and the fourth global optimal position respectively; update each krill position in the krill population adjusted by the spectrometer parameters obtained in the last iteration process according to the fourth global optimal fitness and the fourth global optimal position; after the update is completed, add 1 to the current iteration number of the spectrometer parameter adjustment and enter the next iteration;
[0166] S4235, when When , the iteration is stopped to obtain a second final global optimal position; the parameters of the initial spectrometer are set using the second final global optimal position to obtain a final spectrometer.
[0167] Embodiment 2
[0168] This embodiment discloses a pharmaceutical finished product component detection system based on sample spectral data, and the system can implement the method of the above embodiment, including a pharmaceutical finished product setting module to be detected, a pharmaceutical component type setting module to be detected, a known pharmaceutical finished product actual component content data acquisition module, an initial spectral detection device setting module, a known pharmaceutical finished product initial detection data acquisition module, a spectral detection device parameter adjustment module, a spectral detection device parameter setting module, a pharmaceutical finished product component content data detection module to be detected, a primary pharmaceutical qualified judgment module, a secondary detection module and a secondary pharmaceutical qualified judgment module;
[0169] The pharmaceutical finished product to be tested setting module is used to set a plurality of pharmaceutical finished product samples to be tested, and obtain a pharmaceutical finished product sample set to be tested;
[0170] The pharmaceutical component type setting module to be detected is used to set the component types that need to be detected in various types of finished pharmaceutical products to obtain a pharmaceutical component type matrix;
[0171] The known finished pharmaceutical product actual component content data collection module is used to collect pharmaceutical component content data corresponding to a plurality of finished pharmaceutical product samples with known various component contents corresponding to various finished pharmaceutical product types according to the pharmaceutical component type matrix, and obtain a known finished pharmaceutical product component actual content data set matrix;
[0172] The initial spectrum detection device setting module is used to set a plurality of identical initial spectrum detection devices to obtain an initial spectrum detection device set;
[0173] The known finished pharmaceutical product initial detection data acquisition module is used to cooperate with the known finished pharmaceutical product component actual content data set matrix and the initial spectrum detection equipment set to perform component detection on each known finished pharmaceutical product sample to obtain the known finished pharmaceutical product component detection content data set matrix;
[0174] The spectrum detection device parameter adjustment module is used to adjust the parameters of each initial spectrum detection device in the initial spectrum detection device set according to the known pharmaceutical finished product component detection content data set matrix and the known pharmaceutical finished product component actual content data set matrix to obtain the final spectrum detection device parameter data set matrix;
[0175] The spectrum detection device parameter setting module is used to set the parameters of each initial spectrum detection device in the initial spectrum detection device set using the final spectrum detection device parameter data set matrix to obtain a final spectrum detection device set;
[0176] The pharmaceutical product component content data detection module is used to use the final spectrum detection equipment set to perform component content detection on each pharmaceutical product sample to be detected in the pharmaceutical product sample set to obtain a pharmaceutical product component content data matrix;
[0177] The primary pharmaceutical qualification determination module is used to determine whether the quality of each pharmaceutical product sample to be tested in the pharmaceutical product sample set is qualified according to the pharmaceutical product component content data matrix to be tested;
[0178] The secondary detection module is used to perform secondary detection on the pharmaceutical finished product samples to be detected in the pharmaceutical finished product sample set according to the pharmaceutical finished product component content data matrix to obtain a secondary pharmaceutical finished product component content data set to be detected;
[0179] The secondary pharmaceutical product qualification determination module is used to determine whether the quality of the pharmaceutical product sample to be tested for secondary testing is qualified based on the secondary pharmaceutical product component content data set to be tested.
[0180] In the description of this specification, the description with reference to the terms "one embodiment", "example", "specific example", etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner.
[0181] The preferred embodiments of the invention disclosed above are only used to help explain the invention. The preferred embodiments do not describe all the details in detail, nor do they limit the invention to the specific implementation methods described. Obviously, many modifications and changes can be made according to the content of this specification. This specification selects and specifically describes these embodiments in order to better explain the principles and practical applications of the invention, so that those skilled in the art can understand and use the invention well.
Claims
1. A method for detecting ingredients in finished pharmaceutical products based on sample spectral data, characterized in that: The following steps are involved: S1. Collect pharmaceutical ingredient content data corresponding to a number of pharmaceutical finished product samples with known contents of various ingredients corresponding to various types of pharmaceutical finished products, and obtain a dataset matrix of actual contents of known pharmaceutical finished product ingredients; S2. Use multiple initial spectral detection devices to perform component detection on each known pharmaceutical finished product sample in conjunction with a known pharmaceutical finished product component actual content data set matrix to obtain a known pharmaceutical finished product component detection content data set matrix; adjust the parameters of each initial spectral detection device according to the known pharmaceutical finished product component detection content data set matrix and the known pharmaceutical finished product component actual content data set matrix to obtain a final spectral detection device parameter data set matrix; S3, performing component content detection on each of the pharmaceutical finished product samples to be detected in the pharmaceutical finished product sample set in cooperation with the final spectrum detection equipment parameter data set matrix, to obtain a pharmaceutical finished product component content data matrix; S4. Determine whether the quality of each pharmaceutical product sample in the pharmaceutical product sample set is qualified according to the pharmaceutical product ingredient content data matrix; perform secondary testing on the pharmaceutical product samples in the pharmaceutical product sample set according to the pharmaceutical product ingredient content data matrix and determine whether the quality of the pharmaceutical product samples subjected to secondary testing is qualified; The S4 comprises the following steps: S41. When there is a component content data of 0 in the component content data matrix of the finished pharmaceutical product to be tested, the corresponding finished pharmaceutical product to be tested in the component content data matrix of the finished pharmaceutical product to be tested is recorded as a secondary finished pharmaceutical product to be tested; otherwise, the component content data matrix of the finished pharmaceutical product to be tested is compared with the component content data of the corresponding standard finished pharmaceutical product, and it is determined whether the quality of each finished pharmaceutical product to be tested sample in the finished pharmaceutical product to be tested sample set is qualified; S42, performing secondary testing on the secondary finished pharmaceutical product to be tested to obtain a data set of component content of the secondary finished pharmaceutical product to be tested; comparing the data set of component content of the secondary finished pharmaceutical product to be tested with the component content data of the corresponding standard finished pharmaceutical product, and determining whether the quality of the secondary finished pharmaceutical product to be tested is qualified according to the comparison result; In S42, performing a secondary test on the pharmaceutical product to be tested for a second time to obtain a data set of component contents of the pharmaceutical product to be tested for a second time comprises the following steps: S421, evaporating and ionizing a tiny area on the surface of the secondary pharmaceutical product to be tested by high-energy laser pulses to generate plasma and set an initial spectrometer; using the initial spectrometer to detect and analyze the spectrum emitted by the plasma to obtain an initial data set of component content of the secondary pharmaceutical product to be tested; S422, setting a secondary component content error threshold and setting the content data of the standard pharmaceutical product corresponding to the secondary pharmaceutical product to be detected, to obtain a secondary standard pharmaceutical product content data set; calculating the Euclidean distance between the secondary standard pharmaceutical product content data set and the initial secondary pharmaceutical product component content data set to obtain the initial secondary component content Euclidean distance; when the secondary component content Euclidean distance is less than the secondary component content error threshold, the quality of the secondary pharmaceutical product to be detected is qualified; otherwise, adjusting the parameters of the initial spectrometer in conjunction with the spectrometer measurement accuracy influencing parameter type set; after the adjustment is completed, a final spectrometer is obtained; using the final spectrometer to detect and analyze the spectrum emitted by the plasma to obtain a final secondary pharmaceutical product component content data set; calculating the Euclidean distance between the secondary standard pharmaceutical product content data set and the final secondary pharmaceutical product component content data set to obtain a final secondary component content Euclidean distance; When the final Euclidean distance of the secondary component content is less than the secondary component content error threshold, the quality of the secondary pharmaceutical product to be tested is qualified; otherwise, the quality of the secondary pharmaceutical product to be tested is unqualified.
2. The method for detecting ingredients of finished pharmaceutical products based on sample spectral data according to claim 1, characterized in that: The S1 comprises the following steps: S11, setting a plurality of samples of finished pharmaceutical products to be tested to obtain a sample set of finished pharmaceutical products to be tested; and then setting the types of components to be tested in a plurality of types of finished pharmaceutical products to obtain a pharmaceutical component type matrix; S12. Collect several pharmaceutical finished product samples with known contents of various ingredients and corresponding pharmaceutical ingredient content data corresponding to each type of pharmaceutical finished product to be tested in conjunction with the pharmaceutical finished product sample set to be tested and the pharmaceutical ingredient type matrix, to obtain a known pharmaceutical finished product sample matrix and a known pharmaceutical finished product ingredient actual content data set matrix.
3. The method for detecting ingredients of finished pharmaceutical products based on sample spectral data according to claim 2, characterized in that: The S2 comprises the following steps: S21, setting a plurality of identical initial spectral detection devices to obtain an initial spectral detection device set; matching the pharmaceutical ingredient type matrix and using each initial spectral detection device in the initial spectral detection device set to perform ingredient detection on each known pharmaceutical finished product sample in the known pharmaceutical finished product sample matrix, to obtain a known pharmaceutical finished product ingredient detection content data set matrix; S22, setting the parameter types that need to be adjusted for the multiple initial spectral detection devices in the initial spectral detection device set when performing spectral detection, and obtaining a spectral detection device parameter type set; adjusting the parameters of the initial spectral detection devices in combination with the spectral detection device parameter type set, a known pharmaceutical finished product component actual content data set matrix, and a known pharmaceutical finished product component detection content data set matrix; after the adjustment is completed, obtaining a final spectral detection device parameter data set matrix.
4. The method for detecting ingredients in finished pharmaceutical products based on sample spectral data according to claim 3, characterized in that: In S22, adjusting the parameters of the initial spectral detection device in combination with the spectral detection device parameter type set, the known pharmaceutical finished product component actual content data set matrix, and the known pharmaceutical finished product component detection content data set matrix includes the following steps: S221, calculating the Euclidean distance data between the actual content data set matrix of the known pharmaceutical finished product ingredients and the detected content data set matrix of the known pharmaceutical finished product ingredients, and recording it as known detection error data; S222. Set a component content detection error threshold; when the known detection error data is greater than or equal to the component content detection error threshold, adjust the parameters of each initial spectrum detection device in the initial spectrum detection device set; otherwise, there is no need to adjust the parameters of each initial spectrum detection device in the initial spectrum detection device set.
5. The method for detecting ingredients in finished pharmaceutical products based on sample spectral data according to claim 4, characterized in that: In S222, the parameters of each initial spectrum detection device in the initial spectrum detection device set are adjusted using a krill optimization algorithm.
6. The method for detecting ingredients in finished pharmaceutical products based on sample spectral data according to claim 5, characterized in that: The S3 comprises the following steps: S31, using the final spectrum detection device parameter data set matrix to set the parameters of each initial spectrum detection device in the initial spectrum detection device set to obtain a final spectrum detection device set; S32, using the pharmaceutical ingredient type matrix and each final spectral detection device in the final spectral detection device set to detect the ingredient content of each pharmaceutical finished product sample to be detected in the pharmaceutical finished product sample set, to obtain a pharmaceutical finished product ingredient content data matrix.
7. The method for detecting ingredients in finished pharmaceutical products based on sample spectral data according to claim 6, characterized in that: In S423, the parameters of the initial spectrometer are adjusted in accordance with the spectrometer measurement accuracy influencing parameter type set; after the adjustment is completed, obtaining the final spectrometer includes the following steps: S4231, constructing a spectrometer parameter to adjust the krill population; setting the maximum number of iterations of the spectrometer parameter to adjust the krill population is And the current number of iterations is , are respectively recorded as the maximum number of iterations for spectrometer parameter adjustment and the current number of iterations for spectrometer parameter adjustment; S4232, setting the value interval of the parameter corresponding to each parameter type in the parameter type set affecting the measurement accuracy of the spectrometer to obtain the value interval set of the parameter affecting the measurement accuracy of the spectrometer; setting the spectrometer parameters according to the value interval set affecting the measurement accuracy of the spectrometer to adjust the initial position of each krill in the krill population to obtain a second initial position matrix; S4233, constructing a fitness function for adjusting the krill population by spectrometer parameters according to the Euclidean distance of the initial secondary component content; S4234, start iteration, and before iteration, set the current iteration number of the spectrometer parameter adjustment to 1; in each round of iteration, use the fitness function of the spectrometer parameter adjustment krill population to calculate the fitness value of each krill position in the spectrometer parameter adjustment krill population updated in the previous round of iteration, and update each krill position in the spectrometer parameter adjustment krill population updated in the previous round of iteration; S4235, when When , the iteration is stopped to obtain a second final global optimal position; the parameters of the initial spectrometer are set using the second final global optimal position to obtain a final spectrometer.
Citation Information
Patent Citations
Big data-based real-time quality detection system and method for platinum-iridium development ring production
CN119064399A