A method for determining peak value and related device
The peaks in the time amplitude sequence data are predicted through neural network models, which solves the problem of difficulty in positioning the main peak under the influence of noise in defective signals, and realizes automated and efficient peak determination.
Patent Information
- Application Number
- CN202311281374.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-28
- Publication Date
- 2025-04-04
AI Technical Summary
During defect detection, defect signals often contain a lot of noise, making it difficult to distinguish and locate the main peak. The existing methods rely on a large amount of manual confirmation and are inefficient.
A neural network model, especially a combination of convolution modules, changing shape layers, discarding layers, fully connected layers and long and short-term memory network layers, is used to predict peaks in time-magnitude sequence data. By training the neural network model, loss calculation and backpropagation training are performed using training sample data until the loss reaches the target.
It improves the convenience and accuracy of determining peak signals, reduces manual intervention, and improves detection efficiency.
Smart Images

Figure CN119760330A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of signal processing, and in particular to a method for determining a peak value and a related device. Background Art
[0002] As a defect detection device, the detection device is used to detect the surface of the detection object, the computer processes the detected image and extracts the defects, and the processed image data is stored in the computer. The above processes have been realized in the detection instrument.
[0003] However, in the process of defect detection, it is often necessary to process the acquired defect signal, such as finding the peak in the defect signal and performing further processing based on the peak. However, in the prior art, the defect signal often contains a large amount of noise, making it difficult to identify and locate the main peak in the defect signal. The traditional main peak location method requires a large number of people to manually select the position of the main peak, and this process of manually confirming the main peak position is not only cumbersome, but also inefficient. Summary of the invention
[0004] The embodiment of the present invention provides a method for determining a peak value and a related device, which are used to determine the peak value in time amplitude sequence data by means of a neural network model, thereby improving the convenience of determining the peak signal.
[0005] A first aspect of an embodiment of the present application provides a method for determining a peak value, characterized by comprising:
[0006] Obtain the time amplitude series data to be predicted;
[0007] The time amplitude sequence data to be predicted is input into the peak prediction neural network model to obtain the target peak data output by the peak neural network model, wherein the target peak data is the data with the largest amplitude in the time amplitude sequence data to be predicted.
[0008] Preferably, the peak prediction neural network model comprises: a convolution module, a reshape layer, a dropout layer, a fully connected layer and a long short-term memory network layer;
[0009] Inputting the time amplitude sequence data to be predicted into the peak prediction neural network model to obtain the target peak data output by the peak neural network model, including:
[0010] Inputting the time amplitude sequence data to be predicted into the convolution module to extract data features of the time amplitude sequence data;
[0011] Inputting the data feature into the shape changing layer to change the number of data of the data feature;
[0012] Inputting the data features after the number of data is changed into the discard layer to desparse the data features after the number of data is changed;
[0013] Inputting the de-sparse data features into the fully connected layer to fit the de-sparse data features;
[0014] The fitted data features are input into the long short-term memory network layer to obtain the target peak data output by the peak neural network model.
[0015] Preferably, before inputting the time amplitude sequence data to be predicted into the peak prediction neural network model, the method further includes:
[0016] Acquire training sample data, the training sample data comprising: a plurality of groups of time amplitude sequence data and target peak data corresponding to each group of time amplitude sequence data;
[0017] Inputting each set of time amplitude series data and corresponding target peak data into the peak prediction neural network model to obtain predicted peak data output by the peak prediction neural network model;
[0018] According to a preset loss function, the loss between the target peak data and the corresponding predicted peak data in each set of time amplitude series data is calculated;
[0019] The peak prediction neural network model is trained according to the loss and back propagation algorithm until the loss reaches the target loss.
[0020] Preferably, before inputting each set of time amplitude series data and the corresponding target peak data into the peak prediction neural network model, the method further comprises:
[0021] The training sample data is cleaned, wherein the cleaning includes at least one of deleting duplicate values, deleting outliers, and filling missing values.
[0022] Preferably, the peak prediction neural network model is trained according to the loss and back propagation algorithm, including:
[0023] When the model parameters of the coordinate transformation neural network model are updated using the loss and back propagation algorithm, the learning rate of the parameter update is optimized using the Adamw optimizer.
[0024] Preferably, the peak prediction neural network model comprises: a convolution module, a reshape layer, a dropout layer, a fully connected layer and a long short-term memory network layer;
[0025] Inputting each set of time amplitude series data and the corresponding target peak data into the peak prediction neural network model to obtain predicted peak data output by the peak prediction neural network model, including:
[0026] Inputting each set of time amplitude sequence data into the convolution module to extract data features of each set of time amplitude sequence data;
[0027] Inputting the data feature into the shape changing layer to change the number of data of the data feature;
[0028] Inputting the data features after the number of data is changed into the discard layer to desparse the data features after the number of data is changed;
[0029] Inputting the de-sparse data features into the fully connected layer to fit the de-sparse data features;
[0030] The fitted data features are input into the long short-term memory network layer to obtain the predicted peak data output by the peak neural network model.
[0031] Preferably, the time series in the time amplitude series data is a time series with non-uniform time steps.
[0032] A second aspect of an embodiment of the present application provides a device for determining a peak value, characterized by comprising:
[0033] An acquisition unit, used for acquiring time amplitude sequence data to be predicted;
[0034] An input-output unit is used to input the time amplitude sequence data to be predicted into the peak prediction neural network model to obtain the target peak data output by the peak neural network model, wherein the target peak data is the data with the largest amplitude in the time amplitude sequence data to be predicted.
[0035] Preferably, the peak prediction neural network model comprises: a convolution module, a reshape layer, a dropout layer, a fully connected layer and a long short-term memory network layer;
[0036] Input and output unit, specifically used for:
[0037] Inputting the time amplitude sequence data to be predicted into the convolution module to extract data features of the time amplitude sequence data;
[0038] Inputting the data feature into the shape changing layer to change the number of data of the data feature;
[0039] Inputting the data features after the number of data is changed into the discard layer to desparse the data features after the number of data is changed;
[0040] Inputting the de-sparse data features into the fully connected layer to fit the de-sparse data features;
[0041] The fitted data features are input into the long short-term memory network layer to obtain the target peak data output by the peak neural network model.
[0042] The acquisition unit is further used to acquire training sample data, wherein the training sample data includes: a plurality of groups of time amplitude sequence data and target peak data corresponding to each group of time amplitude sequence data;
[0043] The input-output unit is further used to input each group of time amplitude series data and the corresponding target peak data into the peak prediction neural network model to obtain the predicted peak data output by the peak prediction neural network model;
[0044] The device also includes:
[0045] A calculation unit, used to calculate the loss between the target peak data and the corresponding predicted peak data in each set of time amplitude series data according to a preset loss function;
[0046] A training unit is used to train the peak prediction neural network model according to the loss and the back propagation algorithm until the loss reaches the target loss.
[0047] The device also includes:
[0048] A cleaning unit is used to clean the training sample data before inputting each group of time amplitude series data and the corresponding target peak data into the peak prediction neural network model, wherein the cleaning includes at least one of deleting duplicate values, deleting outliers and filling missing values.
[0049] Training units are specifically used for:
[0050] When the model parameters of the coordinate transformation neural network model are updated using the loss and back propagation algorithm, the learning rate of the parameter update is optimized using the Adamw optimizer.
[0051] Preferably, the peak prediction neural network model comprises: a convolution module, a reshape layer, a dropout layer, a fully connected layer and a long short-term memory network layer;
[0052] Input and output unit, specifically used for:
[0053] Inputting each set of time amplitude sequence data into the convolution module to extract data features of each set of time amplitude sequence data;
[0054] Inputting the data feature into the shape changing layer to change the number of data of the data feature;
[0055] Inputting the data features after the number of data is changed into the discard layer to desparse the data features after the number of data is changed;
[0056] Inputting the de-sparse data features into the fully connected layer to fit the de-sparse data features;
[0057] The fitted data features are input into the long short-term memory network layer to obtain the predicted peak data output by the peak neural network model.
[0058] Preferably, the time series in the time amplitude series data is a time series with non-uniform time steps.
[0059] A third aspect of an embodiment of the present application provides a computer device, including a processor, which is used to implement the method for determining a peak value provided in the first aspect of the embodiment of the present application when executing a computer program stored in a memory.
[0060] A fourth aspect of an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the method for determining a peak value provided in the first aspect of an embodiment of the present application is implemented.
[0061] It can be seen from the above technical solutions that the embodiments of the present invention have the following advantages:
[0062] In an embodiment of the present application, time amplitude sequence data to be predicted is obtained; the time amplitude sequence data to be predicted is input into a peak prediction neural network model to obtain target peak data output by the peak neural network model, wherein the target peak data is the data with the largest amplitude in the time amplitude sequence data to be predicted.
[0063] Because the embodiment of the present application adopts a peak prediction neural network model to predict the target peak data in the time amplitude sequence data, the convenience of obtaining the target peak data from the time amplitude sequence data to be predicted is improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0064] Figure 1 A schematic diagram of an embodiment of a method for determining a peak value in an embodiment of the present application;
[0065] Figure 2 For this application Figure 1A refinement of step 102 in the embodiment;
[0066] Figure 3 This is a structural diagram of a peak prediction neural network model according to an embodiment of the present application;
[0067] Figure 4 This is a schematic diagram of an embodiment of training a peak prediction neural network model in an embodiment of the present application;
[0068] Figure 5 for Figure 4 A refinement of step 401 in the embodiment;
[0069] Figure 6 A schematic diagram of an embodiment of a device for determining a peak value in an embodiment of the present application. DETAILED DESCRIPTION
[0070] The embodiment of the present invention provides a method for determining a peak value and a related device, which are used to determine the peak value in time amplitude sequence data by means of a neural network model, thereby improving the convenience of determining the peak signal.
[0071] 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.
[0072] The terms "first", "second", "third", "fourth", 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 described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "including" and "having" 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 clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0073] For ease of understanding, the method for determining the peak value in the embodiment of the present application is described below. Figure 1 , an embodiment of the method for determining a peak value in the embodiment of the present application includes:
[0074] 101. Obtain time amplitude series data to be predicted;
[0075] In the present application, if you want to obtain the peak value in the time amplitude sequence data, you first need to obtain the time amplitude sequence data to be predicted, and the time amplitude sequence data to be predicted here can be obtained from the detection device locally, or it can be obtained locally, or it can be obtained from a third-party storage medium. There is no specific restriction on the source of the time amplitude sequence data to be predicted.
[0076] Furthermore, in the embodiment of the present application, when acquiring the time amplitude series data to be predicted, it can be acquired in real time or at a scheduled time, and there is no specific restriction on the time for acquiring the time amplitude series data to be predicted.
[0077] In addition, the time amplitude series data in the embodiment of the present application is a series of discrete sequence data, and each data in the sequence data includes time and amplitude. For example, the horizontal coordinate of the time series data is time t, and the vertical coordinate is amplitude w. Furthermore, the time series in the time amplitude series data to be predicted in the implementation of the present application is a time amplitude sequence with non-uniform time steps, that is, the time interval between two adjacent moments is non-constant.
[0078] 102. Input the time amplitude sequence data to be predicted into the peak prediction neural network model to obtain the target peak data output by the peak neural network model, wherein the target peak data is the data with the largest amplitude in the time amplitude sequence data to be predicted.
[0079] After obtaining the time amplitude sequence data to be predicted, the time amplitude sequence data to be predicted is input into the peak prediction neural network model to obtain the target peak data output by the peak neural network model, wherein the target peak data is the data with the largest amplitude in the time amplitude sequence data to be predicted.
[0080] Because the embodiment of the present application adopts a peak prediction neural network model to predict the target peak data in the time amplitude sequence data, the convenience of obtaining the target peak data from the time amplitude sequence data to be predicted is improved.
[0081] Further, based on Figure 1 The embodiment described, Figure 1 The peak prediction neural network model in includes convolutional modules, reshape layers, dropout layers, fully connected layers, and long short-term memory network layers. Figure 1 For a detailed description of step 102 in Figure 2 , Figure 2 for Figure 1 The refinement steps of step 102 are as follows:
[0082] 201. Inputting the time amplitude sequence data to be predicted into the convolution module to extract data features of the time amplitude sequence data;
[0083] For ease of understanding, Figure 3 A structural schematic diagram of the peak prediction neural network model is given. In the embodiment of the present application, the time amplitude series data to be predicted is input into the convolution module to extract data features in the time amplitude series data, wherein the data features include the time interval between two adjacent data and the amplitude change law between two adjacent data.
[0084] 202. Input the data feature to the shape changing layer to change the number of data of the data feature;
[0085] After obtaining the data features, the data features are input into the shape changing layer to change the number of data features. For example, when the data features are 1*4 matrices, if the data feature matrix needs to be changed to 1*16, the 1*4 matrix can be input into the 4*16 matrix (that is, the shape changing layer in the present application) to convert the 1*4 matrix into a 1*16 matrix.
[0086] 203. Inputting the data features after the number of data is changed into the discard layer to desparse the data features after the number of data is changed;
[0087] In step 202, after obtaining the data features after the number of data is changed, because there may be values of 0 in the data features, in order to save computing power, the embodiment of the present application inputs the feature matrix after the number of data is changed into the discard layer to de-sparse the data features after the number of data is changed.
[0088] The specific de-sparseness operation is to delete the data with a value of 0.
[0089] 204. Inputting the de-sparse data features into the fully connected layer to fit the de-sparse data features;
[0090] After obtaining the de-sparse data features, the de-sparse data features are input into the fully connected layer to fit the de-sparse data features, that is, to integrate the de-sparse data features.
[0091] 205. Input the fitted data features into the long short-term memory network layer to obtain the target peak data output by the peak neural network model.
[0092] Finally, the fitted data features are input into the long short-term memory network layer. Since the long short-term memory network layer can predict the amplitude at the next moment based on the amplitude at the current moment and the amplitude at the previous moment, the embodiment of the present application inputs the fitted data features into the long short-term memory network layer, and the long short-term memory network can determine the target peak data hidden in a large amount of noise based on the time series.
[0093] The structure of the peak prediction neural network model is described in detail in the embodiment of the present application, and the peak prediction neural network model includes a discard layer and a long short-term memory network layer, wherein the discard layer can significantly reduce the amount of calculation of the model and improve the calculation efficiency of the model, and the long short-term memory network layer predicts the amplitude at the next moment based on the amplitude at the previous moment and the amplitude at the current moment, thereby determining the true target peak data in a large amount of noise data and improving the accuracy of the model output.
[0094] based on Figure 1 In the embodiment described above, before executing step 102, it is necessary to first train the peak prediction neural network model. The following describes the process of training the peak prediction neural network model. Figure 4 , an embodiment of the peak prediction neural network model training process in the embodiment of the present application includes:
[0095] 401. Acquire training sample data, wherein the training sample data includes: multiple groups of time amplitude sequence data and corresponding target peak data in each group of time amplitude sequence data;
[0096] Before training the peak prediction neural network model, it is necessary to first obtain training sample data of the peak prediction neural network model, wherein the training sample data includes: multiple groups of time series amplitude data and corresponding target peak data in each group of time amplitude series data.
[0097] It is easy to understand that after obtaining multiple sets of time amplitude series data, in order to avoid erroneous data appearing in the multiple sets of time amplitude series data due to accidents, in the embodiment of the present application, after obtaining the training sample data, the training sample data is further cleaned, wherein the cleaning includes: deleting at least one of duplicate values, deleting outliers, and filling missing values.
[0098] Specifically, when filling missing values, the embodiment of the present application adopts interpolation method to fill in, so as to ensure the validity and consistency of the data.
[0099] 402. Input each group of time amplitude series data and the corresponding target peak data into the peak prediction neural network model to obtain predicted peak data output by the peak prediction neural network model;
[0100] After obtaining the training sample data, each set of time amplitude series data and the corresponding target peak data are further input into the peak prediction neural network model to obtain the predicted peak data output by the peak prediction neural network model.
[0101] As for the process of the peak prediction neural network model outputting predicted peak data, it will be described in the following embodiments and will not be repeated here.
[0102] 403. Calculate the loss between the target peak data and the corresponding predicted peak data in each set of time amplitude series data according to a preset loss function;
[0103] After the predicted peak data is obtained, the loss between the target score data in each set of time amplitude series data and the corresponding predicted peak data is calculated according to the preset loss function.
[0104] The loss function here includes L1, L2 or cross entropy loss function, etc., and there is no specific limitation here.
[0105] 404. According to the loss and back propagation algorithm, the peak prediction neural network model is trained until the loss reaches the target loss.
[0106] After the loss is obtained, the peak prediction neural network model is further trained according to the back propagation algorithm until the loss reaches the target loss.
[0107] Among them, the process of training the peak prediction neural network model is the process of continuously updating the model parameters of the peak prediction neural network model. As for the back propagation algorithm, it is also described in detail in the prior art and will not be repeated here.
[0108] In addition, in the process of training the model parameters of the peak prediction neural network model using the loss and back propagation algorithms, in order to ensure that gradient explosion does not occur during the gradient process and to ensure the speed of gradient convergence, this application uses the Adamw optimizer to optimize the learning rate of parameter updates.
[0109] Among them, the Adamw optimizer is used to optimize the learning rate of parameter updates, which has at least the following advantages:
[0110] 1. Automatically adjust the learning rate of different parameters of the model to better adapt to the changes in the gradients of different parameters;
[0111] 2. The training speed is relatively faster, and it can also better handle sparse gradients;
[0112] 3. The Adamw optimizer performs L2 regularization on larger weight updates, which can further improve the training effect of the high model.
[0113] The structure of the Adamw optimizer itself is consistent with that described in the prior art and will not be described in detail here.
[0114] The embodiment of the present application provides a detailed description of the training process of the peak prediction neural network model, and when updating the model parameters of the peak prediction neural network model, the embodiment of the present application uses the Adamw optimizer to optimize the learning rate of the parameter update, so that the peak prediction neural network model training speed is faster and the training effect is better.
[0115] based on Figure 4 In the embodiment described above, step 401 is described in detail below. Figure 5 , Figure 5 is a refinement step of step 401, wherein the model structure of the peak prediction neural network model is Figure 3 A schematic diagram is given in:
[0116] 501. Input each group of time amplitude sequence data into the convolution module to extract data features of each group of time amplitude sequence data;
[0117] 502. Input the data feature to the shape changing layer to change the number of data of the data feature;
[0118] 503. Inputting the data features after the number of data is changed into the discard layer to desparse the data features after the number of data is changed;
[0119] 504. Inputting the de-sparse data features into the fully connected layer to fit the de-sparse data features;
[0120] 505. Input the fitted data features into the long short-term memory network layer to obtain the predicted peak data output by the peak neural network model.
[0121] It should be noted that the description of steps 501 to 505 in the embodiment of the present application is the same as Figure 2 The descriptions of steps 201 to 205 are similar and will not be repeated here.
[0122] When training a peak prediction neural network model, the embodiment of the present application can significantly reduce the amount of model calculations by discarding the layer, thereby improving the model's calculation efficiency. The long short-term memory network layer can predict the amplitude at the next moment based on the amplitude at the previous moment and the amplitude at the current moment, thereby determining the true target peak data in a large amount of noise data, thereby improving the accuracy of the model output.
[0123] The above describes the method for determining the peak value in the embodiment of the present application. Next, the device for determining the peak value in the embodiment of the present application is described. Figure 6 , an embodiment of the device for determining a peak value in the embodiment of the present application includes:
[0124] An acquisition unit 601 is used to acquire time amplitude sequence data to be predicted;
[0125] The input-output unit 602 is used to input the time amplitude sequence data to be predicted into the peak prediction neural network model to obtain the target peak data output by the peak neural network model, wherein the target peak data is the data with the largest amplitude in the time amplitude sequence data to be predicted.
[0126] Preferably, the peak prediction neural network model comprises: a convolution module, a reshape layer, a dropout layer, a fully connected layer and a long short-term memory network layer;
[0127] The input and output unit 602 is specifically used for:
[0128] Inputting the time amplitude sequence data to be predicted into the convolution module to extract data features of the time amplitude sequence data;
[0129] Inputting the data feature into the shape changing layer to change the number of data of the data feature;
[0130] Inputting the data features after the number of data is changed into the discard layer to desparse the data features after the number of data is changed;
[0131] Inputting the de-sparse data features into the fully connected layer to fit the de-sparse data features;
[0132] The fitted data features are input into the long short-term memory network layer to obtain the target peak data output by the peak neural network model.
[0133] The acquisition unit 601 is further used to acquire training sample data, wherein the training sample data includes: multiple groups of time amplitude sequence data and corresponding target peak data in each group of time amplitude sequence data;
[0134] The input-output unit 602 is further used to input each group of time amplitude series data and the corresponding target peak data into the peak prediction neural network model to obtain the predicted peak data output by the peak prediction neural network model;
[0135] The device also includes:
[0136] A calculation unit 603 is used to calculate the loss between the target peak data and the corresponding predicted peak data in each group of time amplitude series data according to a preset loss function;
[0137] The training unit 604 is used to train the peak prediction neural network model according to the loss and the back propagation algorithm until the loss reaches the target loss.
[0138] The device also includes:
[0139] The cleaning unit 605 is used to clean the training sample data before inputting each group of time amplitude series data and the corresponding target peak data into the peak prediction neural network model, and the cleaning includes: deleting at least one of duplicate values, deleting outliers and filling missing values.
[0140] The training unit 604 is specifically used for:
[0141] When the model parameters of the coordinate transformation neural network model are updated using the loss and back propagation algorithm, the learning rate of the parameter update is optimized using the Adamw optimizer.
[0142] Preferably, the peak prediction neural network model comprises: a convolution module, a reshape layer, a dropout layer, a fully connected layer and a long short-term memory network layer;
[0143] The input and output unit 602 is specifically used for:
[0144] Inputting each set of time amplitude sequence data into the convolution module to extract data features of each set of time amplitude sequence data;
[0145] Inputting the data feature into the shape changing layer to change the number of data of the data feature;
[0146] Inputting the data features after the number of data is changed into the discard layer to desparse the data features after the number of data is changed;
[0147] Inputting the de-sparse data features into the fully connected layer to fit the de-sparse data features;
[0148] The fitted data features are input into the long short-term memory network layer to obtain the predicted peak data output by the peak neural network model.
[0149] Preferably, the time series in the time amplitude series data is a time series with non-uniform time steps.
[0150] Because the embodiment of the present application predicts the target peak data in the time amplitude sequence data through the peak prediction neural network model in the input-output unit 602, the convenience of obtaining the target peak data from the time amplitude sequence data to be predicted is improved.
[0151] The peak prediction device in the embodiment of the present invention is described above from the perspective of modular functional entities. The computer device in the embodiment of the present invention is described below from the perspective of hardware processing:
[0152] The computer device is used to implement the function of the peak prediction device. In an embodiment of the present invention, an embodiment of the computer device includes:
[0153] Processor and memory;
[0154] The memory is used to store a computer program, and when the processor is used to execute the computer program stored in the memory, the following steps can be implemented:
[0155] Obtain the time amplitude series data to be predicted;
[0156] The time amplitude sequence data to be predicted is input into the peak prediction neural network model to obtain the target peak data output by the peak neural network model, wherein the target peak data is the data with the largest amplitude in the time amplitude sequence data to be predicted.
[0157] In some embodiments of the present invention, the peak prediction neural network model includes: a convolution module, a reshape layer, a dropout layer, a fully connected layer and a long short-term memory network layer. The processor can also be used to implement the following steps:
[0158] Inputting the time amplitude sequence data to be predicted into the convolution module to extract data features of the time amplitude sequence data;
[0159] Inputting the data feature into the shape changing layer to change the number of data of the data feature;
[0160] Inputting the data features after the number of data is changed into the discard layer to desparse the data features after the number of data is changed;
[0161] Inputting the de-sparse data features into the fully connected layer to fit the de-sparse data features;
[0162] The fitted data features are input into the long short-term memory network layer to obtain the target peak data output by the peak neural network model.
[0163] In some embodiments of the present invention, before inputting the time amplitude sequence data to be predicted into the peak prediction neural network model, the processor may also be used to implement the following steps:
[0164] Acquire training sample data, the training sample data comprising: a plurality of groups of time amplitude sequence data and target peak data corresponding to each group of time amplitude sequence data;
[0165] Inputting each set of time amplitude series data and corresponding target peak data into the peak prediction neural network model to obtain predicted peak data output by the peak prediction neural network model;
[0166] According to a preset loss function, the loss between the target peak data and the corresponding predicted peak data in each set of time amplitude series data is calculated;
[0167] The peak prediction neural network model is trained according to the loss and back propagation algorithm until the loss reaches the target loss.
[0168] In some embodiments of the present invention, before inputting each set of time amplitude series data and the corresponding target peak data into the peak prediction neural network model, the processor may also be used to implement the following steps:
[0169] The training sample data is cleaned, wherein the cleaning includes at least one of deleting duplicate values, deleting outliers, and filling missing values.
[0170] In some embodiments of the present invention, the processor may also be used to implement the following steps:
[0171] When the model parameters of the coordinate transformation neural network model are updated using the loss and back propagation algorithm, the learning rate of the parameter update is optimized using the Adamw optimizer.
[0172] In some embodiments of the present invention, the peak prediction neural network model includes: a convolution module, a reshape layer, a dropout layer, a fully connected layer and a long short-term memory network layer. The processor can also be used to implement the following steps:
[0173] Inputting each set of time amplitude sequence data into the convolution module to extract data features of each set of time amplitude sequence data;
[0174] Inputting the data feature into the shape changing layer to change the number of data of the data feature;
[0175] Inputting the data features after the number of data is changed into the discard layer to desparse the data features after the number of data is changed;
[0176] Inputting the de-sparse data features into the fully connected layer to fit the de-sparse data features;
[0177] The fitted data features are input into the long short-term memory network layer to obtain the predicted peak data output by the peak neural network model.
[0178] In some embodiments of the present invention, the time series in the time amplitude series data is a time series with non-uniform time steps.
[0179] It can be understood that when the processor in the computer device described above executes the computer program, it can also implement the functions of the various units in the corresponding device embodiments described above, which will not be repeated here. Exemplarily, the computer program can be divided into one or more modules / units, and the one or more modules / units are stored in the memory and executed by the processor to complete the present invention. The one or more modules / units can be a series of computer program instruction segments that can perform specific functions, and the instruction segments are used to describe the execution process of the computer program in the peak prediction device. For example, the computer program can be divided into the various units in the above-mentioned peak prediction device, and each unit can implement the specific functions described in the above-mentioned corresponding peak prediction device.
[0180] The computer device may be a computing device such as a desktop computer, a notebook, a PDA, and a cloud server. The computer device may include, but is not limited to, a processor and a memory. Those skilled in the art will appreciate that a processor and a memory are merely examples of computer devices and do not constitute a limitation of the computer device. The computer device may include more or fewer components, or a combination of certain components, or different components. For example, the computer device may also include input and output devices, network access devices, buses, and the like.
[0181] The processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc. The processor is the control center of the computer device, and various interfaces and lines are used to connect various parts of the entire computer device.
[0182] The memory can be used to store the computer program and / or module, and the processor realizes various functions of the computer device by running or executing the computer program and / or module stored in the memory, and calling the data stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, at least one application required for a function, etc.; the data storage area can store data created according to the use of the terminal, etc. In addition, the memory can include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (SecureDigital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0183] The present invention also provides a computer-readable storage medium, which is used to implement the function of the peak prediction device, and stores a computer program. When the computer program is executed by a processor, the processor can be used to perform the following steps:
[0184] Obtain the time amplitude series data to be predicted;
[0185] The time amplitude sequence data to be predicted is input into the peak prediction neural network model to obtain the target peak data output by the peak neural network model, wherein the target peak data is the data with the largest amplitude in the time amplitude sequence data to be predicted.
[0186] In some embodiments of the present invention, the peak prediction neural network model includes: a convolution module, a reshape layer, a dropout layer, a fully connected layer and a long short-term memory network layer. When the computer program is executed by a processor, the processor can also be used to implement the following steps:
[0187] Inputting the time amplitude sequence data to be predicted into the convolution module to extract data features of the time amplitude sequence data;
[0188] Inputting the data feature into the shape changing layer to change the number of data of the data feature;
[0189] Inputting the data features after the number of data is changed into the discard layer to desparse the data features after the number of data is changed;
[0190] Inputting the de-sparse data features into the fully connected layer to fit the de-sparse data features;
[0191] The fitted data features are input into the long short-term memory network layer to obtain the target peak data output by the peak neural network model.
[0192] In some embodiments of the present invention, before the time amplitude series data to be predicted is input into the peak prediction neural network model, when the computer program is executed by the processor, the processor may also be used to implement the following steps:
[0193] Acquire training sample data, the training sample data comprising: a plurality of groups of time amplitude sequence data and target peak data corresponding to each group of time amplitude sequence data;
[0194] Inputting each set of time amplitude series data and corresponding target peak data into the peak prediction neural network model to obtain predicted peak data output by the peak prediction neural network model;
[0195] According to a preset loss function, the loss between the target peak data and the corresponding predicted peak data in each set of time amplitude series data is calculated;
[0196] The peak prediction neural network model is trained according to the loss and back propagation algorithm until the loss reaches the target loss.
[0197] In some embodiments of the present invention, before inputting each set of time amplitude series data and the corresponding target peak data into the peak prediction neural network model, when the computer program is executed by the processor, the processor may also be used to implement the following steps:
[0198] The training sample data is cleaned, wherein the cleaning includes at least one of deleting duplicate values, deleting outliers, and filling missing values.
[0199] In some embodiments of the present invention, when the computer program is executed by a processor, the processor may also be used to implement the following steps:
[0200] When the model parameters of the coordinate transformation neural network model are updated using the loss and back propagation algorithm, the learning rate of the parameter update is optimized using the Adamw optimizer.
[0201] In some embodiments of the present invention, the peak prediction neural network model includes: a convolution module, a reshape layer, a dropout layer, a fully connected layer and a long short-term memory network layer. When the computer program is executed by a processor, the processor can also be used to implement the following steps:
[0202] Inputting each set of time amplitude sequence data into the convolution module to extract data features of each set of time amplitude sequence data;
[0203] Inputting the data feature into the shape changing layer to change the number of data of the data feature;
[0204] Inputting the data features after the number of data is changed into the discard layer to desparse the data features after the number of data is changed;
[0205] Inputting the de-sparse data features into the fully connected layer to fit the de-sparse data features;
[0206] The fitted data features are input into the long short-term memory network layer to obtain the predicted peak data output by the peak neural network model.
[0207] In some embodiments of the present invention, the time series in the time amplitude series data is a time series with non-uniform time steps.
[0208] It is understandable that if the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a corresponding computer-readable storage medium. Based on such an understanding, the present invention implements all or part of the processes in the above-mentioned corresponding embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.
[0209] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0210] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0211] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0212] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0213] As described above, the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features thereof may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for determining a peak value, characterized in that: include: Obtain the time amplitude series data to be predicted; The time amplitude sequence data to be predicted is input into the peak prediction neural network model to obtain the target peak data output by the peak neural network model, wherein the target peak data is the data with the largest amplitude in the time amplitude sequence data to be predicted.
2. The method according to claim 1, characterized in that: The peak prediction neural network model includes: a convolution module, a shape change layer, a discard layer, a fully connected layer and a long short-term memory network layer; Inputting the time amplitude sequence data to be predicted into the peak prediction neural network model to obtain the target peak data output by the peak neural network model, including: Inputting the time amplitude sequence data to be predicted into the convolution module to extract data features of the time amplitude sequence data; Inputting the data feature into the shape changing layer to change the number of data of the data feature; Inputting the data features after the number of data is changed into the discard layer to desparse the data features after the number of data is changed; Inputting the de-sparse data features into the fully connected layer to fit the de-sparse data features; The fitted data features are input into the long short-term memory network layer to obtain the target peak data output by the peak neural network model.
3. The method according to claim 1, characterized in that: Before inputting the time amplitude sequence data to be predicted into the peak prediction neural network model, the method further includes: Acquire training sample data, the training sample data comprising: a plurality of groups of time amplitude sequence data and corresponding target peak data in each group of time amplitude sequence data; Inputting each set of time amplitude series data and corresponding target peak data into the peak prediction neural network model to obtain predicted peak data output by the peak prediction neural network model; According to a preset loss function, the loss between the target peak data and the corresponding predicted peak data in each set of time amplitude series data is calculated; The peak prediction neural network model is trained according to the loss and back propagation algorithm until the loss reaches the target loss.
4. The method according to claim 3, characterized in that: Before inputting each set of time amplitude series data and the corresponding target peak data into the peak prediction neural network model, the method further includes: The training sample data is cleaned, wherein the cleaning includes at least one of deleting duplicate values, deleting outliers, and filling missing values.
5. The method according to claim 3, characterized in that: The peak prediction neural network model is trained according to the loss and back propagation algorithm, including: When the model parameters of the coordinate transformation neural network model are updated using the loss and back propagation algorithm, the learning rate of the parameter update is optimized using the Adamw optimizer.
6. The method according to claim 3, characterized in that The peak prediction neural network model includes: a convolution module, a shape change layer, a discard layer, a fully connected layer and a long short-term memory network layer; Inputting each set of time amplitude series data and the corresponding target peak data into the peak prediction neural network model to obtain predicted peak data output by the peak prediction neural network model, including: Inputting each set of time amplitude sequence data into the convolution module to extract data features of each set of time amplitude sequence data; Inputting the data feature into the shape changing layer to change the number of data of the data feature; Inputting the data features after the number of data is changed into the discard layer to desparse the data features after the number of data is changed; Inputting the de-sparse data features into the fully connected layer to fit the de-sparse data features; The fitted data features are input into the long short-term memory network layer to obtain the predicted peak data output by the peak neural network model.
7. The method according to any one of claims 1 to 6, characterized in that The time series in the time amplitude series data is a time series with non-uniform time steps.
8. A method for determining a peak value, characterized in that: include: An acquisition unit, used for acquiring time amplitude sequence data to be predicted; An input-output unit is used to input the time amplitude sequence data to be predicted into the peak prediction neural network model to obtain the target peak data output by the peak neural network model, wherein the target peak data is the data with the largest amplitude in the time amplitude sequence data to be predicted.
9. A computer device comprising a processor, characterized in that: When executing the computer program stored in the memory, the processor is configured to implement the method for determining a peak value according to any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, it is used to implement the method for determining a peak value according to any one of claims 1 to 7.