Image data processing method, electronic device and storage medium

By motion detection of the images collected by the image acquisition device, the target image set is divided, and only data analysis is performed on them, the problem of waste of computing power resources in the prior art is solved and the utilization rate of computing power resources in the data analysis process is improved.

CN119559563BActive Publication Date: 2025-06-06ZHEJIANG HUAQI INTELLIGENT TECHNOLOGY CO LTD +1
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202510132776.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-02-06
Publication Date
2025-06-06
Estimated Expiration
2045-02-06

AI Technical Summary

Technical Problem

In the prior art, when the device has no target in the video channel for a long time or the night scene is not effective, it will lead to waste of computing resources and cannot effectively improve the utilization rate of computing resources during data analysis.

Method used

By acquiring several consecutive frames of images collected by the image acquisition device within a preset time period, motion detection is performed, and image frames containing motion detection events are determined, so as to divide the target image set and perform data analysis on them.

Benefits of technology

The utilization rate of computing power resources during data analysis is improved, resource consumption for targetless or low-quality scenarios is reduced, and data analysis is carried out only on the more important target image set.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119559563B_ABST
    Figure CN119559563B_ABST
Patent Text Reader

Abstract

The present application discloses an image data processing method, an electronic device, and a storage medium. The image data processing method includes: obtaining a plurality of continuous frames of images collected by an image acquisition device within a preset time period; detecting each image to obtain a motion detection result of each image, each motion detection result including whether the image contains a motion detection event or does not contain a motion detection event; in response to the motion detection result of at least one frame of image being that the image contains a motion detection event, determining a target image set from the plurality of frames of image in order to perform data analysis on the target image set, the target image set being at least part of the images in the plurality of frames of image. The above scheme can improve the utilization rate of computing resources during data analysis.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to an image data processing method, an electronic device, and a storage medium. Background Art

[0002] With the development of computer technology, the requirements for image or video processing have also increased. At present, the device can support intelligent processing type data analysis, such as part detection, license plate recognition, etc. However, due to the limited computing power resources of the device, it can generally only support intelligent processing type data analysis of video data from a few channels. In the prior art, fixed channels are usually set to perform intelligent processing type data analysis on fixed channels. However, in the usage scenario, there may be a situation where there is no target in the video channel for a long time, or the night scene effect is not good, resulting in a waste of device computing power.

[0003] In view of the existing technical defects, how to provide a solution that can improve the utilization rate of computing resources in the data analysis process is a technical problem that needs to be urgently solved by technical personnel in this field. Summary of the invention

[0004] The present application at least provides an image data processing method, an electronic device, and a storage medium.

[0005] The present application provides an image data processing method, comprising: acquiring a plurality of continuous frames of images acquired by an image acquisition device within a preset time period; detecting each image to obtain a motion detection result of each image, wherein each motion detection result includes whether the image contains a motion detection event or does not contain a motion detection event; in response to the motion detection result of at least one frame of image being that the image contains a motion detection event, determining a target image set from the plurality of frames of images so as to perform data analysis on the target image set, wherein the target image set is at least part of the images in the plurality of frames of images.

[0006] The present application provides an image data processing device, including: an acquisition module, a detection module, and a determination module; the acquisition module is used to acquire a plurality of continuous frames of images acquired by an image acquisition device within a preset time period; the detection module is used to detect each image to obtain a motion detection result of each image, each motion detection result includes whether the image contains a motion detection event or does not contain a motion detection event; the determination module is used to determine a target image set from the plurality of frames of images in response to the motion detection result of at least one frame of image being that the image contains a motion detection event so as to perform data analysis on the target image set, the target image set being at least part of the images in the plurality of frames of images.

[0007] The present application provides an electronic device, including a memory and a processor, wherein the processor is used to execute program instructions stored in the memory to implement the above-mentioned image data processing method.

[0008] The present application provides a computer-readable storage medium on which program instructions are stored. When the program instructions are executed by a processor, the above-mentioned image data processing method is implemented.

[0009] The above scheme detects several consecutive frames of images captured by the image acquisition device within a preset time period to obtain motion detection results of each image. Each motion detection result includes whether the image contains a motion detection event or does not contain a motion detection event. Compared with the need to perform subsequent data analysis on all frame images, the present application determines at least part of the several frame images in order to perform data analysis on the target image set when the motion detection result of at least one frame image is that the image contains a motion detection event. This allows data analysis to be performed only on target image sets with higher importance, thereby improving the utilization of computing resources during the data analysis process.

[0010] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] The drawings herein are incorporated into the specification and constitute a part of the specification. These drawings illustrate embodiments consistent with the present application and are used together with the specification to illustrate the technical solution of the present application.

[0012] Figure 1 This is a flow chart of an embodiment of the image data processing method of the present application. Figure 1 ;

[0013] Figure 2 This is a flow chart of an embodiment of the image data processing method of the present application. Figure 2 ;

[0014] Figure 3 This is a flow chart of an embodiment of the image data processing method of the present application. Figure 3 ;

[0015] Figure 4 This is a flow chart of an embodiment of the image data processing method of the present application. Figure 4 ;

[0016] Figure 5 This is a flow chart of an embodiment of the image data processing method of the present application. Figure 5 ;

[0017] Figure 6 is a schematic diagram of a target image set in an embodiment of an image data processing method of the present application;

[0018] Figure 7 It is a structural schematic diagram of an embodiment of an image data processing device of the present application;

[0019] Figure 8It is a structural schematic diagram of an embodiment of the electronic device of the present application;

[0020] Fig. 9 It is a structural diagram of an embodiment of a computer-readable storage medium of the present application. DETAILED DESCRIPTION

[0021] The scheme of the embodiment of the present application is described in detail below in conjunction with the drawings of the specification.

[0022] In the following description, for the purpose of explanation rather than limitation, specific details such as specific system structures, interfaces, and technologies are provided to facilitate a thorough understanding of the present application.

[0023] The term "and / or" in this article is only a description of the association relationship of associated objects, indicating that there may be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the objects associated before and after are in an "or" relationship. In addition, "many" in this article means two or more than two. In addition, the term "at least one" in this article means any combination of at least two of any one or more of a plurality of, for example, including at least one of A, B, and C, can mean including any one or more elements selected from the set consisting of A, B, and C.

[0024] The present application provides some image data processing methods and image data processing devices. The application scenarios of the image data processing method include but are not limited to scenarios of intelligent analysis of collected images. The executor of the image data processing method may be an image data processing device or an intelligent storage server. For example, the image data processing device may be arranged in a terminal device or a server or other processing device, wherein the terminal device may be a device for image data processing, a user equipment (UE), a mobile device, a user terminal, a terminal, a cellular phone, a cordless phone, a personal digital assistant (PDA), a handheld device, a computing device, a vehicle-mounted device, etc. In some possible implementations, the image data processing method may be implemented by a processor calling computer-readable instructions stored in a memory.

[0025] See also Figure 1 , Figure 1 This is a flow chart of an embodiment of the image data processing method of the present application. Figure 1 Specifically, the image data processing method may include the following steps:

[0026] Step S11: obtaining a plurality of continuous frames of images captured by the image acquisition device within a preset time period.

[0027] The image acquisition device may be any device capable of performing image acquisition. The preset time period may be dynamically determined according to the image data processing accuracy. In some application scenarios, the preset time period may be 20 minutes or 1 hour. In other application scenarios, the preset time period may be a preset divided time period obtained by dividing the time period of each day, specifically, it may be a time period from 8:00 to 9:00, 9:00 to 10:00, etc. obtained by presetting each day according to each hour. Several frames of images may be continuous frame images acquired by the image acquisition device for the same image acquisition area within the preset time period. For example, several frames of images may be image code streams acquired for the image acquisition area. Among them, the same image acquisition area may be an acquisition area that needs to be intelligently analyzed. Intelligent analysis may be image data analysis performed on several frames of images. Specifically, intelligent analysis may be a scene that requires image data analysis, such as license plate detection, facial recognition of target objects, posture assessment of target objects, etc.

[0028] The above step S11 may be in response to the image acquisition function of the image acquisition device being started to acquire the above several frames of images.

[0029] Step S12: Detect each image to obtain a motion detection result of each image.

[0030] Each motion detection result includes whether the image contains a motion detection event or does not contain a motion detection event.

[0031] The image acquisition device includes an image sensor. The image sensor has a working state and a dormant state. Among them, the image sensor in the working state can have a motion detection mode. Specifically, the motion detection mode can be a motion detection function of the image sensor. In some application scenarios, the motion detection function can be an image sensor adapted to a motion detection function, and a control signal is output when the picture changes. Exemplarily, the motion detection mode can be a motion detection function (Motion Detect, MD). Specifically, the image output mode can be that the image sensor can send the captured image data to the processor.

[0032] The moving object may be all the objects to be confirmed including the target object. The target object may be an object that needs to be analyzed for the above-mentioned image data. The object to be confirmed may be a predetermined type of organism, a predetermined type of object, or a predetermined type of vehicle. Specifically, the object to be confirmed may be an object type that can cause the picture corresponding to the image acquisition area to change in the captured frames. The image sensor in the motion detection mode is controlled to detect the image data to obtain the motion detection results of each image. The motion detection result of each image includes that the image contains a motion detection event, or that the image does not contain a motion detection event. Specifically, when the motion detection result of each image is that the image contains a motion detection event, the motion detection result may be a first motion detection result about the relevant information containing the moving object in the image. When the motion detection result of each image is that the image does not contain a motion detection event, the motion detection result may be a second motion detection result about the relevant information not containing the moving object in the image. It can be understood that the inclusion of a motion detection event in any frame of image is equivalent to the presence of a moving object in the image.

[0033] Step S13: In response to the motion detection result of at least one frame of image being that the image contains a motion detection event, determining a target image set from a plurality of frames of image.

[0034] In response to the motion detection result of at least one frame of image being that the image contains a motion detection event, a target image set is determined from a plurality of frames of image so as to perform data analysis on the target image set.

[0035] The motion detection result of at least one frame of image is that the image contains a motion detection event, which is used to indicate that at least one frame of image among the plurality of frames of image contains a motion object. The target image set is at least part of the images among the plurality of frames of image. The target image set includes at least images corresponding to the motion objects or motion detection events contained in the plurality of frames of image.

[0036] In some application scenarios, the above method of determining the target image set from a number of frame images may be to directly divide the images corresponding to the moving objects or motion detection events contained in the number of frame images into the target image set. In other application scenarios, the above method of determining the target image set from a number of frame images may be to first determine the image corresponding to the moving objects or motion detection events contained in the number of frame images, and determine the image as the reference image. Then, the reference image and at least one adjacent frame image to the reference image are divided into the target image set. The adjacent frame image is an image that is before and / or after the reference image in the number of frame images.

[0037] The data analysis of the target image set may be performed by using the images included in the target image set to perform data analysis to obtain data analysis results. The data analysis may be the above-mentioned intelligent analysis.

[0038] The above scheme detects several consecutive frames of images captured by the image acquisition device within a preset time period to obtain motion detection results of each image. Each motion detection result includes whether the image contains a motion detection event or does not contain a motion detection event. Compared with the need to perform subsequent data analysis on all frame images, the present application determines at least part of the several frame images in order to perform data analysis on the target image set when the motion detection result of at least one frame image is that the image contains a motion detection event. This allows data analysis to be performed only on target image sets with higher importance, thereby improving the utilization of computing resources during the data analysis process.

[0039] See also Figure 2 , Figure 2 This is a flow chart of an embodiment of the image data processing method of the present application. Figure 2 .

[0040] In some embodiments, the above step S13 may include the following steps: Step S21: For each image, in response to the image satisfying a preset condition, the image is used as the first target image. The preset condition includes that the motion detection result of the image is that the image contains a motion detection event, and the motion detection results of a preset number of frames of images before the image are that the image does not contain a motion detection event. Step S22: Determine the second target image from the candidate image set. The candidate image set includes a number of candidate images, each candidate image is an image that is after the first target image in a number of frames of images, and the second target image is an image in the candidate image set whose motion detection result is that the image does not contain a motion detection event. Step S23: Divide the first target image, the second target image, and the image between the first target image and the second target image into the target image set.

[0041] The preset number of frame images may be historical images or default frame images of the preset number of frames corresponding to each image. The preset number may be dynamically set according to the accuracy requirements of image data processing. In some application scenarios, the above step S21 may be that for each image, when the image is the first frame image among a number of frame images, the preset number of frame images are the default frame images. Based on the difference between the first frame image and the default frame image, the first frame image is determined to be the first target image. For example, at the intersection time point of each preset time period, the first frame image among the number of frame images may contain a moving object. The default frame image is the last frame image collected in the last preset time period. The preset condition is that the default frame image does not contain a motion detection event, and the first frame image contains a motion detection event. Based on this, if the default frame image does not contain a motion detection event, the first frame image contains a motion detection event, and the first frame image among the number of frame images is determined as the first target image. In the case where the first frame image does not meet the above preset conditions, it is continued to determine whether the next frame image after the first frame image among the number of frame images meets the preset conditions. Exemplarily, the first target image is the motion detection result of the first image among the number of frame images, and the image contains a motion detection event. In other application scenarios, the first target image may also be that when a target image set has been determined among several frame images, the motion detection result of the first image in each frame image after the previous target image set among the several frame images is that the image contains a motion detection event.

[0042] In some other application scenarios, the above step S21 may be that for each image, when the image is a non-first frame image among several frame images, the preset number of frame images are a preset number of historical images. A historical image is an image that is before the non-first frame image among several frame images. Specifically, the preset number of historical images are images that are before the non-first frame image among several frame images and are adjacent to the preset number of frames. The preset condition is that the preset number of historical images does not contain a motion detection event, and the non-first frame image contains a motion detection event. The preset number may be one frame or more frames. In some application scenarios, the value of the preset number is greater than or equal to the value of the following preset number of times. Based on this, when the preset number of historical images does not contain a motion detection event, and the non-first frame image contains a motion detection event, the non-first frame image is determined as the first target image. When the non-first frame image does not meet the above preset conditions, it is further determined whether the next frame image after the non-first frame image among several frame images meets the preset conditions.

[0043] In some application scenarios, if none of the above-mentioned frames of images meets the above-mentioned preset conditions, the image data corresponding to the above-mentioned frames of images will be discarded and no subsequent data analysis will be performed. The image data corresponding to the above-mentioned frames of images are data of lower importance, and it is possible to perform data analysis only on image data of higher importance, thereby improving the utilization of computing resources during the data analysis process.

[0044] The second target image is an image that is after the first target image among several frames of images, and the motion detection result is that the image does not contain a motion detection event. In some application scenarios, the second target image is the most recent frame of image that is after the first target image among several frames of images, and the motion detection result is that the image does not contain a motion detection event. In some application scenarios, the above step S22 may be to use the image that is closest to the first target image and whose motion detection result is the second motion detection result among the images included in the candidate image set as the second target image. In other application scenarios, the above step S22 may be to use the last candidate image in each frame of candidate images corresponding to the cumulative number of times as the second target image in response to the cumulative number of times the motion detection result of the images in the candidate image set is the second motion detection result reaching a preset number.

[0045] It can be considered that by determining the first target image and the second target image, the images included in the target image set can be made more important, which can increase the importance of the images that require data analysis, thereby improving the computing resource utilization rate of the data analysis process.

[0046] In some embodiments, the above step S22 may include the following steps: first, based on the motion detection results of each candidate image, determine the number of consecutive times in which the motion detection results of the candidate image set are that the candidate image does not contain a motion detection event. Then, in response to the consecutive number of times reaching a preset number of times, determine the last candidate image in each frame of the candidate image corresponding to the consecutive number of times as the second target image.

[0047] The continuous number is used to indicate that the motion detection results corresponding to the continuous frame images in the candidate image set do not include a motion detection event, and the continuous frame images are at least one continuous frame in the candidate image set.

[0048] In response to the continuous number not reaching the preset number, the step of re-performing the above step based on the motion detection results of each candidate image to determine the motion detection results in the candidate image set as the continuous number of times that the candidate images do not contain motion detection events.

[0049] In some application scenarios, it is assumed that when the motion detection result of the image is that the image contains a motion detection event, the frame image is marked as 0, and it is assumed that when the motion detection result of the image is that the image does not contain a motion detection event, the frame image is marked as 1. If the marks of the candidate images of the five consecutive frames after the first target image is determined are 0, 1, 0, 1, and 1 respectively. The consecutive times are 1 and 2 respectively. If the preset number is 2. For example, the first consecutive number is 1, and the consecutive number does not reach the preset number, and it is continued to be determined whether the consecutive number in the candidate image set reaches the preset number. The second consecutive number is 2, and the consecutive number reaches the preset number, and the last candidate image in each frame of the candidate image corresponding to the second consecutive number is determined as the second target image. That is, the fifth frame of the candidate image after the first target image is used as the second target image.

[0050] Step S23: Divide the first target image, the second target image, and the image between the first target image and the second target image into a target image set.

[0051] The image between the first target image and the second target image may be an image after the first target image and between the second target images in a plurality of frames of images.

[0052] The target image set may include at least one target image group, and each target image group includes at least a first target image and a second target image. The above step S23 may be to treat the first target image, the second target image, and the image between the first target image and the second target image as a target image group, and divide the target image group into the target image set. After determining a target image group, execute the above step S11 to continue to determine the next target image group until it is determined whether a plurality of frame images need to be divided into the target image set.

[0053] In some other application scenarios, the time when the first target image is located is taken as the starting time, and the time when the second target image is located is taken as the ending time. The images in the plurality of frames of images that are between the starting time and the ending time are divided into the target image set.

[0054] It can be considered that using the comparison between the consecutive times and the preset times to determine the second target image in the target image set can avoid frequently determining the target image group in the target image set, making the division of the target image group more reasonable, thereby improving the efficiency in the subsequent data analysis process.

[0055] See also Figure 3 , Figure 3 This is a flow chart of an embodiment of the image data processing method of the present application. Figure 3 .

[0056] In some embodiments, the above step S12 may include the following steps: Step S31: Obtain the channel configuration mode of the image acquisition device in the current time period. The channel configuration mode includes a data analysis mode or a data processing mode. The data analysis mode is used to perform data analysis on a plurality of frames of images, and the data processing mode is used to determine a target image set from a plurality of frames of images. Step S32: In response to the channel configuration mode being the data processing mode, perform a step of detecting each image to obtain a motion detection result of each image.

[0057] In different channel configuration modes, the image acquisition device will perform different processing on the acquired images. Wherein, when the channel configuration mode is the data analysis mode, the image acquisition device will perform data analysis on the acquired images. When the channel configuration mode is the data processing mode, the image acquisition device will perform data processing on the acquired images. The data processing may be to execute the above steps S11 to S13 to determine the target image set so that only the images in the target image set are subsequently analyzed when data analysis can be performed.

[0058] In other application scenarios, in response to the channel configuration mode being the data analysis mode, data analysis is performed on the collected image to obtain a data analysis result.

[0059] It can be considered that in different channel configuration modes, the image acquisition device will perform different processing on the acquired images, which can improve the utilization rate of the image processing resources of the channel corresponding to the image acquisition device.

[0060] Exemplarily, the intelligent storage server can execute the acquisition of a number of consecutive frames of images collected by the image acquisition device within a preset time period. Each intelligent storage server corresponds to an image acquisition device. Under different channel configuration modes of the image acquisition device, each intelligent storage server performs data processing or data analysis. The intelligent analysis specification (number of channels) of the computing power card of each intelligent storage server device is affected by the combined influence of decoding capability and computing power. When the decoding capability of some devices is sufficient, the computing power cannot analyze all decoding channels. In addition, the number of access and storage channels of the device is greater than the intelligent analysis specification of the computing power card. These situations cause the maximum analysis specification of the device to be less than the actual decoding channel and the maximum number of accesses.

[0061] Specifically, the channel configuration mode of the image acquisition device corresponding to each channel is confirmed. The number of target images of each channel is predicted according to the number of historical target images of each channel, thereby predicting the channel configuration mode of the channel. If there is no historical data to rely on, the intelligence can be turned on in the default channel sequence until the intelligence is fully turned on, and the data processing mode is turned on for the channels that are not turned on. The data processing mode can be used to mark the target start time and the target end time of several frames of images collected.

[0062] For example, if the channel configuration mode is mode A, the channel performs intelligent analysis, that is, data analysis, in some time periods, and only decodes and then performs data processing, that is, the above-mentioned marking processing, in the remaining time periods, and records the time periods corresponding to the image frames with motion detection into the database. The channel configuration mode is mode B. The channel performs intelligent analysis, that is, data analysis, around the clock. If the channel configuration mode is mode C, the channel only decodes and then performs detection to obtain motion detection results, and extracts the time periods with moving objects. It can be understood that mode A performs the above-mentioned data analysis in some preset time periods every day, and performs the above-mentioned data processing in some preset time periods.

[0063] See also Figure 4 , Figure 4 This is a flow chart of an embodiment of the image data processing method of the present application. Figure 4 .

[0064] In some embodiments, before the above step S11, the above image data processing method may further include the following steps: Step S41: Obtaining the time statistics result of at least one frame of historical target image in the historical target image set. Each historical target image is a target image before a preset time period, and the time statistics result includes the statistical number of time periods in which each historical target image is located in the time period to be divided. Step S42: Based on the time statistics result, determining the channel configuration mode to which the time period to be divided belongs.

[0065] Each historical target image in the historical target image set is a target image before a preset time period. The time period to be divided is each preset time period obtained by dividing each day. The time statistics result includes the number of each historical target image in the historical target image set in each preset time period within the preset number of days. For example, the preset number of days can be the number of days corresponding to a month, the number of days corresponding to half a year, etc. Specifically, the time statistics result includes the number distribution of each historical target image in the historical target image set in the same preset time period every day. The above step S42 can be based on the number distribution of each historical target image in the historical target image set in the same preset time period, and determine the channel configuration mode to which the same preset time period belongs in the time period to be divided. For the same preset time period, the number distribution of each historical target image in the historical target image set can be the median, mean, etc. of each historical target image in the historical target image set in the same preset time period in each preset number of days. In response to the number distribution of each historical target image in the historical target image set being greater than or equal to the preset number distribution, the channel configuration model to which the preset time period belongs determines the data analysis mode. Among them, the number distribution of each historical target image in the historical target image set being greater than or equal to the preset number distribution indicates that the image acquisition device has a high demand for data analysis in the preset time period. In response to the number distribution of each historical target image in the historical target image set being less than the preset number distribution, the channel configuration model to which the preset time period belongs determines the data processing mode. The fact that the number distribution of each historical target image in the historical target image set is less than the preset number distribution indicates that the image acquisition device has a low demand for data analysis in the preset time period.

[0066] Exemplarily, the preset time period is a time period from eight to nine, nine to ten, etc. obtained by presetting and dividing each day according to each hour. The preset time period in the above step S11 is the current time period of the day. The historical target image set includes a number of historical target images, each of which is a historical image in the target image set determined based on a historical image collected in the same time period as the current time period of the day in the historical days before the day. Among them, the time period to be divided is a time period in the same time period as the current time period of the day in the historical days before the day. If the acquisition frequency of the image acquisition device in each time period is the same, the number of images collected in each time period is the same. In some application scenarios, the channel configuration mode to which the target time period in the time period to be divided belongs is directly determined according to the statistical number of times corresponding to each historical target image. The target time period is a preset time period in the time period to be divided that is in the same time period as each historical target image. For example, the acquisition time periods of each historical target image are respectively preset time periods corresponding to eight to nine o'clock in the previous day and the previous two days. The target time period in the time period to be divided is the preset time period corresponding to eight to nine o'clock in the day.

[0067] In some embodiments, before the above step S42, the above image data processing method may further include the following steps: performing preset processing on the time statistical result to obtain a new time statistical result.

[0068] The historical target image set includes at least one historical target image group. The above-mentioned time statistical result includes the quantitative statistical results corresponding to the historical target image set in each preset time period. The quantitative statistical result of each preset time period includes the total number of historical target images in each historical target image group in each preset time period. The new time statistical result can represent the quantitative distribution of the historical target image set in each preset time period. The larger the numerical value corresponding to the new time statistical result, the more important the image collected in the preset time period corresponding to the new time statistical result is.

[0069] The preset processing may be to clean the number statistics results corresponding to the historical target image set in each preset time period, and obtain a new number statistics result corresponding to the historical target image set in each preset time period. In some application scenarios, for the same preset time period, if there are at least three historical target image groups in the historical target image set in the preset time period, the number statistics result of the preset time period includes the total number of historical target images in each historical target image group corresponding to the preset time period, and the above-mentioned data cleaning may be to remove the maximum and / or minimum total number values ​​in the number statistics result of the preset time period, and obtain a new number statistics result of the preset time period. In other application scenarios, for the same preset time period, if there are less than three historical target image groups in the historical target image set in the preset time period, the number statistics result of the preset time period includes the total number of historical target images in each historical target image group corresponding to the preset time period, and the above-mentioned data cleaning may be to take the average value of the total number corresponding to each group in the number statistics result of the preset time period, and use the average value as the new number statistics result of the preset time period.

[0070] In some embodiments, the above step S42 may include the following steps: based on the new time statistics result, determining the channel configuration mode to which the time period to be divided belongs.

[0071] Determine whether the new time statistics result corresponding to each preset time period is less than a preset value. In response to the new time statistics result corresponding to each preset time period being greater than or equal to the preset value, determine the channel configuration mode to which the time period of the historical target image belongs as the data analysis mode. Or in response to the new time statistics result corresponding to each preset time period being less than the preset value, determine the channel configuration mode to which the time period of the historical target image belongs as the data processing mode. The time period of the historical target image is the preset time period corresponding to each new time statistics result.

[0072] It can be considered that by pre-processing the time statistical results, obtaining new time statistical results can avoid the situation where the number statistical values ​​of images in the time statistical results are extremely distributed, improve the subsequent new time statistical results, and determine the accuracy of the channel configuration mode to which the time period to be divided belongs.

[0073] See also Figure 5 , Figure 5 This is a flow chart of an embodiment of the image data processing method of the present application. Figure 5 .

[0074] In some embodiments, the above step S42 may include the following steps: for each time period of the historical target image set, perform the following Figure 5 The following steps are shown: Step S51: Determine whether the statistical number of the time period in which the historical target image set is located is less than the preset statistical number. Step S52: In response to the statistical number of the time period in which the historical target image set is located being greater than or equal to the preset statistical number, determine the channel configuration mode to which the time period in which the historical target image set is located as the data analysis mode. Or, Step S53: In response to the statistical number of the time period in which the historical target image set is located being less than the preset statistical number, determine the channel configuration mode to which the time period in which the historical target image set is located as the data processing mode.

[0075] The statistical number of the time period of the historical target image set may be the total number of historical target images in the historical target image set. The statistical number of the time period of the historical target image set may also include the total number of historical target images in each group of historical target images in the historical target image set.

[0076] In some application scenarios, when the statistical number of the time period in which the historical target image set is located is the total number of historical target images in the historical target image set, step S52 or step S53 is directly executed.

[0077] In other application scenarios, when the statistical number of the time period in which the historical target image set is located includes the total number of historical target images corresponding to each group of historical target image groups in the historical target image set, before the above step S51, for the historical target image set of the same preset time period, the above preset processing is performed on the total number of historical target images corresponding to each group of historical target image groups in the historical target image set to obtain a new time statistical result belonging to the preset time period. The above step S51 can be to determine whether the new time statistical result is less than a preset value. In response to the new time statistical result corresponding to each preset time period being greater than or equal to the preset value, the channel configuration mode to which each preset time period belongs is determined as a data analysis mode. Or in response to the new time statistical result corresponding to each preset time period being less than the preset value, the channel configuration mode to which each preset time period belongs is determined as a data processing mode.

[0078] It can be considered that the channel configuration mode to which each preset time period belongs can be determined more specifically through the statistical number of the time period in which the historical target image set is located.

[0079] The historical data is counted, and the total number of historical target images in the intelligent data of each channel in each time period of the previous preset days is counted to obtain the above time statistical results.

[0080] Table 1: Example table of time statistics results

[0081]

[0082] Taking 30 days as an example, for any preset time period, remove the minimum and maximum values ​​of the preset time period for 30 days, take the average value M of the remaining data, and use the average value M as the new time statistics result. Determine the threshold N (for example, N=50) based on the empirical value. If the average value M in the new time statistics result is greater than or equal to N, the preset time period is a peak time period. If the average value M in the new time statistics result is less than N, the preset time period is an off-peak time period. Determine the configuration mode of the channel. If the channel predicts that all time periods are peak time periods, determine to configure it as mode B, and perform intelligence around the clock. If all channels do not meet the threshold of the peak time period, configure it as mode C, and perform labeling all day. In other cases, configure it as mode A, perform intelligence in some time periods, and label in some time periods.

[0083] In some embodiments, the target image set includes at least one frame of target image. After the above step S13, the above image data processing method may further include the following steps: first, based on the target image set, determine the corresponding time of the first target image and the time of the last target image in the target image set. Then, use the corresponding time of the first target image as the target start time, and use the time of the last target image as the target end time so as to decode and perform data analysis on several frames of images according to the target start time and the target end time.

[0084] The target image set may include at least one target image group, and each target image group includes at least one frame of target image.

[0085] The above step of determining the corresponding time of the first target image and the time of the last target image in the target image set based on the target image set may be: for each target image group, determining the corresponding time of the first target image and the time of the last target image in the target image group.

[0086] The above-mentioned step of taking the time corresponding to the first target image as the target start time and the time corresponding to the last target image as the target end time can be: for each target image group, taking the time corresponding to the first target image in the target image group as the target start time of the target image group, and taking the time corresponding to the last target image in the target image group as the target end time of the target image group.

[0087] For each target image set, the target start time and target end time of each target image group are taken as a set of marking data, and each marking data is taken as marking data corresponding to the target image set so that several frames of images can be decoded according to the marking data corresponding to the target image set to obtain the target image set and perform data analysis on each frame of target image in the target image set.

[0088] It can be considered that compared with giving the entire target image set to the subsequent data analysis process, directly giving the target start time and target end time of each group of target image groups in the target image set within a preset time period to the subsequent data analysis process, before data analysis, only decoding several frames of images according to the target start time and target end time of each group of target image groups is performed to directly obtain the target image set, which can improve the utilization rate of image processing resources.

[0089] Exemplarily, the stream pulling may be a code stream collected by an image acquisition device and decoded to obtain a plurality of frames of images, wherein the format of the plurality of frames of images is a YUV image. Step S12 is executed to perform intelligent motion detection analysis on each of the plurality of frames of images to obtain motion detection results of each frame of images.

[0090] Judge each frame of several frames one by one. If the motion detection result of the current frame contains a motion detection event, judge whether all the currently analyzed bitstreams have analyzed the motion detection target. If Flg is equal to 0, it means that the current bitstream has analyzed the motion detection target for the first time. Record the frame time t1 when the motion detection target is first triggered, and set the flag position of the current bitstream to 1. If Flg is not equal to 0, it means that this bitstream is not analyzed for the motion detection target for the first time. Continue to pull the stream for intelligent motion detection analysis until the target end time corresponding to t1 is determined.

[0091] Judge each frame of several frames one by one. If the motion detection result of the current frame does not contain a motion detection event, the Cnt value used to record the number of motion detection statistics is set to 0 after the motion detection alarm is generated. Determine whether the motion detection target has been analyzed for this segment of the code stream. If the motion detection target has been analyzed, the Cnt value of the number of motion detection statistics is increased by 1. The moment when the image that has not been analyzed for the motion detection target is recorded as the end time t2. Determine whether the cumulative number of motion detection targets Cnt is greater than the set threshold X. If so, this process ends, and the effective target time period t1 to t2 of this segment of the code stream is recorded in the database for subsequent intelligent analysis, that is, data analysis. If the cumulative number of motion detection targets Cnt is less than or equal to the set threshold X, the stream is re-pull and decoded for motion detection analysis. The value of the threshold X can be configured according to the actual situation. It is generally recommended to be greater than or equal to the code stream GOP.

[0092] See also Figure 6 , Figure 6 It is a schematic diagram of a target image set in an embodiment of the image data processing method of the present application.

[0093] The code stream may be a segment of video data. The video data includes a number of frames of images. The video data is decoded into a number of frames of images. The marking process may be to determine the target start time and target end time of each target image group of the target image set obtained from the video data and mark them. Figure 6 In the video data shown, the target image set includes two target image groups, a first target image group and a second target image group. The time period from T1 to T2 corresponds to the first target image group in the target image set. T1 is the target start time corresponding to the first target image group. T2 is the target end time corresponding to the first target image group. The time period from T3 to T4 corresponds to the second target image group in the target image set. T3 is the target start time corresponding to the third target image group. T4 is the target end time corresponding to the third target image group. Marking can be marking the segment of code stream or video data with the target start time and the target end time.

[0094] For example, in the above-mentioned mode A, when a channel exits the intelligent analysis and switches to the labeling mode, that is, when a channel switches from the data analysis mode to the data processing mode, the analyzer resources of the channel are released. After the module corresponding to the data processing responsible for labeling applies for the analyzer resources, it starts to work. The module corresponding to the data processing responsible for labeling labels the pulled video data, marking the target start time and target end time in the target image set determined in the video data. When a channel switches from the data processing mode to the data analysis mode, after the module corresponding to the rich data analysis applies for the analyzer resources, it reads the corresponding video data according to the marked target start time and target end time obtained from the database for decoding, and then sends it to the algorithm for intelligent analysis.

[0095] The above scheme detects several consecutive frames of images captured by the image acquisition device within a preset time period to obtain motion detection results of each image. Each motion detection result includes whether the image contains a motion detection event or does not contain a motion detection event. Compared with the need to perform subsequent data analysis on all frame images, the present application determines at least part of the several frame images in order to perform data analysis on the target image set when the motion detection result of at least one frame image is that the image contains a motion detection event. This allows data analysis to be performed only on target image sets with higher importance, thereby improving the utilization of computing resources during the data analysis process.

[0096] See also Figure 7 , Figure 7 It is a structural diagram of an embodiment of the image data processing device of the present application. The image data processing device 70 includes an acquisition module 71, a detection module 72, and a determination module 73. The acquisition module 71 is used to acquire a plurality of continuous frames of images acquired by the image acquisition device within a preset time period; the detection module 72 is used to detect each image to obtain a motion detection result of each image, and each motion detection result includes whether the image contains a motion detection event or does not contain a motion detection event; the determination module 73 is used to determine a target image set from a plurality of frames of images in response to the motion detection result of at least one frame of image being that the image contains a motion detection event so as to perform data analysis on the target image set, and the target image set is at least part of the images in the plurality of frames of images.

[0097] The above scheme detects several consecutive frames of images captured by the image acquisition device within a preset time period to obtain motion detection results of each image. Each motion detection result includes whether the image contains a motion detection event or does not contain a motion detection event. Compared with the need to perform subsequent data analysis on all frame images, the present application determines at least part of the several frame images in order to perform data analysis on the target image set when the motion detection result of at least one frame image is that the image contains a motion detection event. This allows data analysis to be performed only on target image sets with higher importance, thereby improving the utilization of computing resources during the data analysis process.

[0098] Please refer to the image data processing method for the functions performed by each module, which will not be repeated here.

[0099] See also Figure 8 , Figure 8 80 is a schematic diagram of the structure of an embodiment of an electronic device of the present application. The electronic device 80 includes a memory 81 and a processor 82, and the processor 82 is used to execute program instructions stored in the memory 81 to implement the steps in the above-mentioned image data processing method embodiment. In a specific implementation scenario, the electronic device 80 may include but is not limited to: a multi-camera device, a microcomputer, and a server. In addition, the electronic device 80 may also include a mobile device such as a laptop computer and a tablet computer, which is not limited here.

[0100] Specifically, the processor 82 is used to control itself and the memory 81 to implement the steps in the above-mentioned image data processing method embodiment. The processor 82 can also be called a CPU (Central Processing Unit). The processor 82 may be an integrated circuit chip with signal processing capabilities. The processor 82 can also be a general-purpose processor, a digital signal processor (Digital Signal Processor, DSP), an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field-programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. In addition, the processor 82 can be implemented by an integrated circuit chip.

[0101] The above scheme detects several consecutive frames of images captured by the image acquisition device within a preset time period to obtain motion detection results of each image. Each motion detection result includes whether the image contains a motion detection event or does not contain a motion detection event. Compared with the need to perform subsequent data analysis on all frame images, the present application determines at least part of the several frame images in order to perform data analysis on the target image set when the motion detection result of at least one frame image is that the image contains a motion detection event. This allows data analysis to be performed only on target image sets with higher importance, thereby improving the utilization of computing resources during the data analysis process.

[0102] See also Fig. 9 , Fig. 9 The computer-readable storage medium 90 stores program instructions 901, which implement the steps in any of the above-mentioned image data processing method embodiments when executed by a processor.

[0103] The above scheme detects several consecutive frames of images captured by the image acquisition device within a preset time period to obtain motion detection results of each image. Each motion detection result includes whether the image contains a motion detection event or does not contain a motion detection event. Compared with the need to perform subsequent data analysis on all frame images, the present application determines at least part of the several frame images in order to perform data analysis on the target image set when the motion detection result of at least one frame image is that the image contains a motion detection event. This allows data analysis to be performed only on target image sets with higher importance, thereby improving the utilization of computing resources during the data analysis process.

[0104] In some embodiments, the functions or modules included in the device provided by the embodiments of the present disclosure can be used to execute the method described in the above method embodiments. The specific implementation can refer to the description of the above method embodiments, and for the sake of brevity, it will not be repeated here.

[0105] The above description of various embodiments tends to emphasize the differences between the various embodiments. The same or similar aspects can be referenced to each other, and for the sake of brevity, they will not be repeated herein.

[0106] In the several embodiments provided in the present application, it should be understood that the disclosed methods and devices can be implemented in other ways. For example, the device implementation described above is only schematic. For example, the division of modules or units is only a logical function division. There may be other division methods in actual implementation, such as units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, and the indirect coupling or communication connection of devices or units can be electrical, mechanical or other forms.

[0107] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0108] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) or a processor to execute all or part of the steps of each implementation method of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program code.

Claims

1. A method for processing image data, characterized in that: The method comprises: The image acquisition device acquires a plurality of continuous frames of images within a preset time period; Detecting each of the images to obtain a motion detection result of each of the images, each of the motion detection results including whether the image contains a motion detection event or does not contain a motion detection event; In response to a motion detection result of at least one frame of the image being that the image contains a motion detection event, determining a target image set from the plurality of frames of images so as to perform data analysis on the target image set, the target image set being at least a portion of the plurality of frames of images, the target image set comprising at least one target image group, each of the target image groups comprising at least one frame of target image; In response to the motion detection result of at least one frame of the image being that the image contains a motion detection event, determining a target image set from the plurality of frames of images comprises: For each of the images, in response to the image satisfying a preset condition, the image is used as a first target image, the preset condition comprising that a motion detection result of the image is that the image contains a motion detection event, and a motion detection result of a preset number of frames of images before the image is that the image does not contain a motion detection event; Determine a second target image from a candidate image set, wherein the candidate image set includes a plurality of candidate images, each of the candidate images is an image located after the first target image in the plurality of frames of images, and the second target image is an image in the candidate image set whose motion detection result indicates that the image does not contain a motion detection event; dividing the first target image, the second target image, and an image between the first target image and the second target image into the target image set; The method of determining the second target image from the candidate image set includes: based on the motion detection results of each of the candidate images, determining the number of consecutive times that the motion detection results in the candidate image set are that the candidate images do not contain motion detection events, the consecutive number of times is used to indicate that the motion detection results corresponding to consecutive frame images in the candidate image set are that they do not contain motion detection events; in response to the consecutive number of times reaching a preset number of times, determining the last candidate image in each frame of candidate images corresponding to the consecutive number of times as the second target image; or, in response to the consecutive number of times not reaching the preset number of times, re-executing the step of determining the number of consecutive times that the motion detection results in the candidate image set are that the candidate images do not contain motion detection events based on the motion detection results of each of the candidate images.

2. The method according to claim 1, characterized in that: The detecting of each of the images to obtain a motion detection result of each of the images includes: Acquire a channel configuration mode of the image acquisition device in a current time period, wherein the channel configuration mode includes a data analysis mode or a data processing mode, wherein the data analysis mode is used to perform data analysis on the plurality of frames of images, and the data processing mode is used to determine the target image set from the plurality of frames of images; In response to the channel configuration mode being the data processing mode, the step of detecting each of the images to obtain a motion detection result for each of the images is performed.

3. The method according to claim 2, characterized in that Before the image acquisition device acquires a plurality of consecutive frames of images within a preset time period, the method further includes: Obtaining a time statistical result of at least one frame of a historical target image in a historical target image set, wherein each of the historical target images is a target image before a preset time period, and the time statistical result includes the statistical number of time periods in which each of the historical target images is located in the time period to be divided; Based on the time statistics result, the channel configuration mode to which the time period to be divided belongs is determined.

4. The method according to claim 3, characterized in that: The determining, based on the time statistics result, the channel configuration mode to which the time period to be divided belongs includes: For each time period of the historical target image set, the following steps are performed: Determine whether the statistical number of the time period of the historical target image set is less than a preset statistical number; In response to the statistical number of the time period in which the historical target image set is located being greater than or equal to the preset statistical number, determining the channel configuration mode to which the time period in which the historical target image set is located belongs as the data analysis mode; or, In response to the statistical number of the time period in which the historical target image set is located being less than the preset statistical number, the channel configuration mode to which the time period in which the historical target image set is located belongs is determined as the data processing mode.

5. The method according to claim 3, characterized in that: Before determining the channel configuration mode to which the time period to be divided belongs based on the time statistics result, the method further includes: Performing preset processing on the time statistics result to obtain a new time statistics result; The determining, based on the time statistics result, the channel configuration mode to which the time period to be divided belongs includes: Based on the new time statistics result, the channel configuration mode to which the time period to be divided belongs is determined.

6. The method according to claim 1, characterized in that The target image set includes at least one frame of target image. After determining the target image set from the plurality of frames of images in response to the motion detection result of at least one frame of the image being that the image includes a motion detection event, the method further includes: Based on the target image set, determining the corresponding time of the first target image and the time of the last target image in the target image set; The time corresponding to the first target image is used as the target start time, and the time corresponding to the last target image is used as the target end time so as to decode the plurality of frames of images and perform data analysis according to the target start time and the target end time.

7. An electronic device, characterized in that: include: A memory and a processor, wherein the memory stores program instructions, and the processor retrieves the program instructions from the memory to execute the method according to any one of claims 1 to 6.

8. A computer-readable storage medium having program instructions stored thereon, characterized in that: When the program instructions are executed by a processor, they are used to implement the method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Video processing method and device

    CN108062507A

  • Video detection method and device, electronic equipment and computer readable medium

    CN110309720A

  • Image processing resource allocation method and storage medium

    CN116739881A