Peak detection method and peak detection device for a spectrum signal, and electronic device

By preprocessing the spectral signal and combining deep learning with Lorentz fitting, the parameter values ​​are automatically optimized, solving the problems of low efficiency and insufficient accuracy in spectral signal peak detection, and achieving efficient and accurate peak detection.

CN119780521BActive Publication Date: 2025-11-18BEIJING ACAD OF QUANTUM INFORMATION SCI
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411755031.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-02
Publication Date
2025-11-18
Estimated Expiration
2044-12-02

AI Technical Summary

Technical Problem

Existing methods for detecting peak values ​​in spectral signals are inefficient and inaccurate, especially when dealing with dynamic, changing, or noisy data. They struggle to accurately identify peak values ​​and rely on manual annotation, which is also inefficient.

Method used

By preprocessing the spectral signal (data normalization, missing value filling, and low-pass filtering), the number of peaks is determined using a deep learning algorithm. Initial peak information is detected by combining a preset peak significance threshold, and the parameter values ​​are optimized using the parametric grid method and the Lorentz fitting method to achieve automated peak detection.

Benefits of technology

It improves the accuracy and efficiency of peak detection, can adapt to dynamic changes in signals, reduces the workload of manual parameter adjustment, and enhances detection performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119780521B_ABST
    Figure CN119780521B_ABST
Patent Text Reader

Abstract

The application provides a peak value detection method and device of a spectrum signal, an electronic device and a non-transitory computer readable storage medium. The peak value detection method comprises the following steps: in response to a peak value detection instruction of a spectrum signal, determining a peak value number of the spectrum signal; performing peak value detection on the spectrum signal according to a preset peak value significance threshold value to obtain initial peak value information; and determining a parameter value of the peak value detection of the spectrum signal according to the peak value number and the initial peak value information. According to the embodiment of the application, the peak value significance threshold value is adaptively adjusted by using the determined peak value number of the spectrum signal, the parameter space is continuously reduced, the optimal parameter value is searched, the automatic peak value detection is realized, the detection performance is optimized, and the dynamic change of the signal can be adapted.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of quantum computing, and more specifically, to a peak detection method and device for spectral signals, an electronic device, and a non-transient computer-readable storage medium. Background Technology

[0002] In the field of signal processing and data analysis, peak detection is an important task, often used to extract useful information from complex signals. Currently, it still relies on manual labeling of peaks, which is inefficient. Relying solely on peak detection lacks physical meaning and the identification results are not realistic. Combining multi-peak fitting methods with peak detection algorithms yields slightly better results, although it reduces most of the workload for experts. However, it still faces the problem of inaccurate identification in cases such as peak splitting. Even when using edge computing to locally search for other peaks, expert correction is still required when dealing with dynamic, changing, or noisy data. Summary of the Invention

[0003] This application aims to provide a peak detection method, peak detection device, electronic device, and non-transient computer-readable storage medium for spectral signals, in order to solve the problems of low efficiency and inaccuracy in peak detection.

[0004] According to one aspect of this application, a peak detection method for a spectrum signal is proposed, comprising: determining the number of peaks of the spectrum signal in response to a peak detection command for the spectrum signal; performing peak detection on the spectrum signal according to a preset peak significance threshold to obtain initial peak information; and determining parameter values ​​for peak detection of the spectrum signal according to the number of peaks and the initial peak information.

[0005] According to some embodiments, before determining the number of peaks in the spectral signal, the method further includes: preprocessing the spectral signal, wherein the preprocessing includes data normalization, filling in missing values, and / or low-pass filtering.

[0006] According to some embodiments, peak detection is performed on the spectrum signal according to a preset peak significance threshold to obtain initial peak information, including: performing peak detection on the spectrum signal to determine the significance information of each peak in the spectrum signal; comparing the significance information of each peak with the peak significance threshold; and selecting the peak information with significance information greater than the peak significance threshold as the initial peak information.

[0007] According to some embodiments, the initial peak information includes peak position, peak width, and / or peak height.

[0008] According to some embodiments, determining the parameter values ​​for peak detection of the spectrum signal based on the number of peaks and the initial peak information includes: determining the parameter range for peak detection of the spectrum signal based on the initial peak information; updating the peak significance threshold based on the determined number of peaks of the spectrum signal; traversing the parameter range using a parameter grid method, and selecting the parameter value corresponding to the smallest peak position error in the parameter range as the parameter value for peak detection of the spectrum signal.

[0009] According to some embodiments, the parameter grid method is used to traverse the parameter range and select the parameter value corresponding to the minimum peak position error in the parameter range as the parameter value for peak detection of the spectrum signal. This includes: performing peak detection on the spectrum signal using the peak significance threshold to obtain a peak detection result; traversing the parameter range to obtain any set of parameters within the parameter range; using the obtained set of parameters to fit the peak shape of the intervals of the spectrum signal to obtain fitted peak information; calculating the peak position error between the peak detection result and the fitted peak information; and determining the parameter value corresponding to the minimum peak position error in the parameter range based on the peak position error, using this value as the parameter value for spectrum peak detection.

[0010] According to some embodiments, the peak shape of the intervals of the spectrum signal is fitted using any set of parameters to obtain fitted peak information, including: dividing the spectrum signal into multiple intervals according to the arbitrary set of parameters, and each interval including a peak; performing single-peak Lorentz fitting on each interval to fit the peak shape of the intervals of the spectrum signal to obtain the fitted peak information.

[0011] According to one aspect of this application, a peak detection device for a spectrum signal is proposed, comprising: a peak quantity determination unit, configured to determine the peak quantity of the spectrum signal in response to a peak detection command for the spectrum signal; an initial peak information determination unit, configured to perform peak detection on the spectrum signal according to a preset peak significance threshold to obtain initial peak information; and a parameter value determination unit, configured to determine the parameter value for peak detection of the spectrum signal according to the peak quantity and the initial peak information.

[0012] According to one aspect of this application, an electronic device is provided, comprising: a processor; and a memory storing a computer program that, when executed by the processor, causes the processor to perform the peak detection method as described in any of the preceding embodiments.

[0013] According to one aspect of this application, a non-transient computer-readable storage medium is provided, on which computer-readable instructions are stored, which, when executed by a processor, cause the processor to perform the peak detection method as described in any of the preceding embodiments.

[0014] According to the embodiments of this application, the threshold value of the peak significance value is adaptively adjusted by using the number of peaks of the determined spectral signal, continuously narrowing the parameter space and finding the optimal parameter value. This not only realizes automated peak detection but also optimizes the detection performance and can adapt to the dynamic changes of the signal.

[0015] It should be understood that the above general description and the following detailed description are merely exemplary and do not limit this application. Attached Figure Description

[0016] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. The above and other objectives, features, and advantages of this application will become more apparent by referring to the accompanying drawings and describing exemplary embodiments in detail.

[0017] Figure 1 A flowchart of a peak detection method for a spectral signal according to an example embodiment of this application is shown.

[0018] Figure 2 A flowchart illustrating a method for determining parameter values ​​for peak detection of a spectral signal according to an example embodiment of this application is shown.

[0019] Figure 3 A schematic diagram of a spectrum detection framework according to an example embodiment of this application is shown.

[0020] Figure 4 A schematic diagram of a deep learning model for detecting peak numbers according to an example embodiment of this application is shown.

[0021] Figure 5 A schematic diagram of a model loss obtained according to an example embodiment of this application is shown.

[0022] Figure 6 A schematic diagram of a unimodal Lorentz interval fitting result according to an example embodiment of this application is shown.

[0023] Figure 7 A block diagram of a peak detection device for a spectral signal according to an example embodiment of this application is shown.

[0024] Figure 8 An electronic device is shown according to an exemplary embodiment of this application. Detailed Implementation

[0025] Exemplary embodiments will now be described more fully with reference to the accompanying drawings. However, these exemplary embodiments can be implemented in many forms and should not be construed as limited to the embodiments set forth herein; rather, they are provided so that this application will be thorough and complete, and will fully convey the concept of the exemplary embodiments to those skilled in the art. The same drawings in the figures show the same or similar parts, and therefore repeated descriptions of them will be omitted.

[0026] The described features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. Numerous specific details are provided in the following description to give a full understanding of embodiments of this disclosure. However, those skilled in the art will recognize that the technical solutions of this disclosure can be practiced without one or more of these specific details, or other methods, components, materials, apparatus, or operations may be employed. In these cases, well-known structures, methods, apparatuses, implementations, materials, or operations will not be shown or described in detail.

[0027] The flowcharts shown in the accompanying drawings are merely illustrative and do not necessarily include all content and operations / steps, nor do they necessarily have to be performed in the described order. For example, some operations / steps can be broken down, while others can be combined or partially combined; therefore, the actual execution order may change depending on the specific circumstances.

[0028] The terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish different objects, not to describe a specific order. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or apparatuses.

[0029] Currently, commonly used peak detection methods include traditional multi-peak fitting methods, statistical peak detection methods, and deep learning-based peak detection methods.

[0030] Traditional multi-peak fitting methods rely on pre-defined mathematical models. First, assumptions are made about the peak shapes, then the mathematical model is fitted to the signal to identify the peaks. Because this method makes strict assumptions about the peak shapes, it cannot handle dynamic signals and is sensitive to initial parameters. Therefore, this peak detection method is not suitable for peak detection in complex signals.

[0031] Statistical peak detection methods rely on static statistical models and employ methods such as fixed thresholds or hypothesis testing to detect peak values ​​in spectral signals. However, these methods are sensitive to noise and may miss peaks when the signal contains significant noise. Furthermore, they are relatively weak at handling dynamic and variable signals.

[0032] Peak detection methods based on deep learning use deep learning algorithms to identify multiple targets. Because this method involves identifying a large number of targets, the learning process is time-consuming and it is difficult to obtain learning results. As a result, the identification results are not accurate and the generalization ability of the data is poor.

[0033] According to the embodiments of this application, by performing Lorentz fitting in intervals, this embodiment not only has the ability to detect local multi-peaks, but also reduces the impact of split peaks or data noise on peak detection.

[0034] The specific embodiments according to this application will now be described in detail with reference to the accompanying drawings.

[0035] Figure 1 A flowchart illustrating a peak detection method for a spectral signal according to an example embodiment of this application is shown, as follows: Figure 1 The peak detection method shown includes steps S101, S103, and S105. The following section uses... Figure 1 Taking an example, a peak detection method for a spectrum signal according to an example embodiment of this application will be described in detail.

[0036] like Figure 1 As shown, in step S101, in response to the peak detection command of the spectrum signal, the number of peaks of the spectrum signal is determined so that the determined number of peaks can be used to determine the parameter value of peak detection.

[0037] According to an embodiment of this application, before step S101, the spectral signal needs to be preprocessed. This preprocessing includes data normalization, filling in missing values, and / or low-pass filtering.

[0038] In a specific embodiment, data normalization involves adjusting the data to the same scale, for example, between 0 and 1, to eliminate the influence of data dimensions.

[0039] When processing data, missing values ​​may be encountered. In other embodiments, missing values ​​are filled using the mean, median, or adjacent values.

[0040] Low-pass filtering can be used to remove high-frequency noise while preserving low-frequency signals. In some embodiments, low-pass filtering is performed using finite impulse response or wireless impulse response.

[0041] According to embodiments of this application, a deep learning algorithm is used to determine the number of peaks in a spectral signal.

[0042] In some embodiments, the deep learning algorithm employs CNN and LSTM deep learning algorithms. For example, a seven-classification task is trained based on CNN and LSTM neural networks, using the CNN convolutional neural network to capture local features and the LSTM algorithm to supplement temporal information, thereby achieving peak number detection of the spectral signal.

[0043] It should be noted that before step S101, the deep learning algorithm needs to be trained using similar spectral signals so that the deep learning algorithm can identify the number of peaks in the spectral signal.

[0044] In step S103, peak detection is performed on the spectral signal according to the preset peak significance threshold to obtain initial peak information.

[0045] Peak significance, or prominence, is used in peak detection to determine whether a peak is significant enough to warrant recording. Typically, peak significance is defined as the height difference between the peak and its neighboring peaks.

[0046] Peak significance helps distinguish actual peaks from noise, ensuring that only significant peaks are detected. In a specific embodiment, peak detection of the spectral signal is performed by setting a preset peak significance threshold to obtain initial peak information, thereby reducing the parameter search space and improving detection efficiency.

[0047] In a specific embodiment, in step S103, firstly, peak detection is performed on the spectral signal to determine the saliency information of each peak in the spectral signal; then, the saliency information of each peak is compared with a peak saliency threshold, and peak information with saliency information greater than the peak saliency threshold is selected as initial peak information. The initial peak information includes peak position, peak width, and / or peak height.

[0048] According to the embodiments of this application, the larger the preset peak significance threshold, the fewer peaks are detected and the more significant the peaks are obtained; conversely, the smaller the preset peak significance threshold, the more peaks are detected, but false peaks caused by noise may be detected.

[0049] In step S105, the parameter values ​​for peak detection of the spectral signal are determined based on the number of peaks and the initial peak information.

[0050] According to an embodiment of this application, in step 105, firstly, based on the initial peak information, the peak intervals of the spectral signal are divided, and Lorentz fitting is performed on each interval; then, based on the determined number of peaks in the spectral signal and the Lorentz fitting results, the peak results of the interval fitting and the peak detection results are compared using the Monte Carlo method, and an error matrix (e.g., peak position difference matrix, peak width matrix, and / or peak height matrix) is calculated. The peak position, peak width, and / or peak height of the fitting result with the smallest error matrix, along with the corresponding frequency, are selected as the final peak detection parameter values. In practice, when optimizing parameters using the Monte Carlo method, the peak significance threshold is updated based on the determined number of peaks in the spectral signal to ensure that the number of detected peaks is the same as the determined number of peaks in the spectral signal.

[0051] According to the embodiments of this application, the threshold value of the peak significance value is adaptively adjusted by using the number of peaks of the determined spectral signal, continuously narrowing the parameter space and finding the optimal parameter value. This not only realizes automated peak detection but also optimizes the detection performance and can adapt to the dynamic changes of the signal.

[0052] In a specific embodiment, an error matrix (e.g., a peak position difference matrix, a peak width matrix, and / or a peak height matrix) is constructed. When optimizing parameters using the Monte Carlo method, the parameter values ​​corresponding to the minimum error matrix are selected to maximize the number of matrix matches and minimize the number of parameters to be adjusted, effectively reducing the workload of manual parameter adjustments by experts. Throughout the optimization process, only preliminary labels are given to inaccurately detected data; the program automatically adjusts the optimal parameters, making the peak detection process more automated and efficient. In this embodiment, an error matrix is ​​constructed to measure the difference between the peak detected and the peak calculated by Lorentz piecewise fitting. The smaller the difference, the smaller the sum of the absolute values ​​of the error matrices, and the closer the parameters are to the optimal values.

[0053] Figure 2 A flowchart illustrating a method for determining parameter values ​​for peak detection of a spectral signal according to an example embodiment of this application is shown, as follows: Figure 2 As shown, step S105 includes sub-steps S1051, S1053 and S1055.

[0054] In sub-step S1051, the parameter range for peak detection of the spectral signal is determined based on the initial peak information.

[0055] According to the embodiments of this application, the parameter range to be determined in step S1051 includes the peak significance threshold and the cutoff frequency of the low-pass filter. Individually, the peak significance threshold is determined based on the number of peaks in the spectral signal obtained in step S101, and the cutoff frequency of the low-pass filter is determined based on the initial peak information obtained in step S103. However, since the two parameters are interdependent, in this embodiment, the parameter range is traversed using the Monte Carlo method, and the parameter value corresponding to the smallest peak position error within the parameter range is selected as the parameter value for peak detection of the spectral signal.

[0056] For example, the peak significance threshold or peak significance threshold range can be determined based on empirical values.

[0057] As previously mentioned, the initial peak information includes peak position, peak width, and / or peak height. In some embodiments, the cutoff frequency of the low-pass filter is determined based on the peak position and peak width.

[0058] In sub-step S1053, the peak significance threshold is updated based on the determined number of peaks in the spectral signal.

[0059] In a specific embodiment, the peak significance threshold is updated based on the determined number of peaks in the spectral signal, so that the number of detected peaks is the same as the determined number of peaks in the spectral signal.

[0060] In sub-step S1055, the parameter range is traversed using the parameter grid method, and the parameter value corresponding to the smallest peak position error in the parameter range is selected as the parameter value for peak detection of the spectrum signal.

[0061] In a specific embodiment, in step S1055, firstly, peak detection is performed on the spectrum signal using a peak significance threshold to obtain a peak detection result; then, the parameter range is traversed to obtain any set of parameters within the parameter range, and the obtained set of parameters is used to fit the peak shape of the intervals of the spectrum signal to obtain fitted peak information; then, the peak position error between the peak detection result and the fitted peak information is calculated, and the parameter value corresponding to the minimum peak position error in the parameter range is determined based on the peak position error, and used as the parameter value for spectrum peak detection.

[0062] According to an embodiment of this application, when using any set of parameters to fit the peak shape of the intervals of the spectrum signal to obtain the fitted peak information, firstly, the spectrum signal is divided into multiple intervals according to any set of parameters, and each interval includes a peak; then, a single-peak Lorentz fitting is performed on each interval to fit the peak shape of the intervals of the spectrum signal to obtain the fitted peak information.

[0063] In practice, the peak positions are first identified based on the peak detection results. Then, the spectral signal is divided into multiple intervals according to these peak positions, with each interval containing one peak. For example, a boundary can be set between two adjacent peaks to divide the signal into different intervals. In specific embodiments, the boundary of each interval can be extended to ensure that the complete shape of the peak and nearby relevant data are included. This decomposes the overall complexity of the signal into multiple smaller, relatively simple intervals, facilitating subsequent processing. Therefore, for complex and dynamic spectral signals, the embodiments of this application can achieve excellent detection results.

[0064] According to the embodiments of this application, by performing Lorentz fitting in intervals, this embodiment not only has the ability to detect local multi-peaks, but also reduces the impact of split peaks or data noise on peak detection.

[0065] Figure 3 A schematic diagram of a spectrum detection framework according to an example embodiment of this application is shown, such as... Figure 3 As shown, after preprocessing operations such as data normalization, missing value imputation, and low-pass filtering, the raw spectrum data undergoes peak detection (peak detection width). Initial peak information (initial guess value) is obtained based on a preset peak significance threshold. Then, the peaks generated by the initial guess are used to divide the spectrum into multiple intervals, and each interval is individually Lorentz fitted. Simultaneously, after preprocessing, the raw spectrum data is used to detect the number of peak labels in the raw spectrum using a neural network (e.g., a CNN+LSTM deep learning model).

[0066] Figure 4 A schematic diagram of a deep learning model for detecting the number of peaks according to an example embodiment of this application is shown. In this embodiment, a seven-classification task is trained based on CNN and LSTM neural networks. The CNN convolutional neural network is used to capture local features, and the LSTM algorithm is used to supplement the temporal information to realize the detection of the number of peaks in the spectral signal.

[0067] Assume the input to the neural network is the original spectrum x(t), which includes the result of Lorentz fitting and features of statistical detection. The output of the neural network is Y, representing the label of peak detection. The training process uses a loss function to measure the difference between the predicted value Y and the true label. The parameters of the neural network are W and b. The loss function is cross-entropy loss, as shown in Equation (1).

[0068]

[0069] Among them, Y iThis is the label after expert correction. These are the predictions from the neural network. The goal of the neural network is to minimize the loss function, specifically the cross-entropy loss between the predicted value and the true label.

[0070] like Figure 5 The diagram shown illustrates the model loss obtained according to an example embodiment of this application. The horizontal axis, epoch, represents the corresponding training epoch number, and the vertical axis, Loss, represents the model loss. Training Loss is the training loss, and Val Loss is the true value loss. Figure 5 The results show that for the seven-class classification problem, the Test Accuracy is 0.9428145201392342, the Test Precision is 0.9556197431464248, the Test Recall is 0.9428145201392342, and the Test F1 Score is 0.9329212611574382.

[0071] During training, the weights W and bias b are adjusted by learning. The output of the neural network can be expressed as: Where o is the Sigma activation function.

[0072] The formula for fitting the Lorentz distribution is shown in formula (2).

[0073]

[0074] Where A is the amplitude parameter in the fitting, and μ is the peak position parameter in the fitting. σ is the standard deviation parameter in the fitting, γ represents the additional peak value of the multi-peak, and Δ is the distance between two peak values. Multi-peak Lorentz fitting aims to fit multiple peak values ​​of a signal by adjusting parameters A, μ, σ, and γ, minimizing the fitting error using the least squares method. The fitting result is shown in formula (3). The fitting curve is as follows:

[0075]

[0076] Since the peak significance threshold and the cutoff frequency of the low-pass filter preprocessing are very important for peak detection, the Lorenz fitting result and the peak number label are used as inputs for Monte Carlo parameter finding. Then, the peak significance threshold will be adaptively adjusted according to the peak number label. During Monte Carlo parameter finding, the Lorenz fitting result and the peak detection are compared, and the cutoff frequency is determined by the error between the two.

[0077] Finally, based on the optimal peak significance threshold and optimal cutoff frequency obtained from Monte Carlo parameter finding, peak detection, peak detection, and Lorentz fitting between partitions are performed to obtain the results of unimodal Lorentz interval fitting, such as... Figure 6 As shown.

[0078] according to Figure 3 The illustrated embodiment reduces a significant amount of expert correction work through initial automated regression detection. Subsequently, it trains the data using neural networks such as CNNs. CNNs are capable of capturing local features of the data and are particularly sensitive to peak detection. Finally, Monte Carlo methods are used to find the optimal parameters, continuously fitting and approximating the optimal effect of the fusion of multiple methods, achieving automatic parameter tuning and reducing the workload of manual adjustments. Simultaneously, it improves the accuracy and robustness of peak detection, increasing the peak detection accuracy from 90% to over 95%.

[0079] The above description primarily focuses on the methodological aspects of the embodiments of this application. Those skilled in the art should readily recognize that, based on the operations or steps described in conjunction with the embodiments disclosed herein, this application can be implemented in hardware or a combination of hardware and computer software. Those skilled in the art can implement the described functionality in different ways for each specific operation or method, and such implementations should not be considered beyond the scope of this application.

[0080] The apparatus embodiments of this application are described below. For details not described in the apparatus embodiments of this application, please refer to the method embodiments of this application.

[0081] Figure 7 A block diagram of a peak detection device for a spectral signal according to an example embodiment of this application is shown, such as... Figure 7 The peak detection device shown includes a peak quantity determination unit 701, an initial peak information determination unit 703, and a parameter value determination unit 705.

[0082] The peak quantity determination unit 701 is used to determine the peak quantity of the spectrum signal in response to the peak detection command of the spectrum signal; the initial peak information determination unit 703 is used to perform peak detection on the spectrum signal according to a preset peak significance threshold to obtain initial peak information; the parameter value determination unit 705 is used to determine the parameter value of the peak detection of the spectrum signal according to the peak quantity and the initial peak information.

[0083] Figure 8 An electronic device according to an exemplary embodiment of this application is shown. Reference is made below. Figure 8 To describe an electronic device 200 according to this embodiment of the present application. Figure 8 The electronic device 200 shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of this application.

[0084] like Figure 8 As shown, the electronic device 200 is presented in the form of a general-purpose computing device. The components of the electronic device 200 may include, but are not limited to: at least one processing unit 210, at least one storage unit 220, a bus 230 connecting different system components (including storage unit 220 and processing unit 210), a display unit 240, etc.

[0085] The storage unit stores program code, which can be executed by the processing unit 210 to perform the methods described in this specification according to various exemplary embodiments of this application. For example, the processing unit 210 can perform, for example... Figure 1 The method shown.

[0086] Storage unit 220 may include readable media in the form of volatile storage units, such as random access memory (RAM) 2201 and / or cache memory 2202, and may further include read-only memory (ROM) 2203.

[0087] Storage unit 220 may also include a program / utility 2204 having a set (at least one) program module 2205, such program module 2205 including but not limited to: operating system, one or more application programs, other program modules and program data, each or some combination of these examples may include an implementation of a network environment.

[0088] Bus 230 can represent one or more of several types of bus structures, including a memory cell bus or memory cell controller, a peripheral bus, a graphics acceleration port, a processing unit, or a local bus using any of the various bus structures.

[0089] Electronic device 200 can also communicate with one or more external devices 300 (e.g., keyboard, pointing device, Bluetooth device, etc.), and with one or more devices that enable a user to interact with electronic device 200, and / or with any device that enables electronic device 200 to communicate with one or more other computing devices (e.g., router, modem, etc.). This communication can be performed via input / output (I / O) interface 250. Furthermore, electronic device 200 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via network adapter 260. Network adapter 260 can communicate with other modules of electronic device 200 via bus 230. It should be understood that, although not shown in the figures, other hardware and / or software modules can be used in conjunction with electronic device 200, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0090] Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein can be implemented by software or by combining software with necessary hardware. The technical solutions according to the embodiments of this application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, external hard drive, etc.) or on a network, including several instructions to cause a computing device (such as a personal computer, server, or network device, etc.) to execute the methods described above according to the embodiments of this application.

[0091] Software products may employ any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example,, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of readable storage media (a non-exhaustive list) include: electrical connections with one or more wires, portable disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0092] Computer-readable storage media may include data signals propagated in baseband or as part of a carrier wave, carrying readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A readable storage medium may also be any readable medium other than a readable storage medium that can transmit, propagate, or transfer a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the readable storage medium may be transmitted using any suitable medium, including but not limited to wireless, wired, optical fiber, RF, etc., or any suitable combination thereof.

[0093] Program code for performing the operations of this application can be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java and C++, and conventional procedural programming languages ​​such as C or similar languages. The program code can execute entirely on the user's computing device, partially on the user's computing device, as a standalone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).

[0094] The aforementioned computer-readable medium carries one or more programs, which, when executed by a device, cause the computer-readable medium to perform the aforementioned functions.

[0095] Those skilled in the art will understand that the above modules can be distributed in the device as described in the embodiments, or they can be modified accordingly and placed in one or more devices that are unique to this embodiment. The modules in the above embodiments can be combined into one module, or they can be further divided into multiple sub-modules.

[0096] According to an embodiment of this application, a computer program is proposed, including a computer program or instructions, which, when executed by a processor, can perform the methods described above.

[0097] The embodiments of this application have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the embodiments above are only for the purpose of helping to understand the method and core ideas of this application. Furthermore, any changes or modifications made by those skilled in the art based on the ideas of this application, and on the specific implementation methods and application scope of this application, are all within the scope of protection of this application. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. A method for peak detection of a spectral signal, characterized in that, include: In response to a peak detection command for a spectral signal, the number of peaks in the spectral signal is determined; Peak detection is performed on the spectral signal according to a preset peak significance threshold to obtain initial peak information; The parameter values ​​for peak detection of the spectral signal are determined based on the number of peaks and the initial peak information; in, Determining the parameter values ​​for peak detection of the spectral signal based on the number of peaks and the initial peak information includes: The parameter range for peak detection of the spectrum signal is determined based on the initial peak information; The peak significance threshold is updated based on the determined number of peaks in the spectral signal; The parameter range is traversed using the parameter grid method, and the parameter value corresponding to the minimum peak position error in the parameter range is selected as the parameter value for peak detection of the spectrum signal. Furthermore, by traversing the parameter range using the parameter grid method, the parameter value corresponding to the minimum peak position error within the parameter range is selected as the parameter value for peak detection of the spectral signal, including: Peak detection is performed on the spectral signal using the aforementioned peak significance threshold to obtain peak detection results; Traverse the parameter range to obtain any set of parameters within the parameter range; Using any set of parameters obtained, the peak shape of the interval of the spectrum signal is fitted to obtain the fitted peak information; Calculate the peak position error between the peak detection result and the fitted peak information; The parameter value corresponding to the minimum peak position error within the parameter range is determined based on the peak position error, and used as the parameter value for the spectrum peak detection.

2. The peak detection method according to claim 1, characterized in that, Before determining the number of peaks in the spectral signal, the method further includes: The spectral signal is preprocessed, wherein the preprocessing includes data normalization, missing value filling, and / or low-pass filtering.

3. The peak detection method according to claim 2, characterized in that, Peak detection is performed on the spectral signal according to a preset peak significance threshold to obtain initial peak information, including: Peak detection is performed on the spectrum signal to determine the significance information of each peak in the spectrum signal; Compare the significance information of each peak with the peak significance threshold; Peak information with a significance value greater than the peak significance value threshold is selected as the initial peak information.

4. The peak detection method according to claim 3, characterized in that, The initial peak information includes peak position, peak width, and / or peak height.

5. The peak detection method according to claim 1, characterized in that, Using any set of parameters obtained, the peak shape of the intervals of the spectral signal is fitted to obtain the fitted peak information, including: The spectrum signal is divided into multiple intervals based on any one set of parameters, and each interval includes a peak value; A single-peak Lorentz fit is performed on each interval to fit the peak shape of the interval of the spectral signal, thereby obtaining the fitted peak information.

6. A peak detection device for a spectral signal, characterized in that, The peak detection device is used to perform the peak detection method as described in any one of claims 1-5, and the peak detection device includes: A peak quantity determination unit is used to determine the number of peaks in the spectrum signal in response to a peak detection command of the spectrum signal. An initial peak information determination unit is used to perform peak detection on the spectrum signal according to a preset peak significance threshold to obtain initial peak information; The parameter value determination unit is used to determine the parameter values ​​for peak detection of the spectrum signal based on the number of peaks and the initial peak information.

7. An electronic device, comprising: processor; as well as A memory storing a computer program that, when executed by the processor, causes the processor to perform the peak detection method as described in any one of claims 1-5.

8. A non-transitory computer-readable storage medium having stored thereon computer-readable instructions that, when executed by a processor, cause the processor to perform the peak detection method as described in any one of claims 1-5.

Citation Information

Patent Citations

  • FBG central wavelength peak seeking method based on self-adaptive multi-peak detection algorithm

    CN109884080A

  • Raman spectrum peak fitting method, medium, equipment and device

    CN117150387A