Virtual atlas generation method and electronic equipment

CN118918202APending Publication Date: 2024-11-08SHANGHAI INST FOR FOOD & DRUG CONTROL
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410919203.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-09
Publication Date
2024-11-08

Smart Images

  • Figure CN118918202A_ABST
    Figure CN118918202A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a virtual atlas generation method and electronic equipment, and relates to the technical field of atlas processing. The virtual atlas generation method comprises the following steps: adding a set number of intensity values at a preset position in an original longitudinal axis array of an original actual measurement atlas of a target object, and deleting the set number of intensity values at another position corresponding to the preset position to obtain a first longitudinal axis array; calculating the product between each specified intensity value in the first longitudinal axis array and the intensity change percentage, and updating the specified intensity values by using the product corresponding to each specified intensity value to obtain a second longitudinal axis array; sampling in the determined sine wave amplitude range to generate a sine wave array; adjusting a continuous preset number of selected intensity values in the second longitudinal axis array based on a continuous preset number of sine wave amplitudes in the sine wave array to obtain a new longitudinal axis array; and combining the original horizontal axis array with the new longitudinal axis array to obtain a virtual map. According to the invention, the virtual atlas with good reliability can be generated.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of graph processing, and in particular to a method for generating a virtual graph and an electronic device. Background Art

[0002] Biotechnology drugs refer to therapeutic drugs produced using DNA recombinant technology or other innovative biotechnologies, covering recombinant proteins / recombinant peptides, vaccines, nucleic acid drugs, cell therapy products, etc., and are an important research subject for monoclonal antibody drugs.

[0003] At present, there are large-scale pattern recognition models that can identify drugs based on their Raman spectra, but as the spectral library continues to expand, new models are needed to adapt to the identification of more categories of drugs. Traditional pattern recognition technology usually requires a large amount of manually annotated data for training. To ensure the accuracy of the new model, it relies on a large amount of Raman spectra data of biotechnology drugs as training data. However, the collection of Raman spectra of biotechnology drugs depends on samples, instruments and time. It is extremely difficult and costly to collect a large amount of Raman spectra data and then manually annotate them for model training. Summary of the invention

[0004] The purpose of the present invention is to provide a method and electronic device for generating a virtual spectrum, wherein the original vertical axis array of the original measured spectrum of the target object is processed in accordance with the Raman spectrum characteristics, so that the virtual spectrum of the target object obtained can also conform to the Raman spectrum characteristics, wherein the original horizontal axis array is combined with the new vertical axis array, and it can also be ensured that the obtained virtual spectrum has the characteristic information of the original measured spectrum; thereby, the generated virtual spectrum can retain the original characteristic information and conform to the Raman spectrum characteristics, thereby ensuring the reliability of the generated virtual spectrum, so that a large number of virtual spectra can be generated for the next step of use, such as used as training data for spectrum recognition model training.

[0005] To achieve the above-mentioned purpose, the present invention provides a method for generating a virtual spectrum, comprising: obtaining an original horizontal axis array and an original vertical axis array of an original measured spectrum of a target object, wherein the original measured spectrum is a Raman spectrum; adding a set number of intensity values ​​at a preset position in the original vertical axis array, and deleting the set number of intensity values ​​at another position corresponding to the preset position in the original vertical axis array to obtain a first vertical axis array; for each specified intensity value in the first vertical axis array, calculating the product between the specified intensity value and the intensity change percentage, and in the first vertical axis array, updating the specified intensity value by using the product corresponding to each of the specified intensity values. degree value to obtain a second vertical axis array; select a continuous preset number of selected intensity values ​​from the second vertical axis array, determine a maximum value in the continuous preset number of selected intensity values ​​as the target intensity value, and determine the sine wave amplitude range based on the target intensity value, and perform sampling within the sine wave amplitude range to generate a sine wave array; select a continuous preset number of sine wave amplitudes from the sine wave array, and adjust the continuous preset number of selected intensity values ​​in the second vertical axis array based on the continuous preset number of sine wave amplitudes to obtain a new vertical axis array; combine the original horizontal axis array with the new vertical axis array to obtain a virtual map of the target object.

[0006] The present invention also provides an electronic device, comprising: one or more processors and one or more memories, wherein the one or more memories store a computer program, and the computer program is loaded and executed by the one or more processors to implement the method for generating a virtual map as described above.

[0007] In one embodiment, adding a set number of intensity values ​​at a preset position in the original vertical axis array, and deleting the set number of intensity values ​​at another position in the original vertical axis array corresponding to the preset position, comprises:

[0008] Add a set number of intensity values ​​before the first intensity value in the original vertical axis array, and delete the set number of intensity values ​​starting from the last intensity value in the original vertical axis array; or,

[0009] A set number of intensity values ​​are added after the last intensity value in the original vertical axis array, and the set number of intensity values ​​are deleted from the first intensity value in the original vertical axis array.

[0010] In one embodiment, determining a maximum value among the consecutive preset number of selected intensity values ​​as the target intensity value comprises:

[0011] Determining all maximum points among the consecutive preset number of selected intensity values;

[0012] After removing the first maximum point from all the maximum points, the intensity value corresponding to the largest maximum point is selected as the target intensity value.

[0013] In one embodiment, the adjusting a continuous preset number of selected intensity values ​​in the second vertical axis array based on the continuous preset number of sine wave amplitudes to obtain a new vertical axis array includes:

[0014] Arranging the preset number of consecutive sine wave amplitudes in reverse order;

[0015] The continuous preset number of sine wave amplitudes arranged in reverse order are added to the continuous preset number of selected intensity values ​​in the second vertical axis array respectively to obtain a new vertical axis array.

[0016] In one embodiment, sampling within the sine wave amplitude range to generate a sine wave array includes:

[0017] According to the set sampling frequency and sine wave frequency, sampling is performed within the sine wave amplitude range to obtain a sine wave array.

[0018] In one embodiment, the intensity variation percentage is between 0.995 and 1.005.

[0019] In one embodiment, the set number is a value randomly selected from 1 to 5.

[0020] In one embodiment, the sine wave amplitude range is obtained by multiplying the target intensity value by the upper limit percentage value to obtain the upper limit value of the amplitude of the sine wave amplitude range, and multiplying the target intensity value by the lower limit percentage value to obtain the lower limit value of the amplitude of the sine wave amplitude range, the upper limit percentage value is 0.3, and the lower limit percentage value is 0.03.

[0021] In one embodiment, a continuous preset number of selected intensity values ​​selected from the second vertical axis array are the first N intensity values ​​in the second vertical axis array, and a continuous preset number of sinusoidal wave amplitude values ​​selected from the sinusoidal wave array are the first N sinusoidal wave amplitudes of the sinusoidal wave array, and N is 1800. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] Figure 1 is a specific flow chart of the method for generating a virtual map according to the first embodiment of the present invention;

[0023] Figure 2 is a schematic diagram of an original Raman spectrum and a virtual spectrum of human immunoglobulin for intravenous injection according to the first embodiment of the present invention;

[0024] Figure 3It is a schematic diagram of the training result of using the virtual graph generated by the method for generating the virtual graph in the first embodiment of the present invention as a training set to train the Transformer model;

[0025] Figure 4 is a schematic diagram of the accuracy results of predicting the original measured spectrum using the trained model according to the first embodiment of the present invention;

[0026] Figure 5 is a schematic diagram of a confusion matrix for predicting an original measured spectrum using the optimal model obtained through training according to the first embodiment of the present invention;

[0027] Figure 6 It is a schematic diagram of the ROC curve of predicting the original measured spectrum using the optimal model obtained through training according to the first embodiment of the present invention. DETAILED DESCRIPTION

[0028] The following will be described in detail with reference to the accompanying drawings to provide a clearer understanding of the purpose, features and advantages of the present invention. It should be understood that the embodiments shown in the accompanying drawings are not intended to limit the scope of the present invention, but are only intended to illustrate the essential spirit of the technical solution of the present invention.

[0029] In the following description, certain specific details are set forth for the purpose of illustrating various disclosed embodiments to provide a thorough understanding of the various disclosed embodiments. However, those skilled in the relevant art will recognize that the embodiments may be practiced without one or more of these specific details. In other cases, well-known devices, structures, and techniques associated with the present application may not be shown or described in detail to avoid unnecessarily obscuring the description of the embodiments.

[0030] Unless the context requires otherwise, throughout the specification and claims, the word "comprise" and variations such as "include" and "have" should be construed in an open, inclusive sense, ie, should be interpreted as "including, but not limited to."

[0031] References throughout the specification to "one embodiment" or "an embodiment" indicate that a particular feature, structure, or characteristic described in connection with the embodiment is included in at least one embodiment. Thus, the appearances of "in one embodiment" or "in an embodiment" in various places throughout the specification are not necessarily all referring to the same embodiment. Furthermore, the particular features, structures, or characteristics may be combined in any manner in one or more embodiments.

[0032] As used in this specification and the appended claims, the singular forms "a", "an", and "the" include plural referents unless the context clearly dictates otherwise. It should be noted that the term "or" is generally employed in its sense including "or / and" unless the context clearly dictates otherwise.

[0033] In the following description, in order to clearly show the structure and working mode of the present invention, many directional words will be used for description, but the words "front", "back", "left", "right", "outside", "inside", "outward", "inward", "up", "down", etc. should be understood as convenient terms and should not be understood as restrictive terms.

[0034] The first embodiment of the present invention relates to a method for generating a virtual map, which can be run on a computer device, such as a desktop host, a laptop computer, etc. The computer device executes the method for generating a virtual map of this embodiment to generate several virtual maps of the target object, the virtual map is a Raman spectrum, and the target object can be a biotechnology drug, but it is not limited to this, so all the target objects that need to generate a virtual map can be generated using the method for generating a virtual map of this embodiment.

[0035] like Figure 1 The figure shows a specific flow chart of the method for generating a virtual atlas in this embodiment.

[0036] Step 101, obtaining an original horizontal axis array and an original vertical axis array of an original measured spectrum of a target object, wherein the original measured spectrum is a Raman spectrum.

[0037] Specifically, first obtain the original measured spectrum of the target object, which is the Raman spectrum and can be measured by a Raman spectrometer. The original measured spectrum of the target object can be divided into horizontal axis data and vertical axis data, forming two arrays, namely the original horizontal axis array and the original vertical axis array. The numbers in the original horizontal axis array are the wave number values ​​of the Raman shift, that is, the wave number difference of the scattered light relative to the incident light; the numbers in the original vertical axis array are the intensity values ​​at the corresponding wave number values, that is, the intensity values ​​of the scattered light.

[0038] Step 102 , adding a set number of intensity values ​​at a preset position in the original vertical axis array, and deleting a set number of intensity values ​​at another position corresponding to the preset position in the original vertical axis array, to obtain a first vertical axis array.

[0039] Step 103, for each designated intensity value in the first vertical axis array, calculate the product between the designated intensity value and the intensity change percentage, and in the first vertical axis array, update the designated intensity value using the product corresponding to each designated intensity value to obtain a second vertical axis array.

[0040] Step 104, select a preset number of consecutive selected intensity values ​​from the second vertical axis array, determine a maximum value among the preset number of consecutive selected intensity values ​​as the target intensity value, determine the sine wave amplitude range based on the target intensity value, and sample within the sine wave amplitude range to generate a sine wave array.

[0041] Step 105 , selecting a continuous preset number of sine wave amplitudes in the sine wave array, and adjusting a continuous preset number of selected intensity values ​​in the second vertical axis array based on the continuous preset number of sine wave amplitudes to obtain a new vertical axis array.

[0042] Step 106, combining the original horizontal axis array and the new vertical axis array to obtain a virtual map of the target object.

[0043] Specifically, the original vertical axis array of the original measured spectrum of the target object is processed in accordance with the Raman characteristics, thereby obtaining a new vertical axis array, and the original horizontal axis array and the new vertical axis array are correspondingly combined to obtain a virtual spectrum of the target object.

[0044] It should be noted that, in the process of generating a virtual map, only one new vertical axis array can be generated, thereby combining the original horizontal axis array with the new vertical axis array to obtain a virtual map of the target object; or multiple new vertical axis arrays can be generated in sequence, and the original horizontal axis array is combined with the multiple new vertical axis arrays respectively, so that multiple virtual maps of the target object can be obtained at one time.

[0045] The processing that complies with the Raman characteristics includes at least one of the following: peak drift processing, intensity change processing, and fluorescence interference processing. The following describes in detail three ways of processing the original vertical axis array of the original measured spectrum of the target object.

[0046] In the first step, the original vertical axis array is subjected to spectrum peak drift processing to obtain a first vertical axis array.

[0047] Raman spectrum is a scattering spectrum. The Raman shift represented by the horizontal axis is the relative displacement value between the wavelength of the incident light and the wavelength of the scattered light. Since it is a relative value, there may be an offset during the measurement process. Therefore, the peak drift can be simulated by performing a peak drift process on the original vertical axis array of the target object to obtain the first vertical axis array, so that the subsequently generated virtual spectrum can simulate the peak drift scenario.

[0048] The method of performing peak shift processing on the original vertical axis array is as follows:

[0049] A set number of intensity values ​​are added at a preset position in the original vertical axis array, and a set number of intensity values ​​are deleted at another position corresponding to the preset position in the original vertical axis array, to obtain a first vertical axis array; the preset position can be any position in the original vertical axis array, and the other position corresponding to the preset position can be a position symmetrical to the preset position in the original vertical axis array; the set number can also be set as needed, such as a fixed value such as 3, 4, 5, or a number randomly selected within a numerical range, such as [1, 5], or can be set based on the number of intensity values ​​in the original vertical axis array. The added intensity value can be the intensity value at the preset position, or the mean, median, or any one of the set number of intensity values ​​starting from the preset position and moving forward or backward; the added intensity value can be the same value or different values.

[0050] Exemplarily, the preset position is the first intensity value of the original vertical axis array, and the other position corresponding to the preset position is the last intensity value of the original vertical axis array; at this time, a set number of intensity values ​​are added before the first intensity value in the original vertical axis array, and a set number of intensity values ​​are deleted from the last intensity value in the original vertical axis array. For example, if the set number is 5, 5 intensity values ​​are added before the first intensity value of the original vertical axis array, and the added intensity value is the first intensity value in the original vertical axis array. For example, if the first intensity value is A, five intensity values ​​A are added before the first intensity value A; then, 5 intensity values ​​are deleted from the last intensity value of the original vertical axis array, that is, the last 5 intensity values ​​of the original vertical axis array are deleted; thereby, a new vertical axis array can be obtained, and the new vertical axis array has the same length as the original vertical axis array, but the spectrum peak is shifted backward by 5.

[0051] From the above, all the intensity values ​​in the original vertical axis array can be shifted backward by a set number of intensity values ​​to obtain a first vertical axis array. The first vertical axis array can well simulate the situation of spectrum peak drift.

[0052] Exemplarily, the preset position is the last intensity value of the original vertical axis array, and the other position corresponding to the preset position is the first intensity value of the original vertical axis array. At this time, a set number of intensity values ​​are added after the last intensity value in the original vertical axis array, and a set number of intensity values ​​are deleted from the first intensity value in the original vertical axis array. For example, if the set number is 5, 5 intensity values ​​are added after the last intensity value of the original vertical axis array, and the added intensity value is the last intensity value in the original vertical axis array. For example, if the last intensity value is B, five intensity values ​​B are added before the last intensity value B; then, 5 intensity values ​​are deleted from the first intensity value of the original vertical axis array, that is, the first five intensity values ​​of the original vertical axis array are deleted; thereby, a new vertical axis array can be obtained, and the new vertical axis array has the same length as the original vertical axis array, but the spectrum peak is shifted backward by 5.

[0053] From the above, all the intensity values ​​in the original vertical axis array can be shifted forward by a set number of intensity values ​​to obtain a first vertical axis array. The first vertical axis array can well simulate the situation of spectrum peak drift.

[0054] In the second step, intensity change processing is performed on the first vertical axis array to obtain a second vertical axis array.

[0055] A single Raman spectrum is formed by superimposing multiple collected sub-spectra, which will contain random noise. Therefore, this random noise can be simulated by performing intensity change processing on the intensity values ​​in the first vertical axis array of the target object to obtain a second vertical axis array. The second vertical axis array is combined with the original horizontal axis array, thereby adding random noise to the subsequently generated virtual spectrum.

[0056] The intensity change processing of the first vertical axis array is as follows:

[0057] For each designated intensity value in the first vertical axis array, the product between the designated intensity value and the intensity change percentage is calculated; in the first vertical axis array, the designated intensity value is updated using the product corresponding to each designated intensity value to obtain a second vertical axis array. The designated intensity value may be part or all of the intensity values ​​in the first vertical axis array, or may be several intensity values ​​selected from the first vertical axis array, such as interval selection, random selection, etc.; the intensity change percentage is a value close to 1, which may be a fixed value, or a value randomly selected from a preset range each time, that is, the intensity change percentage multiplied by each designated intensity value is a value randomly selected from a preset range, and the preset range is, for example, 0.995 to 1.005, then the intensity change percentage is a random value between 0.995 and 1.005, which may include a boundary value.

[0058] For example, if all the intensity values ​​in the first vertical axis array are specified intensity values, all the intensity values ​​in the first vertical axis array are multiplied by the intensity change percentage in sequence to obtain a new intensity value, and all these intensity values ​​form the second vertical axis array in the original order. The intensity change percentage multiplied by each intensity value can be the same value or different values ​​(randomly selected within a preset range).

[0059] Method three, perform fluorescence interference processing on the second vertical axis array to obtain a new vertical axis array:

[0060] Raman spectra are susceptible to fluorescence interference, which causes the low wave number region to bulge as a whole, affecting identification. Therefore, the intensity values ​​in the second vertical axis array of the target object can be processed for fluorescence interference to simulate this fluorescence interference, and a new vertical axis array can be obtained. When the new vertical axis array is combined with the original horizontal axis array, a virtual spectrum with fluorescence interference added can be obtained.

[0061] The method for processing the fluorescence interference of the second vertical axis array is as follows:

[0062] A preset number of selected intensity values ​​are selected from the second vertical axis array, and a target intensity value is determined from the preset number of selected intensity values. Assuming the preset number is N, in order to better simulate the overall low wave number bulge caused by fluorescence interference, the first N intensity values ​​in the second vertical axis array can be selected as the selected intensity values, and the first N intensity values ​​in the second vertical axis array can correspond to the low wave number range in the original horizontal axis array; thus, the size of the preset number N can be determined based on the number of low wave numbers in the second horizontal axis array.

[0063] After selecting N consecutive selected intensity values, a maximum value is determined in the N consecutive selected intensity values ​​as the target intensity value; the specific method includes: first determining all the maximum value points in the N consecutive selected intensity values, the maximum value point is a point whose intensity value is greater than the two adjacent left and right intensity values, and then selecting the maximum value intensity value from all the maximum value points as the target intensity value; in an example, after removing the first maximum value point from all the maximum value points, the intensity value corresponding to the largest maximum value point can be selected as the target intensity value, and the largest maximum value point is the maximum value point with the largest intensity value. The first maximum value point can be determined according to the order of the maximum value points in the second vertical axis array.

[0064] The sine wave amplitude range is determined based on the target intensity value, and sampling is performed within the sine wave amplitude range to generate a sine wave array; specifically, the sine wave amplitude range is determined by the target intensity value by multiplying the target intensity value by an upper limit percentage value to obtain the upper limit value of the amplitude of the sine wave amplitude range, and by multiplying the target intensity value by a lower limit percentage value to obtain the lower limit value of the amplitude of the sine wave amplitude range; the upper limit percentage value and the lower limit percentage value may be a fixed value, or may be a value randomly selected within a percentage range, for example, the upper limit percentage value is 0.3, and the lower limit percentage value is 0.03; or the upper limit percentage value is a value randomly selected within the range of 0.2 to 0.4, and the lower limit percentage value is a value randomly selected within the range of 0.02 to 0.04.

[0065] After determining the sine wave amplitude range, random sampling is performed within the sine wave amplitude range to obtain a sine wave array. The specific method is: according to the set sampling frequency and sine wave frequency, sampling is performed within the sine wave amplitude range to obtain a sine wave array; for example, the sampling frequency is 1, the sine wave frequency is 1, and the sampling duration is a random value in the range of 3600 to 7200. For example, taking the sampling duration as 5000, a sine wave array with a length of 5000 can be obtained, and the sine wave array includes 5000 sine wave amplitudes, and the magnitudes of these 5000 sine wave amplitudes are all within the sine wave amplitude range.

[0066] A preset number of continuous sine wave amplitudes are selected from the sine wave array. Specifically, after obtaining the sine wave array, a preset number of continuous sine wave amplitudes are selected from the sine wave array, that is, a preset number of continuous sine wave amplitudes are also selected. Further, the positions of the preset number of continuous sine wave amplitudes selected from the sine wave array are the same as the positions of the preset number of selected intensity values ​​selected from the second longitudinal axis array. For example, if the preset number is N, and the preset number of selected intensity values ​​selected from the original longitudinal axis array are the first N intensity values ​​in the second longitudinal axis array, then when the preset number of continuous sine wave amplitudes are selected from the sine wave array, the first N sine wave amplitudes are also selected.

[0067] Then, based on the continuous preset number of sine wave amplitudes, the continuous preset number of selected intensity values ​​in the second vertical axis array are adjusted to obtain a new vertical axis array. The specific method is: the continuous preset number of sine wave amplitudes are arranged in reverse order; the continuous preset number of sine wave amplitudes arranged in reverse order are added to the continuous preset number of selected intensity values ​​in the second vertical axis array to obtain a new vertical axis array; that is, sine waves are superimposed in the second vertical axis array to simulate the situation of fluorescence interference. For example, the preset number N = 1800, then the first 1800 intensity values ​​(that is, the 1st to 1800th intensity values) are selected from the second vertical axis array as the selected intensity values, recorded as (X1, X2, ..., X 1799 , X1800 ); The first 1800 sine wave amplitudes (i.e., the sine wave amplitudes from the 1st to the 1800th digit) are selected from the sine wave array and are recorded as (Y1, Y2, ..., Y 1799 , Y 1800 ); Then the 1800 sine wave amplitudes are arranged in reverse order. At this time, the order of the 1800 sine wave amplitudes is reversed, and an arrangement array is obtained, which is (Y 1800 , Y 1799 , ..., Y2, Y1), and then in order (X1, X2, ..., X 1799 , X 1800 ) and (Y 1800 , Y 1799 , ..., Y2, Y1) are added to the selected intensity value of the corresponding position and the sine wave amplitude to obtain the new intensity value of each position, that is, X1 and Y 1800 Addition, X2 and Y 1799 Add, and so on, until X 1800 Add to Y1; and replace the intensity value of the corresponding position in the second vertical axis array with the new intensity value of each position; for example, if the first intensity value in the second vertical axis array is X1, then the first intensity value is updated to (X1+Y 1800 ), the second intensity value is more (X2+Y 1799 ), and so on, the strength value of the 1800th is updated to (X 1800 +Y1), thereby obtaining a new vertical axis array.

[0068] The new vertical axis array can simultaneously meet the three characteristics of Raman spectroscopy and fully simulate the systematic errors that may occur during Raman spectroscopy acquisition.

[0069] It should be noted that the above process describes the peak drift processing, intensity change processing and fluorescence interference processing together, but is not limited to this. These three processing methods can be implemented separately or in combination without conflict. For example, the combination of peak drift processing + intensity change processing, peak drift processing + fluorescence interference processing, and intensity change processing + fluorescence interference processing can also obtain a new vertical axis array that meets some characteristics of the Raman spectrum.

[0070] In this embodiment, the original vertical axis array of the original measured spectrum of the target object is subjected to three kinds of processing in accordance with Raman characteristics to obtain a new vertical axis array, and then the original horizontal axis array is combined with the new vertical axis array to obtain a virtual spectrum of the target object; the original vertical axis array of the original measured spectrum of the target object is processed in accordance with Raman spectrum characteristics, so that the virtual spectrum of the target object obtained can also conform to Raman spectrum characteristics, wherein the original horizontal axis array is combined with the new vertical axis array, and it can also be ensured that the obtained virtual spectrum has the characteristic information of the original measured spectrum; the generated virtual spectrum can retain the original characteristic information and conform to Raman spectrum characteristics, thereby ensuring the reliability of the generated virtual spectrum, so that a large number of virtual spectra can be generated for use as training data for spectrum recognition models.

[0071] By using the virtual atlas generation method implemented in this embodiment, a small amount of real original measured atlases can be used to generate a large number of virtual atlases with good reliability as training data for the Transformer model (atlas recognition model), eliminating the workload of collecting Raman spectral data and then manually annotating it. Using a large number of virtual atlases for training can improve the training efficiency and accuracy of large model training. A large number of virtual atlases provide richer data for large atlas recognition models, thereby expanding the recognition range of the model. In addition, virtual atlases can also generate atlases in various scenes and situations to help the model better understand the various elements and relationships in the atlas and improve the robustness of the model. Moreover, the common systematic errors in the Raman spectrum acquisition process are integrated into the virtual atlas, which can further improve the generalization ability of the model.

[0072] The following is an exemplary description of the specific process of using the virtual map generation method of this embodiment to generate a large number of virtual maps of several biotechnology drugs (targets) and using the virtual maps to perform model training.

[0073] A total of 37 biotechnology drugs were selected as targets, including: human immunoglobulin for intravenous injection (pH 4), human immunoglobulin for intravenous injection (pH 4), human coagulation factor VIII, human fibrinogen, human fibrinogen, human immunoglobulin for intravenous injection (pH 4), human immunoglobulin for intravenous injection (pH 4), human immunoglobulin for intravenous injection (pH4), human immunoglobulin for intravenous injection (pH 4), Varicella live attenuated vaccine, BCG for intradermal injection, quadrivalent influenza virus split vaccine, Varicella live attenuated vaccine, Freeze-dried Hepatitis A live attenuated vaccine, Freeze-dried human rabies vaccine (Vero cells), Influenza split vaccine, Group A and Group C meningococcal polysaccharide conjugate vaccine, Hemorrhagic fever with renal syndrome inactivated vaccine (Vero cells), Freeze-dried human rabies vaccine (Vero cells), Hepatitis A inactivated vaccine (human diploid cells), Brain protein hydrolysate (III) for injection, Brain protein hydrolysate (III) for injection, Adalimumab, Bevacizumab, Ranibizumab, Tocilizumab, Elotuzumab, Secukinumab, Rituximab, Trastuzumab, Bevacizumab, Denosumab, Eketuzumab, Ustekinumab, Guselkumab, Emicizumab, Etanercept.

[0074] Raman spectra (i.e., original measured spectra) of 37 biotech drugs were collected using a Raman spectrometer. 20 original measured spectra were collected for each biotech drug, for a total of 740 original measured spectra. The above-mentioned peak drift processing, intensity change processing, and fluorescence interference processing were performed in sequence for each original measured spectrum. 3,600 virtual spectra were generated for each original measured spectrum, and 133,200 virtual spectra were generated from the 740 original measured spectra. Taking human immunoglobulin for intravenous injection (pH 4) as an example, please refer to Figure 2 , which is a comparison chart between the original measured spectrum and the generated virtual spectrum. It can be seen that the generated virtual spectrum has the characteristic information of the original measured spectrum.

[0075] Read the virtual vertical axis arrays of all virtual maps, take the 200th to 1800th positions to form a new training vertical axis array, the length of the training vertical axis array is 1600, and convert it into a 40*40 matrix. Select the transformer model as the large model for map recognition, set the transformer model input length to 40, the number of layers to 10, 11, 12, and 13, the output of the fully connected layer to 37, and the number of training epochs to 500. Randomly select the virtual vertical axis arrays of 80% of the 133,200 virtual maps for training, and the remaining 20% ​​of the virtual maps are used for cross-validation, and record the accuracy and loss value of each epoch. The results are as follows: Figure 3As shown in the figure, the transformer model is trained using a virtual graph, and the model fits well. Models with different numbers of layers can obtain good fitting effects, and the cross-validation accuracy is close to 100%.

[0076] In addition, 20 original measured spectra of each biotechnology drug were selected as the test set, totaling 740 spectra. The transformer model at different layers and epochs was used to make predictions, and the prediction accuracy was recorded. The results are shown in Figure 2. Figure 4 As shown in the figure, when the number of transformer model layers is 10, the maximum model accuracy is about 95%; when the number of transformer model layers is 11, the maximum model accuracy is 100%; when the number of transformer model layers is 12, the maximum model accuracy is 99%; when the number of transformer model layers is 13, the maximum model accuracy is 96%.

[0077] The results show that the model has the best prediction effect when the number of layers of the transformer model is 11 and the number of epochs is 109, with a prediction accuracy of 100%. This model is used to predict the test set, and the following is drawn based on the prediction results: Figure 5 The confusion matrix shown and Figure 6 As shown in the ROC curve, it can be seen that the model correctly predicts the measured spectra of all categories, and the area under the receiver operating curve is 1.

[0078] The above results show that after using this method to generate a large number of virtual spectra, training the transformer model can obtain a spectrum recognition model with excellent performance, and it has 100% accuracy for the measured spectra of various types of biotechnology drugs collected by Raman spectroscopy.

[0079] The second embodiment of the present invention relates to an electronic device, such as a desktop host, a laptop computer, etc. The electronic device includes: one or more processors and one or more memories, wherein the one or more memories store a computer program, and the computer program is loaded and executed by the one or more processors to implement the method for generating a virtual map in the first embodiment.

[0080] Since the first embodiment corresponds to this embodiment, this embodiment can be implemented in conjunction with the first embodiment. The relevant technical details mentioned in the first embodiment are still valid in this embodiment, and the technical effects that can be achieved in the first embodiment can also be achieved in this embodiment. In order to reduce repetition, they are not repeated here. Accordingly, the relevant technical details mentioned in this embodiment can also be applied in the first embodiment.

[0081] Preferred embodiments of the present invention have been described above in detail, but it should be understood that aspects of the embodiments can be modified, if necessary, to employ aspects, features and concepts of the various patents, applications and publications to provide further embodiments.

[0082] These and other changes can be made to the embodiments in light of the above detailed description.In general, in the claims, the terms used should not be considered limited to the specific embodiments disclosed in the specification and the claims, but should be construed to include all possible embodiments along with the full scope of equivalents to which these claims are entitled.

Claims

1. A method for generating a virtual map, characterized in that: include: Obtaining an original horizontal axis array and an original vertical axis array of an original measured spectrum of the target object, wherein the original measured spectrum is a Raman spectrum; Adding a set number of intensity values ​​at a preset position in the original vertical axis array, and deleting the set number of intensity values ​​at another position corresponding to the preset position in the original vertical axis array, to obtain a first vertical axis array; For each designated intensity value in the first vertical axis array, calculate the product between the designated intensity value and the intensity change percentage, and in the first vertical axis array, update the designated intensity value using the product corresponding to each designated intensity value to obtain a second vertical axis array; Selecting a preset number of selected intensity values ​​from the second vertical axis array, determining a maximum value among the preset number of selected intensity values ​​as a target intensity value, determining a sine wave amplitude range based on the target intensity value, and performing sampling within the sine wave amplitude range to generate a sine wave array; Selecting a preset number of continuous sine wave amplitudes in the sine wave array, and adjusting a preset number of continuous selected intensity values ​​in the second vertical axis array based on the preset number of continuous sine wave amplitudes to obtain a new vertical axis array; The original horizontal axis array and the new vertical axis array are combined to obtain a virtual map of the target object.

2. The method for generating a virtual map according to claim 1, characterized in that: Adding a set number of intensity values ​​at a preset position in the original vertical axis array, and deleting the set number of intensity values ​​at another position in the original vertical axis array corresponding to the preset position, comprises: Add a set number of intensity values ​​before the first intensity value in the original vertical axis array, and delete the set number of intensity values ​​starting from the last intensity value in the original vertical axis array; or, A set number of intensity values ​​are added after the last intensity value in the original vertical axis array, and the set number of intensity values ​​are deleted from the first intensity value in the original vertical axis array.

3. The method for generating a virtual map according to claim 1, characterized in that: Determining a maximum value among the consecutive preset number of selected intensity values ​​as a target intensity value comprises: Determining all maximum points among the consecutive preset number of selected intensity values; After removing the first maximum point from all the maximum points, the intensity value corresponding to the largest maximum point is selected as the target intensity value.

4. The method for generating a virtual map according to claim 1, characterized in that: The step of adjusting a continuous preset number of selected intensity values ​​in the second vertical axis array based on the continuous preset number of sine wave amplitudes to obtain a new vertical axis array comprises: Arranging the preset number of consecutive sine wave amplitudes in reverse order; The continuous preset number of sine wave amplitudes arranged in reverse order are added to the continuous preset number of selected intensity values ​​in the second vertical axis array respectively to obtain a new vertical axis array.

5. The method for generating a virtual map according to claim 1, characterized in that: Sampling within the sine wave amplitude range to generate a sine wave array includes: According to the set sampling frequency and sine wave frequency, sampling is performed within the sine wave amplitude range to obtain a sine wave array.

6. The method for generating a virtual map according to claim 1, characterized in that: The intensity variation percentage is between 0.995 and 1.

005.

7. The method for generating a virtual map according to claim 1, characterized in that: The set number is a value randomly selected from 1 to 5.

8. The method for generating a virtual map according to claim 1, characterized in that: The sine wave amplitude range is obtained by multiplying the target intensity value by the upper limit percentage value to obtain the upper limit value of the sine wave amplitude range, and multiplying the target intensity value by the lower limit percentage value to obtain the lower limit value of the sine wave amplitude range. The upper limit percentage value is 0.3 and the lower limit percentage value is 0.

03.

9. The method for generating a virtual map according to claim 1, characterized in that: A continuous preset number of selected intensity values ​​selected from the second vertical axis array are the first N intensity values ​​in the second vertical axis array, and a continuous preset number of sinusoidal wave amplitude values ​​selected from the sinusoidal wave array are the first N sinusoidal wave amplitudes of the sinusoidal wave array, where N is 1800.

10. An electronic device, characterized in that: include: One or more processors and one or more memories, wherein the one or more memories store a computer program, and the computer program is loaded and executed by the one or more processors to implement the method for generating a virtual atlas as described in any one of claims 1-9.