Spectrogram data processing method and device, electronic equipment and storage medium
By using autocorrelation algorithms to automatically identify and label target peak data in spectrum data processing, the problems of manual labeling in the prior art are solved, and efficient and accurate spectrum data processing is achieved.
Patent Information
- Application Number
- CN202311090057.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-28
- Publication Date
- 2025-02-28
AI Technical Summary
In the prior art, the processing of spectrum data relies on manual labeling, which is prone to errors, is costly and has low efficiency.
By obtaining the sample spectrogram data to be processed, the target peak data corresponding to the biomarker compound is identified based on the autocorrelation algorithm, and automatic labeling is performed to obtain the analysis results.
Automatic labeling of spectral data is realized, reducing manual error rate, reducing costs, and improving data processing efficiency.
Smart Images

Figure CN119537632A_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present invention relate to the field of data processing technology, and in particular, to a method, device, electronic device and storage medium for processing spectrogram data. Background Art
[0002] Gas chromatography-mass spectrometry has become the main technology for detecting organic compounds in different matrices. Gas chromatography-mass spectrometry can detect many components at the same time, with a large amount of data, and has a strong timeliness in detecting organic pollutants.
[0003] In the prior art, auxiliary analytical instruments are used to complete chemical analysis measurements, but instrument analysis does not mean that the measurement process is completed. The obtained spectrum data needs to be manually annotated to mark the biomarker compounds in the spectrum data, and finally obtain the required analysis results. However, in the process of implementing the present invention, it is found that the prior art has at least the following technical problems: the manual processing method is easy to make mistakes or cause legacy; and it causes certain labor costs and low data processing efficiency for spectrum data. Summary of the invention
[0004] The embodiments of the present invention provide a method, device, electronic device and storage medium for processing spectrum data, so as to realize automatic labeling of sample spectrum data, reduce costs and improve labeling efficiency.
[0005] According to one aspect of the present invention, a method for processing spectrogram data is provided, comprising:
[0006] Obtain at least one sample spectrogram data to be processed;
[0007] For each of the sample spectrum data, identifying the target peak data corresponding to the biomarker compound in the sample spectrum data based on an autocorrelation algorithm;
[0008] The sample spectrum data is annotated based on the target peak data to obtain analysis results corresponding to the sample spectrum data.
[0009] According to another aspect of the present invention, there is provided a device for processing spectrogram data, the device comprising:
[0010] A sample spectrum data acquisition module is used to acquire at least one sample spectrum data to be processed.
[0011] A target peak data identification module, used for identifying, for each of the sample spectrum data, target peak data corresponding to the biomarker compound in the sample spectrum data based on an autocorrelation algorithm;
[0012] The data annotation module is used to perform annotation processing on the sample spectrum data based on the target peak data to obtain analysis results corresponding to the sample spectrum data.
[0013] According to another aspect of the present invention, there is provided an electronic device, the electronic device comprising:
[0014] at least one processor; and
[0015] a memory communicatively connected to the at least one processor; wherein,
[0016] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the method for processing spectral data described in any embodiment of the present invention.
[0017] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to implement the method for processing spectrogram data described in any embodiment of the present invention when executed by a processor.
[0018] The technical solution of the embodiment of the present invention obtains at least one sample spectrum data to be processed, and for each sample spectrum data, identifies the target peak data corresponding to the biomarker compound in the sample spectrum data based on the autocorrelation algorithm, thereby realizing automatic acquisition of the target peak data, and annotating the sample spectrum data based on the target peak data to obtain the analysis result corresponding to the sample spectrum data. This embodiment does not require manual operation, and realizes automatic annotation of the sample spectrum data through the autocorrelation algorithm, which is not prone to error, is conducive to reducing costs and improving annotation efficiency.
[0019] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0021] Figure 1 is a flow chart of a method for processing spectrogram data provided according to an embodiment of the present invention;
[0022] Figure 2is a flowchart of another method for processing spectrogram data provided by an embodiment of the present invention;
[0023] Figure 3 is a schematic diagram of sample spectrogram data provided according to an embodiment of the present invention;
[0024] Figure 4 is a schematic structural diagram of a spectrogram data processing device provided according to an embodiment of the present invention;
[0025] Figure 5 It is a schematic diagram of the structure of an electronic device for implementing the method for processing spectrogram data according to an embodiment of the present invention. DETAILED DESCRIPTION
[0026] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0027] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "etc." and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0028] Figure 1 1 is a flow chart of a method for processing spectrogram data according to an embodiment of the present invention. This embodiment is applicable to the case of labeling sample spectrogram data. The method can be executed by a spectrogram data processing device, which can be implemented in the form of hardware and / or software.
[0029] like Figure 1 As shown, the method of this embodiment may specifically include:
[0030] S110, obtaining at least one sample spectrogram data to be processed.
[0031] In this embodiment, the spectrum data obtained by the auxiliary analysis system for analyzing organic compounds can be used as sample spectrum data to be processed. Exemplarily, the auxiliary analysis system includes an Xcalibur system, which can obtain high-dimensional spectrum data by calling the raw_file_access interface in the fisher-py package of python provided by the Xcalibur system, and slice the high-dimensional spectrum data based on the spectrum parameters of the required characteristic ions to obtain slice spectrum data; the slice spectrum data is stored in the form of a list to obtain sample spectrum data.
[0032] In a specific implementation, after obtaining at least one sample spectrum data to be processed, the method further includes: performing a preprocessing operation on the sample spectrum data to be processed, and updating the sample spectrum data based on the preprocessed data.
[0033] The preprocessing operation includes a redundant data removal operation and / or a normalization process.
[0034] Specifically, the sliding window method may be used to process the sample spectrum data to remove redundant data in the sample spectrum data. Exemplarily, the sliding window method may be used to repeat the data removal operation 10 times on the sample spectrum data, and the sample spectrum data is updated based on the obtained data.
[0035] Furthermore, the sample spectrum data may be normalized to eliminate excessive peaks in the sample spectrum data, thereby avoiding the risk of excessive peaks in the biomarker compound identification process.
[0036] This embodiment removes redundant data in the sample spectrum data by a sliding window method, and removes excessive peaks in the sample spectrum data by normalization processing, thereby reducing the interference of unnecessary data on the biomarker compound identification process, which is conducive to improving the accuracy of identifying biomarker compounds.
[0037] S120 . For each sample spectrum data, identify target peak data corresponding to the biomarker compound in the sample spectrum data based on an autocorrelation algorithm.
[0038] It should be noted that the autocorrelation algorithm can be used in the field of image recognition. The autocorrelation algorithm has a strong error correction capability against noise.
[0039] The target peak data includes at least one of the position data, peak value and retention time of the target peak in the sample spectrum data.
[0040] This embodiment identifies the sample spectrum data through an autocorrelation algorithm, thereby determining at least one of the position data, peak value, and retention time of the target peak in the sample spectrum data. Further, before identifying the target peak data corresponding to the biomarker compound in the sample spectrum data based on the autocorrelation algorithm, it also includes: obtaining predetermined standard spectrum data corresponding to the sample spectrum data; identifying the target peak data corresponding to the biomarker compound in the sample spectrum data based on the autocorrelation algorithm, including: determining the matching relationship between the standard spectrum data and the sample spectrum data based on the autocorrelation algorithm, and determining the target peak data corresponding to the biomarker compound based on the matching relationship.
[0041] Among them, the standard spectrum data can be a template data obtained by analyzing the characteristic ions in advance. In this embodiment, the obtained standard spectrum data must be the same as the characteristic ions analyzed by the sample spectrum data to be processed; for example, the sample spectrum data to be processed is the spectrum data obtained by analyzing the characteristic ion 191, then the standard spectrum data also corresponds to the characteristic ion 191.
[0042] In a specific implementation, based on an autocorrelation algorithm, the standard spectrum data is used as a template to compare with the sample spectrum data to determine the matching relationship between the standard spectrum data and the sample spectrum data. The matching relationship can reflect the corresponding relationship between the target peak data in the standard spectrum data and the sample spectrum data. Based on the matching relationship and the obtained standard spectrum data, the target peak data in the sample spectrum data can be determined. It is known to those skilled in the art that in the spectrum data, each target peak can represent a biomarker compound, and thus the biomarker compound in the sample spectrum data can be determined based on the target peak data.
[0043] This embodiment can quickly and effectively identify the target peak data corresponding to the biomarker compound in the sample spectrum data through the autocorrelation algorithm and the determined standard spectrum data, thereby improving the convenience of determining the target peak data.
[0044] In this embodiment, after the target peak data corresponding to the biomarker compound is determined based on the matching relationship, it also includes: based on the determined target peak data and a preset division method, the sample spectrum data is divided to obtain sub-sample spectrum data to be processed; for each sub-sample spectrum data, the sub-target peak data corresponding to the biomarker compound in the sub-sample spectrum data is identified based on the autocorrelation algorithm; based on each sub-target peak data, the target peak data is updated.
[0045] The preset division method may be to divide the sample spectrogram data into a preset number of segments, for example, the preset number of segments may be two segments.
[0046] In order to avoid inaccurate recognition results and the inability to comprehensively and completely identify the target peak data of the target peak contained in the sample spectrum data, the sample spectrum data can be divided based on the target peak data and a preset division method, and the sub-target peak data can be identified for the divided sub-sample spectrum data respectively.
[0047] Exemplarily, taking characteristic ion 191 as an example, after full data recognition of the sample spectrum data corresponding to characteristic ion 191, peaks 15-30 are recognized. In order to improve the accuracy and comprehensiveness of the recognition result, the sample spectrum data corresponding to peaks 15-30 can be divided. For example, the preset division method can be to divide the sample spectrum data into two sections, then the data before peak 15 and after peak 30 in the sample spectrum data can be divided, thereby obtaining two sections of sub-sample spectrum data.
[0048] In a specific implementation, for each sub-sample spectrum data, the sub-target peak data corresponding to the biomarker compound in the sub-sample spectrum data can be identified based on the autocorrelation algorithm, so as to update the target peak data based on each sub-target peak data. Exemplarily, the data before the divided peak 15 and after the peak 30 are identified based on the autocorrelation algorithm, so as to identify peaks 1-15 and peaks 31-36 as sub-target peak data, indicating that the sample spectrum data corresponding to the characteristic ion 191 includes peaks 1-36, and the target peak data can be updated based on each sub-target peak data to obtain the complete peaks 1-36 in the sample spectrum data.
[0049] Furthermore, in order to reduce data interference in the process of identifying sub-sample spectrum data, unnecessary data can be set to zero when dividing the sample spectrum data. For example, to divide the data before peak 15 and after peak 30, the array values of the right peak bottom retention time of peak 15 in the sample spectrum data can be set to zero; the array values of the left peak bottom retention time of peak 30 can be set to zero, thereby obtaining two sections of sub-sample spectrum data.
[0050] S130 , annotating the sample spectrum data based on the target peak data to obtain analysis results corresponding to the sample spectrum data.
[0051] In a specific implementation, the target peak may be annotated in the sample spectrum data, for example, at least one of the position, peak value and retention time of the target peak may be annotated. Based on the annotated sample spectrum data, an analysis result is obtained.
[0052] Specifically, the specific implementation method of obtaining the analysis result corresponding to the sample spectrum data can be: according to the preset template layout, a file with a target format corresponding to the sample spectrum data after the annotation processing is generated, and the file is determined as the analysis result.
[0053] The target format includes a portable document format (PDF). The analysis result is a PDF analysis report.
[0054] It should be noted that those skilled in the art may determine the preset template layout according to the needs of specific application scenarios.
[0055] In the specific implementation, the pre-built Python plotly package can be called to process the annotated sample spectrum data and generate image materials for compiling PDF analysis reports. Based on the image materials, the annotated sample spectrum data and the preset template layout, the pre-built Python xhtml2pdf package is used to generate the PDF analysis report. By generating the PDF analysis report, the information of the identified biomarker compounds can be displayed intuitively and effectively, which is convenient for staff to view and analyze.
[0056] The technical solution of the embodiment of the present invention obtains at least one sample spectrum data to be processed, and for each sample spectrum data, identifies the target peak data corresponding to the biomarker compound in the sample spectrum data based on the autocorrelation algorithm, thereby realizing automatic acquisition of the target peak data, and annotating the sample spectrum data based on the target peak data to obtain the analysis result corresponding to the sample spectrum data. This embodiment does not require manual operation, and realizes automatic annotation of the sample spectrum data through the autocorrelation algorithm, which is not prone to error, is conducive to reducing costs and improving annotation efficiency.
[0057] Figure 2 is a flowchart of another method for processing spectrum data provided by an embodiment of the present invention. After obtaining the analysis result corresponding to the sample spectrum data, this embodiment further includes: sending the analysis result to the staff terminal; updating the analysis result based on the correction data corresponding to the analysis result fed back by the staff terminal. The explanations of the terms that are the same or corresponding to the above embodiments are not repeated here. Figure 2 As shown, the method includes:
[0058] S210, obtaining at least one sample spectrogram data to be processed.
[0059] S220 . For each sample spectrum data, identify target peak data corresponding to the biomarker compound in the sample spectrum data based on an autocorrelation algorithm.
[0060] S230 , annotating the sample spectrum data based on the target peak data to obtain analysis results corresponding to the sample spectrum data.
[0061] S240, sending the analysis result to the staff terminal; updating the analysis result based on the correction data corresponding to the analysis result fed back by the staff terminal.
[0062] In a specific implementation, in order to improve the accuracy of the analysis result, the analysis result can be sent to a staff terminal for verification by the staff. The analysis result is updated based on the correction data corresponding to the analysis result received from the staff terminal. The correction data can be data on at least one of the position, peak value and retention time of the target peak.
[0063] In this embodiment, the target peak data includes the peak height value of the target peak; after obtaining the analysis results corresponding to the sample spectrum data, it also includes: determining the adjacent positions corresponding to each target peak in the analysis results; for each target peak, determining whether the peak height value of the target peak is greater than the curve value of the adjacent position corresponding to the target peak; if not, based on the adjacent position corresponding to the maximum curve value, updating the target peak data marked in the analysis results.
[0064] Specifically, in order to avoid incorrect marking of the position of the target peak, the adjacent position corresponding to each target peak may be determined after obtaining the analysis result.
[0065] Among them, the adjacent position is located between the left peak bottom and the right peak bottom corresponding to the target peak; the adjacent position includes the left adjacent position and the right adjacent position, which can be a position at a unit length away from the position of the target peak.
[0066] Those skilled in the art will know that the peak value of the target peak should be the maximum value among the curve values corresponding to the left peak bottom and the right peak bottom; thus, for each target peak in the analysis result, determine whether the peak height value of the target peak is greater than the curve value of the adjacent position. If it is greater, it means that the current marking of the target peak is correct; if it is less, it means that the current marking of the target peak is wrong, and the adjacent position corresponding to the maximum curve value between the left peak bottom and the right peak bottom can be determined, and the target peak data marked in the analysis result can be updated based on the adjacent position corresponding to the maximum curve value.
[0067] This embodiment achieves the effect of correcting the peak mark by comparing the peak height value with the curve value at the adjacent position, thereby further improving the accuracy and effectiveness of the analysis result.
[0068] The embodiments corresponding to the method for processing spectrum data are described in detail above. In order to make the technical scheme of the method further clear to those skilled in the art, specific application scenarios are given below.
[0069] In a specific implementation, standard spectrum data, a labeling file corresponding to the standard spectrum data, and at least one sample spectrum data to be processed can be obtained. The sample spectrum data can be represented by a curve graph, which can be seen in Figure 3 The process of processing the spectrum data includes the following steps:
[0070] 1. Data Processing
[0071] 1. Call the raw_file_access interface of the fisher-py package of Python to obtain high-dimensional sample spectrum data. According to the attribute parameters of the required characteristic ions, the high-dimensional sample spectrum data is sliced to obtain the sample spectrum data corresponding to the required characteristic ions to complete the reading of the sample spectrum data.
[0072] 2. Save the read sample spectrum data as a structured data list; for example, an Excel data table.
[0073] 2. Algorithm Identification Process
[0074] 1. Use the sliding window method to remove the linear trend of the standard spectrum data and the sample spectrum data, and repeat it 10 times. Use the preprocessing.MinMaxScaler function to normalize the standard spectrum data and the sample spectrum data to eliminate the risk of excessive peaks in the identification of biomarker compounds.
[0075] 2. Based on the autocorrelation algorithm, identify the target peak data in the sample spectrum data. Specifically, different identification methods are adopted according to the characteristics of the biomarker compounds of different characteristic ions. The identification methods may include full identification and dynamic fractional identification. For characteristic ions with dispersed retention times and peak shapes with data stretching at both ends, dynamic fractional identification can be used.
[0076] For example, 191 characteristic ions generally include 1-36, a total of 36 biomarker compounds, corresponding to peaks 1-36. Among them, peaks 1-14 stretch to the left, peaks 15-30 are wider, and peaks 31-36 stretch to the right. In combination with this feature, peaks 15-30 are first identified using the full-quantity recognition method; the second time, two sets of new data are generated from the sample spectrum data obtained after full-quantity recognition based on the identified peaks 15 and 30 data to identify peaks 1-14 and 31-36; the third time, new spectrum data is divided based on the peak 6 data to generate new data for identifying peaks 7-14; the fourth time, peaks 7-14 are calibrated and identified. It can be seen that according to the characteristics of the 191 characteristic ions, identification can be performed in 4 times to improve the accuracy of identifying biomarker compounds.
[0077] 3. Use the simps function to integrate the area of each peak: determine the start and end points of the retention time of each biomarker compound, that is, the left peak bottom and the right peak bottom, so as to determine a set of [retention time, peak height] values corresponding to each peak. The retention time corresponding to the highest point of the peak can be gradually approached to the left and right to trace back to the actual left and right peak bottoms. Based on the left peak bottom and the right peak bottom, determine the area of each peak.
[0078] 4. Multiple identification
[0079] Taking characteristic ion 191 as an example, after the full data is identified, the automatic identification of peaks 15-30 is completed. Furthermore, the array values after the retention time of the right peak bottom of the identified peak 15 can be set to zero; the array values before the retention time of the left peak bottom of the identified peak 30 can be set to zero. Two operations will obtain two sets of new sub-sample spectrum data, which are used to identify peaks 1-15 and 31-36 respectively, thereby eliminating the influence of other peaks and improving the identification accuracy of the peaks after stretching at both ends.
[0080] 2. Result processing:
[0081] 1. Preparation of picture materials
[0082] Based on the sample spectrogram data obtained after recognition, the Python plotly package is called to generate image materials for compiling PDF reports. For example, the image material can be a png (Portable Network Graphics) file with a width of 1600 pixels and a scale of 3.0.
[0083] 2. PDF report production
[0084] Based on the image material and the sample spectrogram data after algorithm recognition, Python's xhtml2pdf package is called to generate a PDF report. If it is in report mode, the preset template layout set in the previous process will be applied.
[0085] 3. Graphics file production
[0086] The plotly package in Python is called based on the sample spectrogram data after algorithm recognition to generate a graph file for manual correction. In this embodiment, the graph file contains information such as the curve of the sample spectrogram, the mark of the target peak, etc. The graph file refers to a special form of json (JavaScript Object Notation, JS object notation) file supported by the plotly package in Python, which is used to save the configuration information of the visualization chart on the interactive canvas of the plotly tool, including data, chart type, layout, label and style, etc.
[0087] 3. Preview and correction process:
[0088] 1. PDF report preview
[0089] The PDF report is sent to the staff terminal; for example, the PDF report can be converted into base64 format for display.
[0090] 2. Result preview and correction
[0091] The plotly React package can be called to read and parse the graph file in the PDF report, and generate a chart with sample data curves and algorithm recognition result peak marks on the interactive canvas. The staff manually corrects the deviations in the peak marks displayed on the chart, and the correction results are saved in the graph file.
[0092] 3. Result update
[0093] Based on the correction data and sample spectrum data received from the staff terminal, the peak correction algorithm is used to process the correction data first, and the PDF report is updated based on the processing results. Taking the peak falling on the left as an example, the specific implementation steps of the peak correction algorithm are described, including:
[0094] 1) According to the target peak data of the mark, obtain the height of the left curve of a unit position adjacent to the mark and the height of the right curve of a unit position adjacent to the mark.
[0095] 2) If the peak value in the target peak data is less than the height of the left curve and greater than the height of the right curve, the height of the left curve is set as the new peak height, and the curve corresponding to the sample spectrum data is moved one position unit to the right.
[0096] 3) Repeat the operation in 2) until the peak value in the target peak data is greater than the height of the left curve.
[0097] This embodiment uses an autocorrelation algorithm to automatically acquire target peak data, which is less prone to error, helps reduce costs, and improves labeling efficiency. In addition, by generating a PDF analysis report, the information of the identified biomarker compound can be displayed intuitively and effectively, making it easier for staff to view and analyze.
[0098] Figure 4 1 is a schematic diagram of the structure of a spectrum data processing device provided in accordance with an embodiment of the present invention, and the device is used to execute the spectrum data processing method provided in any of the above embodiments. The device and the spectrum data processing method of the above embodiments belong to the same inventive concept, and the details not described in detail in the embodiment of the spectrum data processing device can refer to the embodiment of the spectrum data processing method. Figure 4 As shown, the device comprises:
[0099] The sample spectrum data acquisition module 10 is used to acquire at least one sample spectrum data to be processed;
[0100] The target peak data identification module 11 is used to identify the target peak data corresponding to the biomarker compound in the sample spectrum data based on the autocorrelation algorithm for each sample spectrum data;
[0101] The data annotation module 12 is used to perform annotation processing on the sample spectrum data based on the target peak data to obtain analysis results corresponding to the sample spectrum data.
[0102] Based on any optional technical solution in the embodiments of the present invention, optionally, the device further includes:
[0103] A standard spectrum data acquisition module is used to acquire predetermined standard spectrum data corresponding to the sample spectrum data before identifying the target peak data corresponding to the bio-standard compound in the sample spectrum data based on the autocorrelation algorithm;
[0104] The target peak data identification module 11 includes:
[0105] The target peak data determination unit is used to determine the matching relationship between the standard spectrum data and the sample spectrum data based on the autocorrelation algorithm, and determine the target peak data corresponding to the target compound based on the matching relationship.
[0106] Based on any optional technical solution in the embodiments of the present invention, optionally, the device further includes:
[0107] A sub-sample spectrum data generation module is used to divide the sample spectrum data based on the determined target peak data and a preset division method after determining the target peak data corresponding to the target compound based on the matching relationship, so as to obtain the sub-sample spectrum data to be processed;
[0108] A sub-target peak data identification module is used to identify the sub-target peak data corresponding to the biomarker compound in the sub-sample spectrum data based on the autocorrelation algorithm for each sub-sample spectrum data;
[0109] The first target peak data updating module is used to update the target peak data based on each sub-target peak data.
[0110] Based on any optional technical solution in the embodiments of the present invention, optionally, the device further includes:
[0111] The analysis result updating module is used to send the analysis result to the staff terminal after obtaining the analysis result corresponding to the sample spectrum data; and update the analysis result based on the correction data corresponding to the analysis result fed back by the staff terminal.
[0112] Based on any optional technical solution in the embodiments of the present invention, optionally, the target peak data includes a peak height value of the target peak; and the device further includes:
[0113] An adjacent position determination module is used to determine the adjacent position corresponding to each target peak in the analysis result after obtaining the analysis result corresponding to the sample spectrum data; wherein the adjacent position is located between the left peak bottom and the right peak bottom corresponding to the target peak;
[0114] The second target peak data updating module is used to determine, for each target peak, whether the peak height value of the target peak is greater than the curve value of the adjacent position corresponding to the target peak; if not, update the target peak data marked in the analysis result based on the adjacent position corresponding to the maximum curve value.
[0115] Based on any optional technical solution in the embodiment of the present invention, optionally, the data annotation module 12 includes:
[0116] A file generating unit, used to generate a file having a target format corresponding to the sample spectrogram data after the annotation processing according to a preset template layout, and determine the file as an analysis result;
[0117] Among them, the target format includes a portable document format.
[0118] The technical solution of the embodiment of the present invention obtains at least one sample spectrum data to be processed, and for each sample spectrum data, identifies the target peak data corresponding to the biomarker compound in the sample spectrum data based on the autocorrelation algorithm, thereby realizing automatic acquisition of the target peak data, and annotating the sample spectrum data based on the target peak data to obtain the analysis result corresponding to the sample spectrum data. This embodiment does not require manual operation, and realizes automatic annotation of the sample spectrum data through the autocorrelation algorithm, which is not prone to error, is conducive to reducing costs and improving annotation efficiency.
[0119] It is worth noting that in the embodiment of the above-mentioned spectrum data processing device, the various units and modules included are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of the present invention.
[0120] Figure 5 It is a structural schematic diagram of an electronic device for implementing the method for processing spectrogram data of an embodiment of the present invention. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.
[0121] like Figure 5As shown, the electronic device 20 includes at least one processor 21, and a memory connected to the at least one processor 21, such as a read-only memory (ROM) 22, a random access memory (RAM) 23, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 21 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 22 or the computer program loaded from the storage unit 28 to the random access memory (RAM) 23. In RAM23, various programs and data required for the operation of the electronic device 20 can also be stored. The processor 21, ROM22 and RAM23 are connected to each other through a bus 24. An input / output (I / O) interface 25 is also connected to the bus 24.
[0122] A number of components in the electronic device 20 are connected to the I / O interface 25, including: an input unit 26, such as a keyboard, a mouse, etc.; an output unit 27, such as various types of displays, speakers, etc.; a storage unit 28, such as a disk, an optical disk, etc.; and a communication unit 29, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 29 allows the electronic device 20 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0123] The processor 21 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 21 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The processor 21 performs the various methods and processes described above, such as a method for processing spectrogram data.
[0124] In some embodiments, the method for processing spectrogram data may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 28. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 20 via the ROM 22 and / or the communication unit 29. When the computer program is loaded into the RAM 23 and executed by the processor 21, one or more steps of the method for processing spectrogram data described above may be performed. Alternatively, in other embodiments, the processor 21 may be configured to execute the method for processing spectrogram data in any other appropriate manner (e.g., by means of firmware).
[0125] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0126] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0127] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0128] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).
[0129] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0130] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.
[0131] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.
[0132] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for processing spectrogram data, characterized in that: include: Obtain at least one sample spectrogram data to be processed; For each of the sample spectrum data, identifying the target peak data corresponding to the biomarker compound in the sample spectrum data based on an autocorrelation algorithm; The sample spectrum data is annotated based on the target peak data to obtain analysis results corresponding to the sample spectrum data.
2. The method according to claim 1, characterized in that Before identifying the target peak data corresponding to the biomarker compound in the sample spectrum data based on the autocorrelation algorithm, the method further includes: Acquiring predetermined standard spectrum data corresponding to the sample spectrum data; The method of identifying target peak data corresponding to the biomarker compound in the sample spectrum data based on an autocorrelation algorithm includes: Based on the autocorrelation algorithm, a matching relationship between the standard spectrum data and the sample spectrum data is determined, and based on the matching relationship, target peak data corresponding to the biomarker compound is determined.
3. The method according to claim 2, characterized in that After determining the target peak data corresponding to the biomarker compound based on the matching relationship, the method further includes: Based on the determined target peak data and a preset division method, the sample spectrum data is divided to obtain sub-sample spectrum data to be processed; For each of the sub-sample spectrum data, identifying the sub-target peak data corresponding to the biomarker compound in the sub-sample spectrum data based on the autocorrelation algorithm; The target peak data is updated based on each of the sub-target peak data.
4. The method according to claim 1, characterized in that: After obtaining the analysis result corresponding to the sample spectrum data, the method further includes: Sending the analysis results to a staff terminal; The analysis result is updated based on the correction data corresponding to the analysis result fed back by the staff terminal.
5. The method according to claim 1, characterized in that The target peak data includes the peak height value of the target peak; after obtaining the analysis result corresponding to the sample spectrum data, it also includes: Determine an adjacent position corresponding to each of the target peaks in the analysis result; wherein the adjacent position is located between a left peak bottom and a right peak bottom corresponding to the target peak; For each of the target peaks, determining whether the peak height value of the target peak is greater than the curve value of the adjacent position corresponding to the target peak; If not, the target peak data marked in the analysis result is updated based on the adjacent position corresponding to the maximum curve value.
6. The method according to claim 1, characterized in that The obtaining of the analysis result corresponding to the sample spectrum data includes: Generating a file having a target format corresponding to the sample spectrogram data after the annotation process according to a preset template layout, and determining the file as the analysis result; Wherein, the target format includes a portable file format.
7. A device for processing spectrogram data, characterized in that: include: A sample spectrum data acquisition module, used to acquire at least one sample spectrum data to be processed; A target peak data identification module, used for identifying, for each of the sample spectrum data, target peak data corresponding to the biomarker compound in the sample spectrum data based on an autocorrelation algorithm; The data annotation module is used to perform annotation processing on the sample spectrum data based on the target peak data to obtain analysis results corresponding to the sample spectrum data.
8. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can perform the method for processing spectral data according to any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the method for processing spectrogram data according to any one of claims 1 to 6 when executed.