Short-wave real acquisition signal time-frequency diagram data set generation method and computer equipment
By generating a time-frequency diagram data set of shortwave actual acquisition signals with rich annotation information, the problems of spectrum leakage, insufficient resolution and lack of annotation information in the time-frequency diagram generation method in the existing technology are solved, and the accuracy and depth of signal detection are significantly improved. The training effect of the learning model.
Patent Information
- Application Number
- CN202411320982.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-23
- Publication Date
- 2025-01-21
AI Technical Summary
The existing time-frequency graph generation methods have problems such as spectrum leakage, insufficient resolution and lack of labeling information, making it difficult to effectively detect burst signals and weak signals, which affects the accuracy of signal detection and the training effect of deep learning models.
By inputting the time domain broadband signal data of shortwave actual acquisition, perform segmentation processing and frequency domain conversion, calculate the power spectral density, generate a grayscale image, and divide it into overlapping sub-images to generate a time-frequency diagram of the shortwave actual acquisition signal. At the same time, corresponding annotation boxes are generated for each time-frequency diagram to provide annotation information.
Significantly reduces the workload of manual annotation, improves annotation efficiency, captures signal characteristics through time-frequency diagrams with multiple frequency resolutions, enhances signal recognition capabilities, reduces spectrum leakage, and improves the generalization of deep learning models ability.
Smart Images

Figure CN119337176A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of shortwave intelligent reconnaissance, and more specifically, to a method for generating a time-frequency diagram data set of a shortwave real-wave signal and a computer device. Background Art
[0002] In the field of modern radio communications and signal processing, the accuracy and efficiency of signal detection are crucial. With the increase in wireless communication applications, spectrum resources are tight and the signal environment is complex, and the requirements for signal detection are getting higher and higher. Traditional signal detection methods often have difficulty in effectively detecting burst signals and weak signals in complex and changing signal environments, resulting in low detection accuracy and difficulty in meeting actual needs.
[0003] At present, time-frequency diagram is widely used in signal detection and recognition as an intuitive and effective signal analysis tool.
[0004] However, the existing time-frequency diagram generation methods still have the following defects:
[0005] Spectrum leakage: The window truncation effect leads to obvious spectrum leakage, which affects the accuracy of the frequency domain signal. The resolution is insufficient, and the time-frequency diagram of a single resolution cannot fully reflect the detailed characteristics of the signal. The lack of annotation information increases the difficulty of signal detection in deep learning and affects the training effect of the deep learning model. Summary of the invention
[0006] In order to solve the above problems, the present invention provides a method and computer device for generating a shortwave real-time signal time-frequency diagram dataset, which provides high-quality time-frequency diagram dataset input for a deep learning model through an efficient and accurate signal processing process.
[0007] To achieve the above object, according to a first aspect of the present invention, a method for generating a shortwave real-wave signal time-frequency diagram data set is provided, the method comprising:
[0008] Input the shortwave time domain broadband signal data, and process it in segments according to a fixed time period to generate multiple sequentially arranged time domain signal sequences;
[0009] Convert each time domain signal sequence into a frequency domain signal sequence, and calculate the power spectrum density of each frequency domain signal sequence;
[0010] splicing a predetermined number of power spectral densities in time order to generate a power spectral density matrix;
[0011] Linearly normalize the power spectral density matrix to generate a grayscale image;
[0012] The grayscale image is divided into a plurality of square sub-images, each of which has an overlapping area in the frequency domain, so as to generate a plurality of shortwave real-time frequency graphs of the signal;
[0013] Generate a corresponding annotation frame for each shortwave real-acquired signal time-frequency diagram, and the annotation frame is used to mark the frequency starting position, frequency ending position, time starting position and time ending position of the shortwave real-acquired signal;
[0014] Multiple shortwave real-time signal time-frequency diagrams and their corresponding annotation boxes are combined as a shortwave real-time signal time-frequency diagram dataset.
[0015] Furthermore, each time domain signal sequence is converted into a frequency domain signal sequence, and the power spectral density of each frequency domain signal sequence is calculated, including windowing and fast Fourier transforming each time domain signal sequence into a corresponding frequency domain signal sequence; calculating the power spectral density of each frequency domain signal sequence to generate a first power spectral density; and downsampling the first power spectral density to generate a second power spectral density.
[0016] Furthermore, each time domain signal sequence is windowed and fast Fourier transformed into a corresponding frequency domain signal sequence, including windowing each time domain signal sequence, with the window length being equal to the length of the time domain signal sequence; and fast Fourier transforming the windowed time domain signal sequence to generate a frequency domain signal sequence.
[0017] Furthermore, before windowing each time domain signal sequence, the method for generating a shortwave real-wave signal time-frequency diagram data set also includes performing data enhancement on the time domain signal sequence by at least one of adding random noise and changing the signal amplitude.
[0018] Furthermore, a labeling frame corresponding to each shortwave real-sampled signal time-frequency diagram is generated, including generating a preliminary labeling frame in each shortwave real-sampled signal time-frequency diagram by means of a double sliding window, wherein the preliminary labeling frame is used to mark the frequency starting position and the frequency ending position of the shortwave real-sampled signal; threshold processing, dilation operation and erosion operation are performed on the area selected by the preliminary labeling frame to generate a final labeling frame, and the coordinates of the final labeling frame are saved as a labeling file.
[0019] Furthermore, a preliminary annotation frame is generated in each shortwave actual signal time-frequency diagram by a double sliding window method, including setting two sliding windows, the height of the two sliding windows being the same as the height of the shortwave actual signal time-frequency diagram; moving the two sliding windows from left to right along the shortwave actual signal time-frequency diagram, moving according to a predetermined sliding step length, calculating the sum of the grayscale values in the two sliding windows at each sliding position, recording it as the first energy and the second energy, calculating the ratio of the first energy and the second energy to obtain the first ratio, calculating the ratio of the second energy to the first energy to obtain the second ratio, and taking the larger value of the first ratio and the second ratio as the energy ratio; determining a decision threshold according to a change in the energy ratio; determining a frequency start position and a frequency end position of the shortwave actual signal according to a position where the energy ratio exceeds the decision threshold and a peak position of the energy ratio; generating a preliminary annotation frame according to the frequency start position and the frequency end position.
[0020] Furthermore, threshold processing, dilation operation and erosion operation are performed on the area selected by the preliminary annotation box to generate a final annotation box, including extracting the area selected by the preliminary annotation box from the shortwave actual signal time-frequency diagram, performing threshold processing on the area, and converting the shortwave actual signal time-frequency diagram into a binary image; selecting a structural element to perform a dilation operation on the binary image; selecting a structural element that is the same as the structural element used in the dilation operation to perform an erosion operation on the binary image after the dilation operation; searching for all connected white pixel areas in the binary image after the erosion operation, calculating the circumscribed rectangle of each connected white pixel area, and generating a final annotation box for annotation according to the coordinates of the upper left corner and the lower right corner of the circumscribed rectangle.
[0021] Furthermore, the width of the sliding window is determined according to the bandwidth of the shortwave sampled signal and the frequency resolution of the time-frequency diagram of the shortwave sampled signal.
[0022] Furthermore, the predetermined sliding step size is determined according to the frequency resolution of the shortwave actual signal time-frequency diagram and the required marking accuracy.
[0023] According to a second aspect of the present invention, there is also provided a computer device, which includes a memory, a processor and a computer program stored in the memory, and the processor executes the computer program to implement the steps of any one of the above methods.
[0024] According to a third aspect of the present invention, there is also provided a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the steps of any of the above methods are implemented.
[0025] According to a fourth aspect of the present invention, there is also provided a computer program product, comprising a computer program, which implements the steps of any of the above methods when executed by a processor.
[0026] In general, the above technical solutions conceived by the present invention can achieve the following beneficial effects compared with the prior art:
[0027] (1) The present invention provides a method for generating a shortwave real-acquired signal time-frequency diagram data set. After generating the shortwave real-acquired signal time-frequency diagram, a labeling frame corresponding to the time-frequency diagram is also generated. The frequency starting position, frequency ending position, time starting position and time ending position of the shortwave real-acquired signal are labeled through the labeling frame, thereby achieving the purpose of adding labeling information to the shortwave real-acquired signal time-frequency diagram. In addition, when the time-frequency diagram and its corresponding labeling frame are used as inputs in the training and use stages of the deep learning model for signal detection, the workload of manual labeling can be significantly reduced. By automatically generating preliminary labeling frames, humans only need to confirm and fine-tune these auxiliary labeling frames, thereby improving the overall labeling efficiency.
[0028] (2) The present invention provides a method for generating a shortwave real-time signal time-frequency diagram data set, which obtains a second power spectrum density by downsampling the first power spectrum density, thereby obtaining a first power spectrum density and a second power spectrum density with different frequency resolutions. Furthermore, through the time-frequency diagrams corresponding to the first power spectrum density and the second power spectrum density with multiple different frequency resolutions, it is possible to more comprehensively capture signal features and enhance the recognition capability of multiple signals.
[0029] (3) The present invention provides a method for generating a shortwave real-wave signal time-frequency diagram data set, which can reduce spectrum leakage by selecting a window function to perform a windowing operation on the above-mentioned time domain signal sequence.
[0030] (4) The present invention provides a method for generating a shortwave real-time signal time-frequency diagram dataset, which can increase the diversity of the dataset and improve the generalization ability of the deep learning model by using data enhancement technology. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0032] Figure 1 A schematic diagram of a flow chart of a method for generating a shortwave real-wave signal time-frequency diagram dataset provided in an embodiment of the present application;
[0033] Figure 2 A schematic diagram of a dual sliding window operation provided in an embodiment of the present application;
[0034] Figure 3 A schematic diagram of an expansion and corrosion operation provided in an embodiment of the present application;
[0035] Figure 4 A schematic diagram of the internal structure of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0036] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention. In addition, the technical features involved in the various embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.
[0037] The terms "first", "second", "third", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish different objects, rather than to describe a specific order. 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 limited to the listed steps or units, but optionally includes steps or units that are not listed, or optionally includes other steps or units inherent to these processes, methods, products or devices.
[0038] like Figure 1 As shown, a method for generating a shortwave real-time signal time-frequency diagram data set is provided. The method can be executed by a terminal or by a server that communicates with the terminal through a network. The terminal can be, but is not limited to, various personal computers, laptops, etc. The server can be an independent server, or a server cluster composed of multiple servers can be used. The method is applied to a terminal as an example for explanation, and includes the following steps:
[0039] Step 101, inputting shortwave time domain broadband signal data, and performing segment processing according to a fixed time period to generate a plurality of sequentially arranged time domain signal sequences;
[0040] Step 102, converting each time domain signal sequence into a frequency domain signal sequence, and calculating the power spectrum density of each frequency domain signal sequence;
[0041] Step 103, splicing a predetermined number of power spectrum densities in chronological order to generate a power spectrum density matrix;
[0042] Step 104, linearly normalizing the power spectrum density matrix to generate a grayscale image;
[0043] Step 105, dividing the grayscale image into a plurality of square sub-images, each sub-image having an overlapping area in the frequency domain, and generating a plurality of shortwave real-sampled signal time-frequency diagrams;
[0044] Step 106, generating a corresponding annotation box for each shortwave real-time signal frequency diagram, the annotation box is used to annotate the shortwave signal position information in the frequency diagram, including the frequency start position, frequency end position, time start position and time end position, and combining multiple shortwave real-time signal frequency diagrams and their corresponding annotation boxes as a shortwave real-time signal frequency diagram data set.
[0045] In the above-mentioned method for generating a shortwave real-time signal time-frequency diagram dataset, after generating the shortwave real-time signal time-frequency diagram, a labeling box corresponding to the time-frequency diagram is also generated, and the position information of the shortwave signal is annotated by the labeling box. When the time-frequency diagram and its corresponding labeling box are used as inputs in the training and use stages of the deep learning model for signal detection, the workload of manual labeling can be significantly reduced. By automatically generating preliminary labeling boxes, humans only need to confirm and fine-tune these auxiliary labeling boxes, thereby improving the overall labeling efficiency.
[0046] In one embodiment, the above step 102 converts each time domain signal sequence into a frequency domain signal sequence, and calculates the power spectral density of each frequency domain signal sequence, including windowing and fast Fourier transforming each time domain signal sequence into a corresponding frequency domain signal sequence, calculating the power spectral density of each frequency domain signal sequence to obtain a first power spectral density; and downsampling the first power spectral density to obtain a second power spectral density.
[0047] In this embodiment, the second power spectral density is obtained by downsampling the first power spectral density, thereby obtaining the first power spectral density and the second power spectral density with different frequency resolutions. Furthermore, through the time-frequency diagram corresponding to the first power spectral density and the second power spectral density with multiple frequency resolutions, the signal characteristics can be captured more comprehensively and the recognition ability of multiple signals can be enhanced.
[0048] In this embodiment, by selecting a window function to perform a windowing operation on the time domain signal sequence, spectrum leakage can be reduced.
[0049] Before windowing the time domain signal sequence, the above-mentioned shortwave real-sampled signal time-frequency diagram data set generation method further includes data enhancement of the time domain signal sequence by at least one of adding random noise and changing the signal amplitude.
[0050] In this embodiment, by using data enhancement technology, the diversity of the data set can be increased and the generalization ability of the deep learning model can be improved.
[0051] In one embodiment, a method for generating a shortwave real-wave signal time-frequency diagram data set includes the following steps:
[0052] Step 1: Signal preprocessing.
[0053] Input shortwave real-time broadband signal, the sampling rate of which is F s , bandwidth is B w Select the time domain signal sequence with a fixed time period T in the shortwave real-time broadband signal, that is, the length of the time domain signal sequence is L (L = T*F s ).
[0054] The fixed time period is determined according to the statistical transformation of the signal characteristics to ensure that the main characteristics of the signal are retained in the generated power spectrum density matrix.
[0055] Preferably, the fixed time period is determined according to the sampling rate of the time domain signal sequence and the computing resources of the processing system (eg, CPU utilization of the terminal).
[0056] The time domain signal sequence is subjected to windowing operation and fast Fourier transform to obtain a frequency domain signal sequence.
[0057] The window function may be a Black window function, which is defined as:
[0058]
[0059] Where n is the number of sample points in the window, and its value range is [0, N-1]; N is the window length, and its value is L.
[0060] The formula for the Fast Fourier Transform is:
[0061]
[0062] Among them, X[k] is the output frequency domain signal sequence, x ′ [n] is the input time domain signal sequence, N is the window length, its value is L, and the value range of k is [0, N-1].
[0063] Specifically, data enhancement is performed on the time domain signal sequence by adding random noise and changing the signal amplitude, a Black window function is selected to perform a windowing operation on the time domain signal sequence, and a fast Fourier transform is performed on the windowed time domain signal sequence to obtain a frequency domain signal sequence.
[0064] The data length of the obtained frequency domain signal is N, and the frequency resolution is
[0065] Extract the bandwidth B in the frequency domain signal w Frequency domain signal sequence within the range, the index range is Length is
[0066] In this embodiment, by using data enhancement technology, the diversity of the data set can be increased and the generalization ability of the deep learning model can be improved. By selecting a window function to perform a windowing operation on the above time domain signal sequence, the spectrum leakage phenomenon can be reduced.
[0067] In one embodiment, a random noise addition method is selected to perform data enhancement, including randomly adding Gaussian noise or uniform noise to the time domain signal to simulate different signal noise environments, namely:
[0068] x ′ [n] = x[n] + α·noise[n],
[0069] Among them, x ′ [n] is the output time domain signal sequence, x[n] is the input time domain signal sequence, α is the noise intensity coefficient, and noise[n] is Gaussian noise or uniform noise.
[0070] In one embodiment, data enhancement is performed by selecting a signal amplitude variation method, including randomly scaling the amplitude of the time domain signal to simulate different signal strengths, namely:
[0071] x ′ [n] = γ·x[n],
[0072] Among them, x ′ [n] is the output time domain signal sequence, x[n] is the input time domain signal sequence, and γ is the random scaling coefficient.
[0073] Step 2: Calculate the power spectral density.
[0074] For the generated bandwidth B w The frequency domain signal sequence within the range is used to calculate its power spectral density (PSD). The specific calculation formula is:
[0075] PSD=10log 10 (|X[k]| 2 ).
[0076] Thus, the power spectral density (also referred to as the first power spectral density) of the frequency domain signal sequence is obtained.
[0077] Step 3, downsampling.
[0078] The first power spectrum density is downsampled by a downsampling factor of M to obtain a second power spectrum density. The length of the second power spectrum density is The frequency resolution is
[0079] Thus, a second power spectrum density of the frequency domain signal sequence is obtained, and the frequency resolution of the second power spectrum density is different from the frequency resolution of the first power spectrum density.
[0080] Step 4: Form a power spectral density matrix.
[0081] Repeat the above steps 1-3 to obtain a predetermined number (S) of first power spectrum densities and second power spectrum densities; splice the S first power spectrum densities in chronological order to form a size (length * height) of The first power spectrum density matrix, the horizontal axis of the first power spectrum density matrix represents the frequency, and the frequency range is [0, B w ], the vertical axis represents time, and the time range is [0, S*T]; the S second power spectrum densities are spliced in time order to form a size of The second power spectrum density matrix, the horizontal axis of the second power spectrum density matrix represents frequency, and the frequency range is [0, B w ], the vertical axis represents time, and the time range is [0, S*T].
[0082] Preferably, the predetermined number is determined according to a sampling rate of the time domain signal sequence and computing resources of the processing system.
[0083] Exemplarily, the higher the sampling rate of the time domain signal sequence, the larger the predetermined number; and the greater the computing resources of the processing system, the larger the predetermined number.
[0084] Preferably, the predetermined number is determined according to the statistical variation of the signal characteristics to ensure that the main characteristics of the signal are retained in the generated power spectrum density matrix.
[0085] A complete power spectral density matrix is formed by splicing the temporally continuous power spectral densities.
[0086] Optionally, partial overlap processing is performed in time, which can reduce edge effects and improve the accuracy of signal detection.
[0087] Step 5: Linear normalization.
[0088] The first power spectrum density matrix and the second power spectrum density matrix are linearly normalized and mapped to 0 to 255 to generate corresponding grayscale images. The sizes of the grayscale images are and
[0089] The specific steps of linearly normalizing the first power spectrum density matrix are the same as the specific steps of linearly normalizing the second power spectrum density matrix. Taking the linear normalization of the first power spectrum density matrix as an example, the specific steps include determining the minimum and maximum values of the first power spectrum density in the first power spectrum density matrix, setting the minimum value as minPSD and the maximum value as maxPSD, and calculating the linearly normalized value of each first power spectrum density PSD in the first power spectrum density matrix according to the following formula:
[0090]
[0091] Step 6: Image segmentation.
[0092] The above size is The grayscale image is divided into multiple first sub-images of size S*S, and the above size is The grayscale image is divided into multiple second sub-images of size S*S, each first sub-image has a certain overlapping area in the frequency domain, and each second sub-image has a certain overlapping area in the frequency domain. At this time, the first sub-image and the second sub-image are shortwave real-sampled signal time-frequency diagrams, which can be used as inputs of deep learning models for signal detection. Optionally, each first sub-image has a certain overlapping area in the time domain, and each second sub-image has a certain overlapping area in the time domain.
[0093] The above size is The specific steps of dividing the grayscale image into a plurality of first sub-images of size S*S and converting the above-mentioned size The specific steps of dividing the grayscale image into multiple second sub-images of size S*S are the same. Taking the grayscale image segmentation of as an example, the specific steps include setting the size of frequency domain overlap, using the frequency domain overlap method to segment the grayscale image of size The grayscale image is segmented to obtain multiple first sub-images of size S*S. Figure 2 As shown, each first sub-image has a certain overlapping area in the frequency domain.
[0094] In this embodiment, in the process of dividing the grayscale image into a plurality of sub-images, the size of the frequency domain overlap is set so that every two adjacent sub-images overlap in the frequency domain, thereby achieving the purpose of preventing the loss of important signal features.
[0095] Step 7: Formation of the preliminary annotation frame.
[0096] By means of double sliding windows, a preliminary annotation frame is generated in each time-frequency diagram of the shortwave sampled signal of size S*S to determine the frequency starting position and frequency ending position of the shortwave sampled signal.
[0097] Specifically, step 7.1, as Figure 2 As shown, two sliding windows W1 and W2 are set, and the heights of the two sliding windows are the same as the height of the shortwave actual signal time-frequency diagram, that is, S.
[0098] The widths of the two sliding windows are determined according to the bandwidth of the shortwave sampled signal and the frequency resolution of the shortwave sampled signal time-frequency diagram. Preferably, the widths of the two sliding windows are both w, where B is the bandwidth of the signal, and f is the frequency resolution of the shortwave real-wave signal time-frequency diagram.
[0099] When the shortwave real-wave signal time-frequency diagram is the first sub-image, the width of the two sliding windows is When the shortwave real-wave signal time-frequency diagram is the second sub-image, the width of the two sliding windows is
[0100] Determine the sliding step size s of the sliding window, that is, the distance the sliding window moves each time.
[0101] Step 7.2, along the shortwave real signal time-frequency diagram, move the two sliding windows W1 and W2 from left to right, each time moving a predetermined sliding step (s), the predetermined sliding step is determined according to the frequency resolution of the shortwave real signal time-frequency diagram and the required annotation accuracy. At each sliding position, the sum of the grayscale values in the two sliding windows is calculated (this grayscale value sum represents energy), which is recorded as E 1 and E 2 ; Calculate the ratio of the total gray value (hereinafter referred to as energy ratio) P, When both sliding windows are in the noise segment or the signal plus noise segment, the energy ratio P remains basically unchanged and is relatively flat; when the signal enters the rear sliding window W2 and the front sliding window W1 is still in the noise segment, the energy ratio P begins to increase and shows an upward trend; when the signal enters the front sliding window W1, the energy ratio P begins to decrease and shows a downward trend until both sliding windows contain no signals and return to flatness.
[0102] Step 7.3, such as Figure 2 As shown, by observing the change of the energy ratio P, the decision threshold H is determined; according to the position where the energy ratio P exceeds the threshold decision H and the peak position of the energy ratio P, the frequency starting position and the frequency ending position of the signal, that is, the horizontal axis coordinate of the preliminary marking frame, are determined; according to the frequency starting position and the frequency ending position of the signal, a preliminary marking frame is generated.
[0103] Step 8: Formation of the final annotation box.
[0104] The area selected by the preliminary annotation box is subjected to threshold processing, dilation operation and erosion operation to generate a final annotation box. The final annotation box is used to mark the time start position and time end position of the shortwave actual sampling signal, and the coordinates of the final annotation box are saved as an annotation file. The coordinates of the final annotation box include the coordinates of the upper left corner and the lower right corner of the final annotation box.
[0105] Specifically, step 8.1, threshold processing: extract the area selected by the preliminary annotation box from the shortwave real signal time-frequency diagram, perform threshold processing on the area, and convert the grayscale image (i.e., the shortwave real signal time-frequency diagram) into a binary image. Specifically, a threshold t is selected, and pixels greater than the threshold t are set to white (value 1), and pixels not less than the threshold are set to black (value 0).
[0106] Step 8.2, dilation operation: select the structural element to dilate the area (binary image) selected by the preliminary annotation box after threshold processing. Figure 3 As shown, preferably, a 3*3 rectangular element is selected as the structural element. Specifically, the structural element is moved on the binary image to check each pixel area covered by it; if the structural element overlaps with the white pixels (signal area) in the area, the pixel area overlapping with the structural element is set to white.
[0107] The dilation operation will expand the white pixel area, connect adjacent signal parts, fill small holes, and make the signal area more coherent.
[0108] Step 8.3, erosion operation: select a structural element that is the same as the structural element used in the dilation operation, that is, a 3*3 rectangular element whose element value is 1, and perform an erosion operation on the area selected by the preliminary annotation box after the dilation operation (the binary image after the dilation operation). Figure 3 As shown, specifically, the structure element is moved on the binary image after the dilation operation, and each pixel area covered by it is checked; if the structure element is completely contained in the white pixel area, the pixel area is kept white, otherwise it is set to black.
[0109] The erosion operation will shrink the white pixel area, remove the noise at the edge, and make the signal area more precise and clear.
[0110] Step 8.4, generate the final annotation box.
[0111] In the binary image after the corrosion operation, all connected white pixel areas (connected components) are found; for each connected white pixel area, its bounding rectangle is calculated, and the coordinates of the upper left corner and the lower right corner of the bounding rectangle are determined, that is, the coordinates of the upper left corner and the lower right corner of the final annotation box; according to the coordinates of the upper left corner and the lower right corner of the bounding rectangle, the final annotation box is generated, and the coordinates of each final annotation box are saved as an annotation file.
[0112] Step 9: Generation of time-frequency diagram dataset.
[0113] Repeat the above steps 1-8 to form batches of time-frequency graphs and corresponding annotation files to form a time-frequency graph dataset. The time-frequency graph dataset can be used as the input of the deep learning model for signal detection. In practical applications, the final annotation box corresponding to the time-frequency graph can be used as an auxiliary annotation box, which needs to be confirmed and adjusted by a manual or automated system to ensure the accuracy and completeness of the final annotation box. The auxiliary annotation box can significantly reduce the workload of manual annotation. By automatically generating the final annotation box, humans only need to confirm and adjust these auxiliary annotation boxes, thereby improving the efficiency of signal annotation. The confirmed and adjusted annotation boxes are used for the training and verification of the deep learning model, which can significantly reduce the workload of manual annotation. By automatically generating the preliminary annotation box, humans only need to confirm and fine-tune these auxiliary annotation boxes, thereby improving the overall annotation efficiency.
[0114] In this embodiment, by inputting shortwave time-domain broadband signal data, and performing segmented processing according to a fixed time period, a plurality of sequentially arranged time-domain signal sequences are generated; windowing and fast Fourier transform are performed on each time-domain signal sequence to obtain a corresponding frequency-domain signal sequence, and the power spectrum density of each frequency-domain signal sequence is calculated to generate a first power spectrum density; downsampling is performed on the first power spectrum density to generate a second power spectrum density; the above steps are repeated to obtain a plurality of power spectrum densities with different frequency resolutions, and a predetermined number of power spectrum densities are superimposed to form a power spectrum density matrix; linear normalization is performed on the matrix to generate a grayscale image; the grayscale image is converted into a square sub-image; a preliminary annotation frame is generated by a double sliding window method, and then the preliminary annotation frame is subjected to threshold processing, expansion operation and corrosion operation to generate a final annotation frame and save the annotation file; the above steps are repeated to form a batch of shortwave actual signal time-frequency diagrams and corresponding annotation files, which constitute a time-frequency diagram dataset, and the time-frequency diagram dataset is used for training and verification of a deep learning model, which can significantly reduce the workload of manual annotation. By automatically generating preliminary annotation boxes, humans only need to confirm and fine-tune these auxiliary annotation boxes, thereby improving the overall annotation efficiency.
[0115] The present application also provides a computer device, whose internal structure diagram can be as follows: Figure 4As shown. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. The processor, the memory and the input / output interface are connected via a system bus, and the communication interface, the display unit and the input device are connected to the system bus via the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a method for generating a shortwave real-time signal time-frequency diagram data set is implemented. The display unit of the computer device is used to form a visually visible image, and can be a display screen, a projection device or a virtual reality imaging device. The input device of the computer device can be a touch layer covered on the display screen, or a button, trackball or touchpad set on the computer device casing, or an external keyboard, touchpad or mouse, etc.
[0116] Those skilled in the art will understand that Figure 4 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0117] like Figure 4 As shown, the present application also provides a computer device, which includes a memory, a processor, and a computer program stored in the memory, and the processor executes the computer program to implement the steps in the above-mentioned method embodiments.
[0118] The present application also provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented. The computer-readable storage medium may include, but is not limited to, any type of disk, including a floppy disk, an optical disk, a DVD, a CD-ROM, a micro drive, and a magneto-optical disk, a ROM, a RAM, an EPROM, an EEPROM, a DRAM, a VRAM, a flash memory device, a magnetic card or an optical card, a nanosystem (including a molecular memory IC), or any type of medium or device suitable for storing instructions and / or data.
[0119] The present application also provides a computer program product, including a computer program, which implements the steps in the above-mentioned method embodiments when executed by a processor.
[0120] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.
[0121] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0122] The above is only an exemplary embodiment of the present disclosure, and the scope of the present disclosure cannot be limited thereto. That is, any equivalent changes and modifications made according to the teachings of the present disclosure are still within the scope of the present disclosure. After considering the specification and practicing the disclosure here, those skilled in the art will easily think of the implementation scheme of the present disclosure. This application is intended to cover any modification, use or adaptation of the present disclosure, which follows the general principles of the present disclosure and includes common knowledge or customary technical means in the technical field not recorded in the present disclosure. The description and examples are only regarded as exemplary, and the scope and spirit of the present disclosure are defined by the claims.
[0123] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0124] It will be easily understood by those skilled in the art that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for generating a shortwave real-wave signal time-frequency diagram dataset, characterized in that: include: Input the shortwave time domain broadband signal data, and process it in segments according to a fixed time period to generate multiple sequentially arranged time domain signal sequences; Convert each time domain signal sequence into a frequency domain signal sequence, and calculate the power spectrum density of each frequency domain signal sequence; splicing a predetermined number of power spectral densities in time order to generate a power spectral density matrix; Linearly normalizing the power spectral density matrix to generate a grayscale image; The grayscale image is divided into a plurality of square sub-images, each of which has an overlapping area in the frequency domain, to generate a plurality of shortwave real-sampled signal time-frequency diagrams; Generate a corresponding annotation frame for each shortwave real-sampled signal time-frequency diagram, wherein the annotation frame is used to annotate the frequency starting position, frequency ending position, time starting position and time ending position of the shortwave real-sampled signal; The multiple shortwave real-sampled signal time-frequency diagrams and their corresponding annotation boxes are combined as a shortwave real-sampled signal time-frequency diagram data set.
2. The method according to claim 1, characterized in that The converting each time domain signal sequence into a frequency domain signal sequence and calculating the power spectrum density of each frequency domain signal sequence comprises: Each time domain signal sequence is converted into a corresponding frequency domain signal sequence by windowing and fast Fourier transform; Calculating the power spectral density of each frequency domain signal sequence to generate a first power spectral density; The first power spectral density is downsampled to generate a second power spectral density.
3. The method according to claim 2, characterized in that The step of windowing and fast Fourier transforming each time domain signal sequence into a corresponding frequency domain signal sequence comprises: Performing windowing on each time domain signal sequence, where the window length is equal to the length of the time domain signal sequence; The windowed time-domain signal sequence is subjected to fast Fourier transform to generate a frequency-domain signal sequence.
4. The method according to claim 3, characterized in that Before windowing each time domain signal sequence, the method further includes: Data enhancement is performed on the time domain signal sequence by at least one of adding random noise and changing the signal amplitude.
5. The method according to claim 1, characterized in that The generating of the annotation frame corresponding to each shortwave real-wave signal time-frequency diagram includes: Generate a preliminary marking frame in each shortwave real-sampled signal time-frequency diagram by means of a double sliding window, wherein the preliminary marking frame is used to mark the frequency starting position and the frequency ending position of the shortwave real-sampled signal; Threshold processing, dilation operation and erosion operation are performed on the area selected by the preliminary annotation box to generate a final annotation box, and the coordinates of the final annotation box are saved as an annotation file.
6. The method according to claim 5, characterized in that The method of generating a preliminary annotation frame in each shortwave real-wave signal time-frequency diagram by means of a double sliding window includes: Set two sliding windows, the heights of the two sliding windows are the same as the heights of the shortwave real-wave signal time-frequency diagram; Along the shortwave real-sampled signal time-frequency diagram, move two sliding windows from left to right, move according to a predetermined sliding step length, calculate the sum of the grayscale values in the two sliding windows at each sliding position, record it as the first energy and the second energy, calculate the ratio of the first energy to the second energy to obtain the first ratio, calculate the ratio of the second energy to the first energy to obtain the second ratio, and take the larger value of the first ratio and the second ratio as the energy ratio; According to the change of the energy ratio, a decision threshold is determined; according to the position where the energy ratio exceeds the decision threshold and the peak position of the energy ratio, the frequency starting position and the frequency ending position of the shortwave sampled signal are determined; according to the frequency starting position and the frequency ending position, a preliminary marking box is generated.
7. The method according to claim 5, characterized in that The performing threshold processing, dilation operation and erosion operation on the area selected by the preliminary annotation box to generate a final annotation box includes: Extracting the area selected by the preliminary marking box from the shortwave real-acquired signal time-frequency diagram, performing threshold processing on the area, and converting the shortwave real-acquired signal time-frequency diagram into a binary image; Selecting a structural element to perform a dilation operation on the binary image; Select the same structural element as the structural element used in the dilation operation to perform an erosion operation on the binary image after the dilation operation; Find all connected white pixel areas in the binary image after the erosion operation, calculate the bounding rectangle of each connected white pixel area, and generate the final annotation box for annotation according to the coordinates of the upper left corner and the lower right corner of the bounding rectangle.
8. The method according to claim 6, characterized in that The width of the sliding window is determined according to the bandwidth of the shortwave sampled signal and the frequency resolution of the time-frequency diagram of the shortwave sampled signal.
9. The method according to claim 6, characterized in that The predetermined sliding step size is determined according to the frequency resolution and required marking accuracy of the shortwave real-wave signal time-frequency diagram.
10. A computer device, characterized in that: The method comprises a memory, a processor and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of the method according to any one of claims 1 to 9.