AI-based time-lapse recording method and device
Through the AI-based time-lapse recording method, key frames in video surveillance are automatically extracted and spliced, solving the problem of repeated and invalid frames occupying storage space, and achieving efficient local storage and key frame review.
Patent Information
- Application Number
- CN202411138273.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-19
- Publication Date
- 2025-10-03
- Estimated Expiration
- 2044-08-19
AI Technical Summary
In existing video surveillance systems, repeated and invalid images occupy a large amount of storage space, increase the network bandwidth load and make it inconvenient to review and check key images.
Using an AI-based time-lapse recording method, through image acquisition, configuration settings, time management, algorithm detection and storage management modules, key frames are automatically extracted and stitched together, enabling local storage or cloud server upload.
It effectively reduces storage space usage, lowers network load, ensures the integrity of key images, facilitates review and reference, and is suitable for non-networked scenarios.
Smart Images

Figure CN119135817B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image data compression technology, and in particular to an AI-based time-lapse recording method and device. Background Art
[0002] With the diversification of social and economic activities and the increase in business travel, consumers' demand for monitoring home security, infants, and pets is also growing. The video surveillance industry, which uses networks, cameras, and IPCs, is also booming. In video surveillance scenarios, the images recorded by monitoring devices are often repeated and invalid. The large number of repeated and invalid images makes it difficult to review and review key images. If these repeated and invalid images are stored, it will increase the load on network bandwidth and waste storage space. Summary of the Invention
[0003] The present invention aims to solve at least one of the technical problems existing in the prior art. To this end, the present invention proposes an AI-based time-lapse recording method and device that can be applied to a variety of complex scenarios. It can classify and extract key frames from image data without relying on cloud servers, and ensure that the extracted key frames of the image data are complete.
[0004] In a first aspect, an AI-based time-lapse recording method according to an embodiment of the present invention is applied to an AI-based time-lapse recording device, the time-lapse recording device including a general control module, a configuration setting module, an image acquisition module, a time management module, an algorithm management module, an alarm event management module, and a storage management module. The AI-based time-lapse recording method includes the following steps:
[0005] The image data of the preset position is collected by the image collection module;
[0006] Obtain a configuration file through the configuration setting module, and set the trigger event through the configuration file;
[0007] According to the configuration file, obtaining a detection algorithm from the algorithm management module;
[0008] The alarm event management module detects the image data according to the detection algorithm to obtain a detection result;
[0009] The time management module obtains a preset time threshold according to the configuration file and obtains a timestamp of the image data according to the image data;
[0010] The alarm event management module extracts fragments from the image data according to the detection result, the preset time threshold and the trigger event to obtain alarm image data whose image duration does not exceed the preset time threshold;
[0011] The alarm event management module splices the alarm image data according to the timestamp to obtain spliced image data;
[0012] The storage management module stores the stitched image data in a local location or uploads it to a cloud server according to the configuration file.
[0013] According to some embodiments of the present invention, the algorithm management module includes an algorithm selection module and an algorithm storage module, the algorithm storage module stores a plurality of preset algorithms, and the step of obtaining the detection algorithm from the algorithm management module according to the configuration file includes:
[0014] Parsing the configuration file through the algorithm selection module to obtain a parsing result;
[0015] According to the analysis result, the algorithm selection module selects the detection algorithm from the plurality of preset algorithms in the algorithm storage module.
[0016] According to some embodiments of the present invention, the algorithm management module further includes an algorithm updating module, and the algorithm updating module is used to update the plurality of preset algorithms.
[0017] According to some embodiments of the present invention, the time management module includes a time threshold acquisition module and a timestamp acquisition module. The steps of obtaining, by the time management module, a preset time threshold according to the configuration file and obtaining the timestamp of the image data according to the image data include:
[0018] According to the configuration file, the preset time threshold is obtained by the time threshold acquisition module;
[0019] The timestamp of the image data is obtained by the timestamp obtaining module according to the image data.
[0020] According to some embodiments of the present invention, the time management module further includes a timing module, and the step of obtaining alarm image data whose image duration does not exceed the preset time threshold includes:
[0021] Recording the start and end times of the alarm image data through the timing module;
[0022] According to the start time, the end time and the preset time threshold, alarm image data whose image duration does not exceed the preset time threshold is obtained.
[0023] According to some embodiments of the present invention, the alarm event management module includes a detection module, and the step of detecting the image data according to the detection algorithm to obtain the detection result includes:
[0024] The detection module detects the image data according to the detection algorithm to obtain the detection result, where the detection result is the presence of a trigger event in the image data or the absence of a trigger event in the image data.
[0025] According to some embodiments of the present invention, the alarm event management module further includes a classification module, an extraction module, and a file creation module. The step of extracting fragments from the image data through the alarm event management module and based on the detection result, the preset time threshold, and the alarm event to obtain alarm image data whose image duration does not exceed the preset time threshold includes:
[0026] The classification module identifies the image segment in which the triggering event occurs in the image data as the warning image data, and identifies the image segment in which the triggering event does not occur in the image data as the non-warning image data, based on the detection result;
[0027] Obtaining a first folder through the file creation module;
[0028] extracting the warning image data from the image data by the extraction module;
[0029] The warning image data is stored in the first file.
[0030] According to some embodiments of the present invention, the alarm event management module further includes a splicing module, and the step of splicing the alarm image data by the alarm event management module and according to the timestamp to obtain the spliced image data includes:
[0031] Obtaining a second folder through the file creation module;
[0032] The splicing module splices the alarm image data in a preset splicing order according to the timestamp to obtain the spliced image data;
[0033] The stitched image data is stored in the second folder.
[0034] According to some embodiments of the present invention, the storage management module includes a local storage module and a communication module. The step of the storage management module storing the stitched image data in a local location or uploading it to a cloud server according to the configuration file includes:
[0035] The local storage module stores the stitched image data in the local location according to the configuration file; or
[0036] The communication module encrypts the stitched image data according to the configuration file, and uploads the encrypted stitched image data to the cloud server.
[0037] In the second aspect, according to an embodiment of the present invention, an AI-based time-lapse recording device includes a general control module, a configuration setting module, an image acquisition module, a time management module, an algorithm management module, an alarm event management module and a storage management module; the time-lapse recording device is used to implement the AI-based time-lapse recording method as described in the first aspect above.
[0038] According to an embodiment of the present invention, the AI-based time-lapse recording method and device have at least the following beneficial effects: the method of the present application obtains image data through an image acquisition module, performs custom configuration through a configuration setting module, obtains the time information of the image data through a time management module, the algorithm management module obtains a detection algorithm based on the custom configuration, the alarm event management module obtains alarm image data based on the custom configuration, the image data, the time information of the image data, and the detection algorithm, and splices the alarm image data to obtain spliced image data. The spliced image data is then stored in the corresponding location of the storage management module based on the custom configuration. Key frames in the image data can be classified and extracted without relying on a cloud server, and the extracted spliced image data includes all key frames. The method of the present application can directly extract alarm image data from the image data on the device side and then integrate it on the device side. This method does not require reliance on a cloud server to process the image data, and the method of the present application can be effectively applied in non-networked scenarios. The device of the present application is used to implement the method of the present application.
[0039] Additional aspects and advantages of the present invention will be set forth in part in the description which follows and, in part, will be obvious from the description which follows, or may be learned by practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] The above and / or additional aspects and advantages of the present invention will become apparent and readily understood from the following description of the embodiments with reference to the accompanying drawings, in which:
[0041] Figure 1 Schematic diagram of a time-lapse recording method based on AI according to an embodiment of the present invention;
[0042] Figure 2 Schematic diagram of time-lapse video processing of the AI-based time-lapse video method according to an embodiment of the present invention;
[0043] Figure 3Schematic diagram of the structure of an AI-based time-lapse recording device according to an embodiment of the present invention.
[0044] Figure numerals: general control module 100, configuration setting module 200, image acquisition module 300, time management module 400, time threshold acquisition module 410, timestamp acquisition module 420, timing module 430, algorithm management module 500, algorithm selection module 510, algorithm storage module 520, algorithm update module 530, alarm event management module 600, detection module 610, classification module 620, extraction module 630, splicing module 640, file creation module 650, storage management module 700, local storage module 710, communication module 720. DETAILED DESCRIPTION
[0045] This section will describe in detail the specific embodiments of the present invention. The preferred embodiments of the present invention are shown in the accompanying drawings. The purpose of the accompanying drawings is to supplement the description of the text part of the specification with graphics, so that people can intuitively and vividly understand each technical feature and the overall technical solution of the present invention, but it should not be understood as a limitation on the scope of protection of the present invention.
[0046] In the description of the present invention, it should be understood that descriptions involving orientations, such as up, down, front, back, left, right, etc., indicating orientations or positional relationships, are based on the orientations or positional relationships shown in the accompanying drawings. They are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation. Therefore, they cannot be understood as limitations on the present invention.
[0047] In the description of the present invention, "several" means one or more, "more" means more than two, "greater than," "less than," and "exceed" are understood to exclude the number itself, while "above," "below," and "within" are understood to include the number itself. The use of terms such as "first" and "second" is solely for the purpose of distinguishing technical features and should not be construed as indicating or implying relative importance, or implicitly specifying the number of the indicated technical features, or implicitly specifying the order of the indicated technical features.
[0048] In the description of the present invention, unless otherwise clearly defined, terms such as setting, installing, and connecting should be understood in a broad sense, and technicians in the relevant technical field can reasonably confirm the specific meanings of the above terms in the present invention in combination with the specific content of the technical solution.
[0049] First, reference Figure 1According to an embodiment of the present invention, an AI-based time-lapse recording method is applied to an AI-based time-lapse recording device. The time-lapse recording device includes a general control module 100, a configuration setting module 200, an image acquisition module 300, a time management module 400, an algorithm management module 500, an alarm event management module 600, and a storage management module 700. The AI-based time-lapse recording method includes at least steps S100, S200, S300, S400, S500, S600, S700, and S800, wherein:
[0050] Step S100, collecting image data of a preset position through the image collection module 300;
[0051] Step S200, obtaining a configuration file through the configuration setting module 200, and setting a trigger event through the configuration file;
[0052] Step S300, obtaining a detection algorithm from the algorithm management module 500 according to the configuration file;
[0053] Step S400: the alarm event management module 600 detects the image data according to the detection algorithm to obtain the detection result;
[0054] Step S500: The time management module 400 obtains a preset time threshold according to a configuration file and obtains a timestamp of the image data according to the image data;
[0055] Step S600: The alarm event management module 600 extracts segments from the image data based on the detection result, the preset time threshold, and the trigger event to obtain alarm image data whose image duration does not exceed the preset time threshold.
[0056] Step S700: the alarm event management module 600 splices the alarm image data according to the timestamp to obtain spliced image data;
[0057] In step S800 , the storage management module 700 stores the stitched image data in a local location or uploads it to a cloud server according to the configuration file.
[0058] The image acquisition module 300 includes at least one IPC camera, which captures image data at a preset location. When there are multiple IPC cameras, the multiple IPC cameras can capture image data from different perspectives at a single preset location. When there are multiple IPC cameras and multiple preset locations, the relationship between the IPC cameras and the preset locations can be one-to-one or many-to-one.
[0059] According to some embodiments of the present invention, the algorithm management module 500 includes an algorithm selection module 510 and an algorithm storage module 520. The algorithm storage module 520 stores a plurality of preset algorithms. The step of obtaining a detection algorithm from the algorithm management module 500 according to a configuration file includes:
[0060] The configuration file is parsed by the algorithm selection module 510 to obtain a parsing result;
[0061] According to the analysis result, the algorithm selection module 510 selects a detection algorithm from a plurality of preset algorithms in the algorithm storage module 520 .
[0062] According to some embodiments of the present invention, the algorithm management module 500 further includes an algorithm updating module 530 , which is configured to update a plurality of preset algorithms.
[0063] According to some embodiments of the present invention, the time management module 400 includes a time threshold acquisition module 410 and a timestamp acquisition module 420. The steps of obtaining a preset time threshold according to a configuration file and obtaining a timestamp of image data according to the image data by the time management module 400 include:
[0064] According to the configuration file, the preset time threshold is obtained through the time threshold acquisition module 410;
[0065] According to the image data, the timestamp of the image data is obtained by the timestamp obtaining module 420 .
[0066] The preset time threshold is set according to the frequency of occurrence of the alarm image data, the duration of a single alarm image data, the storage space available in the storage management module 700, the actual required duration of the alarm image data, and the like.
[0067] According to some embodiments of the present invention, the time management module 400 further includes a timing module 430, and the step of obtaining alarm image data whose image duration does not exceed a preset time threshold includes:
[0068] The timing module 430 records the start time and end time of the alarm image data;
[0069] According to the start time, end time and preset time threshold, alarm image data whose image duration does not exceed the preset time threshold is obtained.
[0070] When the detection module 610 detects the beginning of a trigger event in the image data, the timing module 430 is activated and begins timing. When the detection module 610 no longer detects the presence of a trigger event in the image data, the timing module 430 stops timing and records the length of time elapsed. The length of time recorded by the timing module 430 serves as the image duration of the alarm image data. When the image duration of the alarm image data exceeds a preset time threshold, the image data from the beginning until the image duration reaches the preset time threshold is used as the alarm image data. If the image duration of the alarm image data does not exceed the preset time threshold, the image acquisition module 300 continues to acquire image data at the preset location for detection.
[0071] According to some embodiments of the present invention, the alarm event management module 600 includes a detection module 610, which detects image data according to a detection algorithm. The steps of obtaining the detection result include:
[0072] The detection module 610 detects the image data according to the detection algorithm and obtains a detection result, which is whether a trigger event exists in the image data or whether a trigger event does not exist in the image data.
[0073] According to some embodiments of the present invention, the alarm event management module 600 further includes a classification module 620, an extraction module 630, and a file creation module 650. The steps of extracting fragments from the image data based on the detection results, the preset time threshold, and the alarm event by the alarm event management module 600, and obtaining alarm image data whose image duration does not exceed the preset time threshold include:
[0074] The classification module 620 identifies the image segments with trigger events in the image data as warning image data and identifies the image segments without trigger events in the image data as non-warning image data according to the detection results;
[0075] Obtaining a first folder through the file creation module 650;
[0076] Extracting warning image data from the image data through the extraction module 630;
[0077] The alarm image data is stored in the first file.
[0078] Among them, reference Figure 2When there is only one triggering event and the alarm image data is distributed across multiple moments, the classification module 620 labels the multiple segments of alarm image data in the image data. The order in which the labels are obtained corresponds to the order in which the alarm image data appear. The extraction module 630 extracts the alarm image data one by one in the order in which the labels are obtained and stores them in the first folder. It is conceivable that the extraction module 630 may also extract the alarm image data in a random order. When there are at least two triggering events, the number of detection algorithms matches the number of triggering events, i.e., the number of detection algorithms is also at least two. When there are at least two triggering events and only one triggering event occurs at a single moment, the classification module 620 labels the alarm image data corresponding to different triggering events with different types of labels, classifying the alarm image data corresponding to different triggering events using the different types of labels. In this case, the file creation module 650 creates a first folder with the same number of triggering events. The extraction module 630 extracts the alarm image data in the same order as described above and extracts and stores the alarm image data in the corresponding first folder. When there are at least two triggering events, and there are multiple triggering events at a moment, for example Figure 2 At moment 3 in the image, there are both trigger events marked as event A and trigger events marked as event B at moment 3. When the alarm image data corresponding to moment 3 is extracted to the first folder, it will be extracted to the first folder corresponding to event A with the marking type, and it will also be extracted to the first folder corresponding to event B with the marking type. Taking event A as an example, the image data of all image durations marked as event A at moment 3 are extracted to the first folder corresponding to event A. The extraction method of event B is the same as that of event A. Figure 2 At time 5 in the figure, there are marker types of event A, event B, and event C. The method for extracting the alarm image data corresponding to time 5 is the same as that for time 3, and will not be repeated here.
[0079] According to some embodiments of the present invention, the alarm event management module 600 further includes a splicing module 640, which splices the alarm image data according to the timestamp through the alarm event management module 600. The steps of obtaining the spliced image data include:
[0080] Obtaining a second folder through the file creation module 650;
[0081] The splicing module 640 splices the alarm image data in a preset splicing order according to the timestamp to obtain spliced image data;
[0082] The stitched image data is stored in the second folder.
[0083] The number of second folders, the number of first folders, and the number of trigger events are consistent. The preset stitching order can be set to the order of marker acquisition from first to last or from last to first. The preset stitching order can also be set to the order of timestamp acquisition of the alarm image data from first to last or from last to first. This ensures the orderliness of the alarm image data in the stitched image data and facilitates subsequent viewing and stitching integrity inspection of the stitched image data.
[0084] According to some embodiments of the present invention, the storage management module 700 includes a local storage module 710 and a communication module 720. The steps of storing the stitched image data in a local location or uploading it to a cloud server according to the configuration file include:
[0085] The local storage module 710 stores the stitched image data in a local location according to the configuration file; or
[0086] The communication module 720 encrypts the stitched image data according to the configuration file, and uploads the encrypted stitched image data to the cloud server.
[0087] The local storage module 710 can be a local storage device such as a local SD card. In some non-networked application scenarios, the stitched image data is usually stored in a local location. In networked application scenarios, the stitched image data can be stored in a local location or uploaded to a cloud server for storage. It is conceivable that the stitched image data can be stored in a local location while also being uploaded to a cloud server for storage, thereby reducing the possibility of loss of the stitched image data.
[0088] Second, reference Figure 2 According to an embodiment of the present invention, an AI-based time-lapse recording device includes a general control module 100, a configuration setting module 200, an image acquisition module 300, a time management module 400, an algorithm management module 500, an alarm event management module 600 and a storage management module 700; the time-lapse recording device is used to implement the AI-based time-lapse recording method as described in the first aspect above.
[0089] The overall control module 100 is electrically connected to the configuration setting module 200, the image acquisition module 300, the time management module 400, the algorithm management module 500, the alarm event management module 600, and the storage management module 700. The AI-based time-lapse recording device also includes a power supply module (not shown) for supplying power to the overall control module 100, the configuration setting module 200, the image acquisition module 300, the time management module 400, the algorithm management module 500, the alarm event management module 600, and the storage management module 700.
[0090] The AI-based time-lapse recording method and device according to an embodiment of the present invention have at least the following beneficial effects: The method of the present application acquires image data through the image acquisition module 300, performs custom configuration through the configuration setting module 200, obtains the time information of the image data through the time management module 400, the algorithm management module 500 obtains the detection algorithm based on the custom configuration, and the alarm event management module 600 obtains alarm image data based on the custom configuration, image data, the time information of the image data, and the detection algorithm, and then stitches the alarm image data to obtain stitched image data. The stitched image data is then stored in the corresponding location of the storage management module 700 according to the custom configuration. Key frames in the image data can be classified and extracted without relying on a cloud server, and the extracted stitched image data includes all key frames. The method of the present application can directly extract alarm image data from the image data on the device side and then integrate it on the device side. This method does not require reliance on a cloud server to process the image data, and can effectively apply the method of the present application in non-networked scenarios. The device of the present application is used to implement the method of the present application.
[0091] Throughout this specification, reference to terms such as "one embodiment," "some embodiments," "illustrative embodiments," "examples," "specific examples," or "some examples" means that a specific feature, structure, material, or characteristic described in conjunction with that embodiment or example is included in at least one embodiment or example of the present invention. In this specification, illustrative uses of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
[0092] Although the embodiments of the present invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the invention, and that the scope of the invention is defined by the claims and their equivalents.
Claims
1. An AI-based time-lapse recording method, characterized in that: Applied to an AI-based time-lapse recording device, the time-lapse recording device includes a general control module, a configuration setting module, an image acquisition module, a time management module, an algorithm management module, an alarm event management module, and a storage management module. The AI-based time-lapse recording method includes the following steps: The image data of the preset position is collected by the image collection module; Obtain a configuration file through the configuration setting module, and set the trigger event through the configuration file; According to the configuration file, obtaining a detection algorithm from the algorithm management module; The alarm event management module detects the image data according to the detection algorithm to obtain a detection result; The time management module obtains a preset time threshold according to the configuration file and obtains a timestamp of the image data according to the image data; The alarm event management module extracts fragments from the image data according to the detection result, the preset time threshold and the trigger event to obtain alarm image data whose image duration does not exceed the preset time threshold; The alarm event management module splices the alarm image data according to the timestamp to obtain spliced image data; The storage management module stores the stitched image data in a local location or uploads it to a cloud server according to the configuration file.
2. The AI-based time-lapse recording method according to claim 1, characterized in that: The algorithm management module includes an algorithm selection module and an algorithm storage module. The algorithm storage module stores a plurality of preset algorithms. The step of obtaining the detection algorithm from the algorithm management module according to the configuration file includes: Parsing the configuration file through the algorithm selection module to obtain a parsing result; According to the analysis result, the algorithm selection module selects the detection algorithm from the plurality of preset algorithms in the algorithm storage module.
3. The AI-based time-lapse recording method according to claim 2, characterized in that: The algorithm management module further includes an algorithm updating module, and the algorithm updating module is used to update the plurality of preset algorithms.
4. The AI-based time-lapse recording method according to claim 1, characterized in that: The time management module includes a time threshold acquisition module and a timestamp acquisition module. The steps of obtaining a preset time threshold according to the configuration file and obtaining the timestamp of the image data according to the image data by the time management module include: According to the configuration file, the preset time threshold is obtained by the time threshold acquisition module; The timestamp of the image data is obtained by the timestamp obtaining module according to the image data.
5. The AI-based time-lapse recording method according to claim 4, characterized in that: The time management module further includes a timing module, and the step of obtaining the alarm image data whose image duration does not exceed the preset time threshold includes: Recording the start and end times of the alarm image data through the timing module; According to the start time, the end time and the preset time threshold, alarm image data whose image duration does not exceed the preset time threshold is obtained.
6. The AI-based time-lapse recording method according to claim 1, characterized in that: The alarm event management module includes a detection module. The step of detecting the image data according to the detection algorithm and obtaining the detection result includes: The detection module detects the image data according to the detection algorithm to obtain the detection result, where the detection result is the presence of a trigger event in the image data or the absence of a trigger event in the image data.
7. The AI-based time-lapse recording method according to claim 6, characterized in that: The alarm event management module further includes a classification module, an extraction module, and a file creation module. The steps of extracting fragments from the image data through the alarm event management module based on the detection result, the preset time threshold, and the alarm event to obtain alarm image data whose image duration does not exceed the preset time threshold include: The classification module identifies the image segment in which the triggering event occurs in the image data as the warning image data, and identifies the image segment in which the triggering event does not occur in the image data as the non-warning image data, based on the detection result; Obtaining a first folder through the file creation module; extracting the warning image data from the image data by the extraction module; The warning image data is stored in the first file.
8. The AI-based time-lapse recording method according to claim 7, characterized in that: The alarm event management module further includes a splicing module. The step of splicing the alarm image data by the alarm event management module and according to the timestamp to obtain the spliced image data includes: Obtaining a second folder through the file creation module; The splicing module splices the alarm image data in a preset splicing order according to the timestamp to obtain the spliced image data; The stitched image data is stored in the second folder.
9. The AI-based time-lapse recording method according to claim 1, characterized in that: The storage management module includes a local storage module and a communication module. The steps of storing the stitched image data in a local location or uploading it to a cloud server according to the configuration file include: The local storage module stores the stitched image data in the local location according to the configuration file; or The communication module encrypts the stitched image data according to the configuration file, and uploads the encrypted stitched image data to the cloud server.
10. An AI-based time-lapse recording device, characterized in that: It includes a general control module, a configuration setting module, an image acquisition module, a time management module, an algorithm management module, an alarm event management module and a storage management module; the time-lapse recording device is used to implement the AI-based time-lapse recording method as described in any one of claims 1 to 9.
Citation Information
Patent Citations
Apriori algorithm-based electric power Internet of Things anomaly alarm compression method
CN112286987A
Intelligent analysis early warning platform and method for security and protection
CN116246416A