Low-power electronic fence triggering algorithm based on edge computing

CN122658014APending Publication Date: 2026-08-28BEIJING WANGYUANFENG TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610847404.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-12
Publication Date
2026-08-28

AI Technical Summary

Technical Problem

[0003]在基于边缘计算的低功耗电子围栏中,如何避免因短时再确认规则将快速穿越的真实入侵错误自标注为虚警并用于在线学习更新,所导致的触发灵敏度在长期运行后发生不可逆退化

Benefits of technology

(1)本发明通过引入基于随机矩阵理论的谱分离度计算,将触发信号的双通道时频结构与环境噪声基底进行统计分离,并结合历史可靠虚警队列构建自适应背景基线,能够有效区分快速穿越的真实目标与纯随机噪声触发的虚警。在果园、牧场等存在野生动物快速穿行且短时再确认规则易失效的场景下,该方案可减少将真实入侵误判为虚警并错误用于模型更新的情况,从而维持电子围栏对实际入侵事件的响应能力,避免长期运行后触发灵敏度的不可逆退化。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122658014A_ABST
    Figure CN122658014A_ABST
Patent Text Reader

Abstract

The application relates to the technical field of security monitoring, and particularly discloses a low-power-consumption electronic fence triggering algorithm based on edge computing, which collects double-channel signals before and after a triggering moment to form a data matrix, extracts empirical characteristic values through standardization and plane rotation iteration, calculates a theoretical limit characteristic value according to a matrix array, and obtains a spectral separation degree; a background baseline is constructed by using the spectral separation degree of historical reliable false alarm samples, and a first or second flag is compared and generated; a sliding cross-correlation similarity check is performed on the first flag sample and the latest confirmed false alarm sample, whether to be included in the reliable false alarm sample is determined according to a check result; only the reliable false alarm sample is used, a step coefficient is obtained according to a normalized deviation value, a dynamic decision boundary is reduced, and a background baseline mean value is exponentially weighted and updated; the application can avoid that a real intrusion which rapidly passes through is mistaken for a false alarm, prevent irreversible degradation of triggering sensitivity, and maintain long-term reliable response of the fence under the condition of low power consumption.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of security monitoring technology, specifically to a low-power electronic fence triggering algorithm based on edge computing. Background Technology

[0002] Edge computing-based electronic fence triggering algorithms are typically deployed in resource-constrained outdoor or perimeter security scenarios. To extend battery life, edge nodes often employ low duty cycle sampling and event-driven processing. When a sensor (such as passive infrared, millimeter-wave radar, or vibration fiber optic) detects a signal exceeding a preset hard threshold, the node is activated, acquires multi-channel signals within a short time window, and uses local decision logic to determine whether it is a real intrusion. To reduce false alarm rates and adapt to environmental changes, existing technologies often introduce online learning mechanisms into edge nodes: using a simple "short-term reconfirmation" rule (e.g., waiting 1 to 2 seconds after infrared triggering for radar echo) to self-label the current trigger sample as a false alarm or a real alarm, and update the local decision threshold or decision tree parameters accordingly.

[0003] In low-power electronic fences based on edge computing, a key challenge is preventing the trigger sensitivity from irreversibly degrading over long-term operation due to short-term reconfirmation rules labeling real intrusions that traverse rapidly as false alarms and using them for online learning updates. This problem differs from conventional false alarm suppression or adaptive threshold adjustment. The difficulty lies in the fact that, under the constraint of no real-time external truth feedback and relying solely on extremely low-power computing resources, edge nodes must both identify samples that "appear to be false alarms but are actually real intrusions" and prevent such samples from contaminating the online learning process. The goal is to maintain the fence's continuous responsiveness to rapidly traversing targets without requiring additional cloud interaction or manual calibration. Summary of the Invention

[0004] The purpose of this invention is to provide a low-power electronic fence triggering algorithm based on edge computing to solve the problems mentioned above.

[0005] The objective of this invention can be achieved through the following technical solutions: The low-power electronic fence triggering algorithm based on edge computing includes the following steps: S1: In response to the hard threshold of the preset physical quantity being crossed, continuously collect the first signal sequence and the second signal sequence within a short time window before and after the trigger time, and arrange the first signal sequence and the second signal sequence in rows to form a dual-channel data matrix. S2: Standardize the dual-channel data matrix, calculate the empirical eigenvalues ​​of its covariance matrix based on the standardized matrix, and determine the spectral separation degree of the current matrix based on the distribution of the limiting eigenvalues ​​in the non-intrusive mode of random matrix theory. The spectral separation degree is the relative deviation between the empirical eigenvalues ​​and the limiting eigenvalues. S3: Obtain the background baseline composed of the mean and fluctuation range of the spectral separation during the historical period without intrusion events, compare the current spectral separation with the background baseline, and if the deviation exceeds a preset multiple, generate a first flag indicating the existence of a non-random intrusion mode; otherwise, generate a second flag indicating that it conforms to the characteristics of pure noise. S4: Based on the first flag or the second flag, if it is the second flag, the current triggered sample is determined to be a reliable false alarm sample; if it is the first flag, the current triggered sample is marked as a suspicious positive sample and prohibited from participating in any subsequent model updates, thereby outputting a filtered reliable false alarm sample. S5: Using only reliable false alarm samples, the dynamic decision boundary of local triggering is reduced with a step size positively correlated with the sample confidence. At the same time, the exponentially weighted moving average of the background baseline is updated using the spectral separation during the period without intrusion events, thus completing the constrained adjustment of the trigger sensitivity.

[0006] As a further aspect of the present invention: the construction of the dual-channel data matrix specifically includes: Using the trigger moment as a reference point, the sliding ratio of the local energy to the background noise energy of the first signal sequence is calculated point by point forward and backward respectively; The search stops when the sliding ratio first falls below the preset ratio, and the forward boundary point and the backward boundary point are obtained accordingly. The first and second signal sequences between the forward and backward boundary points are extracted, aligned by time, and arranged row by row to form a dual-channel data matrix.

[0007] As a further aspect of the present invention: determining the spectral separation degree of the current matrix specifically includes: Calculate the mean and standard deviation of each row of the dual-channel data matrix, subtract the corresponding mean from each row element and divide by the standard deviation to obtain the standardized matrix; Multiply the normalized matrix by its transpose and divide by the number of columns of the normalized matrix to obtain the covariance matrix. Perform planar rotation iteration on the covariance matrix until the sum of squares of all off-diagonal elements falls below a preset threshold. Extract the two diagonal elements as two empirical eigenvalues. The theoretical limit eigenvalue in the non-intrusive mode is calculated based on the number of columns in the dual-channel data matrix. The larger of the two empirical eigenvalues ​​is taken, and the absolute value of the difference between the larger eigenvalue and the theoretical limit eigenvalue is divided by the theoretical limit eigenvalue as the spectral separation degree.

[0008] As a further aspect of the present invention: the calculation of the theoretical limiting eigenvalue under the non-intrusion mode based on the number of columns of the dual-channel data matrix specifically includes: Extract the column number of the dual-channel data matrix, represent the column number in binary form, and obtain the position index of its highest bit; Using the position index as the address, the corresponding initial value of the square root is read from the preset square root approximation table, and then the arithmetic square root of the column number is obtained through a Newton iteration correction. The arithmetic square root is added to the numerical value and then squared. The result is used as the theoretical limit eigenvalue.

[0009] As a further aspect of the present invention: S3 specifically includes: Maintain a fixed-length history queue, which stores the spectral separation scores corresponding to the trigger events most recently determined to be reliable false alarms in chronological order. For each new current spectral separation obtained, the arithmetic mean of all spectral separations in the historical queue is calculated as the baseline mean, and half of the difference between the maximum and minimum values ​​in the historical queue is calculated as the baseline fluctuation range. Calculate the absolute value of the difference between the current spectral separation and the baseline mean, and determine whether the absolute value is greater than three times the baseline fluctuation range. If so, generate the first flag; otherwise, generate the second flag.

[0010] As a further aspect of the present invention: the output of filtered reliable false alarm samples specifically includes: When the first flag is obtained, extract the dual-channel data matrix of the current trigger sample, and read the historical dual-channel data matrix corresponding to the trigger sample most recently determined to be the second flag from the storage unit. Perform sliding cross-correlation on the current dual-channel data matrix and the historical dual-channel data matrix row by row, and take the average of the maximum values ​​of the two cross-correlation sequences as the similarity measure; If the similarity metric is less than a preset threshold, the first flag is maintained. If it is, the current sample is marked as a suspicious positive sample. Otherwise, the first flag is rewritten to the second flag and the current sample is included in the output queue of reliable false alarm samples.

[0011] As a further aspect of the present invention: taking the average of the maximum values ​​of the two cross-correlated sequences as a similarity measure specifically includes: Add zeros to the end of the first row of the current dual-channel data matrix and the first row of the historical dual-channel data matrix, so that the length of each row is twice the original length. Keep the position of the first row of the historical dual-channel data matrix fixed, and move the first row of the current dual-channel data matrix to the right by one sampling interval one time. After each move, calculate the sum of the products of the corresponding elements in the overlapping part of the two rows. The sum of the products corresponding to all moving steps constitutes the first cross-correlation sequence. Similarly, perform the same operation on the second row to obtain the second cross-correlation sequence. Extract the maximum value from the first cross-correlation sequence and the maximum value from the second cross-correlation sequence, and calculate the arithmetic mean of these two maximum values ​​as a similarity measure.

[0012] As a further aspect of the present invention: S5 specifically includes: The normalized deviation value is obtained by dividing the absolute value of the difference between the spectral separation degree corresponding to the current reliable false alarm sample and the mean of the background baseline by the fluctuation range of the background baseline. Using the normalized deviation value as the address, the corresponding step size coefficient is read from the preset step size mapping table, and the step size coefficient is multiplied by the basic adjustment step size to obtain the current adjustment step size; The dynamic decision boundary is reduced by adjusting the current step size, and the current spectral separation degree is fused with the mean of the previous background baseline by exponential weighting. The fusion weight coefficient is the ratio of the current adjustment step size to the maximum allowable step size to obtain the updated mean of the background baseline, while keeping the fluctuation range unchanged.

[0013] The beneficial effects of this invention are: (1) This invention introduces spectral separation calculation based on random matrix theory to statistically separate the dual-channel time-frequency structure of the trigger signal from the environmental noise floor, and constructs an adaptive background baseline by combining a historical reliable false alarm queue. This effectively distinguishes between real targets that are moving quickly and false alarms triggered by pure random noise. In scenarios such as orchards and pastures where wild animals move quickly and short-term reconfirmation rules are prone to failure, this scheme can reduce the situation where real intrusions are misjudged as false alarms and incorrectly used for model updates, thereby maintaining the electronic fence's responsiveness to actual intrusion events and avoiding irreversible degradation of trigger sensitivity after long-term operation.

[0014] (2) This invention employs a similarity metric based on sliding cross-correlation to perform secondary verification on the first flag sample. Only when the current dual-channel data matrix is ​​highly similar to the most recently confirmed typical false alarm waveform is it included in the reliable false alarm sample and used for adjusting the dynamic decision boundary. This mechanism adds a waveform-based filtering step to online learning while maintaining low computational overhead, making the adjustment of the dynamic decision boundary depend only on high-confidence false alarm samples. This reduces the unexpected fluctuations in step size caused by misjudgment of a single sample and helps the fence maintain stable trigger response consistency in complex electromagnetic environments. Attached Figure Description

[0015] The invention will now be further described with reference to the accompanying drawings.

[0016] Figure 1 This is a flowchart of the low-power electronic fence triggering algorithm based on edge computing of the present invention; Figure 2 This is a flowchart illustrating the process of constructing a dual-channel data matrix in this invention. Detailed Implementation

[0017] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0018] Please see Figure 1 As shown, this invention is a low-power electronic fence triggering algorithm based on edge computing, comprising the following steps: S1: In response to the hard threshold of the preset physical quantity being crossed, continuously collect the first signal sequence and the second signal sequence within a short time window before and after the trigger time, and arrange the first signal sequence and the second signal sequence in rows to form a dual-channel data matrix. S2: Standardize the dual-channel data matrix, calculate the empirical eigenvalues ​​of its covariance matrix based on the standardized matrix, and determine the spectral separation degree of the current matrix based on the distribution of the limiting eigenvalues ​​in the non-intrusive mode of random matrix theory. The spectral separation degree is the relative deviation between the empirical eigenvalues ​​and the limiting eigenvalues. S3: Obtain the background baseline composed of the mean and fluctuation range of the spectral separation during the historical period without intrusion events, compare the current spectral separation with the background baseline, and if the deviation exceeds a preset multiple, generate a first flag indicating the existence of a non-random intrusion mode; otherwise, generate a second flag indicating that it conforms to the characteristics of pure noise. S4: Based on the first flag or the second flag, if it is the second flag, the current triggered sample is determined to be a reliable false alarm sample; if it is the first flag, the current triggered sample is marked as a suspicious positive sample and prohibited from participating in any subsequent model updates, thereby outputting a filtered reliable false alarm sample. S5: Using only reliable false alarm samples, the dynamic decision boundary of local triggering is reduced with a step size positively correlated with the sample confidence. At the same time, the exponentially weighted moving average of the background baseline is updated using the spectral separation during the period without intrusion events, thus completing the constrained adjustment of the trigger sensitivity.

[0019] Please see Figure 2 As shown, in S1, in response to the hard threshold of a preset physical quantity being crossed, the first signal sequence and the second signal sequence within a short time window before and after the trigger time are continuously acquired. The first signal sequence and the second signal sequence are arranged in rows to form a dual-channel data matrix, specifically including: Edge computing nodes acquire a first signal sequence via a passive infrared sensor and a second signal sequence via a 24 GHz millimeter-wave radar sensor. When the output signal amplitude of the passive infrared sensor exceeds a preset voltage threshold, it is considered a trigger moment, which is recorded as a time reference point. Using this trigger moment as a reference, the edge computing node calculates the sliding ratio of the local energy to the background noise energy of the first signal sequence point by point, moving along the negative (before trigger) and positive (after trigger) directions of the time axis. The local energy refers to the sum of the squares of the sampled values ​​of the first signal sequence within a window consisting of 10 sampling points before and after the current search point, while the background noise energy is the average energy of the first signal sequence within a time window from 500 milliseconds to 100 milliseconds before the trigger moment.

[0020] When the calculated sliding ratio falls below a preset ratio (calibrated to 2.5 based on the site environment) for the first time during the forward search, the search point is designated as the forward boundary point. Similarly, during the backward search, when the sliding ratio falls below the preset ratio for the first time, the corresponding search point is designated as the backward boundary point. Using the criterion of a sliding ratio falling below the preset ratio effectively extracts the valid range containing the main trigger energy waveform, eliminating redundant data whose energy at both ends has attenuated to near background noise levels.

[0021] After obtaining the forward and backward boundary points, the edge computing nodes extract all sampled values ​​of the first signal sequence located between the forward and backward boundary points, and all sampled values ​​of the second signal sequence within the same time interval, from the original sampled data. The extracted first signal sequence sampled values ​​are arranged in chronological order as the first row, and the extracted second signal sequence sampled values ​​are arranged in the same chronological order as the second row, thus forming a dual-channel data matrix. The number of columns in this matrix equals the number of extracted sample points. Subsequent spectral separation calculations are all based on this dual-channel data matrix.

[0022] In S2, the dual-channel data matrix is ​​standardized. Based on the standardized matrix, the empirical eigenvalues ​​of its covariance matrix are calculated. Then, based on the distribution of limiting eigenvalues ​​in the non-intrusive mode of random matrix theory, the spectral separation of the current matrix is ​​determined. Spectral separation is the relative deviation between the empirical eigenvalues ​​and the limiting eigenvalues, specifically including: The edge computing node first standardizes the dual-channel data matrix obtained in the first step. Specifically, it calculates the arithmetic mean and standard deviation of all elements in the first row and the second row of the dual-channel data matrix. Each element in the first row is subtracted from its arithmetic mean and then divided by its standard deviation to obtain the standardized first row; similarly, each element in the second row is subtracted from its arithmetic mean and then divided by its standard deviation to obtain the standardized second row. The standardized first and second rows are then arranged in their original row order to form the standardized matrix.

[0023] Next, the edge computing nodes calculate their covariance matrix based on the normalized matrix. Specifically, the normalized matrix is ​​multiplied by its transpose to obtain a 2x2 matrix; then, each element of this matrix is ​​divided by the number of columns in the normalized matrix (i.e., the number of columns in the dual-channel data matrix), and the result is the covariance matrix. To extract two empirical eigenvalues ​​from this covariance matrix, a planar rotation iteration method is used. Initialize a 2x2 identity matrix as the rotation matrix, and repeatedly perform the following operations: Calculate the squares of the elements in the first row and second column of the covariance matrix (which are equal) and the elements in the second row and first column. Add these two squares to obtain the sum of squares of the off-diagonal elements. Determine if this sum of squares is less than a preset threshold, which is 10 to the power of negative 6. If it is greater than or equal to the threshold, calculate the rotation angle to make the off-diagonal elements zero, and update the covariance matrix and the rotation matrix. When the sum of squares of the off-diagonal elements is less than the preset threshold, stop the iteration. At this point, the two elements on the diagonal of the covariance matrix are the two empirical eigenvalues, which are recorded in descending order as the first empirical eigenvalue and the second empirical eigenvalue.

[0024] After obtaining two empirical eigenvalues, the edge computing node further calculates the theoretical limiting eigenvalues ​​under non-intrusive mode. First, the number of columns in the dual-channel data matrix is ​​extracted and denoted as the data length. This data length is converted to binary representation. Starting from the most significant bit (the leftmost 1 bit), the position index of this most significant bit is determined, with the position index of the least significant bit denoted as 0. Using this position index as the address, the corresponding initial square root value is read from a pre-stored square root approximation table within the edge computing node. This square root approximation table is constructed as follows: for each integer with a position index from 0 to 15, the arithmetic square root of that integer power is pre-calculated, and the result is stored in fixed-point number form. After reading the initial square root value, a Newton-Raphson iteration correction is performed on the data length: the sum of the initial square root value and the quotient of the data length divided by the initial square root value is calculated, and then multiplied by half to obtain the corrected arithmetic square root.

[0025] After obtaining the arithmetic square root of the data length, add the square root to the numerical value to obtain the first sum. Then, square the first sum (i.e., multiply the first sum by itself). The resulting product is the theoretical limiting eigenvalue under the non-intrusion mode. Finally, take the larger of the two empirical eigenvalues ​​obtained in the first step (i.e., the first empirical eigenvalue), calculate the absolute value of the difference between the larger value and the theoretical limiting eigenvalue, and then divide this absolute value by the theoretical limiting eigenvalue. The resulting ratio is the spectral separation of the current dual-channel data matrix. This spectral separation is used for subsequent comparison with the background baseline to determine whether a non-random intrusion mode exists.

[0026] In S3, a background baseline is obtained, consisting of the mean and fluctuation range of spectral separation during historical periods without intrusion events. The current spectral separation is compared with the background baseline. If the deviation exceeds a preset multiple, a first flag indicating the existence of a non-random intrusion mode is generated; otherwise, a second flag indicating that the characteristics conform to pure noise is generated. Specifically, this includes: The edge computing node maintains a fixed-length history queue, which stores the spectral separation values ​​corresponding to the most recently confirmed reliable false alarms in chronological order. The queue is pre-set to be fifty long, meaning it can store a maximum of fifty spectral separation values ​​corresponding to the most recently confirmed reliable false alarms. When the queue is not full, newly acquired spectral separation values ​​are appended to the tail of the queue; when the queue is full, for each new spectral separation value, the oldest value at the head of the queue is removed, and the new value is appended to the tail, maintaining a constant queue length of fifty.

[0027] After obtaining a new current spectral separation score in the second step, the edge computing node first reads all currently stored spectral separation score values ​​from the historical queue. It then calculates the arithmetic mean of these values: summing all spectral separation score values, dividing the sum by the actual number of values ​​stored in the historical queue (taking the actual number if the queue is not full, and taking fifty if it is full), and using the result as the baseline mean. Simultaneously, it finds the maximum and minimum values ​​in the historical queue, calculates the difference between the maximum and minimum values, and multiplies this difference by one-half; the result is used as the baseline fluctuation range.

[0028] After obtaining the baseline mean and baseline fluctuation range, the edge computing nodes calculate the absolute value of the difference between the current spectral separation and the baseline mean. Specifically, if the current spectral separation is greater than or equal to the baseline mean, the baseline mean is subtracted from the current spectral separation; if the current spectral separation is less than the baseline mean, the current spectral separation is subtracted from the baseline mean, yielding the absolute value of the difference. This absolute value is then compared to three times the baseline fluctuation range. Three times the baseline fluctuation range is obtained by multiplying the baseline fluctuation range by three. If the absolute value of the difference is greater than three times the baseline fluctuation range, a first flag is generated, indicating the presence of a non-random intrusion pattern in the current trigger signal; if the absolute value of the difference is less than or equal to three times the baseline fluctuation range, a second flag is generated, indicating that the current trigger signal conforms to pure noise characteristics. The generated first or second flag will be used for sample filtering processing in the subsequent fourth step.

[0029] In S4, based on either a first flag or a second flag, if the second flag is present, the current triggering sample is determined to be a reliable false alarm sample; if the first flag is present, the current triggering sample is marked as a suspicious positive sample and prohibited from participating in any subsequent model updates, thus outputting filtered reliable false alarm samples, specifically including: When the edge computing node obtains the first flag from the third step, it indicates that the spectral separation of the current trigger signal deviates significantly from the background baseline, but the possibility of misjudgment due to rapid target crossing has not yet been ruled out. At this time, the edge computing node extracts the dual-channel data matrix corresponding to the current trigger sample, denoted as the current matrix; simultaneously, it reads the dual-channel data matrix corresponding to the trigger sample most recently identified as having the second flag from the internal storage unit, denoted as the history matrix. This history matrix represents the typical signal pattern most recently identified as a pure noise false alarm.

[0030] Next, the edge computing node performs a sliding cross-correlation operation on the current matrix and the historical matrix row by row to quantify the waveform similarity between them. For the first row (i.e., the signal sequence acquired by the passive infrared sensor), the specific operation is as follows: Let the length of the first row of the current matrix be L sampling points, and the length of the first row of the historical matrix also be L sampling points. Add zeros to the end of each of these two rows, extending the length of each row to twice its original length, i.e., 2L sampling points. Keeping the position of the first row of the historical matrix fixed, the first row of the current matrix is ​​successively moved to the right by one sampling interval, starting from 0 and going up to L-1 (because when the number of moves reaches L, the length of the overlapping part of the two rows is zero). For each move number k (k = 0, 1, ..., L-1), calculate the sum of the products of corresponding elements in the overlapping area of ​​the two rows; this sum is the cross-correlation value corresponding to the move number k. All L cross-correlation values ​​are arranged in order of the move number, forming the first cross-correlation sequence. Similarly, the same sliding cross-correlation operation is performed on the second row of the current matrix (the signal sequence collected by the millimeter-wave radar sensor) and the second row of the historical matrix to obtain the second cross-correlation sequence, which also has a length of L cross-correlation values.

[0031] The calculation process of the above sliding cross-correlation can be expressed by the following mathematical formula: ; in, ; Indicates the number of steps to move. Cross-correlation value at time, This indicates the first row of the current matrix. The values ​​of each sampling point (the positions in the sequence that exceed the original length after padding with zeros are set to zero). This represents the first row of the history matrix. The values ​​of each sampling point (with the portion exceeding the original length being zero) are then processed. The same operation is performed on the second row to obtain the second cross-correlation sequence. Its expression is the same as Same, only and Replace with the corresponding sequence of the second row of the current matrix and the second row of the historical matrix.

[0032] After obtaining the first and second cross-correlation sequences, extract the maximum value from each sequence. Let the maximum value of the first cross-correlation sequence be... The maximum value of the second cross-correlation sequence is The arithmetic mean of these two maximum values ​​is used as a similarity measure, and its formula is as follows: ; Here, S is the similarity measure between the current matrix and the historical matrix. The value of S depends on the signal amplitude, but it is dimensionless.

[0033] An edge computing node pre-stores a similarity threshold. This threshold is obtained by collecting 100 sets of pure noise false alarm samples in a non-intrusion environment, calculating the similarity metric between every two sets of samples, averaging the results, and then multiplying by 0.8. The specific value is set to 0.65. The calculated similarity metric S is compared with this preset threshold: if S is less than 0.65, it indicates that the waveform similarity between the current matrix and the historical matrix is ​​low, meaning the current trigger signal is not a typical pure noise false alarm mode. Therefore, the first flag is maintained, and the current trigger sample is marked as a suspicious positive sample, prohibiting it from participating in any subsequent model updates. If S is greater than or equal to 0.65, it indicates that the current matrix is ​​highly similar to the historical matrix, meaning the current trigger signal has the same noise characteristics as the most recently confirmed pure noise false alarm. In this case, the first flag is rewritten as the second flag, and the current sample is included in the output queue of reliable false alarm samples for use in the subsequent fifth step. Through the above similarity metric verification, the misjudgment of spectral separation caused by rapid target crossing can be effectively corrected, avoiding the incorrect marking of real intrusions as false alarms.

[0034] In S5, only reliable false alarm samples are used, and the dynamic decision boundary for local triggering is reduced with a step size positively correlated with the sample confidence. Simultaneously, the exponentially weighted moving average of the background baseline is updated using the spectral separation during the period without intrusion events, thus completing a constrained adjustment to the trigger sensitivity. Specifically, this includes: After the edge computing node obtains a reliable false alarm sample through step four, it first calculates the absolute value of the difference between the spectral separation corresponding to the reliable false alarm sample and the current background baseline mean. Specifically, if the spectral separation is greater than or equal to the baseline mean, the spectral separation is subtracted from the baseline mean; if the spectral separation is less than the baseline mean, the spectral separation is subtracted from the baseline mean. The resulting difference is divided by the fluctuation range of the background baseline to obtain the normalized deviation value. This normalized deviation value is usually between 0 and 3, because the condition for generating the second indicator in step three is that the absolute value of the difference is less than or equal to three times the fluctuation range.

[0035] An internal step size mapping table is pre-stored within the edge computing node. This table is constructed by dividing the possible range of normalized deviation values ​​from 0 to 3 into 15 equal-length intervals, each corresponding to a step size coefficient. Specifically, the first interval (0 to 0.2) corresponds to a step size coefficient of 0.1, the second interval (0.2 to 0.4) corresponds to a step size coefficient of 0.2, and so on, with the 15th interval (2.8 to 3.0) corresponding to a step size coefficient of 1.5. The step size coefficient monotonically increases as the normalized deviation value increases. Using the currently calculated normalized deviation value as the address (i.e., determining which interval it falls into), the corresponding step size coefficient is read from this table. Then, the read step size coefficient is multiplied by a preset base adjustment step size to obtain the current adjustment step size. The base adjustment step size is set to two percent of the current value of the dynamic decision boundary, which is initially set by field calibration to 0.5 volts of the passive infrared sensor output signal amplitude.

[0036] Based on the calculated current adjustment step size, the dynamic decision boundary for local triggering is reduced. That is, the original dynamic decision boundary value is subtracted from the current adjustment step size to obtain a new dynamic decision boundary, which is used for subsequent triggering judgments.

[0037] Edge computing nodes perform exponentially weighted fusion updates on the background baseline mean. First, the background baseline mean before the update is obtained (i.e., the mean saved after the last update). The spectral separation corresponding to the current reliable false alarm sample is weighted and fused with the background baseline mean before the update. The fusion weight coefficient is the ratio of the current adjustment step size to a preset maximum allowable step size. The maximum allowable step size is set to 5 times the base adjustment step size, i.e., 10% of the current value of the dynamic decision boundary. Specifically, the fusion method is as follows: multiply the weight coefficient by the current spectral separation to obtain the first weighted value; subtract the weight coefficient from the value and multiply by the previous background baseline mean to obtain the second weighted value; add the first weighted value and the second weighted value, and the result is used as the updated background baseline mean. The fluctuation range of the background baseline remains unchanged and is not included in this update. The updated background baseline mean will be used for the third step comparison of subsequent trigger events, thereby achieving constrained adaptive adjustment of trigger sensitivity.

[0038] The working principle of this invention is as follows: When the passive infrared sensor signal exceeds the hard threshold, the edge computing node searches for the sliding ratio of local energy to background noise before and after the trigger time, extracting a first signal sequence and a second signal sequence to form a dual-channel data matrix. This matrix is ​​standardized, and two empirical eigenvalues ​​of the covariance matrix are extracted through planar rotation iteration. The theoretical limit eigenvalue is calculated based on the number of matrix columns using a lookup table and Newton's iteration, thereby obtaining the spectral separation degree. A historical queue of spectral separation degrees from reliable false alarm samples is maintained, and its mean and fluctuation range are calculated as a background baseline. If the deviation between the current spectral separation degree and the baseline mean exceeds three times the fluctuation range, a first flag is generated; otherwise, a second flag is generated. When the first flag is obtained... When a flag is set, the current dual-channel matrix and the historical matrix corresponding to the most recent second flag are subjected to row-wise sliding cross-correlation. The average of the maximum cross-correlation values ​​of the two rows is extracted as a similarity metric and compared with a preset threshold. If the similarity metric is lower than the threshold, the first flag is maintained and marked as a suspicious positive sample. Otherwise, the first flag is rewritten as the second flag and included in the reliable false alarm sample. Finally, only reliable false alarm samples are used. The step size coefficient is obtained by looking up the table based on the normalized deviation of its spectral separation from the baseline mean. After multiplying by the basic adjustment step size, the dynamic decision boundary is reduced. At the same time, the ratio of the current adjustment step size to the maximum allowed step size is used as the weight to perform exponential weighted fusion update of the background baseline mean, so as to achieve constrained adaptive adjustment of the trigger sensitivity.

[0039] The foregoing has provided a detailed description of one embodiment of the present invention, but this description is merely a preferred embodiment and should not be construed as limiting the scope of the invention. All equivalent variations and modifications made within the scope of the claims of this invention should still fall within the patent coverage of this invention.

Claims

1. A low-power electronic fence triggering algorithm based on edge computing, characterized in that, Includes the following steps: S1: In response to the hard threshold of the preset physical quantity being crossed, continuously collect the first signal sequence and the second signal sequence within a short time window before and after the trigger time, and arrange the first signal sequence and the second signal sequence in rows to form a dual-channel data matrix. S2: Standardize the dual-channel data matrix, calculate the empirical eigenvalues ​​of its covariance matrix based on the standardized matrix, and determine the spectral separation degree of the current matrix based on the distribution of the limiting eigenvalues ​​in the non-intrusive mode of random matrix theory. The spectral separation degree is the relative deviation between the empirical eigenvalues ​​and the limiting eigenvalues. S3: Obtain the background baseline composed of the mean and fluctuation range of the spectral separation during the historical period without intrusion events, compare the current spectral separation with the background baseline, and if the deviation exceeds a preset multiple, generate a first flag indicating the existence of a non-random intrusion mode; otherwise, generate a second flag indicating that it conforms to the characteristics of pure noise. S4: Based on the first flag or the second flag, if it is the second flag, the current triggered sample is determined to be a reliable false alarm sample; if it is the first flag, the current triggered sample is marked as a suspicious positive sample and prohibited from participating in any subsequent model updates, thereby outputting a filtered reliable false alarm sample. S5: Using only reliable false alarm samples, the dynamic decision boundary of local triggering is reduced with a step size positively correlated with the sample confidence. At the same time, the exponentially weighted moving average of the background baseline is updated using the spectral separation during the period without intrusion events, thus completing the constrained adjustment of the trigger sensitivity.

2. The low-power electronic fence triggering algorithm based on edge computing according to claim 1, characterized in that, The dual-channel data matrix specifically includes: Using the trigger moment as a reference point, the sliding ratio of the local energy to the background noise energy of the first signal sequence is calculated point by point forward and backward respectively; The search stops when the sliding ratio first falls below the preset ratio, and the forward boundary point and the backward boundary point are obtained accordingly. The first and second signal sequences between the forward and backward boundary points are extracted, aligned by time, and arranged row by row to form a dual-channel data matrix.

3. The low-power electronic fence triggering algorithm based on edge computing according to claim 1, characterized in that, Determining the spectral separation degree of the current matrix specifically includes: Calculate the mean and standard deviation of each row of the dual-channel data matrix, subtract the corresponding mean from each row element and divide by the standard deviation to obtain the standardized matrix; Multiply the normalized matrix by its transpose and divide by the number of columns of the normalized matrix to obtain the covariance matrix. Perform planar rotation iteration on the covariance matrix until the sum of squares of all off-diagonal elements falls below a preset threshold. Extract the two diagonal elements as two empirical eigenvalues. The theoretical limit eigenvalue in the non-intrusive mode is calculated based on the number of columns in the dual-channel data matrix. The larger of the two empirical eigenvalues ​​is taken, and the absolute value of the difference between the larger eigenvalue and the theoretical limit eigenvalue is divided by the theoretical limit eigenvalue as the spectral separation degree.

4. The low-power electronic fence triggering algorithm based on edge computing according to claim 3, characterized in that, The calculation of the theoretical limiting eigenvalue under the non-intrusion mode based on the number of columns of the dual-channel data matrix specifically includes: Extract the column number of the dual-channel data matrix, represent the column number in binary form, and obtain the position index of its highest bit; Using the position index as the address, the corresponding initial value of the square root is read from the preset square root approximation table, and then the arithmetic square root of the column number is obtained through a Newton iteration correction. The arithmetic square root is added to the numerical value and then squared. The result is used as the theoretical limit eigenvalue.

5. The low-power electronic fence triggering algorithm based on edge computing according to claim 1, characterized in that, S3 specifically includes: Maintain a fixed-length history queue, which stores the spectral separation scores corresponding to the trigger events most recently determined to be reliable false alarms in chronological order. For each new current spectral separation obtained, the arithmetic mean of all spectral separations in the historical queue is calculated as the baseline mean, and half of the difference between the maximum and minimum values ​​in the historical queue is calculated as the baseline fluctuation range. Calculate the absolute value of the difference between the current spectral separation and the baseline mean, and determine whether the absolute value is greater than three times the baseline fluctuation range. If so, generate the first flag; otherwise, generate the second flag.

6. The low-power electronic fence triggering algorithm based on edge computing according to claim 1, characterized in that, The output filtered reliable false alarm samples specifically include: When the first flag is obtained, extract the dual-channel data matrix of the current trigger sample, and read the historical dual-channel data matrix corresponding to the trigger sample most recently determined to be the second flag from the storage unit. Perform sliding cross-correlation on the current dual-channel data matrix and the historical dual-channel data matrix row by row, and take the average of the maximum values ​​of the two cross-correlation sequences as the similarity measure; If the similarity metric is less than a preset threshold, the first flag is maintained. If it is, the current sample is marked as a suspicious positive sample. Otherwise, the first flag is rewritten to the second flag and the current sample is included in the output queue of reliable false alarm samples.

7. The low-power electronic fence triggering algorithm based on edge computing according to claim 6, characterized in that, The method of taking the average of the maximum values ​​of two cross-correlated sequences as a similarity measure specifically includes: Add zeros to the end of the first row of the current dual-channel data matrix and the first row of the historical dual-channel data matrix, so that the length of each row is twice the original length. Keep the position of the first row of the historical dual-channel data matrix fixed, and move the first row of the current dual-channel data matrix to the right by one sampling interval one time. After each move, calculate the sum of the products of the corresponding elements in the overlapping part of the two rows. The sum of the products corresponding to all moving steps constitutes the first cross-correlation sequence. Similarly, perform the same operation on the second row to obtain the second cross-correlation sequence. Extract the maximum value from the first cross-correlation sequence and the maximum value from the second cross-correlation sequence, and calculate the arithmetic mean of these two maximum values ​​as a similarity measure.

8. The low-power electronic fence triggering algorithm based on edge computing according to claim 1, characterized in that, S5 specifically includes: The normalized deviation value is obtained by dividing the absolute value of the difference between the spectral separation degree corresponding to the current reliable false alarm sample and the mean of the background baseline by the fluctuation range of the background baseline. Using the normalized deviation value as the address, the corresponding step size coefficient is read from the preset step size mapping table, and the step size coefficient is multiplied by the basic adjustment step size to obtain the current adjustment step size; The dynamic decision boundary is reduced by adjusting the current step size, and the current spectral separation degree is fused with the mean of the previous background baseline by exponential weighting. The fusion weight coefficient is the ratio of the current adjustment step size to the maximum allowable step size to obtain the updated mean of the background baseline, while keeping the fluctuation range unchanged.