Intrusion detection method, electronic device, storage medium and computer program product
By sampling and signal processing of the intermediate frequency signals output by the microwave module in Doppler radar, the interference problem in intrusion detection is solved, the detection accuracy is improved and the cost is reduced.
Patent Information
- Application Number
- CN202411418587.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-11
- Publication Date
- 2025-02-11
AI Technical Summary
In intrusion detection, the existing Doppler radar has low detection accuracy due to the interference of metal objects and electronic devices on the echo signal, and the cost of achieving accurate intrusion detection is high.
By sampling the in-phase component signal of the intermediate frequency signal output by the microwave module based on the set sampling frequency, a sequence of sampling values is obtained, and a differential processing and weighted filtering process is determined whether there is an intrusion signal.
It reduces interference with echo signals by metal objects and electronic devices, improves the accuracy of sampled value sequences, thereby improving the accuracy of intrusion detection and reducing hardware costs.
Smart Images

Figure CN119414374A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of signal processing technology, and in particular to an intrusion detection method, electronic equipment, storage medium and computer program product. Background Art
[0002] Existing Doppler radars are based on the Doppler effect and can detect intrusions through reflected echo signals. However, in intrusion detection scenarios, metal objects and various electronic devices will interfere with the echo signals generated by the Doppler radar, resulting in low intrusion detection accuracy; and the cost of achieving accurate intrusion detection is high. Summary of the invention
[0003] In order to solve the technical problem of high cost of accurate intrusion detection, the embodiments of the present application provide an intrusion detection method, an electronic device, a storage medium and a computer program product.
[0004] The technical solution of the embodiment of the present application is implemented as follows:
[0005] The present invention provides an intrusion detection method, which includes:
[0006] The first signal is sampled based on the set sampling frequency to obtain at least one sampling value sequence; the first signal represents the in-phase component signal of the intermediate frequency signal output by the microwave module;
[0007] Based on the at least one sampling value sequence, it is determined whether an intrusion signal exists in the first signal or whether an intrusion signal does not exist.
[0008] In the above solution, the determining whether an intrusion signal exists in the first signal or not based on the at least one sampling value sequence includes:
[0009] Performing differential processing on the at least one sampling value sequence to obtain at least one first value, wherein one sampling value sequence corresponds to one first value;
[0010] Based on the at least one first value and the first threshold, it is determined whether an intrusion signal exists in the first signal or whether an intrusion signal does not exist.
[0011] In the above solution, the determining whether an intrusion signal exists in the first signal or not based on the at least one sampling value sequence includes:
[0012] Performing differential processing on the at least one sampling value sequence to obtain at least one first value, wherein one sampling value sequence corresponds to one first value;
[0013] Performing weighted filtering on the at least one first value to obtain at least one second value;
[0014] Based on the at least one second value and the second threshold, it is determined whether an intrusion signal exists in the first signal or not.
[0015] In the above solution, performing differential processing on the at least one sampling value sequence to obtain at least one first value includes:
[0016] The difference between every two adjacent sampling values in each sampling value sequence in the at least one sampling value sequence is summed to obtain a first numerical value corresponding to each sampling value sequence.
[0017] In the above solution, performing weighted filtering on the at least one first value to obtain at least one second value includes:
[0018] When the number of the first values is 1, the product of the first value and the first weight is determined as the second value; or
[0019] When the number of first values is greater than or equal to 2, add the third value and the fourth value to obtain the i-th second value; wherein the third value is the product of the first weight and the i-th first value, the fourth value is the product of the second weight and the i-1-th second value, the second weight is the difference between 1 and the first weight, and i is an integer greater than or equal to 1.
[0020] In the above scheme, when the i-th first value is greater than the third threshold, the first weight is the third weight; when the i-th first value is less than or equal to the third threshold, the first weight is the fourth weight; the third weight is greater than the fourth weight.
[0021] In the above solution, performing weighted filtering on the at least one first value to obtain at least one second value includes:
[0022] When the number of the first value is 1, the first value is right-shifted by a set number of bits to obtain a second value; or
[0023] When the number of first values is greater than or equal to 2, the fifth value and the sixth value are added to obtain the i-th second value; wherein the fifth value represents the difference between the i-1th second value and the seventh value, the seventh value is obtained by shifting the i-1th second value right by a set number of bits, and the sixth value is obtained by shifting the i-th first value right by the set number of bits, and i is an integer greater than or equal to 1.
[0024] The present application also provides an intrusion detection device, including:
[0025] A sampling module, used to sample a first signal based on a set sampling frequency to obtain at least one sampling value sequence; the first signal represents an in-phase component signal of an intermediate frequency signal output by the microwave module;
[0026] A determination module is used to determine whether an intrusion signal exists in the first signal or not based on the at least one sampling value sequence.
[0027] An embodiment of the present application further provides an electronic device, comprising a processor and a memory for storing a computer program that can be run on the processor, wherein the processor is used to execute the steps of any one of the methods described above when running the computer program.
[0028] An embodiment of the present application further provides a storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above methods are implemented.
[0029] An embodiment of the present application further provides a computer program product, including a computer program, which implements the steps of any of the above methods when executed by a processor.
[0030] In the intrusion detection method, electronic device, storage medium and computer program product provided by the embodiment of the present application, the first signal is sampled based on the set sampling frequency to obtain at least one sampling value sequence; based on the at least one sampling value sequence, it is determined whether there is an intrusion signal or not in the first signal; the first signal represents the in-phase component signal of the intermediate frequency signal output by the microwave module. The above scheme samples the first signal based on the set sampling frequency, which can reduce the interference of metal objects and various electronic devices on the echo signal, improve the accuracy of the obtained at least one sampling value sequence, and determine whether there is an intrusion signal or not in the first signal based on at least one sampling value sequence, thereby improving the accuracy of intrusion detection, and the first signal represents the in-phase component signal of the intermediate frequency signal output by the microwave module. Compared with the radio frequency signal, the intermediate frequency signal is easier to be processed by the subsequent signal processing circuit, which reduces the performance requirements and design difficulty of the processing circuit, and only considers the in-phase component signal of the intermediate frequency signal. The subsequent signal processing circuit can also be designed for only one signal, which reduces the hardware cost of the subsequent signal processing circuit, thereby reducing the cost of intrusion detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] Figure 1 This is a schematic diagram of an intrusion detection method flow in an embodiment of the present application;
[0032] Figure 2 A flowchart of the implementation of the intrusion detection method provided in the embodiment of the present application;
[0033] Figure 3 This is a schematic diagram of interference waveforms according to an embodiment of the present application;
[0034] Figure 4 This is a schematic diagram of the original noise segment of the third signal in an embodiment of the present application;
[0035] Figure 5 This is a schematic diagram of an original signal segment of a third signal according to an embodiment of the present application;
[0036] Figure 6 A schematic diagram of a noise segment after differential processing according to an embodiment of the present application;
[0037] Figure 7 A schematic diagram of a signal segment after differential processing according to an embodiment of the present application;
[0038] Figure 8 A schematic diagram of waveforms after weighted filtering and differential processing according to an embodiment of the present application;
[0039] Fig. 9 This is a schematic diagram of the structure of an intrusion detection device according to an embodiment of the present application;
[0040] Fig.10 This is a schematic diagram of the structure of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0041] Microwave technology based on Doppler radar is a technology that uses radar principles to achieve target detection and tracking. The working principle of Doppler radar is based on the Doppler effect. When microwave signals (radar signals) interact with moving targets, the moving targets will cause the frequency of microwave signals to change. Microwave technology based on Doppler radar can detect the presence of moving targets and obtain the moving speed information of moving targets by performing data analysis on the reflected echo signals. Therefore, this technology is very effective in target tracking and mobile object recognition.
[0042] For example, some security equipment has the need for human intrusion detection, which can be performed based on the characteristics of microwave technology and combined with microwave detection algorithms. However, most of the current microwave detection algorithms are combined with fast Fourier transform (FFT) algorithms, which are highly complex and have high requirements on the computing power of the microcontroller unit (MCU), which will increase hardware costs.
[0043] In the actual application of microwave technology, for example in a home environment, fans, fluorescent lamps, metal objects and various electronic devices will interfere with the echo signal, and the echo signal has a low anti-interference ability, which leads to low accuracy of intrusion detection based on microwave technology.
[0044] Based on this, in various embodiments of the present application, the first signal is sampled based on the set sampling frequency to obtain at least one sampling value sequence; based on the at least one sampling value sequence, it is determined whether there is an intrusion signal or not in the first signal; the first signal represents the in-phase component signal of the intermediate frequency signal output by the microwave module. The above scheme samples the first signal based on the set sampling frequency, which can reduce the interference of metal objects and various electronic devices on the echo signal, improve the accuracy of the obtained at least one sampling value sequence, and determine whether there is an intrusion signal or not in the first signal based on at least one sampling value sequence, thereby improving the accuracy of intrusion detection, and the first signal represents the in-phase component signal of the intermediate frequency signal output by the microwave module. Compared with the radio frequency signal, the intermediate frequency signal is easier to be processed by the subsequent signal processing circuit, which reduces the performance requirements and design difficulty of the processing circuit, and only considers the in-phase component signal of the intermediate frequency signal. The subsequent signal processing circuit can also be designed for only one signal, which reduces the hardware cost of the subsequent signal processing circuit, thereby reducing the cost of intrusion detection.
[0045] The present application is further described in detail below in conjunction with the accompanying drawings and embodiments.
[0046] The embodiment of the present application provides an intrusion detection method, which is applied to an electronic device, a processor or a chip with a data processing function. The electronic device may have a display screen or a display function, or may be connected to a display screen; the electronic device includes a terminal and / or a device with a display screen or a display function. Figure 1 As shown, the method includes:
[0047] Step 101: Sample a first signal based on a set sampling frequency to obtain at least one sampling value sequence.
[0048] Among them, the first signal represents the in-phase (I, in-phase) component signal of the intermediate frequency signal output by the microwave module. The first signal includes the second signal and / or the third signal; the second signal is the in-phase component signal of the intermediate frequency signal output by the microwave module in normal working state; the third signal is a signal that amplifies the in-phase component signal of the intermediate frequency signal output by the microwave module in normal working state by a set multiple through an operational amplifier, and the set multiple can be adjusted according to the detection distance and structural interference, and can also be set according to other actual needs, for example, the set multiple is 40000 times.
[0049] Here, sampling the first signal based on the set sampling frequency includes: performing ADC sampling on the second signal based on the set sampling frequency through an analog-to-digital converter (ADC); or, performing ADC sampling on the third signal based on the set sampling frequency; or, performing ADC sampling on the second signal and the third signal based on the set sampling frequency.
[0050] In practical applications, the sampling frequency is set to 50 Hz, without any specific limitation.
[0051] It should be noted that, based on the set sampling frequency, the first signal is sampled to obtain at least one sampling value sequence, the sampling value in a sampling value sequence is greater than or equal to 1, and the sampling value in a sampling value sequence can be a voltage value. Different sampling values in the sampling value sequence are arranged in the order of sampling. The intermediate frequency signal output by the microwave module refers to a specific frequency signal between the radio frequency signal and the baseband signal in the radar signal processing process. The intermediate frequency signal generation process is as follows: the radio frequency signal emitted by the radar encounters the target and is reflected back to form an echo signal. The echo signal and the local oscillator signal are mixed in the mixer. Through the mixing action, the frequency of the radio frequency signal is reduced to the intermediate frequency range to obtain the intermediate frequency signal. The intermediate frequency signal is usually between a few megahertz and hundreds of megahertz. The intermediate frequency signal carries key information such as the distance, speed, and direction of the target. By analyzing the intermediate frequency signal, the relative speed of the target can be calculated based on the frequency change of the intermediate frequency signal based on the Doppler effect; the distance of the target can be estimated based on the signal delay, etc.
[0052] Step 102: Based on the at least one sampling value sequence, determine whether an intrusion signal exists in the first signal or whether an intrusion signal does not exist.
[0053] Here, based on at least one sampling value sequence, determining whether an intrusion signal exists in the first signal or not includes: based on at least one sampling value sequence and a fourth threshold, determining whether an intrusion signal exists in the first signal or not; and / or, performing differential processing on at least one sampling value sequence to obtain at least one first numerical value, one sampling value sequence corresponds to one first numerical value, and determining whether an intrusion signal exists in the first signal or not based on at least one first numerical value and a first threshold; and / or, performing differential processing on at least one sampling value sequence to obtain at least one first numerical value, one sampling value sequence corresponds to one first numerical value, performing weighted filtering processing on at least one first numerical value to obtain at least one second numerical value, and determining whether an intrusion signal exists in the first signal or not based on at least one second numerical value and a second threshold.
[0054] Specifically, based on at least one sampling value sequence and a fourth threshold, determine whether an intrusion signal exists in the first signal or not; or, based on at least one first numerical value and a first threshold, determine whether an intrusion signal exists in the first signal or not; or, based on at least one second numerical value and a second threshold, determine whether an intrusion signal exists in the first signal or not; or, based on at least one sampling value sequence, a fourth threshold, at least one first numerical value and a first threshold, determine whether an intrusion signal exists in the first signal or not; or, based on at least one sampling value sequence, a fourth threshold, at least one second numerical value and a second threshold, determine whether an intrusion signal exists in the first signal or not; or, based on at least one first numerical value, a first threshold, at least one second numerical value and a second threshold, determine whether an intrusion signal exists in the first signal or not; or, based on at least one sampling value sequence, a fourth threshold, at least one first numerical value, a first threshold, at least one second numerical value and a second threshold, determine whether an intrusion signal exists in the first signal or not;
[0055] Based on at least one sampling value sequence and a fourth threshold, determining whether an intrusion signal exists in the first signal or not includes: determining that an intrusion signal exists in the first signal when a sampling value greater than the fourth threshold exists in at least one sampling value sequence; and determining that an intrusion signal does not exist in the first signal when all sampling values are less than or equal to the fourth threshold. The presence of an intrusion signal in the first signal can be understood as sensing a human body or an object.
[0056] Based on at least one first numerical value and a first threshold, determining whether an intrusion signal exists in the first signal or not, including: when there is a first numerical value greater than the first threshold among at least one first numerical value, determining that there is an intrusion signal in the first signal; when all first numerical values are less than or equal to the first threshold, determining that there is no intrusion signal in the first signal.
[0057] Based on at least one second value and a second threshold, determining whether there is an intrusion signal in the first signal or not, includes: determining that there is an intrusion signal in the first signal when there is a second value greater than the second threshold among at least one second value; and determining that there is no intrusion signal in the first signal when all second values are less than or equal to the second threshold.
[0058] Based on at least one sampling value sequence, a fourth threshold, at least one first numerical value and the first threshold, determining whether an intrusion signal exists in the first signal or not, including: determining that an intrusion signal exists in the first signal when there is a sampling value greater than the fourth threshold in at least one sampling value sequence and there is a first numerical value greater than the first threshold in at least one first numerical value; determining that there is no intrusion signal in the first signal when all sampling values are less than or equal to the fourth threshold and / or all first numerical values are less than or equal to the first threshold.
[0059] Based on at least one sampling value sequence, a fourth threshold, at least one second value and a second threshold, determining whether an intrusion signal exists in a first signal or not, including: determining that an intrusion signal exists in the first signal when there is a sampling value greater than the fourth threshold in at least one sampling value sequence and there is a second value greater than the second threshold in at least one second value; determining that there is no intrusion signal in the first signal when all sampling values are less than or equal to the fourth threshold and / or all second values are less than or equal to the second threshold.
[0060] Based on at least one first numerical value, a first threshold, at least one second numerical value and a second threshold, determining whether an intrusion signal exists in a first signal or not, including: determining that an intrusion signal exists in the first signal when at least one first numerical value has a first numerical value greater than the first threshold and at least one second numerical value has a second numerical value greater than the second threshold; determining that there is no intrusion signal in the first signal when all first numerical values are less than or equal to the first threshold and / or all second numerical values are less than or equal to the second threshold.
[0061] Based on at least one sampling value sequence, a fourth threshold, at least one first numerical value, a first threshold, at least one second numerical value and a second threshold, determining whether an intrusion signal exists in a first signal or not, including: determining that an intrusion signal exists in the first signal when there is a sampling value greater than the fourth threshold in at least one sampling value sequence, a first numerical value greater than the first threshold in at least one first numerical value, and a second numerical value greater than the second threshold in at least one second numerical value; determining that there is no intrusion signal in the first signal when all sampling values are less than or equal to the fourth threshold, and / or all first numerical values are less than or equal to the first threshold, and / or all second numerical values are less than or equal to the second threshold.
[0062] It should be understood that the first threshold, the second threshold and the fourth threshold can be set according to actual needs and are not included in any sampling value sequence; the first threshold, the second threshold and the fourth threshold can be the same or different.
[0063] In this embodiment, the first signal is sampled based on the set sampling frequency to enhance the anti-interference capability of the first signal, improve the accuracy of at least one sampling value sequence obtained, and determine whether an intrusion signal exists or not in the first signal based on at least one sampling value sequence, thereby improving the accuracy of intrusion detection. The first signal represents the in-phase component signal of the intermediate frequency signal output by the microwave module. The intermediate frequency signal has the characteristics of relatively low frequency and contains key information, which makes it easy to process the first signal. And only for the in-phase component signal of the intermediate frequency signal, it can help reduce hardware costs, thereby reducing the cost of intrusion detection.
[0064] In one embodiment, the determining, based on the at least one sampling value sequence, whether an intrusion signal exists in the first signal or not, includes:
[0065] Performing differential processing on the at least one sampling value sequence to obtain at least one first value, wherein one sampling value sequence corresponds to one first value;
[0066] Based on the at least one first value and the first threshold, it is determined whether an intrusion signal exists in the first signal or whether an intrusion signal does not exist.
[0067] Here, based on at least one first numerical value and a first threshold, determining whether there is an intrusion signal in the first signal or not includes: when there is a first numerical value greater than the first threshold among at least one first numerical value, determining that there is an intrusion signal in the first signal; when all first numerical values are less than or equal to the first threshold, determining that there is no intrusion signal in the first signal.
[0068] For example, a sampling value sequence is {X1, X2, X3, X4, X5, X6, X7, X8}, and the sampling value sequence is differentially processed to obtain a first value S1; when S1 is greater than the first threshold, it is determined that there is an intrusion signal in the first signal.
[0069] In this embodiment, differential processing is performed on at least one sampling value sequence to improve the signal-to-noise ratio of at least one sampling value sequence. The larger the signal-to-noise ratio, the stronger the anti-interference ability, that is, the anti-interference ability of at least one sampling value sequence is enhanced, thereby improving the accuracy of intrusion detection.
[0070] In one embodiment, the determining, based on the at least one sampling value sequence, whether an intrusion signal exists in the first signal or not, includes:
[0071] Performing differential processing on the at least one sampling value sequence to obtain at least one first value, wherein one sampling value sequence corresponds to one first value;
[0072] Performing weighted filtering on the at least one first value to obtain at least one second value;
[0073] Based on the at least one second value and the second threshold, it is determined whether an intrusion signal exists in the first signal or not.
[0074] Here, weighted filtering is performed on at least one first value to obtain at least one second value, including: when the number of first values is 1, weighted filtering is performed on the first value to obtain a second value; or, when the number of first values is greater than or equal to 2, based on the ith first value and the i-1th second value, obtaining the ith second value, where i is an integer greater than or equal to 1.
[0075] Based on at least one second value and a second threshold, determining whether there is an intrusion signal in the first signal or not, includes: determining that there is an intrusion signal in the first signal when there is a second value greater than the second threshold among at least one second value; and determining that there is no intrusion signal in the first signal when all second values are less than or equal to the second threshold.
[0076] For example, there are two continuous sampling value sequences, namely {X1, X2, X3, X4, X5, X6, X7, X8} and {X9, X10, X11, X12, X13, X14, X15, X16}. The two continuous sampling value sequences are differentially processed to obtain the first first numerical value S1 and the second first numerical value S2; the first second numerical value M1 is obtained based on S1; the second second numerical value M2 is obtained based on S2 and M1; when M1 and / or M2 is greater than the second threshold, it is determined that there is an intrusion signal in the first signal.
[0077] In this embodiment, weighted filtering is performed on at least one first value, which can enable the signal segment signal in the first signal to respond quickly and the maximum amplitude of the waveform of the signal segment signal to be reduced less, thereby avoiding the signal segment signal from being unable to be detected normally, and making the waveform of the noise segment signal in the first signal smoother, further enhancing the anti-interference ability of the first signal, thereby further improving the accuracy of intrusion detection.
[0078] In one embodiment, performing differential processing on the at least one sampling value sequence to obtain at least one first value includes:
[0079] The difference between every two adjacent sampling values in each sampling value sequence in the at least one sampling value sequence is summed to obtain a first numerical value corresponding to each sampling value sequence.
[0080] For example, a sampling value sequence is {X1, X2, X3, ..., X(n-1), Xn}, and the first value S1 = (X2-X1)+(X3-X2)+...+(Xn-X(n-1)); wherein n is a positive integer and can be set according to actual needs.
[0081] In this embodiment, a specific method of performing differential processing on at least one sampling value sequence is clarified to improve the accuracy and efficiency of obtaining the first value.
[0082] In one embodiment, performing weighted filtering on the at least one first value to obtain at least one second value includes:
[0083] When the number of the first values is 1, the product of the first value and the first weight is determined as the second value; or
[0084] When the number of first values is greater than or equal to 2, add the third value and the fourth value to obtain the i-th second value; wherein the third value is the product of the first weight and the i-th first value, the fourth value is the product of the second weight and the i-1-th second value, the second weight is the difference between 1 and the first weight, and i is an integer greater than or equal to 1.
[0085] Here, when the number of first values is greater than or equal to 2, the i-th second value Mi = f2×M(i-1)+f1×Si; wherein i is an integer greater than or equal to 1; f1×Si is the third value, f2×M(i-1) is the fourth value; f2 = 1-f1, f2 is the second weight; M(i-1) is the i-1th second value; f1 is the first weight, for example, the first weight is 0.5, 0.25 or 0.125; Si is the i-th first value. It should be noted that the first second value is the product of the first weight and the first first value, and in this case, M(i-1) is 0.
[0086] In this embodiment, a specific method of performing weighted filtering on at least one first value is clarified to improve the accuracy and efficiency of obtaining the second value.
[0087] In one embodiment, when the i-th first value is greater than a third threshold, the first weight is the third weight; when the i-th first value is less than or equal to the third threshold, the first weight is the fourth weight; and the third weight is greater than the fourth weight.
[0088] The third threshold value can be set according to actual needs. The first threshold value, the second threshold value, the third threshold value and the fourth threshold value can be the same or different.
[0089] When the i-th first value is greater than the third threshold, the first weight is the third weight, for example, the third weight is 0.25; when the i-th first value is less than or equal to the third threshold, the first weight is the fourth weight, for example, the fourth weight is 0.125.
[0090] In this embodiment, if certain conditions are met, the first weight may be the third weight or the fourth weight, which can solve the problem of unsatisfactory waveform smoothing or overly smooth waveform of the first signal caused by the first weight being a fixed value, thereby further improving the accuracy of intrusion detection.
[0091] In one embodiment, performing weighted filtering on the at least one first value to obtain at least one second value includes:
[0092] When the number of the first value is 1, the first value is right-shifted by a set number of bits to obtain a second value; or
[0093] When the number of first values is greater than or equal to 2, the fifth value and the sixth value are added to obtain the i-th second value; wherein the fifth value represents the difference between the i-1th second value and the seventh value, the seventh value is obtained by shifting the i-1th second value right by a set number of bits, and the sixth value is obtained by shifting the i-th first value right by the set number of bits, and i is an integer greater than or equal to 1.
[0094] Here, when the number of first numerical values is greater than or equal to 2, the i-th second numerical value Mi = M(i-1)-(M(i-1)>>q)+(Si>>q); wherein, “>>” is a right shift operation in a computer, which can replace the division operation of a floating-point operation, and q is the number of bits moved; M(i-1)-(M(i-1)>>q) is the fifth numerical value, and (Si>>q) is the sixth numerical value; M(i-1) is the i-1th second numerical value, and (M(i-1)>>q) is the seventh numerical value.
[0095] For example, 16>>1=8 means that the result of shifting 16 right by 1 bit is 8, which is equivalent to 16 divided by 2 = 8; 16>>2=4 means that the result of shifting 16 right by 2 bits is 4, which is equivalent to 16 divided by 4 = 4.
[0096] In this embodiment, a specific method of performing weighted filtering processing on at least one first value is given with changes. The mobile operation in the computer is used instead of the division operation of the floating-point operation, which can further improve the speed of obtaining the second value. The hardware performance requirements of the mobile operation in the computer are lower, further reducing the cost of intrusion detection.
[0097] The present application is described in further detail below in conjunction with application examples.
[0098] Taking the intrusion detection method provided in this application as an example, the implementation flow chart of the intrusion detection method provided in this application is as follows: Figure 2 As shown, including:
[0099] Step 1: amplify the in-phase component signal of the intermediate frequency signal output by the microwave module in normal working state by a set multiple through an operational amplifier to obtain a third signal; perform ADC sampling on the third signal based on the set sampling frequency to obtain at least one sampling value sequence.
[0100] The value of the sampling frequency is set here from the following perspectives:
[0101] From the perspective of calculation requirements, for ADC sampling, theoretically, the higher the sampling frequency is set, the better the waveform of the third signal can be restored. However, the higher the sampling frequency is set, the higher the calculation requirements are. Therefore, the sampling frequency should not be set too high or too low.
[0102] From the perspective of interference frequency, the third signal may be interfered by, for example, fluorescent light. The interference waveform diagram is shown in FIG. Figure 3 As shown, from Figure 3 It is not difficult to see that the interference waveform presents a waveform regularity of 50Hz (50.0 times / second). 50Hz is the standard frequency, and some intrusion detection products have fluorescent lamp anti-interference test items. The reason why the third signal is interfered by the fluorescent lamp is that when the ballast inside the old fluorescent lamp is working, it will generate a high-frequency oscillating current. When this high-frequency oscillating current passes through the inductor coil of the ballast and the filament of the fluorescent tube and other components, it will radiate electromagnetic waves to the surrounding space. The frequency range of its radiation may partially overlap or be close to the microwave working frequency, and the radiation frequency of the ballast of the old fluorescent lamp may also be within this range.
[0103] It can be seen that setting the sampling frequency to 50 Hz can not only ensure the restoration of the waveform of the third signal, but also ensure that the third signal is minimally interfered with by the fluorescent lamp. It should be understood that the value of setting the sampling frequency is not limited and can be considered from other angles.
[0104] Step 2: Perform differential processing on at least one sampling value sequence to obtain at least one first value.
[0105] Specifically, the difference between every two adjacent sampling values in each sampling value sequence in at least one sampling value sequence is summed to obtain a first numerical value corresponding to each sampling value sequence.
[0106] Here, a schematic diagram of the original noise segment of the third signal is provided, such as Figure 4 As shown, Figure 4 The middle voltage is 600 millivolts (mV); the schematic diagram of the original signal segment of the third signal is as follows: Figure 5 As shown, Figure 5 The medium voltage is 2140mV; the schematic diagram of the noise section after differential processing is as follows: Figure 6 As shown, Figure 6 The noise value after differential processing is about 300; the schematic diagram of the signal segment after differential processing is as follows: Figure 7 As shown, Figure 7 The signal value after differential processing is about 1800. Figures 4 to 7 It can be seen that the signal-to-noise ratio increased from 2140 / 600≈3.57 to 1800 / 300=6, an increase of 68%; and after differential processing, the signal-to-noise ratio can generally be improved by more than 50%.
[0107] Step 3: Perform weighted filtering on at least one first value to obtain at least one second value.
[0108] Specifically, when the number of the first values is 1, the product of the first value and the first weight is determined as the second value; or
[0109] When the number of first values is greater than or equal to 2, add the third value and the fourth value to obtain the i-th second value; wherein the third value is the product of the first weight and the i-th first value, the fourth value is the product of the second weight and the i-1-th second value, the second weight is the difference between 1 and the first weight, and i is an integer greater than or equal to 1.
[0110] When the i-th first value is greater than the third threshold, the first weight is the third weight; when the i-th first value is less than or equal to the third threshold, the first weight is the fourth weight; the third weight is greater than the fourth weight.
[0111] Here, a schematic diagram of the waveform after weighted filtering and after differential processing is provided, such as Figure 8 shown. Figure 8 The dashed line is the waveform after differential processing, the solid line is the waveform after weighted filtering processing, and the threshold judgment curve corresponds to the third threshold. Figure 8 It is not difficult to see that when it is less than or equal to the third threshold, that is, the noise segment or interference data below the threshold judgment curve can be smoothed more effectively to improve the anti-interference ability; when it is greater than the third threshold, that is, the signal segment curve above the threshold judgment curve can also better conform to the signal change situation.
[0112] Step 4: Perform threshold comparison based on at least one second value and a second threshold to determine whether an intrusion signal exists in the first signal or not.
[0113] When at least one second value is greater than the second threshold, the result of the presence of an intrusion signal in the first signal is output; when all second values are less than or equal to the second threshold, the result of the absence of an intrusion signal in the first signal is output.
[0114] The intrusion detection method provided by the present application, under the premise of meeting the calculation requirements of intrusion detection and the requirements of signal anti-interference capability, does not need to perform FFT operations, greatly reduces the algorithm overhead, and reduces the plug-in (Flash) consumption from at least 10K (kilobytes) using the FFT algorithm to less than 1K, and does not require floating-point operations. It can be adapted to most MCUs with low computing power and small storage space, reducing hardware costs. The first signal represents the in-phase component signal of the intermediate frequency signal output by the microwave module, and intrusion detection is performed only on the in-phase component signal of the intermediate frequency signal, further saving hardware costs.
[0115] In order to implement an intrusion detection method provided in an embodiment of the present application, an intrusion detection device is also provided in an embodiment of the present application, such as Fig. 9 As shown, the device comprises:
[0116] The sampling module 901 is used to sample the first signal based on the set sampling frequency to obtain at least one sampling value sequence; the first signal represents the in-phase component signal of the intermediate frequency signal output by the microwave module;
[0117] The determination module 902 is configured to determine whether an intrusion signal exists in the first signal or not based on the at least one sampling value sequence.
[0118] In one embodiment, the determining module 902 is specifically configured to perform differential processing on the at least one sampling value sequence to obtain at least one first value, where one sampling value sequence corresponds to one first value;
[0119] Based on the at least one first value and the first threshold, it is determined whether an intrusion signal exists in the first signal or whether an intrusion signal does not exist.
[0120] In one embodiment, the determining module 902 is specifically configured to perform differential processing on the at least one sampling value sequence to obtain at least one first value, where one sampling value sequence corresponds to one first value;
[0121] Performing weighted filtering on the at least one first value to obtain at least one second value;
[0122] Based on the at least one second value and the second threshold, it is determined whether an intrusion signal exists in the first signal or not.
[0123] In one embodiment, the determination module 902 is specifically configured to sum the difference between every two adjacent sampling values in each sampling value sequence in the at least one sampling value sequence to obtain a first value corresponding to each sampling value sequence.
[0124] In one embodiment, the determining module 902 is specifically configured to determine the product of the first value and the first weight as the second value when the number of the first values is 1; or
[0125] When the number of first values is greater than or equal to 2, add the third value and the fourth value to obtain the i-th second value; wherein the third value is the product of the first weight and the i-th first value, the fourth value is the product of the second weight and the i-1-th second value, the second weight is the difference between 1 and the first weight, and i is an integer greater than or equal to 1.
[0126] In one embodiment, when the i-th first value is greater than a third threshold, the first weight is the third weight; when the i-th first value is less than or equal to the third threshold, the first weight is the fourth weight; and the third weight is greater than the fourth weight.
[0127] In one embodiment, the determining module 902 is specifically configured to, when the number of the first value is 1, right-shift the first value by a set number of bits to obtain the second value; or
[0128] When the number of first values is greater than or equal to 2, the fifth value and the sixth value are added to obtain the i-th second value; wherein the fifth value represents the difference between the i-1th second value and the seventh value, the seventh value is obtained by shifting the i-1th second value right by a set number of bits, and the sixth value is obtained by shifting the i-th first value right by the set number of bits, and i is an integer greater than or equal to 1.
[0129] In actual application, the sampling module 901 and the determination module 902 can be implemented by a processor in the intrusion detection device.
[0130] It should be noted that: the above embodiment provides an intrusion detection device, and only uses the division of the above program modules as an example to illustrate when performing intrusion detection. In actual applications, the above processing can be assigned to different program modules as needed, that is, the internal structure of the device is divided into different program modules to complete all or part of the processing described above. In addition, the intrusion detection device provided in the above embodiment and the intrusion detection method embodiment belong to the same concept, and the specific implementation process is detailed in the method embodiment, which will not be repeated here.
[0131] Based on the hardware implementation of the above program modules, and in order to implement an intrusion detection method provided in an embodiment of the present application, an embodiment of the present application further provides an electronic device, such as Fig.10 As shown, the electronic device 1000 includes:
[0132] Communication interface 1001, capable of exchanging information with other network nodes;
[0133] The processor 1002 is connected to the communication interface 1001 to implement information exchange with other network nodes, and is used to execute the method provided by one or more technical solutions when running a computer program. The computer program is stored in the memory 1003.
[0134] Specifically, the processor 1002 is used to sample the first signal based on a set sampling frequency to obtain at least one sampling value sequence; based on the at least one sampling value sequence, determine whether an intrusion signal exists in the first signal or not; the first signal represents the in-phase component signal of the intermediate frequency signal output by the microwave module.
[0135] In one embodiment, the processor 1002 is specifically configured to perform differential processing on the at least one sampling value sequence to obtain at least one first value, where one sampling value sequence corresponds to one first value;
[0136] Based on the at least one first value and the first threshold, it is determined whether an intrusion signal exists in the first signal or whether an intrusion signal does not exist.
[0137] In one embodiment, the processor 1002 is specifically configured to perform differential processing on the at least one sampling value sequence to obtain at least one first value, where one sampling value sequence corresponds to one first value;
[0138] Performing weighted filtering on the at least one first value to obtain at least one second value;
[0139] Based on the at least one second value and the second threshold, it is determined whether an intrusion signal exists in the first signal or not.
[0140] In one embodiment, the processor 1002 is specifically configured to sum the difference between every two adjacent sampling values in each sampling value sequence in the at least one sampling value sequence to obtain a first value corresponding to each sampling value sequence.
[0141] In one embodiment, the processor 1002 is specifically configured to determine, when the number of the first values is 1, a product of the first value and the first weight as the second value; or
[0142] When the number of first values is greater than or equal to 2, add the third value and the fourth value to obtain the i-th second value; wherein the third value is the product of the first weight and the i-th first value, the fourth value is the product of the second weight and the i-1-th second value, the second weight is the difference between 1 and the first weight, and i is an integer greater than or equal to 1.
[0143] In one embodiment, when the i-th first value is greater than a third threshold, the first weight is the third weight; when the i-th first value is less than or equal to the third threshold, the first weight is the fourth weight; and the third weight is greater than the fourth weight.
[0144] In one embodiment, the processor 1002 is specifically configured to, when the number of the first value is 1, right-shift the first value by a set number of bits to obtain the second value; or
[0145] When the number of first values is greater than or equal to 2, the fifth value and the sixth value are added to obtain the i-th second value; wherein the fifth value represents the difference between the i-1th second value and the seventh value, the seventh value is obtained by shifting the i-1th second value right by a set number of bits, and the sixth value is obtained by shifting the i-th first value right by the set number of bits, and i is an integer greater than or equal to 1.
[0146] It should be noted that the specific processing process of the processor 1002 and the communication interface 1001 can be understood by referring to the above method.
[0147] Of course, in actual application, the various components in the electronic device 1000 are coupled together through the bus system 1004. It can be understood that the bus system 1004 is used to realize the connection and communication between these components. In addition to the data bus, the bus system 1004 also includes a power bus, a control bus, and a status signal bus. However, for the sake of clarity, Fig.10 Various buses are labeled as bus system 1004 .
[0148] The memory 1003 in the embodiment of the present application is used to store various types of data to support the operation of the electronic device 1000. Examples of such data include: any computer program used to operate on the electronic device 1000.
[0149] The method disclosed in the above embodiment of the present application can be applied to the processor 1002, or implemented by the processor 1002. The processor 1002 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by an integrated logic circuit of the hardware in the processor 1002 or an instruction in the form of software. The above-mentioned processor 1002 may be a general-purpose processor, a digital signal processor (DSP, DigitalSignal Processor), or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The processor 1002 can implement or execute the various methods, steps and logic block diagrams disclosed in the embodiments of the present application. A general-purpose processor may be a microprocessor or any conventional processor, etc. In combination with the steps of the method disclosed in the embodiment of the present application, it can be directly embodied as a hardware decoding processor to execute, or it can be executed by a combination of hardware and software modules in the decoding processor. The software module may be located in a storage medium, which is located in the memory 1003, and the processor 1002 reads the information in the memory 1003 and completes the steps of the above method in combination with its hardware.
[0150] In an exemplary embodiment, the electronic device 1000 can be implemented by one or more application specific integrated circuits (ASIC), DSP, programmable logic device (PLD), complex programmable logic device (CPLD), field programmable gate array (FPGA), general processor, controller, microcontroller (MCU), microprocessor, or other electronic components to execute the aforementioned method.
[0151] It can be understood that the memory 1003 of the embodiment of the present application can be a volatile memory or a non-volatile memory, and can also include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a magnetic random access memory (FRAM), a ferromagnetic random access memory, a flash memory, a magnetic surface memory, an optical disc, or a compact disc read-only memory (CD-ROM); the magnetic surface memory can be a disk memory or a tape memory. The volatile memory can be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM), synchronous static random access memory (SSRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM, SyncLink Dynamic Random Access Memory), and direct RAMbus random access memory (DRRAM, Direct Rambus Random Access Memory).The memory 1003 described in the embodiments of the present application is intended to include but is not limited to these and any other suitable types of memories.
[0152] The embodiment of the present application also provides a storage medium, namely a computer storage medium, specifically a computer-readable storage medium, for example, including a memory 1003 storing a computer program, and the computer program can be executed by a processor 1002 of an electronic device 1000 to complete the steps of the aforementioned method. The computer-readable storage medium can be a memory such as FRAM, ROM, PROM, EPROM, EEPROM, Flash Memory, magnetic surface storage, optical disk, or CD-ROM.
[0153] An embodiment of the present application further provides a computer program product, including a computer program, which implements the steps of any of the above methods when executed by a processor.
[0154] It should be noted that "first", "second", etc. are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. The term "and / or" in this article is only a description of the association relationship between related objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone.
[0155] In addition, the technical solutions described in the embodiments of the present application can be combined arbitrarily without conflict.
[0156] The above description is only a preferred embodiment of the present application and is not intended to limit the protection scope of the present application.
Claims
1. An intrusion detection method, characterized in that: The method comprises: The first signal is sampled based on the set sampling frequency to obtain at least one sampling value sequence; the first signal represents the in-phase component signal of the intermediate frequency signal output by the microwave module; Based on the at least one sampling value sequence, it is determined whether an intrusion signal exists in the first signal or whether an intrusion signal does not exist.
2. The method according to claim 1, characterized in that The determining, based on the at least one sampling value sequence, whether an intrusion signal exists in the first signal or not, comprises: Performing differential processing on the at least one sampling value sequence to obtain at least one first value, wherein one sampling value sequence corresponds to one first value; Based on the at least one first value and the first threshold, it is determined whether an intrusion signal exists in the first signal or whether an intrusion signal does not exist.
3. The method according to claim 1, characterized in that The determining, based on the at least one sampling value sequence, whether an intrusion signal exists in the first signal or not, comprises: Performing differential processing on the at least one sampling value sequence to obtain at least one first value, wherein one sampling value sequence corresponds to one first value; Performing weighted filtering on the at least one first value to obtain at least one second value; Based on the at least one second value and the second threshold, it is determined whether an intrusion signal exists in the first signal or not.
4. The method according to claim 2 or 3, characterized in that: The performing differential processing on the at least one sampling value sequence to obtain at least one first value includes: The difference between every two adjacent sampling values in each sampling value sequence in the at least one sampling value sequence is summed to obtain a first numerical value corresponding to each sampling value sequence.
5. The method according to claim 3, characterized in that: The step of performing weighted filtering on the at least one first value to obtain at least one second value includes: When the number of the first values is 1, the product of the first value and the first weight is determined as the second value; or When the number of first values is greater than or equal to 2, add the third value and the fourth value to obtain the i-th second value; wherein the third value is the product of the first weight and the i-th first value, the fourth value is the product of the second weight and the i-1-th second value, the second weight is the difference between 1 and the first weight, and i is an integer greater than or equal to 1.
6. The method according to claim 5, characterized in that When the i-th first value is greater than the third threshold, the first weight is the third weight; when the i-th first value is less than or equal to the third threshold, the first weight is the fourth weight; the third weight is greater than the fourth weight.
7. The method according to claim 3, characterized in that The step of performing weighted filtering on the at least one first value to obtain at least one second value includes: When the number of the first value is 1, the first value is right-shifted by a set number of bits to obtain a second value; or When the number of first values is greater than or equal to 2, the fifth value and the sixth value are added to obtain the i-th second value; wherein the fifth value represents the difference between the i-1th second value and the seventh value, the seventh value is obtained by shifting the i-1th second value right by a set number of bits, and the sixth value is obtained by shifting the i-th first value right by the set number of bits, and i is an integer greater than or equal to 1.
8. An electronic device, characterized in that: comprising a processor and a memory for storing a computer program capable of being executed on the processor, Wherein, when the processor is used to run the computer program, it executes the steps of the method described in any one of claims 1 to 7.
9. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.