AR network camera tamper-proofing method based on security agent mechanism
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- 中国电子口岸数据中心上海分中心
- Filing Date
- 2026-07-06
- Publication Date
- 2026-08-07
AI Technical Summary
[0004]为了解决被动的状态匹配机制在面对刻意伪装时失效,无法主动识别终端是否已被劫持或篡改的技术问题,本发明的目的在于提供一种基于安全Agent机制的AR网络摄像机防篡改方法,所采用的技术方案具体如下:
首先获取当前终端设备及参照终端设备的环境参数实时曲线。若终端设备所获取到的环境状态表现与周围的终端设备的环境状态表现差异较大,则通常具有较高的篡改风险,所以分析当前终端设备与参照终端设备的环境参数实时曲线之间的变化差异特征来确定动态篡改风险值,然后以动态篡改风险值作为是否触发防篡改检测的判断依据。在触发防篡改检测时,依据当前终端设备的动态篡改风险值和剩余算力共同确定难度因子,能够使探测任务的难度与设备当前的安全威胁等级和资源承载能力相匹配,随机选取与难度因子匹配的轻量级任务下发至当前终端设备。基于轻量级任务的类型、当前终端设备的环境参数实时曲线以及难度因子,预测当前终端设备执行轻量级任务时的预期状态增量得分,为后续的异常判别提供对比基准,提升篡改判别的精准度。进一步地,通过将执行轻量级任务期间的视频流参数与预设历史窗口内的视频流历史参数进行对比,同时将环境参数曲线与预设历史窗口内环境参数对比曲线进行对比,从而计算实际状态增量得分,能够从视频流和环境参数两个维度综合评估设备在探测任务下的真实响应。最后,通过比较预期状态增量得分与实际状态增量得分之间的得分差异来确定当前终端设备的篡改状态,能够以量化得分差异的方式精准区分正常状态波动与真实篡改行为,根据得分差异确定篡改状态并触发对应安全措施。
Smart Images

Figure CN122534205A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of network security technology, and specifically to a method for preventing tampering with AR network cameras based on a secure agent mechanism. Background Technology
[0002] As Augmented Reality (AR) technology expands its applications in industrial inspection, remote collaboration, smart security, and medical assistance, AR video cameras are evolving from simple video acquisition devices into integrated terminals that combine image acquisition, environmental perception, spatial positioning, virtual annotation, real-time transmission, and intelligent analysis. This information collectively forms the foundation for reliable recording in AR scenarios. Therefore, if video content, timestamps, spatial data, or virtual overlay information is illegally altered, it could lead to flawed decision-making, difficulties in determining responsibility, invalidation of evidence, and even security incidents.
[0003] When AR network camera systems operate in untrusted environments, they are vulnerable to being killed, replaced, or having their reports falsified by attackers. Therefore, tamper detection is necessary to prevent such incidents in advance. Current anti-tamper detection primarily relies on HTTPS, heartbeat mechanisms, and fixed-rule terminal operation status matching. These methods can only guarantee the security of the communication link or detect obvious disconnection anomalies. However, in scenarios where the terminal is hijacked, attackers can simulate system operating parameters that conform to standard rules (such as faking normal fluctuations in CPU and physical memory usage) to respond to server-side probes. This passive state matching mechanism fails when faced with deliberate spoofing and cannot proactively identify whether the terminal has been hijacked or tampered with. Summary of the Invention
[0004] To address the technical problem that passive state matching mechanisms fail when faced with deliberate spoofing, and cannot proactively identify whether a terminal has been hijacked or tampered with, the present invention aims to provide an anti-tampering method for AR network cameras based on a secure agent mechanism. The specific technical solution adopted is as follows: Obtain real-time curves of environmental parameters for the current terminal device and a reference terminal device; Analyze the differences in the real-time environmental parameter curves between the current terminal device and the reference terminal device to determine the dynamic tampering risk value of the current terminal device, which is used to determine whether anti-tampering detection is triggered. If anti-tampering detection is triggered, the difficulty factor is determined based on the dynamic tampering risk value and remaining computing power of the current terminal device, and a lightweight task matching the difficulty factor is randomly selected and sent to the current terminal device. Based on the type of lightweight task, the real-time curve of the environmental parameters of the current terminal device, and the difficulty factor, the expected state increment score of the current terminal device when performing the lightweight task is predicted; the environmental parameter curve and video stream parameters of the current terminal device during the execution of the lightweight task are obtained; the video stream parameters are compared with the historical parameters of the video stream in the preset historical window, and the environmental parameter curve is compared with the environmental parameter comparison curve in the preset historical window, thereby calculating the actual state increment score of the current terminal device; By comparing the score difference between the expected state increment score and the actual state increment score, the tampering state of the current terminal device is determined, and corresponding security measures are triggered.
[0005] Furthermore, the method for obtaining the dynamic tampering risk value includes: Calculate the dynamic time-warped distance between the real-time environmental parameter curves of the current terminal device and each reference terminal device under each environmental parameter, and use it as a distance factor; The average distance factor between the current terminal device and each reference terminal device under all types of environmental parameters is taken as the first average distance, and the average of the first average distance between the current terminal device and all reference terminal devices is taken as the first average characteristic value. In the reference terminal device, the dynamic time warping distance between the real-time curves of the environmental parameters of any two reference terminal devices under each environmental parameter is calculated as the distance parameter. The average of the distance parameters of any two reference terminal devices under all types of environmental parameters is used as the second average distance. The average of the second average distances between all reference terminal devices is used as the second average characteristic value. The absolute value of the difference between the first mean feature value and the second mean feature value is calculated and normalized to obtain the dynamic tampering risk value of the current terminal device; wherein, the reference terminal device is a device of the same type as the current terminal device, and the types of environmental parameters include CPU utilization and physical memory utilization.
[0006] Furthermore, the determination of whether anti-tampering detection is triggered includes: If the dynamic tampering risk value of the current terminal device is greater than or equal to the preset risk threshold, anti-tampering detection is triggered; if the dynamic tampering risk value of the current terminal device is less than the preset risk threshold, dynamic monitoring continues, and it is determined whether the time interval between the current moment and the last time the anti-tampering detection was triggered reaches the preset period threshold. If the preset period threshold is reached, anti-tampering detection is triggered.
[0007] Furthermore, the method for obtaining the difficulty factor includes: Obtain the CPU utilization rate of the current terminal device at the current moment and the preset necessary redundancy ratio; Subtract the CPU utilization rate from the total computing power of the current terminal device, and then subtract the necessary redundancy ratio to obtain the remaining computing power of the current terminal device; Multiply the current dynamic tampering risk value of the terminal device by the remaining computing power, and use the product as the difficulty factor.
[0008] Furthermore, the method for obtaining the expected state increment score includes: The types of lightweight tasks are processed by one-hot encoding to obtain a task type vector; The task type vector, the real-time curve of the current terminal device's environmental parameters, and the difficulty factor are concatenated and input into a pre-trained deep model, which outputs the expected average increment corresponding to each environmental parameter. Based on the preset environmental parameter weights, the expected average increments corresponding to each environmental parameter are weighted and summed, and the resulting weighted result is used as the expected state increment score when the current terminal device performs a lightweight task.
[0009] Furthermore, the method for obtaining the actual state increment score includes: The length of the preset history window is the same as the time taken for the current terminal device to execute a lightweight task; The similarity between the video stream parameters of the current terminal device during the execution of lightweight tasks and the video stream historical parameters in the preset historical window is analyzed, thereby filtering out the reference window from all preset historical windows; Under each environmental parameter, the difference between the environmental parameter curve of the current terminal device during the execution of a lightweight task and the environmental parameter comparison curve in the reference window at the same time number is calculated as the difference factor. The mean of all non-negative difference factors is taken as the actual increment of the current terminal device under each environmental parameter. Based on the preset environmental parameter weights, the actual increments of the current terminal device at each environmental parameter are weighted and summed, and the resulting weighted result is used as the actual state increment score of the current terminal device.
[0010] Furthermore, the method for obtaining the reference window includes: For each video stream parameter, the cosine similarity between the sequence of video stream parameters of the current terminal device during the execution of a lightweight task and the sequence of video stream historical parameters in each preset historical window is calculated and normalized to obtain the similarity factor between the current terminal device during the execution of a lightweight task and each preset historical window. The average similarity factor between the current terminal device and each preset historical window under all video stream parameters during the execution of lightweight tasks is used as the similarity index, and the preset historical window corresponding to the maximum similarity index is used as the reference window.
[0011] Furthermore, determining the current tampering status of the terminal device includes: Calculate the absolute value of the difference between the expected state increment score and the actual state increment score corresponding to the current terminal device and perform normalization processing to obtain the tampering probability of the current terminal device; If the tampering probability is greater than or equal to a preset tampering probability threshold, the current terminal device is determined to be in a tampered or hijacked state; if the tampering probability is less than the preset tampering probability threshold, the current terminal device is determined to be in a normal state.
[0012] Furthermore, the triggering of the corresponding security measures includes: If the current terminal device is in a state of being tampered with or hijacked, security measures include at least one of the following: interrupting video stream acquisition, disconnecting the network interface, or restoring factory settings. If the terminal device is currently in a normal state, logs will be recorded and dynamic monitoring will be continuously performed.
[0013] Furthermore, the preset tampering probability threshold ranges from (0.6, 1).
[0014] The present invention has the following beneficial effects: First, real-time environmental parameter curves for the current terminal device and a reference terminal device are acquired. If the environmental state acquired by the terminal device differs significantly from that of surrounding terminal devices, it usually indicates a high risk of tampering. Therefore, the dynamic tampering risk value is determined by analyzing the differences in the real-time environmental parameter curves between the current and reference terminal devices. This dynamic tampering risk value is then used as the criterion for triggering anti-tampering detection. When anti-tampering detection is triggered, a difficulty factor is determined based on the dynamic tampering risk value and remaining computing power of the current terminal device. This ensures that the difficulty of the detection task matches the current security threat level and resource carrying capacity of the device. A lightweight task matching the difficulty factor is randomly selected and sent to the current terminal device. Based on the type of lightweight task, the real-time environmental parameter curve of the current terminal device, and the difficulty factor, the expected state increment score when the current terminal device executes the lightweight task is predicted. This provides a benchmark for subsequent anomaly detection and improves the accuracy of tampering detection. Furthermore, by comparing the video stream parameters during lightweight tasks with historical video stream parameters within a preset historical window, and simultaneously comparing the environmental parameter curve with the environmental parameter comparison curve within the preset historical window, the actual state increment score is calculated. This allows for a comprehensive evaluation of the device's true response under detection tasks from both video stream and environmental parameter dimensions. Finally, by comparing the score difference between the expected state increment score and the actual state increment score, the current tampering status of the terminal device is determined. This allows for a precise distinction between normal state fluctuations and genuine tampering behavior by quantifying the score difference, and the tampering status is determined based on the score difference to trigger corresponding security measures. Attached Figure Description
[0015] Figure 1 This is a flowchart illustrating a method for preventing tampering with an AR network camera based on a secure agent mechanism, as provided in one embodiment of the present invention. Detailed Implementation
[0016] The following description, in conjunction with the accompanying drawings, details a specific scheme for an AR network camera anti-tampering method based on a secure agent mechanism provided by the present invention.
[0017] Please see Figure 1 The diagram illustrates a flowchart of an anti-tampering method for AR network cameras based on a security agent mechanism, according to an embodiment of the present invention. The method includes the following steps: Step S1: Obtain the real-time curves of environmental parameters for the current terminal device and the reference terminal device.
[0018] First, a secure communication link based on the HTTPS protocol is established between the server and each AR network camera. A secure agent (intelligent agent) is deployed in the embedded system of each AR network camera (i.e., the terminal device) to monitor the underlying physical hardware status. Second, the server determines the reference terminal device for the current terminal device. The selection mechanism for the reference terminal device is as follows: in the device cluster, select the terminal device of the same type with the same device configuration (such as the same CPU model and physical memory size) and the closest physical installation location or network topology location. Typically, at least two terminal devices meeting the above conditions are selected as the reference terminal device set. The purpose of selecting similar devices is based on the reasonable assumption that, in the same time period and similar environment, normally operating AR network cameras of the same type will incur similar physical hardware computing power overhead when processing video streams and virtual-real fusion.
[0019] Then, through the security agent deployed within each terminal device, environmental parameters are collected in real time by calling the underlying interface of the operating system according to a unified preset sampling frequency. In this embodiment of the invention, the environmental parameters primarily reflect the physical operating overhead of the device, specifically including but not limited to the CPU utilization and physical memory usage of the terminal device.
[0020] Finally, the security agent reports the collected low-level environmental parameters, along with timestamps, to the server. The server uses the current time as a reference, extracts continuously collected data within a preset time window (e.g., the last 5 seconds), and concatenates these discrete data points according to a time sequence to generate real-time environmental parameter curves for the current terminal device and various reference terminal devices. By limiting the sampling frequency and the length of the preset time window, it ensures that the real-time environmental parameter curves generated by all devices are perfectly aligned in terms of time period and number of data points, providing a standardized basis for subsequent distance calculations and difference analysis between curves.
[0021] Step S2: Analyze the differences in the real-time environmental parameter curves between the current terminal device and the reference terminal device to determine the dynamic tampering risk value of the current terminal device, which is used to determine whether anti-tampering detection is triggered.
[0022] In normal surveillance and augmented reality operations, AR cameras of the same type with similar physical locations and configurations should exhibit a high degree of consistency in system computing power expenditure when processing lighting changes, environmental perception, and video stream encoding within the same time period (i.e., similar curve trends and fluctuations). When attackers hijack terminals and attempt to fabricate false CPU and memory fluctuations to circumvent routine server checks, the fabricated parameters are typically based on a pre-set random fluctuation model, which cannot match the instantaneous workload of the real environment. Therefore, by horizontally calculating the differences in changes in real-time environmental parameter curves between the current terminal device and a reference terminal device (such as outlier distance), it is possible to capture this anomaly where fabricated parameters are disconnected from real-world business operations, thereby determining the dynamic tampering risk value of the current terminal device.
[0023] Preferably, in one embodiment of the present invention, the method for obtaining the dynamic tampering risk value includes: Calculate the dynamic time warping distance between the real-time environmental parameter curves of the current terminal device and each reference terminal device under each environmental parameter, and use it as a distance factor. The larger the distance factor, the more significant the difference between the fluctuation trajectory of the current terminal device and the reference terminal device under each environmental parameter.
[0024] The average distance factor between the current terminal device and each reference terminal device under all types of environmental parameters is taken as the first average distance, and the average of the first average distance between the current terminal device and all reference terminal devices is taken as the first average characteristic value. The larger the first average characteristic value, the more the current terminal device deviates from the consensus characteristics of the normal device group in the overall environmental state, and the stronger its outlier attribute.
[0025] Then, establish a reasonable fluctuation baseline for the reference terminal device group at the current moment: among the reference terminal devices, calculate the dynamic time-normalized distance between the real-time curves of the environmental parameters of any two reference terminal devices under each environmental parameter, and use it as a distance parameter. Take the average of the distance parameters of any two reference terminal devices under all types of environmental parameters as the second average distance. Take the average of the second average distances between all reference terminal devices as the second average characteristic value. The larger the value of the second average characteristic value, the more complex the current environment or the greater the natural differences between normal devices; the smaller the value, the more consistent the performance of the normal group at the current moment (low background noise).
[0026] Finally, the absolute value of the difference between the first and second mean eigenvalues is calculated and normalized to obtain the dynamic tampering risk value of the current terminal device. The larger the absolute value of the difference, the greater the deviation between the current terminal device and normal physical fluctuations, and therefore the greater the dynamic tampering risk value, and the greater the likelihood that the current terminal device has been tampered with. The normalization here can use maximum and minimum value normalization, where the maximum and minimum values can be obtained from a secure operation database in the cloud or locally. This database stores a large number of absolute value samples of differences accumulated by similar AR network cameras under long-term normal operation and simulated attack testing conditions.
[0027] After obtaining the dynamic tampering risk value of the current terminal device, this indicator can be used to determine whether anti-tampering detection needs to be triggered.
[0028] Preferably, in one embodiment of the present invention, determining whether anti-tampering detection is triggered includes: Based on the foregoing analysis, the higher the dynamic tampering risk value, the greater the possibility that the current terminal device is being tampered with. Therefore, if the dynamic tampering risk value of the current terminal device is greater than or equal to the preset risk threshold, anti-tampering detection is triggered. Conversely, if the dynamic tampering risk value of the current terminal device is less than the preset risk threshold, dynamic monitoring continues, and it is determined whether the time interval between the current moment and the last time the anti-tampering detection was triggered reaches the preset period threshold. If the preset period threshold is reached, anti-tampering detection is triggered.
[0029] It should be noted that in this embodiment of the present invention, the preset risk threshold can be set to 0.6 and the preset period threshold can be set to 3 hours, which represents the longest trust time window for the current normal state of the terminal device without active physical response verification. The specific values can be adjusted according to the implementation scenario and are not limited here.
[0030] Step S3: If anti-tampering detection is triggered, the difficulty factor is determined based on the dynamic tampering risk value and remaining computing power of the current terminal device, and a lightweight task matching the difficulty factor is randomly selected and sent to the current terminal device.
[0031] When anti-tampering detection is triggered, a lightweight task can be set to be executed by the current terminal device. The incremental score of the current terminal device's environmental state performance during the execution of the lightweight task is expected and compared with the actual incremental score of the environmental state performance to determine the severity of the tampering.
[0032] When distributing lightweight tasks, if the remaining computing power of the current terminal device is insufficient, blindly issuing high-load tasks can lead to terminal operating system crashes or severe frame drops in the video stream, impacting core business operations. The dynamic tampering risk value determines the likelihood of the current terminal device being tampered with; a higher value indicates that the terminal device may be controlled by a highly sophisticated spoofing script. If only extremely low-difficulty tasks (such as calculating the hash of a very small file) are issued, the resulting increase in CPU overhead is negligible and easily masked by the fluctuations and noise of the normal video stream, making it impossible to effectively verify authenticity. Only issuing more difficult tasks can force the hardware to generate significant and difficult-to-mask power consumption spikes. Therefore, combining the aforementioned two characteristics to calculate a difficulty factor is used to randomly select lightweight tasks to issue to the current terminal device in subsequent processes.
[0033] Preferably, in one embodiment of the present invention, the method for obtaining the difficulty factor includes: The CPU utilization rate and the preset necessary redundancy ratio of the current terminal device at the current moment are obtained. The necessary redundancy ratio is the computing power buffer pool, which is usually set to 10%. Then, the CPU utilization rate and the necessary redundancy ratio are subtracted from the total computing power of the current terminal device to obtain the remaining computing power of the current terminal device.
[0034] Finally, the dynamic tampering risk value of the current terminal device is multiplied by the remaining computing power, and the product is used as the difficulty factor. Based on the above analysis, it can be seen that the larger the difficulty factor, the stronger the remaining computing power of the current terminal device's CPU, and the greater the possibility that the current terminal device is tampered with. Therefore, it is more necessary to execute a lightweight task with higher difficulty, so that the physical reaction of security verification is more significant.
[0035] When a lightweight task of unknown type is randomly issued from the task library, the attacker's forged script cannot predict and accurately calculate the instantaneous CPU and memory power consumption characteristics corresponding to this lightweight task in advance. Therefore, in this embodiment of the present invention, by introducing this unpredictable randomness, the current terminal device is forced to make a real physical response.
[0036] It should be noted that in this embodiment of the invention, the total computing power of the current terminal device is 1. The system pre-defines the difficulty level of all lightweight tasks and sets a corresponding difficulty factor value matching interval for each difficulty level. The difficulty level adapted to the current terminal device is determined by judging the corresponding value matching interval into which the calculated difficulty factor value falls. Then, a specific lightweight task is randomly selected from the set of lightweight tasks of the same difficulty level and sent to the current terminal device for execution.
[0037] Step S4: Based on the type of lightweight task, the real-time curve of the environmental parameters of the current terminal device, and the difficulty factor, predict the expected state increment score when the current terminal device performs the lightweight task; obtain the environmental parameter curve and video stream parameters of the current terminal device during the execution of the lightweight task; compare the video stream parameters with the historical parameters of the video stream in the preset historical window, and compare the environmental parameter curve with the environmental parameter comparison curve in the preset historical window, thereby calculating the actual state increment score of the current terminal device.
[0038] Since the server operates in a secure and trustworthy environment, when the server issues a lightweight task to the current terminal device, it can predict the expected state increment score of the current terminal device when executing the lightweight task based on the type of lightweight task, the real-time curve of the environmental parameters of the current terminal device, and the difficulty factor. This score represents the real and normal resource consumption that the current terminal device should have when executing the lightweight task.
[0039] Preferably, in one embodiment of the present invention, the method for obtaining the expected state increment score includes: One-hot encoding is performed on the types of lightweight tasks to obtain task type vectors, which are used to eliminate the ambiguity of numerical magnitude when calculating discrete classification data.
[0040] At this point, the task type vector determines the basic overhead characteristics of the algorithm's computational logic, the real-time curve of the current terminal device's environmental parameters provides the basic data load, and the difficulty factor determines the resource consumption scale of the task. Therefore, the task type vector, the real-time curve of the current terminal device's environmental parameters, and the difficulty factor are concatenated and input into the pre-trained deep model to output the expected average increment corresponding to each environmental parameter.
[0041] Finally, based on the preset environmental parameter weights, the expected average increments corresponding to each environmental parameter are weighted and summed, and the resulting weighted result is used as the expected state increment score when the current terminal device performs a lightweight task. That is, the expected average increment corresponding to each environmental parameter is multiplied by the corresponding preset environmental parameter weight, and the sum of the products corresponding to all environmental parameters is used as the expected state increment score.
[0042] In this embodiment of the invention, the environmental parameters include two types: CPU utilization rate and physical memory utilization rate of the terminal device. Since CPU utilization rate is more sensitive, its corresponding preset environmental parameter weight is set to 0.6, and the preset environmental parameter weight corresponding to physical memory utilization rate is set to 0.4.
[0043] It should be noted that the training process of neural networks is a well-known technique, and the specific process will not be described in detail here.
[0044] During the execution of lightweight tasks on the current terminal device, environmental parameter curves and video stream parameters of various environmental parameters are acquired. In this embodiment of the present invention, the video stream parameters include the resolution, frame rate, single frame size, color depth, etc. of the AR camera.
[0045] Because similar video streams require similar computational power for their parameters under normal monitoring conditions, the environmental state parameters generated by terminal devices also exhibit similar behavior under similar parameters. To eliminate the portion of environmental state parameters collected by the current terminal device used for video stream calculations, this embodiment of the invention performs similarity analysis with video stream parameters and environmental parameters from a preset historical window (when lightweight calculation tasks are not performed) to determine the actual state increment score of the current terminal device.
[0046] Preferably, in one embodiment of the present invention, the method for obtaining the actual state increment score includes: The preset history window length is the same as the time taken for the current terminal device to perform a lightweight task.
[0047] This analysis examines the similarity between the video stream parameters of the current terminal device during lightweight task execution and the historical video stream parameters within a preset historical window, thereby selecting a reference window from all preset historical windows. For each video stream parameter, the cosine similarity between the sequence of video stream parameters of the current terminal device during lightweight task execution and the sequence of video stream parameters within each preset historical window is calculated and normalized. Since the cosine similarity value ranges from -1 to 1, the normalization process here can use the formula... , where x represents the independent variable, and obtains the similarity factor between the current terminal device and each preset historical window during the execution of a lightweight task. The larger the similarity factor, the more consistent the data state of the current terminal device during the execution of a lightweight task is with the data state of that preset historical window.
[0048] Since single-parameter similarity cannot represent the same overall computing power consumption, the average of the similarity factors between the current terminal device and each preset historical window under all video stream parameters during the execution of lightweight tasks is used as the similarity index, and then the preset historical window corresponding to the maximum similarity index is used as the reference window.
[0049] Then, under each environmental parameter, the difference between the environmental parameter curve of the current terminal device during the execution of a lightweight task and the environmental parameter comparison curve in the reference window at the same time number is calculated and used as the difference factor. The data values at the same time number are subtracted to ensure time alignment. The mean of all non-negative difference factors is used as the actual increment of the current terminal device under each environmental parameter.
[0050] Finally, based on the preset environmental parameter weights, the actual increments of the current terminal device at each environmental parameter are weighted and summed, and the resulting weighted result is used as the actual state increment score of the current terminal device.
[0051] It should be noted that in this embodiment of the present invention, the environmental parameters include two types: CPU utilization rate and physical memory utilization rate of the terminal device. Since CPU utilization rate is more sensitive, its corresponding preset environmental parameter weight is set to 0.6, and the preset environmental parameter weight corresponding to physical memory utilization rate is set to 0.4.
[0052] Step S5: Compare the score difference between the expected state increment score and the actual state increment score to determine the current tampered state of the terminal device and trigger the corresponding security measures.
[0053] In step S4, the expected state increment score and the actual state increment score should be relatively close in value if there is no hijacking or tampering. Therefore, in this step, the score difference between the expected state increment score and the actual state increment score can be compared to determine the tampering status of the current terminal device.
[0054] Preferably, in one embodiment of the present invention, determining the tampering status of the current terminal device includes: Since the expected state increment score is a theoretical value and the actual state increment score is a measured value, the difference between the two directly reflects the error magnitude of the current terminal device in a tampered state. Therefore, the absolute value of the difference between the expected state increment score and the actual state increment score corresponding to the current terminal device is calculated and normalized to obtain the tampering probability of the current terminal device. The higher the tampering probability, the higher the possibility that the current terminal device has been tampered with. The normalization here can use maximum and minimum value normalization, where the maximum and minimum values can be obtained from a secure operation database in the cloud or locally. This database stores a large sample set of "absolute values of the difference between the expected state increment score and the actual state increment score" accumulated by similar AR network cameras in historical anti-tampering detection and security confrontation tests.
[0055] If the tampering probability is greater than or equal to the preset tampering probability threshold, the current terminal device is determined to be in a tampered or hijacked state; if the tampering probability is less than the preset tampering probability threshold, the current terminal device is determined to be in a normal state.
[0056] It should be noted that the preset tampering probability threshold is set to a range of (0.6, 1), and in this embodiment of the invention, the specific value can be set to 0.75.
[0057] Once the tampering status of the current terminal device is determined, the corresponding security measures can be triggered.
[0058] Preferably, in one embodiment of the present invention, triggering the corresponding security measures includes: If the current terminal device is tampered with or hijacked, security measures include at least one of interrupting video stream acquisition, disconnecting network interfaces, or restoring factory settings to physically block the transmission of untrusted data and prevent business contamination in a timely manner, thus preventing the attack from spreading laterally in the network; if the current terminal device is in a normal state, logs are recorded and dynamic monitoring is continuously performed.
[0059] In summary, the first step is to obtain the real-time environmental parameter curves of the current terminal device and a reference terminal device. If the environmental state obtained by the terminal device differs significantly from that of surrounding terminal devices, it usually indicates a high risk of tampering. Therefore, the dynamic tampering risk value is determined by analyzing the differences in the real-time environmental parameter curves between the current and reference terminal devices. This dynamic tampering risk value is then used as the basis for determining whether to trigger anti-tampering detection. When anti-tampering detection is triggered, the difficulty factor is determined based on the dynamic tampering risk value and remaining computing power of the current terminal device. This ensures that the difficulty of the detection task matches the current security threat level and resource carrying capacity of the device. A lightweight task matching the difficulty factor is randomly selected and sent to the current terminal device. Based on the type of lightweight task, the real-time environmental parameter curve of the current terminal device, and the difficulty factor, the expected state increment score when the current terminal device executes the lightweight task is predicted, providing a benchmark for subsequent anomaly detection and improving the accuracy of tampering detection. Furthermore, by comparing the video stream parameters during lightweight tasks with historical video stream parameters within a preset historical window, and simultaneously comparing the environmental parameter curve with the environmental parameter comparison curve within the preset historical window, the actual state increment score is calculated. This allows for a comprehensive evaluation of the device's true response under detection tasks from both video stream and environmental parameter dimensions. Finally, by comparing the score difference between the expected state increment score and the actual state increment score, the current tampering status of the terminal device is determined. This allows for a precise distinction between normal state fluctuations and genuine tampering behavior by quantifying the score difference, and the tampering status is determined based on the score difference to trigger corresponding security measures.
[0060] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A method for preventing tampering with AR network cameras based on a secure agent mechanism, characterized in that, The method includes: Obtain real-time curves of environmental parameters for the current terminal device and a reference terminal device; Analyze the differences in the real-time environmental parameter curves between the current terminal device and the reference terminal device to determine the dynamic tampering risk value of the current terminal device, which is used to determine whether anti-tampering detection is triggered. If anti-tampering detection is triggered, the difficulty factor is determined based on the dynamic tampering risk value and remaining computing power of the current terminal device, and a lightweight task matching the difficulty factor is randomly selected and sent to the current terminal device. Based on the type of lightweight task, the real-time curve of the environmental parameters of the current terminal device, and the difficulty factor, the expected state increment score of the current terminal device when performing the lightweight task is predicted; the environmental parameter curve and video stream parameters of the current terminal device during the execution of the lightweight task are obtained; the video stream parameters are compared with the historical parameters of the video stream in the preset historical window, and the environmental parameter curve is compared with the environmental parameter comparison curve in the preset historical window, thereby calculating the actual state increment score of the current terminal device; By comparing the score difference between the expected state increment score and the actual state increment score, the tampering state of the current terminal device is determined, and corresponding security measures are triggered.
2. The method for preventing tampering with AR network cameras based on a secure agent mechanism according to claim 1, characterized in that, The method for obtaining the dynamic tampering risk value includes: Calculate the dynamic time-warped distance between the real-time environmental parameter curves of the current terminal device and each reference terminal device under each environmental parameter, and use it as a distance factor; The average distance factor between the current terminal device and each reference terminal device under all types of environmental parameters is taken as the first average distance, and the average of the first average distance between the current terminal device and all reference terminal devices is taken as the first average characteristic value. In the reference terminal device, the dynamic time warping distance between the real-time curves of the environmental parameters of any two reference terminal devices under each environmental parameter is calculated as the distance parameter. The average of the distance parameters of any two reference terminal devices under all types of environmental parameters is used as the second average distance. The average of the second average distances between all reference terminal devices is used as the second average characteristic value. The absolute value of the difference between the first mean feature value and the second mean feature value is calculated and normalized to obtain the dynamic tampering risk value of the current terminal device; wherein, the reference terminal device is a device of the same type as the current terminal device, and the types of environmental parameters include CPU utilization and physical memory utilization.
3. The method for preventing tampering of AR network cameras based on a secure agent mechanism according to claim 1, characterized in that, The determination of whether anti-tampering detection is triggered includes: If the dynamic tampering risk value of the current terminal device is greater than or equal to the preset risk threshold, anti-tampering detection is triggered; if the dynamic tampering risk value of the current terminal device is less than the preset risk threshold, dynamic monitoring continues, and it is determined whether the time interval between the current moment and the last time the anti-tampering detection was triggered reaches the preset period threshold. If the preset period threshold is reached, anti-tampering detection is triggered.
4. The method for preventing tampering with AR network cameras based on a secure agent mechanism according to claim 1, characterized in that, The methods for obtaining the difficulty factor include: Obtain the CPU utilization rate of the current terminal device at the current moment and the preset necessary redundancy ratio; Subtract the CPU utilization rate from the total computing power of the current terminal device, and then subtract the necessary redundancy ratio to obtain the remaining computing power of the current terminal device; Multiply the current dynamic tampering risk value of the terminal device by the remaining computing power, and use the product as the difficulty factor.
5. The method for preventing tampering with AR network cameras based on a secure agent mechanism according to claim 1, characterized in that, The method for obtaining the expected state increment score includes: The types of lightweight tasks are processed by one-hot encoding to obtain a task type vector; The task type vector, the real-time curve of the current terminal device's environmental parameters, and the difficulty factor are concatenated and input into a pre-trained deep model, which outputs the expected average increment corresponding to each environmental parameter. Based on the preset environmental parameter weights, the expected average increments corresponding to each environmental parameter are weighted and summed, and the resulting weighted result is used as the expected state increment score when the current terminal device performs a lightweight task.
6. The method for preventing tampering of AR network cameras based on a secure agent mechanism according to claim 1, characterized in that, The method for obtaining the actual state increment score includes: The length of the preset history window is the same as the time taken for the current terminal device to execute a lightweight task; The similarity between the video stream parameters of the current terminal device during the execution of lightweight tasks and the video stream historical parameters in the preset historical window is analyzed, thereby filtering out the reference window from all preset historical windows; Under each environmental parameter, the difference between the environmental parameter curve of the current terminal device during the execution of a lightweight task and the environmental parameter comparison curve in the reference window at the same time number is calculated as the difference factor. The mean of all non-negative difference factors is taken as the actual increment of the current terminal device under each environmental parameter. Based on the preset environmental parameter weights, the actual increments of the current terminal device at each environmental parameter are weighted and summed, and the resulting weighted result is used as the actual state increment score of the current terminal device.
7. The method for preventing tampering of AR network cameras based on a secure agent mechanism according to claim 6, characterized in that, The method for obtaining the reference window includes: For each video stream parameter, the cosine similarity between the sequence of video stream parameters of the current terminal device during the execution of a lightweight task and the sequence of video stream historical parameters in each preset historical window is calculated and normalized to obtain the similarity factor between the current terminal device during the execution of a lightweight task and each preset historical window. The average similarity factor between the current terminal device and each preset historical window under all video stream parameters during the execution of lightweight tasks is used as the similarity index, and the preset historical window corresponding to the maximum similarity index is used as the reference window.
8. The method for preventing tampering of AR network cameras based on a secure agent mechanism according to claim 1, characterized in that, Determining the current tampering status of the terminal device includes: Calculate the absolute value of the difference between the expected state increment score and the actual state increment score corresponding to the current terminal device and perform normalization processing to obtain the tampering probability of the current terminal device; If the tampering probability is greater than or equal to a preset tampering probability threshold, the current terminal device is determined to be in a tampered or hijacked state; if the tampering probability is less than the preset tampering probability threshold, the current terminal device is determined to be in a normal state.
9. The method for preventing tampering of AR network cameras based on a secure agent mechanism according to claim 8, characterized in that, The corresponding security measures for triggering include: If the current terminal device is in a state of being tampered with or hijacked, security measures include at least one of the following: interrupting video stream acquisition, disconnecting the network interface, or restoring factory settings. If the terminal device is currently in a normal state, logs will be recorded and dynamic monitoring will be continuously performed.
10. The method for preventing tampering of AR network cameras based on a secure agent mechanism according to claim 8, characterized in that, The preset tampering probability threshold ranges from (0.6, 1).