Monitoring data storage method and device, storage medium and electronic equipment
By dynamically scheduling PTZ motion and using intelligent encoding technology, the sampling interval and frame rate are adjusted according to the monitoring level, solving the problem of wasted storage of duplicate images in AOR PTZ camera recordings, and achieving efficient storage and extended hardware lifespan.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-10
- Publication Date
- 2026-04-03
AI Technical Summary
Existing AOR PTZ cameras record a large amount of repetitive, static, and eventless low-value footage, resulting in wasted storage space and severe wear and tear on the mechanical structure.
By dynamically scheduling the movement of the PTZ, introducing a low-repetition sampling mode and intelligent coding technology, the sampling interval and frame number are dynamically adjusted according to the monitoring level, saving only key frames and difference data, reducing redundant storage and mechanical rotation.
Significantly reduces invalid storage usage, extends hardware lifespan, and improves storage space utilization and anomaly detection efficiency.
Smart Images

Figure CN121785530A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computers, and more specifically, to a method, apparatus, storage medium, and electronic device for storing monitoring data. Background Technology
[0002] In related technologies, AOR (Always On Recording) PTZ cameras, which operate continuously while plugged in, can record 24 / 7, eliminating concerns about battery life. Existing AOR PTZ cameras mostly use preset position rotation; however, their rotation paths and schedules are often fixed and preset. Continuous recording at each preset position results in the generated footage containing a large amount of repetitive, static, and eventless low-value footage, significantly wasting storage space.
[0003] This reveals the technical problems existing in the relevant technologies.
[0004] There is currently no effective solution to the aforementioned problems in the relevant technologies. Summary of the Invention
[0005] This application provides a method, apparatus, storage medium, and electronic device for storing monitoring data, so as to at least solve the technical problem of ineffective utilization of storage space in related technologies.
[0006] According to one aspect of the embodiments of this application, a method for storing monitoring data is provided, comprising: determining the monitoring level of a target sub-region currently being monitored by a target device, wherein the target region includes a plurality of target sub-regions; determining, based on the monitoring level, a sampling interval and a number of sampling frames for the target device to sample the target sub-region, wherein when the pan-tilt unit in the target device is at a target position, the area monitored by the target device is the target sub-region; controlling the target device to capture images of the target sub-region according to the sampling interval and the number of sampling frames to obtain a monitoring image; determining monitoring data based on a first frame image and other frames included in the monitoring image, wherein the monitoring data includes the first frame image and difference data between adjacent images included in the monitoring image; and storing the monitoring data.
[0007] In one exemplary embodiment, determining the monitoring level of a target sub-region currently monitored by a target device includes: determining a target score for the location attribute of the target sub-region; determining the first number of times the target device detected a target object in the target sub-region within a historical period; and determining the monitoring level based on the target score and the first number of times.
[0008] In an exemplary embodiment, determining the sampling interval and number of sampling frames for the target device to sample the target sub-region based on the monitoring level includes: determining the correspondence between the target monitoring level and the target sampling interval and the target number of sampling frames; determining the remaining number of rotations of the target device; and determining the sampling interval and the number of sampling frames based on the correspondence and the remaining number of rotations.
[0009] In an exemplary embodiment, determining the sampling interval and the number of sampling frames based on the correspondence and the remaining number of rotations includes: determining the sampling interval and the initial number of sampling frames for the monitoring level based on the correspondence; determining the initial number of sampling frames as the number of sampling frames when the remaining number of rotations is greater than or equal to a preset number of rotations; and multiplying the initial number of sampling frames by a target coefficient to obtain an updated number of sampling frames when the remaining number of rotations is less than the preset number of rotations, and determining the updated number of sampling frames as the number of sampling frames, wherein the target coefficient is a coefficient greater than 1.
[0010] In an exemplary embodiment, determining the monitoring level of a target sub-region currently monitored by a target device includes: determining a first relationship between the current time and a preset time period; determining the noise audio collected by the target device; determining the second number of times the target device detected the target object within a first preset time period; determining the event occurrence rate of the target sub-region within a historical time period; determining the risk level of the target sub-region based on the first relationship, the noise audio, the second number of times, and the event occurrence rate; and determining the monitoring level of the target sub-region currently monitored by the target device if the risk level is a first level.
[0011] In an exemplary embodiment, determining the risk level of the target sub-region based on the first relationship, the noise audio, the second number of occurrences, and the event occurrence rate includes: determining the risk level as a first level when the first relationship indicates that the current time is outside the preset time period, the intensity of the noise audio is less than a first preset threshold, the second number of occurrences is less than a second preset threshold, and the event occurrence rate is less than a third preset threshold; the preset time period is a time period in which the activity of the monitored object is less than a preset activity level; and determining the risk level as a second level when at least one of the following conditions is met: the first relationship indicates that the current time is within the preset time period, the intensity of the noise audio is greater than or equal to the first preset threshold, the second number of occurrences is greater than or equal to the second preset threshold, and the event occurrence rate is greater than or equal to the third preset threshold.
[0012] In one exemplary embodiment, the method further includes: if the risk level is a second level, determining the target object in the target sub-region and tracking the target object.
[0013] In an exemplary embodiment, determining monitoring data based on a first frame image and other frames included in the monitoring image includes: performing a target operation on each of the i-th frame images included in the other frame images to determine monitoring sub-data of the i-th frame image, where i is an integer greater than or equal to 1; determining the monitoring sub-data of the first frame image and all the other frame images as the monitoring data; the target operation includes: determining the target number of images existing between the i-th frame image and a target keyframe, where the target keyframe is a keyframe located before the i-th frame image and most recently captured with the i-th frame image; when i = 1, the target keyframe... The first frame image is defined as follows: if the number of targets is greater than a preset number of frames, the i-th frame image is defined as a key frame and the i-th frame image is defined as the monitoring sub-data; if the number of targets is less than the preset number of frames, the image change rate between the i-th frame image and the previous frame image is determined; if the image change rate is less than a preset change rate, the difference data between the i-th frame image and the previous frame image is determined, and the difference data is defined as the monitoring sub-data; if the image change rate is greater than the preset change rate, the i-th frame image is defined as a key frame and the i-th frame image is defined as the monitoring sub-data.
[0014] In one exemplary embodiment, the method further includes: determining at least one collaborating device adjacent to the target device and the working status information of the collaborating device; determining a second area of the collaborating device based on the working status information, wherein the second area is a blind spot of the collaborating device or an area where the monitoring effect of the collaborating device does not meet preset conditions; and adjusting the target area of the target device to cover the second area.
[0015] According to another aspect of the embodiments of this application, a monitoring data storage device is also provided, comprising: a first determining module, configured to determine the monitoring level of a target sub-region currently monitored by a target device, wherein the target region includes a plurality of target sub-regions; a second determining module, configured to determine, based on the monitoring level, the sampling interval and the number of sampling frames for the target device to sample the target sub-region, wherein when the pan-tilt unit in the target device is at the target position, the area monitored by the target device is the target sub-region; a control module, configured to control the target device to capture images of the target sub-region according to the sampling interval and the number of sampling frames, thereby obtaining a monitoring image; a third determining module, configured to determine monitoring data based on a first frame image and other frames included in the monitoring image, wherein the monitoring data includes the first frame image and difference data between adjacent images included in the monitoring image; and a storage module, configured to store the monitoring data.
[0016] According to another aspect of the embodiments of this application, a computer-readable storage medium is also provided, wherein a computer program is stored therein, wherein the computer program is configured to perform the steps in any of the above method embodiments when executed by a processor.
[0017] According to another aspect of the embodiments of this application, a computer program product or computer program is provided, the computer program product or computer program including computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, causing the computer device to perform the steps in any of the method embodiments described above.
[0018] According to another aspect of the embodiments of this application, an electronic device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to perform the steps of any of the above method embodiments through the computer program.
[0019] This application allows for the determination of the monitoring level of the currently monitored target sub-region. Based on the monitoring level, the sampling interval and number of sampling frames for this target sub-region can be determined. This enables the target device to capture images of the target sub-region according to the sampling interval and number of sampling frames, thus obtaining monitoring images. Furthermore, during the process of saving the monitoring data formed from the monitoring images, the difference data between the first frame and adjacent frames in other frames can be saved. Since the sampling interval and number of sampling frames for each target sub-region can be determined based on the monitoring level, and given that the pan-tilt unit in the target device is at the target location, the area monitored by the target device is the target sub-region. In other words, after the pan-tilt unit in the target device continuously captures N images at each target location (indicated by the number of sampling frames), it rotates from one target location to another. The target sub-region monitored by the target device also becomes a different target sub-region. This means the sampling interval and number of sampling frames are not entirely the same for each target sub-region. The rotation of the target device can be bound to the number of sampling frames, rather than a fixed time, allowing for adaptive adjustment of the number of captured images. This avoids the problem of wasteful storage space caused by continuous recording for a fixed time in each area, resulting in a large number of repetitive, static, and eventless low-value images in the monitoring images. Furthermore, encoding the first frame of the monitoring image (i.e., the aforementioned first frame image) as a keyframe and saving it completely, while subsequent frames (i.e., the aforementioned other frames image) are used as prediction frames, retaining only the difference data between the first and previous frames. Compared to related technologies that repeatedly save complete images, this maximizes storage space compression. Therefore, it addresses the technical problem of inefficient storage space utilization in related technologies, achieving improved storage space utilization. Attached Figure Description
[0020] Figure 1 This is a schematic diagram illustrating an application scenario of a method for storing monitoring data according to an embodiment of this application;
[0021] Figure 2 This is a flowchart illustrating an optional method for storing monitoring data according to an embodiment of this application;
[0022] Figure 3 This is a schematic diagram of the high-risk model decision-making process according to an embodiment of this application;
[0023] Figure 4 This is a schematic diagram of the process for storing monitoring data in this optional example;
[0024] Figure 5 This is a structural block diagram of an optional monitoring data storage device according to an embodiment of this application;
[0025] Figure 6This is a computer system architecture block diagram of an optional electronic device according to an embodiment of this application. Detailed Implementation
[0026] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.
[0027] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0028] According to one aspect of the embodiments of this application, a method for storing monitoring data is provided. Optionally, in this embodiment, the above-described method for storing monitoring data may be applied to, but is not limited to, methods such as... Figure 1 The hardware environment shown includes terminal device 102 and server 104. Server 104 can be connected to terminal device 102 via a network and can be used to provide services (e.g., application services, etc.) to terminal device 102 or clients installed on terminal device 102. A database can be set up on server 104 or independently of server 104 to provide data storage services for server 104.
[0029] The aforementioned network may include, but is not limited to, at least one of the following: wired network and wireless network. The aforementioned wired network may include, but is not limited to, at least one of the following: wide area network (WAN), metropolitan area network (MAN), and local area network (LAN). The aforementioned wireless network may include, but is not limited to, at least one of the following: Wireless Fidelity (WIFI) and Bluetooth. Terminal device 102 may be, but is not limited to, a personal computer (PC), mobile phone, tablet computer, etc. Server 104 may be, but is not limited to, a cloud server, server cluster, or other server types.
[0030] The monitoring data storage method of this application embodiment can be executed by server 104, terminal device 102, or jointly by server 104 and terminal device 102. Alternatively, the monitoring data storage method of this application embodiment can be executed by a client installed on the terminal device 102.
[0031] Figure 2 This is a flowchart illustrating an optional method for storing monitoring data according to an embodiment of this application, as shown below. Figure 2 As shown, the process of this method may include the following steps:
[0032] Step S202: Determine the monitoring level of the target sub-region currently being monitored by the target device, wherein the target region includes multiple target sub-regions;
[0033] The data storage method described in this embodiment can be applied to fields such as public safety and urban monitoring, financial institutions and confidential locations, and is suitable for scenarios with high requirements for continuous monitoring, intelligent analysis, and resource optimization. AOR (Always On Recording) PTZ cameras, which operate continuously with power, can record 24 / 7, eliminating concerns about battery life. However, most traditional AOR PTZ cameras have significant drawbacks in their operating modes: many cameras remain stationary for extended periods after recording begins, functioning only as static cameras, completely wasting the PTZ's mobility. This results in a narrow field of view, requiring more cameras to cover the same area, significantly increasing system costs. Furthermore, while some cameras support preset position rotation, their patrol paths and schedules are often fixed and preset, lacking intelligent response. More importantly, continuous recording at each preset position results in a large amount of repetitive, static, and event-free low-value footage, wasting significant storage space. Secondly, frequent PTZ start-up and shutdown accelerate mechanical wear and reduce equipment lifespan. Furthermore, due to rigid monitoring strategies, key information in massive amounts of video recordings is overwhelmed by redundant data, making it extremely difficult to retrieve abnormal events afterward, thus wasting manpower and time.
[0034] To at least partially address the aforementioned technical issues, this application maximizes the information value density of surveillance recordings per unit time by dynamically scheduling PTZ movement, introducing an innovative low-repetition sampling mode, and employing intelligent encoding technology. This significantly reduces invalid storage usage, extends PTZ hardware lifespan, and improves the efficiency of anomaly detection and recording. In other words, this application uses an intelligent scheduling center to dynamically switch between an event-driven high-response mode and an adaptive low-wear panoramic coverage mode based on real-time risk assessment. The panoramic coverage mode, through a series of innovative methods such as non-repetitive spatial sampling, intelligent frame encoding, and configurable rotation intervals, fundamentally eliminates data redundancy during low-risk periods and significantly reduces PTZ mechanical wear, thereby achieving systematic and intelligent management of storage resources and hardware lifespan.
[0035] In the above embodiments, the monitored space (i.e., the target area) can first be divided into M partitions (i.e., the target sub-regions) according to the preset viewing angle width (e.g., 60°, 55°, etc.) of the target device. For each target sub-region, the target device rotates to the center of the partition and remains stable before starting to acquire images. After acquiring images at this position, the pan-tilt unit rotates to the next adjacent partition (i.e., the next target sub-region). The target device can be a pan-tilt unit, a camera, a monitoring device, etc. The intelligent dispatch center module can comprehensively determine the monitoring level of the target sub-region currently being monitored by the target device based on multiple factors. For example, if the target device detects the target object more times in this target sub-region within this historical period, the monitoring level of this target sub-region can be determined as high level.
[0036] Step S204: Based on the monitoring level, determine the sampling interval and number of sampling frames for the target device to sample the target sub-region, wherein when the pan-tilt unit in the target device is at the target position, the area monitored by the target device is the target sub-region;
[0037] In the above embodiments, the sampling interval and number of sampling frames for target sub-regions differ under different monitoring levels, and even the sampling interval and number of sampling frames for different target sub-regions within the same level are not entirely the same. Furthermore, when the PTZ is at the target location, the target device continuously acquires N (number of sampling frames) images of the target sub-region at the frequency indicated by the sampling interval. The PTZ can then rotate to another target location, thereby driving the target device to rotate to another target sub-region for monitoring. When the intelligent dispatch center module determines that the monitoring level of the target sub-region is high, the sampling interval can be set to 1 second, or even 0.1 seconds, to ensure complete target tracking, and the number of sampling frames can be 10 frames, etc.
[0038] Step S206: Control the target device to capture images of the target sub-region according to the sampling interval and the number of sampling frames to obtain a monitoring image;
[0039] In the above embodiments, the sampling period T (i.e., the sampling interval) and the rotation interval N (i.e., the number of sampling frames) are two key parameters that jointly determine the movement and sampling behavior of the target device. Specifically, the sampling period T controls the frequency of image sampling, while the rotation interval N controls the frequency of the target device's rotation. The sampling period T can be understood as the time interval between image sampling, i.e., one frame is collected every T seconds (e.g., T = 2 seconds, then one frame is collected every 2 seconds). The rotation interval N can be understood as the number of frames continuously collected by the target device at each stationary point. That is, the target device (pan-tilt unit) collects N frames at the same geographical location before rotating to the next location. In other words, in low-risk mode, the pan-tilt unit can be controlled to continuously collect N frames at each stationary point before rotating to the next stationary point, where N ≥ 2. Through these steps, the problem of severe storage space waste caused by low data value density in AOR mode can be solved, greatly improving storage space utilization. Furthermore, decoupling the pan-tilt unit's rotation frequency from the image sampling frequency can significantly reduce invalid pan-tilt unit rotations and the number of mechanical rotations, extending the hardware's lifespan.
[0040] Step S208: Determine monitoring data based on the first frame image and other frame images included in the monitoring image, wherein the monitoring data includes the first frame image and the difference data between adjacent images included in the monitoring image;
[0041] In the above embodiment, after the target device rotates to the center of the target sub-region and remains stable, N frames of images (i.e. the above monitoring data) can be continuously acquired at this position. The acquired N frame image sequence can be efficiently encoded to store the difference data between the first frame image and adjacent images in other images.
[0042] Step S210: Store the monitoring data.
[0043] In the above embodiments, after acquiring multiple images, these images (i.e., the aforementioned monitoring data) can be stored. Specifically, the encoded first frame image can be completely saved as a keyframe (I-frame), and the subsequent N-1 frames can be saved as prediction frames (P-frames). The P-frames only store the differences between the image and the previous frame. The monitoring data includes only the complete first frame image and the differences between the multiple images (i.e., the aforementioned difference data). Through I / P frame technology, secondary data compression can be achieved while avoiding spatial repetition, resulting in extremely high storage efficiency.
[0044] This application allows for the determination of the monitoring level of the currently monitored target sub-region. Based on the monitoring level, the sampling interval and number of sampling frames for this target sub-region can be determined. This enables the target device to capture images of the target sub-region according to the sampling interval and number of sampling frames, thus obtaining monitoring images. Furthermore, during the process of saving the monitoring data formed from the monitoring images, the difference data between the first frame and adjacent frames in other frames can be saved. Since the sampling interval and number of sampling frames for each target sub-region can be determined based on the monitoring level, and given that the pan-tilt unit in the target device is at the target location, the area monitored by the target device is the target sub-region. In other words, after the pan-tilt unit in the target device continuously captures N images at each target location (indicated by the number of sampling frames), it rotates from one target location to another. The target sub-region monitored by the target device also becomes a different target sub-region. This means the sampling interval and number of sampling frames are not entirely the same for each target sub-region. The rotation of the target device can be bound to the number of sampling frames, rather than a fixed time, allowing for adaptive adjustment of the number of captured images. This avoids the problem of a large number of repetitive, static, and eventless low-value images in the monitoring images, which wastes a lot of storage space, resulting from continuous recording for a fixed time in each area. Furthermore, the first frame of the monitoring image (i.e., the aforementioned first frame image) is encoded as a keyframe and saved completely. Subsequent frames (i.e., the aforementioned other frames image) are encoded as prediction frames, retaining only the difference data between them and the previous frame image. Compared to related technologies that repeatedly save complete images, this can maximize storage space compression. Therefore, it addresses the technical problem of inefficient storage space utilization in related technologies, achieving the effect of improving storage space utilization.
[0045] Optionally, the entity performing the above steps may be a terminal, a server, or a client or other device with similar processing capabilities, but is not limited to these.
[0046] In one exemplary embodiment, determining the monitoring level of a target sub-region currently monitored by a target device includes: determining a target score for the location attribute of the target sub-region; determining the first number of times the target device detected a target object in the target sub-region within a historical period; and determining the monitoring level based on the target score and the first number of times.
[0047] In the above embodiments, the priority score (i.e., the monitoring level) of the target sub-area can be pre-set statically and then dynamically adjusted based on real-time analysis or historical data. Specifically, initial priority scores can be assigned to different target sub-areas based on the importance of the monitoring scenario. That is, the target score (i.e., the initial priority score) of different target sub-areas can be determined based on the location attributes of the target sub-areas. The location attributes can include entrance areas, corridor areas, open areas, and exit areas. Since the flow of people in different areas is different, the target score can be determined based on different location attributes. For example, entrance and exit areas will receive higher scores due to their high flow of people, such as 90 points and 80 points, while open areas or areas with less activity will receive lower scores, such as 50 points and 55 points. The impact on the monitoring level can also be determined by determining the first occurrence of the target in this target sub-area within a historical period. That is, if a target sub-area has frequent recent occurrences of targets, its monitoring level will be temporarily increased; conversely, areas with long-term inactivity will have their monitoring level decreased. The monitoring level can include high level, medium level, and low level.
[0048] In the above embodiments, after determining the target score and the first score, the monitoring level can be determined by combining the target score and the first score. This can be calculated using a weighted average, regression analysis, or sum method. For example, the weights of the target score and the first score can be 0.3 and 0.7, respectively. If the calculated total score is between 10 and 35, the monitoring level can be determined as low. If the calculated total score is between 36 and 80, the monitoring level can be determined as medium. If the score is between 81 and 100, the monitoring level can be determined as high.
[0049] By assigning target scores to the location attributes of each monitored sub-area and combining this with the frequency of target detection within historical periods, it is possible to intelligently identify which areas are more critical or where noteworthy events occur more frequently. This allows for more precise allocation of system resources (such as PTZ motion, recording frequency, and storage space), enabling focused monitoring of high-scoring areas and reducing resource investment in low-scoring areas, thereby improving overall monitoring efficiency and resource utilization.
[0050] In an exemplary embodiment, determining the sampling interval and number of sampling frames for the target device to sample the target sub-region based on the monitoring level includes: determining the correspondence between the target monitoring level and the target sampling interval and the target number of sampling frames; determining the remaining number of rotations of the target device; and determining the sampling interval and the number of sampling frames based on the correspondence and the remaining number of rotations.
[0051] In the above embodiments, the correspondence between the target monitoring level, the target sampling interval, and the target sampling frame number can be predetermined. That is, a low target monitoring level corresponds to one target sampling interval and target sampling frame number, while a medium target monitoring level corresponds to another. Different target monitoring levels correspond to different target sampling intervals and target sampling frame numbers. For example, a low target monitoring level corresponds to T <= 3 seconds, N >= 2, which could be T = 1s, N = 4; T = 2s, N = 3. A high target monitoring level corresponds to T > 3 seconds, N >= 1 (e.g., T = 5s, N = 2; T = 15s, N = 1). Therefore, after determining the monitoring level of the target sub-region, it can be compared with the target monitoring level, and the sampling interval and the sampling frame number can be selected based on the correspondence. Furthermore, the sampling interval and sampling frame number can also be adjusted according to the remaining rotation count of the target device. That is, if the remaining rotation count is small, the sampling frame number can be reduced and the sampling interval increased.
[0052] By closely linking monitoring levels with sampling strategies, and combining equipment health monitoring and adaptive adjustment capabilities, it not only improves monitoring efficiency but also optimizes hardware maintenance and storage costs, demonstrating its advanced nature and practicality in the field of intelligent monitoring.
[0053] In an exemplary embodiment, determining the sampling interval and the number of sampling frames based on the correspondence and the remaining number of rotations includes: determining the sampling interval and the initial number of sampling frames for the monitoring level based on the correspondence; determining the initial number of sampling frames as the number of sampling frames when the remaining number of rotations is greater than or equal to a preset number of rotations; and multiplying the initial number of sampling frames by a target coefficient to obtain an updated number of sampling frames when the remaining number of rotations is less than the preset number of rotations, and determining the updated number of sampling frames as the number of sampling frames, wherein the target coefficient is a coefficient greater than 1.
[0054] In the above embodiments, the sampling interval and sampling frame count can be determined through the correspondence and remaining rotation count. When the remaining rotation count of the target device is greater than or equal to the preset rotation count, it indicates that the target device is not excessively worn and can work normally. That is, the initial sampling frame count and sampling interval determined according to the monitoring level can be used as the sampling interval and sampling frame count of the target device in this target sub-region. The remaining rotation count of the target device can be determined based on the historical cumulative working parameters of the PTZ. The rotation interval frame count N can be adaptively adjusted through the historical cumulative working parameters. However, when the remaining rotation count of the target device is less than the preset rotation count, it indicates that the target device is worn significantly. The sampling frame count can be appropriately increased. That is, the initial sampling frame count determined according to the monitoring level can be multiplied by the target coefficient to increase it, thereby obtaining the updated sampling coefficient. For example, the system records the historical cumulative rotation count of the PTZ (i.e., the aforementioned remaining rotation count). When the cumulative count reaches a specific percentage of the PTZ's design life (such as 50% or 75%), the intelligent dispatch center can automatically and gradually increase the rotation interval N (for example, adjusting N from 4 to 5, and then to 6).
[0055] In the above embodiments, a rotation interval can be intelligently matched or user-defined based on a preset AOR sampling period (T, such as 1 second, 3 seconds, 5 seconds). The total dwell time of the target device at a stopping point is N×T seconds. For example, if T=2 seconds and N=4, the target device stays at that point for 8 seconds, collects 4 frames of images, and then rotates. The sampling interval and the number of sampling frames can be matched with a strategy (e.g., N≥2 when T≤3 seconds, N≥1 when T>3 seconds) to ensure that the number of rotations of the target device is minimized in low-risk mode. That is, after the target device reaches a position, it begins periodic sampling, collecting one frame every T seconds. After accumulating N frames, it immediately rotates to the next position. Therefore, the rotation trigger is based on the number of frames N, not time.
[0056] In the above embodiments, compared with the "staying in a region for a predetermined time interval" in related technologies, this embodiment can significantly reduce the number of gimbal rotations by introducing a "rotation interval N". In related technologies, the target device stays in each region for a fixed time (e.g., 10 seconds), and will rotate on time regardless of the scene. Even if there is no change, the gimbal will frequently start and stop. The number of rotations is directly related to the number of regions and cannot be adaptively adjusted. Moreover, the long-term repetitive movement of the gimbal leads to increased mechanical wear and significantly shortens the device's lifespan. In this embodiment, the target device only rotates after acquiring N frames of images, and N can be dynamically adjusted according to factors such as risk status and gimbal health (optimization point four below). For example, in low-risk situations, N=5 is set, and the gimbal rotates after acquiring 5 frames at each position, while related methods may rotate more times within the same time window (e.g., under a fixed time interval, it may rotate multiple times within 10 seconds to cover multiple regions). Specifically, assuming the monitoring area is divided into M partitions, in related technologies, the target device rotates M times per cycle. In this embodiment, since N≥2, the PTZ stays at each position for a longer time (acquiring multiple frames), so the number of rotations to complete one panoramic scanning cycle is still M, but the rotation frequency per unit time is reduced (because the total time increases). For example, if T=2 seconds and N=4, the total time of one cycle is M×4×2 seconds, with M rotations. In contrast, the fixed time interval in related technologies may be shorter, leading to more frequent rotations. Therefore, this embodiment significantly reduces the ineffective rotation of the PTZ and extends the hardware lifespan.
[0057] In this embodiment, the rotation interval N is no longer a fixed value, but possesses self-optimizing capabilities. This decouples rotation from the number of sampling frames, rather than using a fixed time. During low-risk periods, unnecessary gimbal movements are reduced, thereby decreasing mechanical wear and extending hardware lifespan. Simultaneously, adaptive N value adjustment further optimizes the rotation frequency. By decoupling sampling from rotation, adjusting N and T allows for a flexible balance between monitoring coverage and hardware wear, optimizing storage and lifespan. In the later stages of the gimbal's lifespan, significantly reducing the number of gimbal rotations further reduces wear and extends its effective usage time.
[0058] In an exemplary embodiment, determining the monitoring level of a target sub-region currently monitored by a target device includes: determining a first relationship between the current time and a preset time period; determining the noise audio collected by the target device; determining the second number of times the target device detected the target object within a first preset time period; determining the event occurrence rate of the target sub-region within a historical time period; determining the risk level of the target sub-region based on the first relationship, the noise audio, the second number of times, and the event occurrence rate; and determining the monitoring level of the target sub-region currently monitored by the target device if the risk level is a first level.
[0059] In the above embodiments, when the target sub-area captured by the target device is determined to be of low risk level (i.e., the first level mentioned above), mode two: adaptive low-wear panoramic coverage mode can be activated. The risk level of the target sub-area is based on a multi-factor comprehensive judgment, rather than a single condition. This can include: determining whether the current time is within a preset time period, which can be understood as the user's low-activity time; determining whether the noise level detected by the environmental sensors in the target device is too high; determining whether the target device has detected a valid target within a continuous period; and determining the frequency of similar time periods within the historical time period of this target sub-area through a historical event database. Furthermore, the risk level can also be jointly determined by some optional factors such as weather conditions and light intensity. Through this embodiment, multi-factor judgment improves the accuracy and reliability of mode switching, reduces the risk of erroneous switching, and ensures that the system only activates energy-saving and low-wear modes when the risk is truly low, thereby optimizing resource utilization.
[0060] In an exemplary embodiment, determining the risk level of the target sub-region based on the first relationship, the noise audio, the second number of occurrences, and the event occurrence rate includes: determining the risk level as a first level when the first relationship indicates that the current time is outside the preset time period, the intensity of the noise audio is less than a first preset threshold, the second number of occurrences is less than a second preset threshold, and the event occurrence rate is less than a third preset threshold; the preset time period is a time period in which the activity of the monitored object is less than a preset activity level; and determining the risk level as a second level when at least one of the following conditions is met: the first relationship indicates that the current time is within the preset time period, the intensity of the noise audio is greater than or equal to the first preset threshold, the second number of occurrences is greater than or equal to the second preset threshold, and the event occurrence rate is greater than or equal to the third preset threshold.
[0061] In the above embodiments, the system can automatically switch to the low-risk level of Mode 2 only when the following conditions are met simultaneously: no valid target (such as people, vehicles, etc.) is detected for a continuous period of time (e.g., T_safe = 300 seconds) (the second number is less than the second preset threshold); the current time is within a user-preset low-activity period (the current time is outside the preset time period, such as 0:00 to 6:00 AM); the intensity of noise detected by the environmental sound sensor is lower than the threshold (i.e., the intensity of the noise audio is less than the first preset threshold); or the motion sensor is not triggered; the event occurrence rate of the area in a similar time period, determined based on the historical event database, is lower than the threshold (i.e., the event occurrence rate is less than the third preset threshold). The above conditions can be weighted and fused by the intelligent scheduling center module to output the risk level. Only when multiple conditions are met simultaneously will the system switch to Mode 2 (adaptive low-wear panoramic coverage mode); otherwise, it will be at the high-risk level. In addition, during the acquisition process in Mode 2, if a valid target is detected when acquiring or analyzing any frame of image, the current panoramic scanning cycle is immediately interrupted, the target quickly turns to the target location, and the system switches back to Mode 1 (event-driven intelligent tracking mode).
[0062] By comprehensively analyzing time, environmental noise, target detection frequency, and historical event data, the intelligent monitoring system can achieve accurate risk assessment and working mode switching. This not only improves the quality and storage efficiency of monitoring data but also significantly enhances the system's responsiveness and hardware durability, providing strong technical support for the field of intelligent security. It demonstrates its unique value and broad application prospects, especially in scenarios requiring long-term, continuous, and efficient monitoring.
[0063] In one exemplary embodiment, the method further includes: if the risk level is a second level, determining the target object in the target sub-region and tracking the target object.
[0064] In the above embodiments, when the intelligent dispatch center module determines that the risk level of the target sub-region is high (i.e., the second level mentioned above), or determines a high-priority target from a process with a low risk level, mode one can be adopted: event-driven administrative function tracking mode. Figure 3 This is a schematic diagram of the high-risk model decision-making process according to an embodiment of this application, such as... Figure 3As shown, the intelligent dispatch center continuously runs and analyzes real-time video and environmental data to assess the monitoring priority of objects in the target sub-region. If a high-priority target exists, the target device switches to "fixed-point staring" or "automatic tracking" and continues tracking. If no high-priority target exists, the target device can intelligently allocate dwell time according to the priority scores of each pre-divided region. Moreover, in Mode 1 (event-driven intelligent tracking mode), the target device allocates dwell time according to the priority score, but the collected video will not produce unnecessary duplication. This is because the dwell time is dynamically allocated according to priority when the target device moves between different regions, aiming to cover key areas rather than fixed-path round-robin. If a certain region has a high priority, the target device may stay for a longer time, but the collected video is a continuous stream and will not deliberately collect the same content repeatedly; the dwell time in low-priority areas is short, reducing redundancy.
[0065] In an exemplary embodiment, determining monitoring data based on a first frame image and other frames included in the monitoring image includes: performing a target operation on each of the i-th frame images included in the other frame images to determine monitoring sub-data of the i-th frame image, where i is an integer greater than or equal to 1; determining the monitoring sub-data of the first frame image and all the other frame images as the monitoring data; the target operation includes: determining the target number of images existing between the i-th frame image and a target keyframe, where the target keyframe is a keyframe located before the i-th frame image and most recently captured with the i-th frame image; when i = 1, the target keyframe... The first frame image is defined as follows: if the number of targets is greater than a preset number of frames, the i-th frame image is defined as a key frame and the i-th frame image is defined as the monitoring sub-data; if the number of targets is less than the preset number of frames, the image change rate between the i-th frame image and the previous frame image is determined; if the image change rate is less than a preset change rate, the difference data between the i-th frame image and the previous frame image is determined, and the difference data is defined as the monitoring sub-data; if the image change rate is greater than the preset change rate, the i-th frame image is defined as a key frame and the i-th frame image is defined as the monitoring sub-data.
[0066] In the above embodiments, during the storage of monitoring data, to avoid the loss of the entire GOP (Group of Pictures) data due to the corruption of key frames (I-frames), a fault-tolerant coding strategy can be adopted. When collecting N frames and encoding them into a GOP for each target sub-region, if the change in the image content relative to the previous time period (i.e., the aforementioned image change rate) exceeds a certain threshold (a preset change rate, such as due to a sudden light switch or an object moving in / out), a new I-frame (i.e., the aforementioned key frame) is forcibly inserted. Simultaneously, a maximum GOP length (i.e., the aforementioned preset number of frames, such as N_max = 30) can be set, and I-frames are periodically inserted even if the change threshold is not reached to control the risk of data loss. Specifically, during storage, the first frame image can be initially determined as the target key frame. If the change rate of the image content in other frames after the first frame exceeds the image change rate of the previous frame, a new I-frame is forcibly inserted, regardless of whether the current frame is a P-frame or another type; these other frames are then used as target key frames. In the acquisition sequence, if any frame (regardless of its position) changes more than a threshold compared to the previous time period (e.g., the previous I-frame or the frame before that), that frame is encoded as an I-frame. For example, if the first P-frame after an I-frame changes significantly, it will be set as a new I-frame; similarly, if another P-frame changes significantly, it will also be set as an I-frame. This means the GOP structure may be interrupted, with multiple I-frames inserted to handle sudden changes. Furthermore, to prevent data recovery difficulties and error accumulation caused by excessively long GOPs—that is, if the GOP is too long and the I-frame interval is large, subsequent P-frames cannot be decoded if an I-frame is damaged or lost, leading to significant data loss (e.g., a black screen during video playback)—I-frames can be forcibly inserted when the number of targets between other frame images and the nearest target keyframe is greater than or equal to a preset threshold. This ensures that the decoder can synchronize periodically, even without change, limiting the scope of error propagation. Example: The target device collects 10 frames of images in a certain target sub-region. The rate of change between the 5th and 6th frames exceeds the preset rate of change, and the preset number of frames is 3. Then the monitoring data includes the first frame image, the difference data between the second and first frames, the difference data between the third and second frames, the difference data between the fourth and third frames, the fifth frame image (since the number of targets between the fifth frame image and the target key frame (first frame) exceeds the preset number of frames 3, the fifth frame image is used as the target key frame), the sixth frame image (since the rate of change exceeds the preset rate of change, the sixth frame image is used as the target key frame), the difference data between the seventh and sixth frames, the difference data between the eighth and seventh frames, the difference data between the ninth and eighth frames, and the tenth frame image (since the number of targets between the fifth frame image and the target key frame image (sixth frame) exceeds the preset number of frames 3, the tenth frame image is used as the target key frame).
[0067] This embodiment ensures that the video stream can refresh reference frames in a timely manner during drastic scene changes (such as sudden changes in lighting or rapid object movement), reducing error propagation. Furthermore, while long GOPs can reduce random access performance (such as fast searches), N_max guarantees periodic keyframes, improving retrieval efficiency. Additionally, although long GOPs can improve compression ratios, excessive length sacrifices fault tolerance; N_max (e.g., 30) can serve as a safety upper limit, striking a balance between compression ratio and reliability. This fault-tolerant coding strategy, combining content adaptation and periodic refresh, improves the reliability and recoverability of video data and is also suitable for storage optimization in AOR scenarios.
[0068] In one exemplary embodiment, the method further includes: determining at least one collaborating device adjacent to the target device and the working status information of the collaborating device; determining a second area of the collaborating device based on the working status information, wherein the second area is a blind spot of the collaborating device or an area where the monitoring effect of the collaborating device does not meet preset conditions; and adjusting the target area of the target device to cover the second area.
[0069] In the above embodiments, in a multi-camera system, the target device can communicate with at least one neighboring camera (i.e., the aforementioned collaborative device) via a network. When making decisions, the intelligent dispatch center can receive working status information (such as the current monitoring focus, i.e., the second area, the target detection list, etc.) sent by one or more neighboring cameras, in addition to local information. Therefore, it can control the target device to adjust its own panoramic scanning starting point or dwell time (i.e., the aforementioned target area), actively cover the blind spots or weak coverage areas of one or more neighboring devices (i.e., the aforementioned second area), realize system-level monitoring resource optimization, and avoid duplicate monitoring and monitoring loopholes.
[0070] In the above embodiments, to ensure absolute integrity of monitoring coverage, the ideal "boundary overlap" is abandoned, and a more reliable "small overlap" scheme is adopted: that is, the pan-tilt unit (PTZ) is rotated so that the field of view of the next acquisition position has a small overlap area with the field of view of the previous position (e.g., 5%-10% field of view width), effectively eliminating potential blind spots caused by lens distortion or PTZ error. Specifically, the field of view between adjacent zones can have an overlap area of 5% to 10%. For example, if the horizontal field of view width of the PTZ lens is 60°, the center viewing angle of adjacent zones will be set to 54° to 57°. By controlling the rotation of the PTZ, the field of view of the next stationary point can have a small overlap area (e.g., 5%-10%) with the field of view of the previous stationary point, which solves the idealized problem of "boundary overlap," ensures coverage integrity, and eliminates blind spots.
[0071] The storage of monitoring data in this application will be explained below with reference to specific embodiments.
[0072] Figure 4 This is a schematic diagram illustrating the process of storing monitoring data in this optional example, such as... Figure 4 As shown, the process of storing this monitoring data may include the following steps:
[0073] Step S402: The intelligent dispatch center determines the risk to be low.
[0074] Step S404, Mode 2: Parameter Configuration;
[0075] Step S406: Panoramic scan acquisition loop;
[0076] Step S408: Move the gimbal to partition 1 and keep it stable;
[0077] Step S410: Continuously acquire N frames (first frame I, subsequent frames P);
[0078] Step S412: Determine if the data collection for this partition is complete. If yes, proceed to step S414; otherwise, proceed to step S410.
[0079] Step S414: The gimbal rotates to partition i+1 (with slight overlap in the field of view);
[0080] Step S416: Determine whether a target has been detected. If yes, proceed to step S418; otherwise, proceed to step S420.
[0081] Step S418, Immediate Interruption: Switch to Mode 1;
[0082] Step S420: Determine whether the panoramic scan is complete. If yes, proceed to step S422; otherwise, proceed to step S406.
[0083] Step S422: After the cycle interval, the next cycle begins.
[0084] In the above embodiments, the core of the system may include an intelligent dispatch center module, a real-time video analysis module, a historical event database, a PTZ motion control module, and an intelligent video recording encoding and storage module. The intelligent dispatch center dynamically assesses the risk level of the monitored area: when assessed as high-risk, the camera is controlled to enter a first working mode (event-driven mode), where the PTZ motion is dominated by detected events; when assessed as low-risk, the camera is controlled to enter a second working mode (panoramic coverage mode), where the PTZ rotates periodically along a preset path and acquires a limited number of frames at each stop point to achieve full spatial coverage. The low-risk assessment is based on a comprehensive judgment of multiple conditions, including but not limited to: continuous target-free time, whether the current time period is within a preset low-activity period, and environmental sensor data. This multi-factor judgment significantly improves the accuracy and reliability of mode switching and reduces the risk of missed detections. In mode two, when acquiring or analyzing any frame, if a valid target is detected, the current panoramic scanning cycle is immediately interrupted, the PTZ quickly turns to the target location, and the system switches back to mode one (event-driven intelligent tracking mode). After completing one lap (M zones) of data acquisition, a panoramic scan cycle is completed. A configurable time interval can be paused before a new scan cycle begins, ensuring continuous monitoring. Furthermore, in the second working mode, the target device can be controlled to continuously acquire N frames (N≥2) of images at each stop point before rotating to the next stop point. By introducing a "rotation interval N," the sampling frequency and rotation frequency are decoupled. The value of the rotation interval N can be dynamically adjusted based on the target device's historical cumulative rotation count (health status) or a preset AOR image sampling cycle T, thereby reducing PTZ wear. For the monitoring images acquired in each zone, the first frame can be encoded as a keyframe (I-frame), and the subsequent N-1 frames can be encoded as prediction frames (P-frames). Video encoding technology is used for storage. This encoding technology is creatively applied to AOR static scene monitoring, maximizing storage space compression.
[0085] In the above embodiment, taking factory perimeter monitoring as an example: Initial setup and triggering: 1 AM (low activity period), quiet environment, and no targets for 5 consecutive minutes, meeting multi-factor conditions, switching to mode two. The perimeter is divided into 6 zones, with an AOR period T = 2 seconds, an initial rotation interval N = 4, and 5% overlap. Adaptive operation: The PTZ continuously acquires 4 frames (0s, 2s, 4s, 6s) in zone 1, encoded as 1 I-frame and 3 P-frames. During acquisition, a car headlight sweeps across, causing a drastic change in the image, and the system forcibly inserts a new I-frame. The PTZ rotates to zone 2 (ensuring 5% overlap) and continues acquisition. The system background records show that the number of PTZ rotations is approaching 60% of its lifespan, automatically adjusting N from 4 to 5 to further protect the hardware. Collaborative work: A nearby camera reports that it is tracking a target to the east. Based on this, the intelligent dispatch center decides to appropriately reduce the dwell time in the eastern zone during the current scanning cycle, while strengthening coverage of the blind spot to the west. Interruption Response: An abnormal heat source was detected in partition 4. The scan was immediately interrupted, and the system was switched to mode 1 for tracking.
[0086] In the aforementioned embodiments, storage efficiency can be maximized: the combination of non-repeating sampling and I / P frame encoding fundamentally reduces redundant data; hardware lifespan is significantly extended: the concept of rotation interval N and adaptive adjustment greatly reduce PTZ wear; monitoring coverage is seamless: the field-of-view overlap strategy ensures spatial coverage integrity; system robustness is enhanced: fault-tolerant coding and multi-factor triggering mechanisms improve system reliability; intelligence and adaptability: intelligent mode switching and adaptive parameter adjustment achieve optimal resource allocation; and system-level collaboration is supported: multi-device communication capabilities maximize system monitoring efficiency.
[0087] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this application.
[0088] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as read-only memory (ROM) / random access memory (RAM), magnetic disk, optical disk), and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of this application.
[0089] According to another aspect of the embodiments of this application, a monitoring data storage device is also provided. This monitoring data storage device can be used to implement the monitoring data storage method provided in the above embodiments, and details already described will not be repeated. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the apparatus described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.
[0090] Figure 5 This is a structural block diagram of an optional monitoring data storage device according to an embodiment of this application, such as... Figure 5 As shown, the storage device for the monitoring data includes:
[0091] The first determining module 502 is used to determine the monitoring level of the target sub-region currently being monitored by the target device, wherein the target region includes multiple target sub-regions;
[0092] The second determining module 504 is used to determine the sampling interval and the number of sampling frames for the target device to sample the target sub-region based on the monitoring level, wherein when the pan-tilt unit in the target device is at the target position, the area monitored by the target device is the target sub-region;
[0093] Control module 506 is used to control the target device to capture images of the target sub-region according to the sampling interval and the number of sampling frames, so as to obtain a monitoring image;
[0094] The third determining module 508 determines monitoring data based on the first frame image and other frame images included in the monitoring image, wherein the monitoring data includes the first frame image and the difference data between adjacent images included in the monitoring image;
[0095] Storage module 510 stores the monitoring data.
[0096] In an exemplary embodiment, the first determining module 502 may determine the monitoring level of the target sub-region currently being monitored by the target device in the following manner: determining the target score of the location attribute of the target sub-region; determining the first number of times the target device detected the target object in the target sub-region within a historical period; and determining the monitoring level based on the target score and the first number of times.
[0097] In an exemplary embodiment, the first determining module 504 may determine the sampling interval and the number of sampling frames for the target device to sample the target sub-region based on the monitoring level by: determining the correspondence between the target monitoring level and the target sampling interval and the target number of sampling frames; determining the remaining number of rotations of the target device; and determining the sampling interval and the number of sampling frames based on the correspondence and the remaining number of rotations.
[0098] In an exemplary embodiment, the first determining module 504 can determine the sampling interval and the number of sampling frames based on the correspondence and the remaining number of rotations in the following manner: determining the sampling interval and the initial number of sampling frames for the monitoring level based on the correspondence; determining the initial number of sampling frames as the number of sampling frames when the remaining number of rotations is greater than or equal to a preset number of rotations; multiplying the initial number of sampling frames by a target coefficient to obtain an updated number of sampling frames when the remaining number of rotations is less than the preset number of rotations, and determining the updated number of sampling frames as the number of sampling frames, wherein the target coefficient is a coefficient greater than 1.
[0099] In an exemplary embodiment, the first determining module 502 can determine the monitoring level of the target sub-area currently monitored by the target device in the following ways: determining a first relationship between the current time and a preset time period; determining the noise audio collected by the target device; determining the second number of times the target device detects the target object within a first preset time period; determining the event occurrence rate of the target sub-area within a historical time period; determining the risk level of the target sub-area based on the first relationship, the noise audio, the second number of times, and the event occurrence rate; and determining the monitoring level of the target sub-area currently monitored by the target device if the risk level is the first level.
[0100] In an exemplary embodiment, the first determining module 502 can determine the risk level of the target sub-region based on the first relationship, the noise audio, the second number of occurrences, and the event occurrence rate in the following manner: when the first relationship indicates that the current time is outside the preset time period, the intensity of the noise audio is less than a first preset threshold, the second number of occurrences is less than a second preset threshold, and the event occurrence rate is less than a third preset threshold, the risk level is determined to be a first level, and the preset time period is a time period in which the activity of the monitored object is less than a preset activity level; when at least one of the following conditions is met, the risk level is determined to be a second level: the first relationship indicates that the current time is within the preset time period, the intensity of the noise audio is greater than or equal to the first preset threshold, the second number of occurrences is greater than or equal to the second preset threshold, and the event occurrence rate is greater than or equal to the third preset threshold.
[0101] In one exemplary embodiment, the apparatus is further configured to determine and track the target object in the target sub-region when the risk level is second level.
[0102] In an exemplary embodiment, the third determining module 506 can determine monitoring data based on the first frame image and other frame images included in the monitoring image in the following manner: for the i-th frame image included in the other frame images, a target operation is performed to determine the monitoring sub-data of the i-th frame image, where i is an integer greater than or equal to 1; the monitoring sub-data of the first frame image and all the other frame images are determined as the monitoring data; the target operation includes: determining the target number of images existing between the i-th frame image and the target keyframe, where the target keyframe is the keyframe located before the i-th frame image and the keyframe whose shooting time is closest to that of the i-th frame image, in i=1 When the number of targets is greater than a preset number of frames, the i-th frame is determined as a key frame and the i-th frame is determined as the monitoring sub-data. When the number of targets is less than the preset number of frames, the image change rate between the i-th frame and the previous frame is determined. When the image change rate is less than a preset change rate, the difference data between the i-th frame and the previous frame is determined, and the difference data is determined as the monitoring sub-data. When the image change rate is greater than the preset change rate, the i-th frame is determined as a key frame and the i-th frame is determined as the monitoring sub-data.
[0103] In an exemplary embodiment, the apparatus may further be used to determine a first area currently monitored by a collaborative device adjacent to the target device and a list of monitoring areas; determine a second area of the collaborative device based on the first area and the list of monitoring areas, wherein the second area is a blind spot of the collaborative device or an area where the monitoring effect of the collaborative device does not meet preset conditions; and adjust the target area of the target device so that the target area covers the second area.
[0104] It should be noted that the above modules can be implemented by software or hardware. For the latter, they can be implemented in the following ways, but are not limited to: all the above modules are located in the same processor; or, the above modules are located in different processors in any combination.
[0105] According to another aspect of the embodiments of this application, a computer-readable storage medium is provided, the computer-readable storage medium including a stored program, wherein the program executes the steps in any of the above method embodiments when it is run.
[0106] In one exemplary embodiment, the aforementioned computer-readable storage medium may include, but is not limited to, various media capable of storing computer programs, such as USB flash drives, ROMs, RAMs, portable hard drives, magnetic disks, or optical disks.
[0107] According to another aspect of the embodiments of this application, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor. The processor is configured to perform the steps of any of the method embodiments described above via the computer program. In an exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.
[0108] Specific examples in this embodiment can be found in the examples described in the above embodiments and exemplary implementations, and will not be repeated here.
[0109] According to another aspect of the embodiments of this application, a computer program product is also provided, comprising a computer program / instructions containing program code for performing the methods shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network via communication section 609, and / or installed from removable medium 611. When the computer program is executed by central processing unit 601, it performs various functions provided in the embodiments of this application. The sequence numbers of the embodiments of this application above are merely descriptive and do not represent the superiority or inferiority of the embodiments.
[0110] Figure 6A schematic block diagram of a computer system architecture for implementing embodiments of the present application is shown. Figure 6 As shown, the computer system 600 includes a Central Processing Unit (CPU) 601, which performs various appropriate actions and processes based on programs stored in ROM 602 or loaded into RAM 603 from storage section 608. Random Access Memory 603 also stores various programs and data required for system operation. The CPU 601, ROM 602, and RAM 603 are interconnected via a bus 604. An Input / Output (I / O) interface 605 is also connected to the bus 604.
[0111] The following components are connected to I / O interface 605: an input section 606 including a keyboard, mouse, etc.; an output section 607 including a cathode ray tube (CRT), liquid crystal display (LCD), and speakers, etc.; a storage section 608 including a hard disk, etc.; and a communication section 609 including a network interface card, such as a local area network card or modem, etc. The communication section 609 performs communication processing via a network such as the Internet. A drive 610 is also connected to I / O interface 605 as needed. A removable medium 611, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on drive 610 as needed so that computer programs read from it can be installed into storage section 608 as needed.
[0112] Specifically, according to embodiments of this application, the processes described in the various method flowcharts can be implemented as computer software programs. For example, embodiments of this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 609, and / or installed from removable medium 611. When the computer program is executed by central processing unit 601, it performs various functions defined in the system of this application.
[0113] It should be noted that, Figure 6 The computer system 600 of the electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.
[0114] Obviously, those skilled in the art should understand that the modules or steps of this application described above can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of multiple computing devices. They can be implemented using computer-executable program code, and thus can be stored in a storage device for execution by a computing device. In some cases, the steps shown or described can be performed in a different order than those described herein, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, this application is not limited to any particular combination of hardware and software.
[0115] The above are merely preferred embodiments of this application and are not intended to limit this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the principles of this application should be included within the protection scope of this application.
Claims
1. A method for storing monitoring data, characterized in that, include: Determine the monitoring level of the target sub-region currently being monitored by the target device, wherein the target region includes multiple target sub-regions; Based on the monitoring level, the sampling interval and number of sampling frames for the target device to sample the target sub-region are determined, wherein when the pan-tilt unit in the target device is at the target location, the area monitored by the target device is the target sub-region; The target device is controlled to capture images of the target sub-region according to the sampling interval and the number of sampling frames to obtain a monitoring image; Monitoring data is determined based on the first frame image and other frames included in the monitoring image, wherein the monitoring data includes the first frame image and the difference data between adjacent images included in the monitoring image; Store the monitoring data.
2. The method according to claim 1, characterized in that, Determine the monitoring level of the target sub-area currently being monitored by the target device, including: Determine the target score for the location attributes of the target sub-region; Determine the first number of times the target device detected the target object within the target sub-region during the historical period; The monitoring level is determined based on the target score and the first number of times.
3. The method according to claim 1, characterized in that, Based on the monitoring level, the sampling interval and number of sampling frames for the target device to sample the target sub-region are determined, including: Determine the correspondence between the target monitoring level and the target sampling interval and the number of target sampling frames; Determine the remaining number of rotations of the target device; The sampling interval and the number of sampling frames are determined based on the correspondence and the remaining number of rotations.
4. The method according to claim 3, characterized in that, Determining the sampling interval and the number of sampling frames based on the correspondence and the remaining number of rotations includes: The sampling interval and initial number of sampling frames for the monitoring level are determined based on the correspondence. If the remaining number of rotations is greater than or equal to the preset number of rotations, the initial number of sampling frames is determined as the number of sampling frames; If the remaining number of rotations is less than the preset number of rotations, the initial number of sampling frames is multiplied by the target coefficient to obtain the updated number of sampling frames, and the updated number of sampling frames is determined as the number of sampling frames, wherein the target coefficient is a coefficient greater than 1.
5. The method according to claim 1, characterized in that, Determine the monitoring level of the target sub-area currently being monitored by the target device, including: Determine the primary relationship between the current time and the preset time period; Determine the noise audio collected by the target device; Determine the second number of times the target device detects the target object within a first preset time period; Determine the event occurrence rate of the target sub-region within a historical time period; The risk level of the target sub-region is determined based on the first relationship, the noise audio, the second number of times, and the event occurrence rate. If the risk level is Level 1, determine the monitoring level of the target sub-area currently being monitored by the target device.
6. The method according to claim 5, characterized in that, Determining the risk level of the target sub-region based on the first relationship, the noise audio, the second frequency, and the event occurrence rate includes: If the first relationship indicates that the current time is outside the preset time period, the intensity of the noise audio is less than the first preset threshold, the second number is less than the second preset threshold, and the event occurrence rate is less than the third preset threshold, then the risk level is determined to be the first level, and the preset time period is the time period during which the activity of the monitored object is less than the preset activity level. The risk level is determined to be level two if at least one of the following conditions is met: the first relationship indicates that the current time is within the preset time period, the intensity of the noise audio is greater than or equal to a first preset threshold, the second number is greater than or equal to a second preset threshold, and the event occurrence rate is greater than or equal to a third preset threshold.
7. The method according to claim 1, characterized in that, Based on the first frame image and other frames included in the monitored images, monitoring data is determined, including: For the i-th frame image included in other frame images, a target operation is performed to determine the monitoring sub-data of the i-th frame image, where i is an integer greater than or equal to 1; The monitoring sub-data of the first frame image and all the other frame images are determined as the monitoring data; The target operation includes: Determine the number of target images that exist between the i-th frame image and the target keyframe, wherein the target keyframe is the keyframe located before the i-th frame image and whose capture time is closest to that of the i-th frame image, and when i=1, the target keyframe is the first frame image; If the number of targets is greater than the preset number of frames, the i-th frame image is determined as a key frame and the i-th frame image is determined as the monitoring sub-data; If the target number is less than the preset number of frames, determine the image change rate between the i-th frame and the previous frame. If the image change rate is less than the preset change rate, determine the difference data between the i-th frame and the previous frame. The difference data is then determined as the monitoring sub-data. If the rate of change of the image is greater than the preset rate of change, the i-th frame image is determined as a key frame and the i-th frame image is determined as the monitoring sub-data.
8. The method according to claim 1, characterized in that, The method further includes: Identify at least one cooperating device adjacent to the target device and the working status information of the cooperating device; Based on the working status information, a second area of the collaborative device is determined. The second area is the blind spot of the collaborative device or the area where the monitoring effect of the collaborative device does not meet the preset conditions. Adjust the target area of the target device so that the target area covers the second area.
9. A storage device for monitoring data, characterized in that, include: The first determining module is used to determine the monitoring level of the target sub-region currently being monitored by the target device, wherein the target region includes multiple target sub-regions; The second determining module is used to determine the sampling interval and number of sampling frames for the target device to sample the target sub-region based on the monitoring level, wherein when the pan-tilt unit in the target device is at the target position, the area monitored by the target device is the target sub-region; The control module is used to control the target device to capture images of the target sub-region according to the sampling interval and the number of sampling frames, so as to obtain monitoring images; The third determining module determines monitoring data based on the first frame image and other frames included in the monitoring image, wherein the monitoring data includes the first frame image and the difference data between adjacent images included in the monitoring image; The storage module stores the monitoring data.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, wherein the computer program, when executed by a processor, implements the steps of the method according to any one of claims 1 to 8.
11. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 8.