A perimeter signal classification method and apparatus
By performing GAF processing on signal data and constructing neural network models based on GASF and GADF, the problem of the inability to preserve temporal relationships in traditional signal classification is solved, thereby improving the accuracy of signal classification.
Patent Information
- Application Number
- CN202011486597.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-16
- Publication Date
- 2025-10-24
- Estimated Expiration
- 2040-12-16
AI Technical Summary
Traditional signal classification methods cannot effectively preserve temporal relationships, resulting in reduced classification accuracy.
By performing Gram angle field processing (GAF) on the signal data to be classified, Gram angle sum field (GASF) processing results and Gram angle difference field (GADF) processing results are generated. A neural network model combining 3D convolutional layers, 2D convolutional networks and fully connected networks is used to preserve the temporal information of the signal data, and the data is classified using an image classifier based on the DenseNet model.
It improves the accuracy of signal classification and enables better utilization of the temporal relationships of signal data for classification.
Smart Images

Figure CN114638249B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of signal processing, and particularly relates to a perimeter signal classification method and device. BACKGROUND
[0002] Signal classification is a signal processing process, which determines the category to which a signal belongs by analyzing the characteristics of the signal. For example, in a perimeter protection system, target object detection signals in a perimeter area are collected, and the detection signal characteristics are analyzed to distinguish between personnel intrusion and signal fluctuations caused by natural factors. Since the complexity of signal characteristics is different in different application fields, the signals in some application scenarios have high complexity, and therefore pure signal characteristic analysis cannot accurately determine the category to which the signal belongs.
[0003] In order to realize the classification of complex signals, a neural network model can be used in the classification process. A typical neural network model is obtained by inputting training signal data into the network model, obtaining the model output result, and updating the model parameters according to the model data result and the label information. After multiple training, a neural network model conforming to the current field is obtained. When classifying signals, the signal to be classified can be input into the neural network model in the form of a vector, and the classification probability of the signal to be classified can be output by the neural network model, and finally the category of the signal can be determined.
[0004] It can be seen that in the above classification process, the specific values in the signal to be classified need to be arranged to form vector data. Common network models such as convolutional neural networks input the signal to be classified as image data into the network model when processing the signal to be classified. However, most signals have a time sequence relationship, that is, the specific values in the signal have a correlation in time. Without processing, this time sequence relationship cannot be effectively preserved, and therefore the accuracy of signal classification is reduced. SUMMARY
[0005] The present application provides a perimeter signal classification method and device to solve the problem of reduced classification accuracy caused by the inability to effectively preserve the time sequence relationship in the traditional signal classification method.
[0006] In a first aspect, the present application provides a perimeter signal classification method, comprising:
[0007] obtaining a signal to be classified detected by a detection device, the signal to be classified being a time sequence signal;
[0008] generating input data according to the signal to be classified, the input data comprising execution gram angle and field GASF processing results and gram angle difference field GADF processing results;
[0009] obtaining an intrusion classification probability corresponding to the signal to be classified, the intrusion classification probability being an output result obtained by inputting the input data into a neural network model, wherein the neural network model comprises an input layer based on a 3D convolution layer, an intermediate layer based on a 2D convolution network, a pooling layer and a classifier, and an output layer based on a full connection network.
[0010] Optionally, the generating input data according to the signal data to be classified comprises:
[0011] generating specification data according to the signal data to be classified, the specification data being data obtained by converting specific values of the signal data to be classified into a set range through performing normalization processing;
[0012] mapping the specification data to polar coordinates;
[0013] calculating a trigonometric sum and a trigonometric difference between any two points corresponding to the specification data on the polar coordinates to obtain the GASF processing result and the GADF processing result.
[0014] Optionally, the calculating a trigonometric sum and a trigonometric difference between any two points corresponding to the specification data on the polar coordinates to obtain the GASF processing result and the GADF processing result is performed according to the following formula:
[0015]
[0016]
[0017] wherein GASF is the GASF processing result; GADF is the GADF processing result; is a polar angle of the i-th specification data on the polar coordinates; i is a serial number of a specific value contained in the signal data to be classified.
[0018] Optionally, the obtaining an intrusion classification probability corresponding to the signal to be classified comprises:
[0019] generating combined data, the combined data being data obtained by combining the GASF processing result and the GADF processing result using the 3D convolution layer;
[0020] performing reduction processing on the combined data through the 2D convolution network and the pooling layer;
[0021] obtaining the classification probability by the classifier through the processed combined data;
[0022] outputting the classification probability through the full connection network.
[0023] Optionally, the generating combined data further comprises:
[0024] setting parameters of the 3D convolution layer, the parameters of the 3D convolution layer including a convolution kernel size, a step size, and a padding value;
[0025] inputting the input data into the 3D convolution layer to convert a depth transformation in the input data into a set value;
[0026] performing compression processing on the input data to obtain the combined data suitable for a 2D convolution network.
[0027] Optionally, the method further comprises constructing a classifier, the classifier being an image classifier based on a DenseNet model, including a plurality of block blocks, each of the block blocks including a plurality of DenseLayer layers; and the plurality of block blocks being connected through the 2D convolution network and a pooling network.
[0028] Optionally, the method further comprises training the neural network model, specifically comprising:
[0029] obtaining signal sample data, the signal sample data including training labels;
[0030] processing the signal sample data through the GASF and the GADF to generate training data;
[0031] inputting the training data into the initialized neural network model to obtain an output result;
[0032] adjusting model parameters of the neural network model according to the output result and the training labels.
[0033] Optionally, the method further comprises:
[0034] obtaining judgment data, the judgment data being a combination of one or more of a training set accuracy, a training set loss, a validation set accuracy, and a validation set loss output by the neural network model;
[0035] if the judgment data meets a preset training requirement, outputting the model parameters.
[0036] Optionally, the step of adjusting the model parameters of the neural network model according to the output result and the training labels comprises:
[0037] calculating a difference between the training labels and the output result in the training data using a loss function;
[0038] iteratively adjusting the model parameters of the neural network model through a back propagation algorithm with the objective of minimizing the difference.
[0039] In a second aspect, the present application further provides a perimeter signal classification device, comprising:
[0040] an acquisition module configured to acquire a to-be-classified signal detected by a detection device, the to-be-classified signal being a time-series signal;
[0041] an input data generation module configured to generate input data according to the to-be-classified signal, the input data including a Gram angle and field GASF processing result and a Gram angle difference field GADF processing result;
[0042] an output module configured to obtain a classification probability, the classification probability being an output result obtained by inputting the input data into a neural network model, wherein the neural network model includes an input layer based on a 3D convolution layer, an intermediate layer based on a 2D convolution network, a pooling layer and a classifier, and an output layer based on a full connection network.
[0043] According to the above technical solution, the perimeter signal classification method and device provided by the present application first acquire to-be-classified signal data, and then generate input data according to the to-be-classified signal data, wherein the input data includes a Gram angle and field GASF processing result and a Gram angle difference field GADF processing result. Finally, the input data is input into a neural network model to output a classification probability. The signal classification method performs GASF processing and GADF processing on the signal data input into the neural network model, so that the time-series information in the signal data is retained, thereby increasing the number of classification features of the neural network model, and enabling the neural network model to better complete the classification of the signal and improve the accuracy of the signal classification. BRIEF DESCRIPTION OF DRAWINGS
[0044] In order to more clearly illustrate the technical solutions of the present application, the drawings required in the embodiments will be briefly introduced below. Obviously, other drawings can also be obtained by those skilled in the art without creative labor on the basis of these drawings.
[0045] Figure 1 The figure is a schematic diagram of the application scene of the signal classification device in the embodiments of the present application.
[0046] Figure 2(a) is a schematic diagram of the perimeter signal classification method flow in the embodiments of the present application.
[0047] Figure 2(b) is a schematic diagram of a perimeter security system in the embodiments of the present application.
[0048] Figure 2(c) is a schematic diagram of another perimeter security system in the embodiments of the present application.
[0049] Figure 3 The figure is a schematic diagram of the flow of generating input data in the embodiments of the present application.
[0050] Figure 4Schematic diagram of the process of outputting classification probability in an embodiment of the present application;
[0051] Figure 5 This is a schematic diagram of the input data conversion process in the embodiment of this application;
[0052] Figure 6 This is a flow chart of training a neural network model in an embodiment of the present application;
[0053] Figure 7 Schematic diagram of the process of outputting model parameters in an embodiment of the present application;
[0054] Figure 8 This is a schematic diagram of the structure of the perimeter classification device in an embodiment of the present application. DETAILED DESCRIPTION
[0055] The following embodiments are described in detail, with examples illustrated in the accompanying drawings. When the following description refers to the drawings, identical numbers in different figures represent identical or similar elements unless otherwise indicated. The embodiments described in the following embodiments are not intended to represent all possible implementations consistent with the present application. They are merely examples of systems and methods consistent with certain aspects of the present application, as detailed in the claims.
[0056] In the embodiment of the present application, signal classification is a signal processing process that determines the category to which the signal belongs by analyzing the features in the signal data. Here, the signal refers to an electrical signal detected by a front-end device such as a sensor in actual engineering. Figure 1 As shown, the signal can be converted into a digital signal through A / D conversion, which can be read and processed by a control device such as a computer or a controller. The signal can also be subjected to noise reduction and impurity removal before being converted into a digital signal to obtain a signal of better quality.
[0057] It's important to note that in some signal processing processes, the electrical signals detected by front-end equipment have a time-series relationship. This means that a digital signal can be composed of multiple specific values arranged in chronological order. This means that digital signals can be further converted into signal data through encoding, mixing, and other processing, and represented by vectors. Clearly, each vector includes multiple original signal values with a time-series relationship, representing the specific data content of the signal at a specific moment.
[0058] In some application scenarios, the signal can be generated by multiple front-end devices, or generated by one front-end device but includes multiple specific meanings, so such signal data can also include multiple vectors. For example, in a perimeter security system, the front-end device is a detection device capable of acquiring a wireless signal (microwave signal), and the detection device can detect within the range of the defense zone to acquire a detection signal. In the process of detecting objects that intrude into the perimeter of the defense zone using the detection signal, different intruding objects produce different signal change characteristics.
[0059] In order to exclude the influence of irrelevant interference on the system intrusion judgment, the perimeter security system needs to distinguish between "personnel intrusion" and "non-personnel interference". Among them, the "personnel intrusion" signal usually includes personnel vertical intrusion signal, personnel along-line intrusion signal, etc., and the "non-personnel interference" signal usually includes weather change signal, animal intrusion signal, vehicle intrusion signal, etc. Obviously, the signals detected by the above different types of intrusion methods are different, and since the intrusion process is a continuous process, the detected signal will change as the intrusion process continues, that is, it has a time sequence relationship.
[0060] The classification to which the signal belongs can be determined by analyzing the characteristics in the signal data. For example, the signal data can include characteristics of the moving speed and path of the intruding object, which can be determined by analyzing the signal data, to determine the type of the intruding object. Multiple characteristics in the signal data can also be analyzed comprehensively to obtain more accurate classification results. For example, the signal data can be input into a pre-trained classification model, and the classification probability can be calculated by the classification model to determine which type of intrusion the detection signal corresponds to.
[0061] Among them, the classification model used can be a convolutional neural network model obtained by deep training of a large amount of sample data. Through the neural network model, multiple characteristics in the signal data can be analyzed and calculated comprehensively, so that the classification result output has a great advantage in accuracy.
[0062] It should be noted that the time sequence relationship refers to the time sequence order between each specific data value in the vector in the signal data, and / or the correlation between the specific data values in the time dimension, that is, the correlation between the specific data values collected at the previous time and the specific data values collected at the next time. For example, the target area of personnel in the defense zone will change continuously as the personnel gradually enter the defense zone from the outside. According to the moving direction and speed of the personnel, the target area detected has a correlation in the time dimension.
[0063] In order to be able to input the signal data into the classification model based on the convolutional neural network, the vectors in the signal data can be converted into an image form for subsequent processing as an image, but such processing will result in the loss of the time sequence relationship within the vector, so that the time sequence relationship between the signals is not utilized in the features analyzed by the neural network model.
[0064] To this end, as shown in FIG. 2(a), a perimeter signal classification method is provided in some embodiments of the present application, including the following steps:
[0065] S100: obtaining signal data to be classified detected by a detection device.
[0066] The signal classification method provided in the embodiments of the present application can be configured in a signal classification device in a specific application system. The signal classification device can be connected to a front-end device for obtaining signal data to be classified through the front-end device. The signal to be classified is a time sequence signal. For example, in a perimeter security system, the front-end device is a detection device capable of obtaining a wireless signal (microwave signal), and the detection device can detect within a defense area to obtain a detection signal.
[0067] The obtained detection signal can be sent to the signal classification device by the front-end device, and during the process, noise reduction processing, analog-to-digital conversion, modulation / demodulation, and other signal processing procedures are performed to form signal data to be classified. The signal data to be classified includes one or more data vectors, each data vector is composed of a plurality of sequences with numerical values, and the data in the vector has a time sequence relationship.
[0068] It should be noted that in order to obtain the detection signal, the detection device can use different detection principles to obtain the signal. For example, a perimeter security system is composed of microwave radio frequency signal transmitting sensors and receiving sensors, wherein each transmitting sensor can transmit wireless signals to s receiving sensors, and correspondingly, each receiving sensor can receive wireless signals transmitted by t transmitting sensors, thereby forming a wireless network, wherein s and t are positive integers. When an intruding object or an interfering object enters the wireless network, the wireless network will fluctuate.
[0069] As shown in FIG. 2(b) and FIG. 2(c), each transmitting sensor can transmit wireless signals to three receiving sensors (i.e., s is 3), and correspondingly, each receiving sensor can receive wireless signals transmitted by three transmitting sensors (i.e., t is 3). In addition, in order to improve the intrusion detection accuracy of the perimeter security system, the density of the wireless network formed between the transmitting sensors and the receiving sensors can also be improved. Therefore, in FIG. 2(c), each transmitting sensor can also transmit wireless signals to five receiving sensors (i.e., s is 5), and correspondingly, each receiving sensor can receive wireless signals transmitted by five transmitting sensors (i.e., t is 5). Of course, according to different detection requirements, the transmitting sensor can also be configured to transmit wireless signals to a larger number of receiving sensors, and the embodiments of the present application do not limit this.
[0070] S200: generating input data according to the signal data to be classified.
[0071] After obtaining the signal data to be classified, the signal classification device can generate input data according to the signal data to be classified. The input data refers to data input into the neural network model, which is obtained by transforming the signal data to be classified. For example, the vectors in the signal data to be classified can be transformed into an image-like form to generate input data, so as to adapt to the input requirements of the network model based on the convolutional neural network.
[0072] In the process of transforming the vectors into an image-like form, the specific values in the multiple vectors can be stacked to form an image matrix. However, since the simple stacking of the signal data will cause the time sequence relationship between the specific values to be lost, before the signal data is transformed into an image-like form, the signal data to be classified can be subjected to Gramian Angular Field (GAF) processing to preserve its time sequence characteristics and form two-dimensional image data with time sequence information.
[0073] The GAF processing is a signal data processing method, which transforms the time sequence information in the signal into a two-dimensional image by using a Gram matrix, and the generated two-dimensional image can preserve the time dependence of the original signal. The GAF processing includes Gramian Angular Summation Field (GASF) processing and Gramian Angular Difference Field (GADF) processing. The output results of the GASF processing and the GADF processing both have mapping uniqueness, and there is a certain difference between the two output results. Therefore, the input data after the GAF processing includes the GASF processing result and the GADF processing result.
[0074] S300: obtaining an intrusion classification probability corresponding to the signal to be classified.
[0075] After the input data is generated, the input data is outputted to the neural network model to obtain an output result of the neural network model. The neural network model includes an input layer based on a 3D convolution layer, an intermediate layer based on a 2D convolution network, a pooling process and a classifier, and an output layer based on a full connection network. Since the neural network model in the present application is used for signal classification, the output result is a classification probability corresponding to each category of the signal data to be classified.
[0076] The neural network model is obtained by repeatedly training a training data set as a model input after constructing an initial model according to a model training criterion. In the neural network model, the input data can be processed by the input layer to convert the input data into a specific format. Then, the input data is processed by the intermediate layer to determine the output result of each channel in the neural network model through a classifier and other model algorithms. Finally, the output results of multiple channels are fused by the input layer to obtain the final classification probability. The input layer based on the 3D convolution layer can adapt to the GAF processing result of the signal data, so that the output results of the GASF processing and the GADF processing are combined by using the processing capability of the 3D convolution layer on the "depth channel", so that the neural network model can learn the time sequence relationship retained in the two output results and automatically assign weights.
[0077] Obviously, the category with the highest classification probability can be used as the classification result of the signal data to be classified. For example, in a perimeter security system, a signal data has a probability of 85% corresponding to the classification category of "personnel intrusion" and a probability of 15% corresponding to the classification category of "non-personnel interference", and the classification category of the current signal data is determined as "personnel intrusion". After the neural network processing, the input classification probability is more likely to be "personnel intrusion", so it is determined that the current signal data is triggered by personnel intrusion, so that further measures can be taken to handle the related event, such as generating an alarm signal.
[0078] It should be noted that the input data inputted into the neural network model can include data corresponding to multiple vectors. Multiple vectors are selected to more effectively distinguish the classification results, for example, to distinguish the vector fluctuations caused by "personnel intrusion" and the vector fluctuations caused by natural factors. The number of supported vectors can be set according to the form of the model training data set.
[0079] According to the technical solution, the GAF-based signal classification method provided in the embodiments of the present application can retain the time sequence relationship in the signal data through GAF processing before the signal data is input into the neural network, and the output results of the GASF processing and the GADF processing are fused through the input layer based on the 3D convolution layer in the classification model, while the output results of the GASF processing and the GADF processing are retained, so that the input data in the neural network model can retain more significant time sequence relationship, and then more accurate classification probability is output through the increase of data features.
[0080] It can be seen that, in the above embodiments, in order to retain the time sequence relationship in the signal data, GAF processing needs to be performed on the signal data before the signal data is input into the neural network model. In order to complete the GAF processing, in some embodiments of the present application, as shown in the following formula, the input data is generated according to the signal data to be classified. Figure 3
[0081] S201: generating standard data according to the signal data to be classified;
[0082] S202: mapping the standard data to polar coordinates;
[0083] S203: calculating the sum and difference of any two points corresponding to the standard data on the polar coordinates to obtain the GASF processing result and the GADF processing result.
[0084] After obtaining the signal data to be classified, the classification device needs to perform standardization processing on the signal data first to generate standard data. The standard data is obtained by converting the specific value of the signal data to be classified to a set range through standardization processing. The standard data can be mapped to convert the signal data from a time sequence to polar coordinates, so as to retain the time sequence relationship in the data.
[0085] In order to adapt to the characteristics of polar coordinates, before mapping from a time sequence to polar coordinates, the signal data needs to be standardized first to be transformed to the range of [-1, 1]. The specific data standardization processing method can be completed through the following formula:
[0086]
[0087] In the formula, is the i-th signal data to be classified; x i is the corresponding standard data; x i is the specific value of the i-th signal in the signal data to be classified; X is the signal data to be classified, max(X) is the maximum value in the signal data to be classified, min(X) is the minimum value in the signal data to be classified, and i is the serial number of the specific value contained in the signal data to be classified.
[0088] After generating the canonical data from the signal data to be classified, each specific value in the canonical data can be mapped to polar coordinates. The mapping of data from time series to polar coordinates can preserve the time dependence of the series while preserving the time correlation of the series.
[0089] The normalized data is projected onto polar coordinates according to the following formula:
[0090]
[0091] In the formula, is the polar angle of the polar coordinate point; r is the polar radius in the polar coordinate; i is the serial number of the specific value contained in the signal data to be classified; and N is the total number of specific values in the canonical data.
[0092] Through the above formula, a unique mapping relationship between each specific value in the signal data and the polar coordinate point can be obtained, so that the loss generated when the data is inversely calculated is relatively small.
[0093] After the data is mapped, the time relationship needs to be obtained through GAF processing. Different methods of obtaining the time relationship result in the emergence of two methods of GASF and GADF, i.e., calculating the sum of triangles and the difference of triangles between any two points of the canonical data on the polar coordinates to obtain the GASF processing result and the GADF processing result.
[0094] Wherein, the GASF processing and the GADF processing can use the sum of triangles and the difference of triangles between two points to obtain the time relationship of the converted sequence according to the following formula:
[0095]
[0096]
[0097] In the formula, GASF is the GASF processing result; GADF is the GADF processing result; is the polar angle of the canonical data on the polar coordinates, and i is the serial number of the specific value contained in the signal data to be classified.
[0098] After a single vector of length n is converted once, a single image of size n x n is generated. The output results of the GASF processing and the GADF processing have mapping uniqueness, and there is a certain difference between them. Both results can be retained at the same time to significantly increase the time sequence relationship in the data. For example, the input single sample is 10 x 200, i.e., 10 vectors of length 200. After the GASF processing and the GADF processing, a result of 10 x 2 x 200 x 200 can be generated, which corresponds to the number of channels x depth x width x height of the neural network model.
[0099] As can be seen from the above technical solution, in this embodiment, by normalizing the signal data to be classified and mapping it to polar coordinates, the time series in the signal data to be classified can be converted into polar coordinates, and then the output results are obtained through GASF processing and GADF processing to achieve the preservation of the temporal relationship characteristics. In commonly used convolutional neural network models, the input data of the model should conform to the format of "number of channels × width × height", but the current format does not meet the requirements, so further processing is required to perform additional transformation on the data while preserving the temporal relationship.
[0100] That is Figure 4 As shown, in some embodiments of the present application, the step of obtaining the classification probability further includes:
[0101] S310: Generate combined data;
[0102] S320: Performing reduction processing on the combined data through the 2D convolutional network and the pooling layer;
[0103] S330: Passing the processed combined data through the classifier to obtain the classification probability;
[0104] S340: Output the classification probability through the fully connected network.
[0105] For neural network models, the input data can be further processed through the input layer. Because the data input to the neural network model includes the results of GASF and GADF processing, the input layer needs to combine the two processing results to generate combined data. To complete the combination of the two processing results, the input layer in the neural network model can be constructed based on the 3D convolution layer.
[0106] Compared to a typical 2D convolutional network, a 3D convolutional layer adds a depth channel. This depth channel corresponds to the number of images in the data resulting from GASF and GADF processing, meaning the depth channel value is 2. A 3D convolutional layer is used to merge the two processed results. For example, after merging, the data processed by the neural network model has a format of 10 × 2 × 200 × 200, which corresponds to the number of channels × depth × width × height. After processing by the 3D convolutional layer, the format becomes 10 × 1 × 200 × 200. The dimension of size 1 is then removed, resulting in a final format of 10 × 200 × 200 for the subsequent data.
[0107] After generating the combined data, the middle layer of the neural network model can perform reduction processing on the combined data, that is, the combined data can be reduced through 2D convolutional networks and pooling processing. Using 2D convolutional networks and pooling processing, the size of the input data can be further reduced, thereby reducing the number of neural network parameters and computing requirements.
[0108] After the 2D convolution network and the pooling processing, the intermediate layer of the neural network model can also perform classification calculation on the processed combined data through a classifier, and finally obtain the classification probability through a full connection network to complete the output of the classification result. The classifier is an algorithm model constructed according to the application scene, and the classifier is an image classifier based on a DenseNet model, including a plurality of block blocks, and each block block includes a plurality of DenseLayer layers; the plurality of block blocks are connected through the 2D convolution network and the pooling network.
[0109] For example, an image classifier based on a DenseNet model can be constructed first, and the model is connected by three block blocks, and each block block includes 4 layers, 8 layers and 6 layers of DenseLayer layers. In each block block, the input of the current layer is composed of the outputs of all previous layers, so as to form a network with increasing number of channels according to the growth rate. The convolution layer and the pooling layer are used to connect the different block blocks, so as to reduce the size of the feature map. In the DenseLayer layer, the bottleneck structure using 1x1 convolution kernel and 1x3 convolution kernel is included, so as to further reduce the parameter amount of the whole model.
[0110] According to the above technical solution, after obtaining the input data, the GASF processing result and the GADF processing result are combined through the 3D convolution layer, and then the 2D convolution network is used for intermediate processing to reduce the size of the input data, and the classification probability is calculated by the classifier, so that the classification probability is output through the output layer, and the classification process of the signal data is completed.
[0111] In the process of outputting the classification probability by the neural network model, after the GASF processing result and the GADF processing result are combined by the 3D convolution layer, the 2D convolution network is used for reduction processing. In actual application, the 2D convolution network has no depth channel, so that the processing result of the 3D convolution layer cannot be directly input into the 2D convolution network. Therefore, in some embodiments of the present application, the processing result of the 3D convolution layer also needs to be converted. That is, as shown in the following figure, the step of generating the combined data further includes: Figure 5
[0112] S311: setting the parameters of the 3D convolution layer;
[0113] S312: inputting the input data into the 3D convolution layer to convert the depth in the input data into a set value;
[0114] S313: performing compression processing on the input data to obtain the combined data suitable for the 2D convolution network.
[0115] In order to complete the combination processing of the input data using the 3D convolution layer, the parameters of the 3D convolution layer need to be set first, wherein the parameters of the 3D convolution layer include the kernel size, the step, and the padding value. For example, in the design of the 3D convolution layer, the kernel size is set to (2, 3, 3), which corresponds to the depth, width, and height dimensions respectively, the step is set to 1, and the padding value is set to (0, 1, 1).
[0116] By setting the parameters of the 3D convolution layer, the depth of the output data after processing by the 3D convolution layer can be changed to 1, while the width and height remain unchanged. Therefore, the input data can be input into the 3D convolution layer to convert the depth in the input data into a set value. For example, for a hypothetical input of 10x200, after processing by the 3D convolution layer, the data format becomes 10x1x200x200.
[0117] The dimension with a size of 1 can be directly compressed, i.e., performing compression processing on the input data to obtain combined data suitable for a 2D convolution network. After compression, the data format obtained is 10x200x200, which conforms to the input form suitable for a convolutional neural network, i.e., "number of channels x width x height".
[0118] As can be seen from the above technical solutions, the processing of signal data by the 3D convolution layer in this embodiment can complete the combination of the two processing results of GASF and GADF, realize the simultaneous use of two different processing methods, and ensure the maximum retention of signal information and time dependence. Moreover, according to the two results of GASF and GADF of the data, the two generated images constitute a data format of vector number (channel) x depth x width x height in the data structure, rather than simply being stacked together, which not only adapts to the subsequent model processing requirements, but also reduces the data processing amount, so that the number of vectors in each sample does not affect the convolution kernel size settings in the neural network, but only relates to the input channel number.
[0119] In the above embodiment, the classification probability can be obtained by processing the signal data to be classified using the neural network model, and the adaptability of the neural network model will directly affect the accuracy of the classification result. In order to obtain a neural network model that is more suitable for the current application scenario, as shown in FIG. 8, the neural network model can also be trained before the signal is classified and processed, specifically including: Figure 6
[0120] S401: obtaining signal sample data;
[0121] S402: processing the signal sample data by the GASF and the GADF to generate training data;
[0122] S403: inputting the training data into the initialized neural network model to obtain an output result;
[0123] S404: Adjust the model parameters of the neural network model according to the output result and the training label.
[0124] The training process of the neural network model is to input sample data to obtain a model output result on the basis of constructing an initial model, and to optimize the model parameters in the neural network model by reverse propagation according to the difference between the model output result and the training label.
[0125] Therefore, when training the model, the signal sample data needs to be obtained first. The signal sample data includes the training label. The signal sample data is signal data with a training label obtained in advance based on statistics, data mining, etc., and the training label is used to indicate the classification to which the corresponding signal data belongs. Obviously, in order to adapt to the current application scenario, the source of the signal sample data should also be in the current application scenario. For example, in a perimeter security system, the signal sample data is obtained by experiment and statistics, and the signal data collected by each front-end device under different target intrusion modes. The training label in the signal sample data is the target intrusion mode corresponding to the signal data.
[0126] After obtaining the signal sample data, the signal sample data also needs to be processed by GASF and GADF to obtain training data that retains the time sequence relationship. The specific processing method of processing the signal sample data by GASF and GADF is the same as the processing method provided in the above embodiments, which will not be described here.
[0127] By processing the signal sample data by GASF and GADF, the time sequence relationship in the training data can be retained, so that after inputting the training data into the initialized neural network model, an output result that refers to the time sequence relationship characteristics can be obtained. Then, according to the difference between the output result and the training label, the difference is propagated in reverse, and the model parameters of the neural network model are adjusted based on the minimum value of the difference.
[0128] The difference between the training label and the output result in the training data can be calculated using a loss function, and the model parameters of the neural network model are iteratively adjusted by a back propagation algorithm with the goal of minimizing the difference. For example, the input signal sample data is processed using GASF and GADF, the input time series signal is converted into a two-dimensional image that retains time dependence and time correlation, and is constructed into an input format suitable for entering a 3D convolution layer. The loss function uses a cross-entropy function to calculate the difference between the input label and the neural network output result. The processed training sample and training label are input into the initialized neural network model, and the network parameters are iteratively adjusted on the data set by the back propagation algorithm. That is, in the perimeter security system, the signal sample data of the training label "person intrusion" is a positive sample, and the signal sample data of the training label "non-person intrusion" is a negative sample.
[0129] After multiple input signal sample data and repeated adjustment of the model parameters, the output result of the neural network model can be made to be closer and closer to the training label, that is, the adaptability of the neural network model to the current scene is higher and higher. As the difference between the output result and the training label becomes smaller and smaller, the model parameters at this time can be output when the difference reaches a certain set threshold, thereby training the initialized neural network model into a neural network model suitable for the current application scenario.
[0130] In order to output the model parameters of the neural network model, as shown in Figure 7 In some embodiments of the present application, the method further comprises:
[0131] S405: obtaining judgment data;
[0132] S406: if the judgment data meets the preset training requirement, outputting the model parameters.
[0133] The judgment data is one or a combination of the training set accuracy, the training set loss, the validation set accuracy, and the validation set loss output by the neural network model. In actual application, different parameters can be selected as judgment data according to different application scene requirements, and different training requirements can be set.
[0134] After obtaining the judgment data, the judgment data and the preset training requirement can be compared to determine whether the judgment data meets the preset training requirement. When the judgment data meets the preset training requirement, that is, the difference between the output result under the current model and the sample label is within an acceptable range, the model parameters can be output, and the model training is completed. In addition, the training set accuracy, the training set loss, the validation set accuracy, and the validation set loss are output synchronously during the training process to more effectively adjust the model parameters. The result on the validation set is used as the standard for when the model stops training, and the final model parameters are saved or the model is directly output after the training is completed.
[0135] It can be seen that, through the above model training process, a neural network model conforming to the characteristics of the current application scenario can be obtained. For example, after the signal data processed by GASF and GADF is input into the trained neural network model, the output result of the last full connection layer of the classifier is processed by the softmax layer, and the probability value of the input signal belonging to the "person intrusion" and "non-person intrusion" categories is output.
[0136] From the above technical solutions, the GAF-based signal classification method provided by the present application can obtain a neural network model conforming to the application scenario by pre-training the neural network model. Thus, after the signal data to be classified is processed by GASF and GADF and input into the neural network model, the classification result can be output. Since the classification result refers to the time sequence feature, the accuracy of the classification result can be improved.
[0137] Based on the above signal classification method, as shown in Figure 8 In some embodiments of the present application, a GAF-based signal classification device is also provided, which includes an acquisition module, an input data generation module, and an output module. The acquisition module is configured to acquire signal data to be classified.
[0138] The input data generation module is configured to generate input data according to the signal data to be classified, wherein the input data includes the results of GASF processing and GADF processing.
[0139] The output module is configured to obtain a classification probability, which is an output result obtained by inputting the input data into a neural network model, wherein the neural network model includes an input layer based on a 3D convolution layer, an intermediate layer based on a 2D convolution network, a pooling processing, and a classifier, and an output layer based on a full connection network.
[0140] In practical applications, the signal classification device can be arranged in a terminal device with data processing function, such as a computer or a server. The acquisition module of the signal classification device is connected to the front-end device to acquire the signal data to be classified through the front-end device. After acquiring the signal data to be classified, the acquisition module can send the signal data to be classified to the input data generation module, so as to perform GASF processing and GADF processing on the signal data to be classified to retain the time sequence relationship and generate input data. The input data generation module sends the generated input data to the output module. The output module has a neural network model built-in, which can output a classification probability according to the input data to complete signal classification.
[0141] It should be noted that for other implementation manners provided in the above embodiments, additional function modules such as a training module can be configured in the signal classification device, or function processing units can be configured in any module to execute the related program steps in the above embodiments. For example, the input data generation module can further include a specification processing unit, a mapping unit, a GAF processing unit, and the like.
[0142] The specification processing unit is configured to generate specification data according to the signal data to be classified; the mapping unit is configured to map the specification data to polar coordinates; and the GAF processing unit is configured to calculate a sum of triangles and a difference of triangles between any two points of the specification data in the polar coordinates to obtain the GASF processing result and the GADF processing result.
[0143] Similarly, for other implementation manners described above, corresponding function modules or function units can also be configured to complete various processing of signal data, which will not be listed one by one here.
[0144] As can be seen from the above technical solutions, the present application provides a signal classification method and device based on GAF. The signal classification method first acquires signal data to be classified, and then generates input data according to the signal data to be classified, wherein the input data includes a Gram angle and field GASF processing result and a Gram angle difference field GADF processing result. Finally, the input data is input into a neural network model to output a classification probability. The signal classification method performs GASF processing and GADF processing on the signal data input into the neural network model, so that the time sequence information in the signal data is retained, thereby increasing the number of classification features of the neural network model, and enabling the neural network model to better complete classification of the signal and improve the accuracy of classification of the signal.
[0145] The similar parts among the embodiments provided by the present application can be referred to each other, and the specific embodiments provided above are only several examples under the general concept of the present application, and do not limit the protection scope of the present application. For those skilled in the art, any other embodiments extended according to the present application scheme without creative labor are within the protection scope of the present application.
Claims
1. A perimeter signal classification method characterized by, The method comprises: obtaining a to-be-classified signal detected by a detection device, the to-be-classified signal being a time sequence signal, comprising at least one data vector, each data vector being a sequence of multiple numerical values, and the numerical values in the data vector having a time sequence relationship; generating input data from the to-be-classified signal, the input data being two-dimensional image data with time sequence information, comprising a GASF processing result and a GADF processing result; obtaining an intrusion classification probability corresponding to the to-be-classified signal, the intrusion classification probability being an output result obtained by inputting the input data into a neural network model, wherein the neural network model comprises an input layer based on a 3D convolution layer, an intermediate layer based on a 2D convolution network, a pooling layer and a classifier, and an output layer based on a full connection network; the parameters of the 3D convolution layer are set, the parameters of the 3D convolution layer comprising a convolution kernel size (2, 3, 3), a step length 1 and a padding value (0, 1, 1), so as to convert the depth in the input data into 1.
2. The perimeter signal classification method of claim 1, wherein, The method comprises: generating specification data from the to-be-classified signal data, the specification data being obtained by converting the specific values of the to-be-classified signal data into a set range through normalization processing; mapping the specification data to polar coordinates; calculating the triangle sum and the triangle difference between any two points corresponding to the specification data on the polar coordinates, so as to obtain the GASF processing result and the GADF processing result.
3. The perimeter signal classification method of claim 2, wherein, The triangle sum and the triangle difference between any two points corresponding to the specification data on the polar coordinates are calculated according to the following formula, so as to obtain the GASF processing result and the GADF processing result: Wherein, GASF is a GASF processing result; GADF is a GADF processing result; is the polar angle of the i-th norm data in the norm data on the polar coordinate; i is the serial number of the specific value contained in the signal data to be classified.
4. The perimeter signal classification method of claim 1, wherein, The method comprises: generating combined data, the combined data being obtained by combining the GASF processing result and the GADF processing result using the 3D convolution layer; performing reduction processing on the combined data through the 2D convolution network and the pooling layer; obtaining the classification probability by processing the combined data through the classifier; outputting the classification probability through the full connection network.
5. The perimeter signal classification method of claim 4, wherein, The method further comprises performing compression processing on the input data to obtain the combined data suitable for the 2D convolution network.
6. The perimeter signal classification method of claim 4, wherein, The method further comprises constructing a classifier, the classifier being an image classifier based on a DenseNet model, comprising a plurality of block blocks, each block block comprising a plurality of DenseLayer layers; the plurality of block blocks are connected through the 2D convolution network and the pooling network.
7. The perimeter signal classification method of claim 1, wherein, The method further comprises training the neural network model, specifically comprising: obtaining signal sample data, the signal sample data comprising training labels; processing the signal sample data through the GASF and the GADF to generate training data; inputting the training data into the initialized neural network model to obtain an output result; adjusting the model parameters of the neural network model according to the output result and the training labels.
8. The perimeter signal classification method of claim 7, wherein, The method further comprises: Obtaining judgment data, the judgment data being a combination of one or more of training set accuracy, training set loss, validation set accuracy, and validation set loss output by the neural network model; If the judgment data meets a preset training requirement, outputting the model parameters.
9. The perimeter signal classification method of claim 7, wherein, The step of adjusting the model parameters of the neural network model according to the output result and the training label comprises: calculating a difference between the training label and the output result in the training data using a loss function; minimizing the difference by iteratively adjusting the model parameters of the neural network model through a back propagation algorithm.
10. A perimeter signal classification device, characterized by, Comprise: The acquisition module is used for acquiring a to-be-classified signal detected by a detection device, the to-be-classified signal being a time sequence signal, comprising at least one data vector, each data vector being a sequence composed of multiple numerical values, and the numerical values in the data vector having a time sequence relationship; The input data generation module is used for generating input data according to the to-be-classified signal, the input data being two-dimensional image data with time sequence information, comprising a Gram angle and field GASF processing result and a Gram angle difference field GADF processing result; The output module is used for obtaining an intrusion classification probability corresponding to the to-be-classified signal, the intrusion classification probability being an output result obtained by inputting the input data into a neural network model, wherein the neural network model comprises an input layer based on a 3D convolution layer, an intermediate layer based on a 2D convolution network, a pooling layer and a classifier, and an output layer based on a full connection network; the parameters of the 3D convolution layer are set, the parameters of the 3D convolution layer comprising a convolution kernel size (2, 3, 3), a step length 1 and a padding value (0, 1, 1), so as to convert the depth in the input data into 1.