[0042] The present invention will be further described below in conjunction with the accompanying drawings. It should be noted that this embodiment is based on the technical solution and provides detailed implementation and specific operation procedures, but the scope of protection of the present invention is not limited to this Examples.

[0043] The application scenario of the present invention is an FM signal indoor positioning system, which includes FM signal base stations, attackers and normal users. The user calculates the cross-correlation between the received undetected signal and the frequency spectrum of the FM carrier signal, and uses the upper and lower thresholds to determine the signal type to obtain the detection result of the location spoofing attack.

[0044] Such as figure 1 As shown, the specific steps of the present invention are as follows:

[0045] Step 1. Initialization.

[0046] 1.1) The user uses its own antenna to receive 100 natural noise signals at the center of gravity frequency of the FM signal when the FM signal base station used for positioning is not working; when the FM signal base station used for positioning works, it receives 100 normal FM signals . It should be noted that 100 times is the better number of receptions. The more the number of receptions, the more accurate the value obtained, but the processing time will increase.

[0047] 1.2) Construct the carrier signal of the FM signal for positioning according to the following formula:

[0048] x=Acos(2πft);

[0049] Where x represents the carrier signal, A represents the amplitude, cos represents the cosine function, π represents the circumference of the circle, f represents the frequency, and t represents the time.

[0050] Step 2. Determine the threshold.

[0051] 2.1) Use Fourier transform formula to calculate the frequency spectrum of natural noise signal, normal frequency modulation signal and carrier signal:

[0052] X ( ω ) = ∫ - ∞ + ∞ x ( t ) e - j ω t d t S ( ω ) = ∫ - ∞ + ∞ s ( t ) e - j ω t d t N ( ω ) = ∫ - ∞ + ∞ n ( t ) e - j ω t d t ;

[0053] Where X represents the carrier signal in the frequency domain, S represents the normal FM signal in the frequency domain, N represents the natural noise signal in the frequency domain, ω represents the angular frequency, ∫dt represents the integral over time t, and +∞ represents positive infinity, -∞ means negative infinity, carrier signal in x time domain, normal FM signal in s time domain, natural noise signal in n time domain, t means time, and e means natural base.

[0054] 2.2) Calculate the correlation coefficient between the frequency spectrum of the carrier signal and the normal FM signal received each time, and the correlation coefficient between the frequency spectrum of the carrier signal and the natural noise signal received each time:

[0055] R = ∫ - ∞ + ∞ S ( ω ) X ( ω + τ ) d τ r = ∫ - ∞ + ∞ N ( ω ) X ( ω + τ ) d τ ;

[0056] Where R represents the correlation coefficient between the frequency spectrum of the carrier signal and the normal FM signal, ∫dτ represents the integral of the parameter τ, +∞ represents positive infinity, -∞ represents negative infinity, S represents the normal FM signal in the frequency domain, and ω represents the angular frequency , X represents the carrier signal in the frequency domain, r represents the correlation coefficient between the frequency spectrum of the carrier signal and the natural noise signal, and N represents the natural noise signal in the frequency domain.

[0057] 2.3) Set the average value of the frequency spectrum correlation coefficient of the carrier signal and all received normal FM signals as the upper threshold, and set the average value of the frequency spectrum correlation coefficient of the carrier signal and all received natural noise signals as the lower threshold value.

[0058] Step 3. Receive undetected signals.

[0059] The user uses his own antenna to receive undetected signals on the frequency of the FM signal used for positioning. The undetected signal contains three possibilities: normal FM signal, natural noise signal and signal after being attacked by location spoofing.

[0060] Step 4. Calculate the frequency domain correlation.

[0061] 4.1) Use the Fourier transform formula to calculate the frequency spectrum of the undetected signal:

[0062] G ( ω ) = ∫ - ∞ + ∞ g ( t ) e - j ω t d t

[0063] Where G represents the undetected signal in the frequency domain, ω represents the angular frequency, ∫dt represents the integral over time t, +∞ represents positive infinity, -∞ represents negative infinity, g represents the carrier signal in the time domain, t represents time, e represents the natural base, j represents the imaginary unit.

[0064] 4.2) Calculate the correlation coefficient between the frequency spectrum of the undetected signal and the carrier signal:

[0065] W = ∫ - ∞ + ∞ G ( ω ) X ( ω + τ ) d τ ;

[0066] Where W represents the spectral correlation coefficient between the undetected signal and the carrier signal, ∫dτ represents the integral of the parameter τ, +∞ represents positive infinity, -∞ represents negative infinity, G represents the undetected signal in the frequency domain, and ω represents the angular frequency , X represents the carrier signal in the frequency domain.

[0067] Step 5. Detect location spoofing attacks.

[0068] Determine whether the correlation coefficient between the frequency spectrum of the carrier signal and the undetected signal is less than the upper threshold. If yes, determine whether the correlation coefficient between the frequency spectrum of the carrier signal and the undetected signal is greater than the lower threshold. If yes, it means that the undetected signal is a signal attacked by location spoofing. A location spoofing attack occurs in the FM signal indoor positioning system; on the contrary, it means that the undetected signal is a natural noise signal; on the contrary, it means that the undetected signal is a normal FM signal. The test is over.

[0069] For those skilled in the art, various corresponding changes and modifications can be made based on the above technical solutions and concepts, and all these changes and modifications should be included in the protection scope of the claims of the present invention.