A method and system for processing data of a video transmission recorder
By setting the sampling time window T in the image transmission recorder, calculating the pixel change value between the image frames and filtering abnormal frames using adaptive thresholds, the problems of low image data processing efficiency and inaccurate abnormal event recognition in the prior art are solved, and efficient data storage and transmission are achieved.
Patent Information
- Application Number
- CN202411798879.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-09
- Publication Date
- 2025-07-25
- Estimated Expiration
- 2044-12-09
AI Technical Summary
When processing image data, existing image transmission recorders have problems such as insufficient filtering of unrelated data, missing or mislabeling of abnormal events, low encoding and association efficiency, resulting in increased storage and transmission burden, and the inability to accurately locate and mark the occurrence time of abnormal events.
The image data stream is collected through the graph transfer recorder, the sampling time window T is set, the pixel change value between adjacent frames of the N frame image is calculated, the differential data sequence is generated, and the abnormal frame is filtered based on the adaptive threshold R. After encoding and packaging, it is time stamped with the original image data stream to form an associated data record.
Improve the accuracy and reliability of image change detection, ensure sensitive identification of abnormal events in dynamic environments, and improve the efficiency and integrity of data storage and transmission through effective encoding and compression.
Smart Images

Figure CN119603456B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data analysis, and in particular to a method and system for processing data of a video transmission recorder. Background Art
[0002] With the development of video surveillance technology, image transmission and recording systems have been widely used in various industries, especially playing a crucial role in fields such as security monitoring, traffic management, and industrial production. Traditional image transmission recorders are usually used to capture and record image data streams in real time and transmit them to storage media or cloud servers. However, with the explosive growth of image data volume, how to efficiently process these large amounts of image data has become an urgent problem to be solved. To improve data processing efficiency, the technology of image transmission recorders has been continuously developed, adding functions such as compression coding, image differential analysis, and event-driven data capture. These technologies can effectively reduce data storage requirements, optimize the use of network bandwidth, and improve the real-time performance of data processing.
[0003] Although the prior art has made many progress in image data processing, there are still some deficiencies. For example, existing systems often rely only on simple inter-frame differences for data screening and fail to fully utilize pixel change information to deeply analyze image content. This method may generate a large amount of irrelevant data or mislabels, resulting in an increased burden on storage and transmission. In event-driven data capture, traditional technologies mostly rely on fixed time intervals or simple triggering mechanisms, which are prone to missing some important abnormal events and cannot accurately locate and mark the occurrence time of abnormal events. In addition, existing image data stream processing systems also lack an efficient solution for encoding and associating abnormal events, leading to difficulties in subsequent data retrieval and analysis. Summary of the Invention
[0004] In view of the problems existing in the prior art, the present invention proposes a method and system for processing data of a video transmission recorder.
[0005] Therefore, the present invention provides a method for processing data of a video transmission recorder, which can solve the problems mentioned in the background art.
[0006] To solve the above technical problems, the present invention provides the following technical solutions:
[0007] In a first aspect, an embodiment of the present invention provides a method for processing data of a video transmission recorder, which includes,
[0008] Collecting an image data stream through a video transmission recorder, setting a sampling time window T for the image data stream, and obtaining N frames of images within the sampling time window T;
[0009] Calculate the pixel change values between adjacent frames of the N frames of images to generate a differential data sequence;
[0010] Based on the differential data sequence, set a threshold R for data screening, and mark the differential data greater than the threshold R as abnormal frames;
[0011] Encode and pack the abnormal frames in chronological order to generate an abnormal event data packet;
[0012] Associate the time stamps of the abnormal event data packet with the original image data stream to form an associated data record.
[0013] As a preferred solution of the data processing method of the video transmission recorder according to the present invention, wherein: the generation of the differential data sequence includes:
[0014] Read the N frames of images in chronological order, and perform pixel-level differential operations between every two consecutive frames;
[0015] Based on the differential values of each pixel point, construct a differential matrix D;
[0016] Normalize the elements in the differential matrix D, and arrange the normalized differential matrix D in chronological order to form a differential data sequence including N - 1 matrices.
[0017] As a preferred solution of the data processing method of the video transmission recorder according to the present invention, wherein: the differential operation is as shown in the following formula:
[0018] D(x, y, i) = |P(x, y, i + 1) - P(x, y, i)| × w(x, y)
[0019] Wherein, D(x, y, i) represents the differential value at the coordinate (x, y) between the i-th frame and the (i + 1)-th frame, P(x, y, i) represents the pixel value at the coordinate (x, y) of the i-th frame image, and w(x, y) is the spatial weight coefficient;
[0020] The spatial weight coefficient is calculated by the following formula:
[0021]
[0022] Wherein, σ is the Gaussian kernel parameter for adjusting the spatial sensitivity, and α(i) is the time decay factor;
[0023] The time decay factor is calculated by the following formula:
[0024] α(i) = λ (N-i) ×(1 + β × V(i))
[0025] Wherein, λ is the attenuation base, V(i) is the local variance, β is the variance adjustment coefficient, and N is the total number of frames of the input image sequence.
[0026] As a preferred solution of the data processing method of the video transmission recorder according to the present invention, wherein: the normalization process is shown in the following formula:
[0027]
[0028] Wherein, K(i) is the adaptive correction factor;
[0029] The adaptive correction factor is calculated by the following formula:
[0030] K(i) = 1 + γ × log(1 + mean(D(i)))
[0031] Wherein, γ is an adjustable parameter, mean(D(i)) is the mean of the i-th frame difference matrix, max(D) is the maximum difference value in the i-th difference matrix D, and min(D) represents the minimum difference value in the i-th difference matrix D.
[0032] As a preferred solution of the data processing method of the video transmission recorder according to the present invention, wherein: the threshold R is dynamically set, including the following steps:
[0033] Calculate the mean and standard deviation for each difference matrix;
[0034] Use the environmental factor to correct the threshold;
[0035] Calculate the quality evaluation factor based on the local variance to obtain the threshold R;
[0036] The environmental factor is determined by the image entropy value and the motion complexity, where the image entropy value characterizes the richness of image information, and the motion complexity index reflects the severity of scene motion;
[0037] The quality evaluation factor is used to measure the influence degree of image quality on the threshold.
[0038] As a preferred solution of the data processing method of the video transmission recorder according to the present invention, wherein: the calculation of the threshold R is shown in the following formula:
[0039] R(i) = μ(i) + k × σ(i) × F(i)
[0040] Wherein, μ(i) is the mean of the i-th difference matrix, σ(i) is the standard deviation, k is the adjustment coefficient, and F(i) is the environmental factor;
[0041] The calculation of the environmental factor is shown in the following formula:
[0042] F(i) = [1 + η × H(i)] × S(i)
[0043] Where η is the weight coefficient, S(i) is the signal-to-noise ratio evaluation value, and H(i) is the image entropy value function;
[0044] The image entropy value function is shown as follows:
[0045] H(i) = -∑[p(j) × log(p(j))] × M(i)
[0046] Where p(j) is the normalized probability distribution of the gray values of the difference matrix, and M(i) is the motion complexity index;
[0047] The calculation of the motion complexity index is shown as follows:
[0048]
[0049] Where A is the normalization coefficient and Q(i) is the quality evaluation factor;
[0050] The calculation of the quality evaluation factor is shown as follows:
[0051] Q(i) = 1 - exp(-θ × V local (i))
[0052] Where θ is the adjustable parameter and V local (i) is the local variance.
[0053] As a preferred solution of the data processing method of the video transmission recorder according to the present invention, wherein: after determining the threshold R, the difference data sequence is screened, that is, for each difference matrix D norm (x, y, i) in the difference data sequence, its statistical eigenvalue E(i) is calculated;
[0054] The calculation of the statistical eigenvalue E(i) is shown as follows:
[0055]
[0056] When the condition E(i) > R(i) is satisfied, the corresponding i-th frame is marked as an abnormal frame, and at the same time, the abnormal degree coefficient C(i) is recorded:
[0057] C(i) = [E(i) - R(i)] × B(i)
[0058] Where B(i) is the reliability evaluation coefficient:
[0059] B(i) = tanh(ρ × S(i)) × (1 - exp(-E(i)))
[0060] Among them, ρ is an adjustable parameter, and S(i) is the signal-to-noise ratio evaluation value.
[0061] As a preferred solution of the method for processing data of the video transmission recorder according to the present invention, wherein: the triggering of the dynamic adjustment of the threshold R includes:
[0062] When the ambient light changes significantly, the statistical characteristics of the difference matrix will fluctuate, and at this time, the adjustment of the threshold R is triggered;
[0063] When the motion mode of the target in the monitoring scene changes, the threshold R is adjusted;
[0064] When there are problems with the image acquisition quality, the threshold R is adjusted accordingly;
[0065] When the background structure of the monitoring scene changes, the adjustment of the threshold R is triggered;
[0066] When there are multiple moving targets interfering with each other in the scene, the threshold is adjusted.
[0067] In a second aspect, an embodiment of the present invention provides a video transmission recorder data processing system, which includes:
[0068] A data acquisition module, configured to collect an image data stream through a video transmission recorder, set a sampling time window T for the image data stream, and obtain N frames of images within the sampling time window T;
[0069] A data sequence generation module, configured to calculate the pixel change values between adjacent frames of the N frames of images and generate a difference data sequence;
[0070] A threshold adjustment module, configured to set a threshold R based on the difference data sequence for data screening;
[0071] An abnormality determination module, configured to mark the difference data greater than the threshold R as an abnormal frame, encode and package the abnormal frames in chronological order to generate an abnormal event data packet;
[0072] A recording module, configured to perform timestamp association on the abnormal event data packet and the original image data stream to form an associated data record.
[0073] The beneficial effects of the present invention are as follows: by introducing spatial weight, time decay, and local variance adjustment, the detection accuracy and reliability of image changes are improved. During the processing, pixel changes between adjacent frames are calculated through differential operations, and adaptive thresholds are used to screen abnormal frames, ensuring the sensitive identification of abnormal events in a changing monitoring environment. At the same time, abnormal frames are effectively encoded and compressed, and timestamp association is performed with the original image data stream to ensure the efficiency and integrity of data storage and transmission. This method is applicable to target monitoring in dynamic environments, can adaptively adjust in different scenarios, and improves the intelligence and response speed of the monitoring system. BRIEF DESCRIPTION OF THE DRAWINGS
[0074] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings. Among them:
[0075] Figure 1 It is a flowchart of a data processing method for a video transmitter recorder. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0076] In order to make the above objects, features, and advantages of the present invention more obvious and understandable, the following will provide a detailed description of the specific embodiments of the present invention with reference to the drawings of the specification. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the scope of protection of the present invention.
[0077] In the following description, many specific details are set forth in order to fully understand the present invention. However, the present invention can also be implemented in other ways different from those described herein. Those skilled in the art can make similar extensions without departing from the connotation of the present invention. Therefore, the present invention is not limited by the specific embodiments disclosed below.
[0078] Secondly, the so-called "one embodiment" or "embodiment" herein refers to a specific feature, structure, or characteristic that can be included in at least one implementation manner of the present invention. The phrase "in one embodiment" appearing in different places in this specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that excludes other embodiments.
[0079] The present invention will be described in detail with reference to the schematic diagrams. When describing the embodiments of the present invention in detail, for the convenience of explanation, the cross-sectional views showing the device structure will be enlarged locally not in accordance with the general scale, and the schematic diagrams are only examples, which should not limit the scope of protection of the present invention here. In addition, in actual production, three-dimensional spatial dimensions including length, width, and depth should be included.
[0080] At the same time, in the description of the present invention, it should be noted that the orientation or positional relationship indicated by terms such as "upper, lower, inner, and outer" is based on the orientation or positional relationship shown in the drawings. It is only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, so it cannot be understood as a limitation to the present invention. In addition, the terms "first, second, or third" are only used for descriptive purposes and cannot be understood as indicating or implying relative importance.
[0081] Unless otherwise clearly specified and limited in the present invention, the terms "installation, connection, and coupling" should be understood in a broad sense. For example, it can be a fixed connection, a detachable connection, or an integral connection; it can also be a mechanical connection, an electrical connection, or a direct connection, and can also be indirectly connected through an intermediate medium, or can be the communication inside two elements. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to specific situations.
[0082] Embodiment 1
[0083] Refer to Figure 1 , which is the first embodiment of the present invention. This embodiment provides a method for processing data of a video transmission recorder, including:
[0084] S1: Collect an image data stream through a video transmission recorder, set a sampling time window T for the image data stream, and obtain N frames of images within the sampling time window T;
[0085] When collecting an image data stream through a video transmission recorder, the image acquisition unit in the video transmission recorder receives an image signal, performs image digitization conversion on the image signal at a fixed frame rate, and forms a continuous image data stream. For the image data stream, set a sampling time window T according to actual monitoring requirements, and the length of the sampling time window T is configured through user interface parameters; within the sampling time window T, at a preset sampling frequency of 25 frames per second, continuously collect N frames of images from the image data stream, where the number N of the N frames of images is equal to the product of the sampling time window T and the sampling frequency; the N frames of images are stored in the buffer unit of the video transmission recorder in a time series manner, and each frame of image is accompanied by corresponding time information;
[0086] S2: Perform an inter-frame difference operation on the N frames of images, calculate the pixel change values between adjacent frames, and generate a difference data sequence;
[0087] Read the N-frame images in chronological order, and perform pixel-level difference operations between every two consecutive frames. The difference operation includes: subtracting the gray values of the corresponding pixel points of the i-th frame image and the (i + 1)-th frame image. The gray value uses 8-bit data depth, and the value range is 0 - 255. The difference calculation formula is:
[0088] D(x, y, i) = |P(x, y, i + 1) - P(x, y, i)| × w(x, y)
[0089] Where D(x, y, i) represents the difference value between the i-th frame and the (i + 1)-th frame at the coordinate (x, y), P(x, y, i) represents the pixel value of the i-th frame image at the coordinate (x, y), and w(x, y) is the spatial weight coefficient, which is calculated by the following formula:
[0090]
[0091] Where σ is the Gaussian kernel parameter used to adjust the spatial sensitivity, and α(i) is the time decay factor, and the calculation formula is:
[0092] α(i) = λ (N-i) ×(1 + β × V(i))
[0093] Where λ is the decay base (0 < λ < 1), V(i) is the local variance, and β is the variance adjustment coefficient.
[0094] Preferably, the difference calculation method mentioned in this embodiment makes different image regions show different response sensitivities in the difference calculation by introducing spatial weights, and can more accurately reflect the motion or change of each region. In particular, the Gaussian kernel function is used to adjust the weights of the spatial distribution, so that the central region or specific region of interest obtains higher difference calculation weights, effectively improving the detection accuracy of the key region. Secondly, considering the continuity and complexity of the image information in the dynamic scene, this embodiment adds time decay and local variance adjustment. The time decay factor gradually reduces the influence on the historical frames in an exponential decay manner, making the difference calculation pay more attention to the change characteristics of the current frame and adjacent frames. At the same time, the local variance adjustment dynamically adjusts the weights according to the local complexity of the image, so that the changes can be more sensitively captured in the rapidly changing regions, while unnecessary fluctuations are reduced in the stable regions.
[0095] Furthermore, based on the difference values of each pixel point, a difference matrix D is constructed. The dimension of the difference matrix D is the same as the resolution of the original image. Normalize the elements in the difference matrix D to map the difference values to the range of 0 - 1. The normalization process uses an improved maximum-minimum normalization method:
[0096]
[0097] Among them, K(i) is an adaptive correction factor:
[0098] K(i) = 1 + γ × log(1 + mean(D(i)))
[0099] Among them, γ is an adjustable parameter, mean(D(i)) is the mean value of the i-th frame difference matrix, max(D) is the maximum difference value in the i-th difference matrix D, and min(D) is the minimum difference value in the i-th difference matrix D.
[0100] Arrange the normalized difference matrix D in chronological order to form a difference data sequence containing N - 1 matrices; each difference matrix in the difference data sequence is attached with corresponding time marking information for subsequent data traceability; during the difference operation process, a parallel computing method is adopted to improve the operation efficiency, and the image data is processed in blocks and then the results are merged.
[0101] S3: Based on the difference data sequence, set a threshold R for data screening, and mark the difference data greater than the threshold R as abnormal frames;
[0102] Specifically, for each difference matrix in the difference data sequence, extract the image feature parameters of the local area, including the regional gray mean value, edge density value, and texture complexity value.
[0103] Set weight coefficients for the image feature parameters, and obtain a scene feature index through weighted combination. The scene feature index is multiplied by a reference threshold to obtain an adaptive threshold R for the current scene, which is expressed by the following formula:
[0104] R(i) = μ(i) + k × σ(i) × F(i)
[0105] Among them, μ(i) is the mean value of the i-th difference matrix, σ(i) is the standard deviation, k is an adjustment coefficient, and F(i) is an environmental factor, and its calculation formula is:
[0106] F(i) = [1 + η × H(i)] × S(i)
[0107] Among them, η is a weight coefficient, S(i) is a signal-to-noise ratio evaluation value, and H(i) is an image entropy value function:
[0108] H(i) = -∑[p(j) × log(p(j))] × M(i)
[0109] Among them, p(j) is the normalized probability distribution of the difference matrix gray value, and M(i) is a motion complexity index:
[0110]
[0111] Among them, A is a normalization coefficient, and Q(i) is a quality evaluation factor:
[0112] Q(i) = 1 - exp(-θ × V local (i))
[0113] Among them, θ is an adjustable parameter, and V local (i) is the local variance;
[0114] After determining the threshold R, the differential data sequence is screened, that is, for each differential matrix D norm (x, y, i) in the differential data sequence, its statistical eigenvalue E(i) is calculated:
[0115]
[0116] When the condition E(i) > R(i) is satisfied, the corresponding i-th frame is marked as an abnormal frame, and at the same time, the abnormal degree coefficient C(i) is recorded:
[0117] C(i) = [E(i) - R(i)] × B(i)
[0118] Among them, B(i) is a reliability evaluation coefficient:
[0119] B(i) = tanh(ρ × S(i)) × (1 - exp(-E(i)))
[0120] Among them, ρ is an adjustable parameter, and S(i) is a signal-to-noise ratio evaluation value.
[0121] The abnormal frame and its corresponding abnormal degree coefficient C(i) are stored in the abnormal frame buffer queue, and the abnormal frame buffer queue adopts a circular buffer structure and has an automatic overflow handling mechanism.
[0122] It should be noted that the specific scenarios triggering the change of threshold calculation include:
[0123] When the ambient light changes significantly, the statistical characteristics of the differential matrix will fluctuate, and at this time, the adjustment of the threshold R is triggered: First, the degree of light change is detected through the change of the image entropy value H(i). When the entropy value change in adjacent time windows exceeds the preset threshold, the environmental factor F(i) is adjusted accordingly; Second, based on the statistical result of the local variance V local (i), the quality evaluation factor Q(i) is updated to compensate for the impact brought by the light change; Finally, through the calculation result of the motion complexity index M(i), the reference value of the threshold R is adjusted to make the system have stronger adaptability to light changes.
[0124] It should be noted that the definition of significant changes in ambient light includes calculating the overall brightness mean μ(i) of the image. When the change rate of the brightness mean between adjacent frames, Δμ / μ, exceeds ±20%, it is defined as significant. The gray-level histogram distribution of the image is statistically analyzed. When the peak position of the histogram shifts by more than 25% of the total range of gray levels, it is determined to be significant. Calculate the ratio of the inter-frame brightness variances, σ 2 (i) / σ 2 (i - 1). When the ratio exceeds the interval [0.5, 2.0], it is recognized as a significant change; analyze the local area brightness gradient. When the proportion of pixels with a gradient change rate exceeding ±30% exceeds 40% of the image area, it is determined to be significant.
[0125] When the motion pattern of the target in the monitoring scene changes, the threshold R needs to be adjusted in a timely manner: First, based on the statistical characteristics of the difference matrix D norm (x, y, i), calculate the motion complexity index M(i). When the motion complexity exceeds the preset range, trigger the threshold adjustment; Second, evaluate the stability of the current motion characteristics by calculating the reliability evaluation coefficient B(i); Third, according to the change trend of the signal-to-noise ratio evaluation value S(i), dynamically adjust the environmental factor F(i) so that the threshold R can adapt to the new motion pattern.
[0126] When there are problems with the image acquisition quality, the system needs to adjust the threshold R accordingly: First, monitor the image quality status in real time through the quality evaluation factor Q(i). When the quality index is lower than the safety threshold, trigger the compensation mechanism; Second, based on the analysis result of the local variance V local (i), adjust the reliability evaluation coefficient B(i); Finally, through the dynamic calculation of the environmental factor F(i), correct the threshold R to reduce the misjudgment risk caused by quality anomalies.
[0127] When the background structure of the monitoring scene changes, trigger the update of the threshold R: First, detect the degree of change in the background complexity through the image entropy function H(i); Second, analyze the influence range of the background change based on the statistical eigenvalue E(i) of the difference matrix; Third, adjust the environmental factor F(i) and the motion complexity index M(i) so that the threshold R can adapt to the new background environment.
[0128] When there are multiple moving targets interfering with each other in the scene, adjust the threshold: First, evaluate the comprehensive characteristics of multi-target motion through the motion complexity index M(i); Second, analyze the mutual influence between targets based on the local variance V local (i); Finally, through the calculation of the reliability evaluation coefficient B(i) and the environmental factor F(i), optimize the value of the threshold R to improve the system's adaptability to multi-target scenarios.
[0129] S4: Encode and package the abnormal frames in chronological order to generate an abnormal event data packet;
[0130] First, extract the timestamp information for each abnormal frame, including year, month, day, hour, minute, second, and millisecond, to ensure the integrity of time accuracy. Then, read the abnormal degree coefficient and perform quantization processing on it, converting it into an integer value within the range of 0 - 255 for unified processing. Next, construct a descriptor for each abnormal frame, including basic information such as frame type identification, resolution information, and color space parameters, to comprehensively describe the characteristics of the frame. Immediately afterwards, calculate the feature hash value of the abnormal frame for verifying the integrity of the data.
[0131] On this basis, calculate the time interval between adjacent abnormal frames through the timestamp information. When the interval is less than the preset threshold, group these frames into the same event cluster. At the same time, perform compression encoding on the original image data, adopt an adaptive compression ratio, and dynamically adjust the compression parameters according to the abnormal degree coefficient to optimize data storage. Next, perform structured encoding on the abnormal frame descriptor, adopting a compact binary format to improve data transmission efficiency. After that, encode the time series feature vector to ensure the accurate preservation of time information.
[0132] Subsequently, generate a data packet header, which contains basic information such as version number, data packet length, and check code; and organize the abnormal frame data according to the event cluster, ensuring that the data within each event cluster is arranged in chronological order. At the same time, establish a data packet index table to record the start position and length information of each event cluster for quick access. Finally, add integrity check information and an end marker at the end of the data packet to ensure the integrity of data transmission.
[0133] S5: Associate the abnormal event data packet with the original image data stream by timestamp to form an associated data record.
[0134] Furthermore, this embodiment also provides a data processing system for a video transmission recorder, including:
[0135] A data acquisition module, used to acquire an image data stream through a video transmission recorder, set a sampling time window T for the image data stream, and obtain N frames of images within the sampling time window T;
[0136] A data sequence generation module, used to calculate the pixel change values between adjacent frames of the N frames of images and generate a differential data sequence;
[0137] A threshold adjustment module, used to set a threshold R for data screening based on the differential data sequence;
[0138] An abnormal judgment module, used to mark the differential data greater than the threshold R as abnormal frames, encode and package the abnormal frames in chronological order to generate an abnormal event data packet;
[0139] A recording module for associating the timestamp of the abnormal event data packet with the original image data stream to form an associated data record.
[0140] This embodiment also provides a computer device applicable to the case of the data processing method of the video transmission recorder, including a memory and a processor; the memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions to implement the data processing method of the video transmission recorder proposed in the above embodiment.
[0141] This computer device may be a terminal, and this computer device includes a processor, a memory, a communication interface, a display screen, and an input device connected through a system bus. Among them, the processor of this computer device is used to provide computing and control capabilities. The memory of this computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of this computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a carrier network, NFC (Near Field Communication), or other technologies. The display screen of this computer device may be a liquid crystal display screen or an electronic ink display screen, and the input device of this computer device may be a touch layer covering the display screen, or a button, a trackball, or a touchpad provided on the outer shell of the computer device, or an external keyboard, touchpad, or mouse, etc.
[0142] This embodiment also provides a storage medium, on which a computer program is stored, and when this program is executed by a processor, it implements the data processing method of the video transmission recorder proposed in the above embodiment.
[0143] The storage medium proposed in this embodiment and the data storage method proposed in the above embodiment belong to the same inventive concept. For technical details not described in detail in this embodiment, reference can be made to the above embodiment, and this embodiment has the same beneficial effects as the above embodiment.
[0144] Embodiment 2
[0145] This is the second embodiment of the present invention. This embodiment provides a data processing method for a video transmission recorder. In order to verify the beneficial effects of the present invention, scientific demonstration is carried out through economic benefit calculation and simulation experiments.
[0146] This experiment was implemented and verified in the security monitoring system of a large commercial complex. The experimental environment included a main hall of a shopping mall with a building area of approximately 12,000 square meters, where 16 high-definition network cameras were installed, including 8 fixed cameras and 8 dome cameras. The cameras used 2-million-pixel CMOS sensors and output video streams with a resolution of 1920×1080, and the frame rate was set to 25fps. The video transmission recorder used an industrial computer with an Intel i7-11700 processor and 32GB of memory, and was equipped with an NVIDIA RTX 3060 graphics card for parallel computing acceleration.
[0147] The experiment was carried out in four time periods: daytime, night, peak flow of people, and low flow of people, and the test duration for each period was 4 hours. The sampling time window T was set to 2 seconds, that is, 50 frames of images were acquired within each sampling window. For the parameters in the differential calculation, the Gaussian kernel parameter σ was set to 1.5, the time decay base λ was taken as 0.95, and the variance adjustment coefficient α was set to 0.8. In the adaptive threshold calculation, the adjustment coefficient β was set to 0.6, the weight coefficient w was taken as [0.4, 0.3, 0.3] respectively, and the adjustable parameter γ was set to 0.75.
[0148] During the experiment, system performance tests were carried out according to different scene characteristics: (1) Normal flow of people scene: Simulating the movement of people in the daily shopping environment; (2) Sudden gathering scene: Simulating the gathering of people during the mall promotion activities; (3) Light change scene: Simulating the change of natural light and the switching of the lighting system; (4) Multi-target interference scene: Simulating the situation of multiple fast-moving targets crossing and interfering. During the operation of the system, all the original data streams were recorded through a high-performance solid-state drive, and at the same time, the detected abnormal events were stored separately for subsequent analysis and comparison. The specific experimental data are shown in Table 1 below:
[0149] Table 1 Experimental data table
[0150]
[0151]
[0152] Through the analysis of the experimental data, the present invention shows significant advantages in multiple key performance indicators. First of all, in the normal flow of people scene, the system shows the best comprehensive performance, the frame processing time is only 12.5ms, the detection accuracy rate reaches 94.8%, and at the same time, it maintains a low false negative rate (3.2%) and false positive rate (2.0%). This benefits from the improved differential algorithm and adaptive threshold mechanism adopted by the present invention, which effectively balances the detection sensitivity and system stability.
[0153] In the system pressure test scenario (sudden aggregation scenario), although the processing time increased to 15.8 ms, the detection accuracy rate still remained at an acceptable level of 92.3%. This proves that the parallel computing architecture proposed by the present invention has good load balancing ability and can still maintain stable performance even under high load conditions. Especially in terms of memory occupancy, even in the most complex multi-target interference scenario, the peak value is only 945 MB, which benefits from the innovative circular buffer structure and efficient memory management mechanism.
[0154] The test results of the light change scenario are particularly worthy of attention. Traditional algorithms often have a large number of false alarms when the light changes violently, while the present invention controls the false alarm rate in the light change scenario at 3.4% by introducing an adaptive environmental factor and a quality evaluation mechanism, which is significantly better than the generally 5 - 8% level in the industry. This verifies the outstanding advantages of the present invention in environmental adaptability.
[0155] It can be seen from the test data of the multi-target interference scenario that although this is the most challenging application scenario, the system still maintains a detection accuracy rate of 89.7%, and the increase in response latency is also controlled within an acceptable range (25.4 ms). This proves that the multi-target processing strategy and motion complexity evaluation mechanism proposed by the present invention can effectively handle the target detection task in complex scenarios.
[0156] In various scenario tests, the CPU usage rate is controlled within a relatively ideal range (45.2% - 63.8%), which indicates that the system has good computational resource utilization efficiency. Especially in the composite scenario test, although facing the superposition effect of multiple interference factors, the system still maintains a detection accuracy rate of 90.8%, fully proving the robustness and practical value of the present invention. In summary, the experimental data comprehensively verify the comprehensive advantages of the present invention in terms of accuracy, real-time performance, stability, etc., providing reliable technical support for practical applications.
[0157] A light mutation experiment was specially designed to verify the environmental adaptability of the system by controlling the lighting system to generate different degrees of light changes. In the multi-target scenario test, multiple testers were arranged to move crosswise along the preset path to verify the system's processing ability for complex motion patterns. At the same time, by introducing a professional-level video quality analyzer, the image quality parameters were monitored in real time to ensure the reliability of the test data.
[0158] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not restrictive. Although the present invention has been described in detail with reference to the preferred embodiments, those of ordinary skill in the art should understand that the technical solutions of the present invention can be modified or equivalently replaced without departing from the spirit and scope of the technical solutions of the present invention, and they should all be covered within the scope of the claims of the present invention.
Claims
1. A method for processing data of a video transmission recorder, characterized in that: Including: Collect an image data stream through an image transmission recorder, set a sampling time window T for the image data stream, and obtain N frames of images within the sampling time window T; Calculate the pixel change values between adjacent frames of the N frames of images to generate a differential data sequence; Based on the differential data sequence, set a threshold R for data screening, and mark the differential data greater than the threshold R as abnormal frames; Encode and package the abnormal frames in chronological order to generate an abnormal event data packet; Associate the time stamps of the abnormal event data packet and the original image data stream to form an associated data record; The generation of the differential data sequence includes: Read the N frames of images in chronological order, and perform pixel-level differential operations between every two consecutive frames; Based on the differential values of each pixel point, construct a differential matrix D; Normalize the elements in the differential matrix D, and arrange the normalized differential matrix D in chronological order to form a differential data sequence containing N - 1 matrices; The differential operation is shown as follows: , Among them, represents the difference value between the frame and the frame at the coordinate ([[]] represents the pixel value of the frame image at the coordinate ([[]] is the spatial weight coefficient; The spatial weight coefficient is calculated by the following formula: , Among them, is the Gaussian kernel parameter, which is used to adjust the spatial sensitivity, is the time decay factor; The time decay factor is calculated by the following formula: , Among them, is the attenuation base number, is the local variance, is the variance adjustment coefficient, is the total number of frames of the input image sequence.
2. The method for processing the data of the video transmission recorder according to claim 1, wherein: The normalization process is shown as follows: , Among them, is an adaptive correction factor; The adaptive correction factor is calculated by the following formula: , Among them, is an adjustable parameter, is the mean value of the frame difference matrix, is the th difference matrix in the maximum difference value, represents the th difference matrix in the minimum difference value.
3. The method for processing data of the video transmission recorder according to claim 2, characterized in that: The threshold R is dynamically set, including the following steps: Calculate the mean and standard deviation for each differential matrix; Use the environmental factor to correct the threshold; Calculate the quality assessment factor based on the local variance to obtain the threshold R; The environmental factor is determined by the image entropy value and the motion complexity, where the image entropy value represents the richness of image information, and the motion complexity index reflects the severity of scene motion; The quality assessment factor is used to measure the influence degree of image quality on the threshold.
4. The method for processing video transmission recorder data according to claim 3, wherein: The calculation of the threshold R is shown as follows: , Among them, is the mean of the i-th difference matrix, is the standard deviation, is the adjustment coefficient, is the environmental factor; The calculation of the environmental factor is shown as follows: , Among them, is the weight coefficient, is the signal-to-noise ratio evaluation value, is the image entropy value function; The image entropy value function is shown as follows: , Among them, is the normalized probability distribution of the gray value of the difference matrix, is the motion complexity index; The calculation of the motion complexity index is shown as follows: , Among them, is a normalization coefficient, is a quality assessment factor; The calculation of the quality assessment factor is shown as follows: , Among them, is an adjustable parameter, is the local variance.
5. The method for processing data of the video transmission recorder according to claim 4, characterized in that: After determining the threshold R, perform a screening process on the differential data sequence, that is, for each differential matrix in the differential data sequence , calculate its statistical eigenvalue ; The statistical eigenvalue is calculated as shown in the following formula: , When the condition > is met, the corresponding frame is marked as an abnormal frame, and at the same time, the abnormal degree coefficient is recorded: , Among them, is the reliability evaluation coefficient: , Among them, is an adjustable parameter, is the signal-to-noise ratio evaluation value.
6. The method for processing the data of the video transmission recorder according to claim 5, wherein: The trigger for the dynamic adjustment of the threshold R includes: When the environmental light changes significantly, the statistical characteristics of the differential matrix will fluctuate, and at this time, the adjustment of the threshold R is triggered; When the motion mode of the target in the monitored scene changes, adjust the threshold R; When there are problems with the image acquisition quality, adjust the threshold R accordingly; When the background structure of the monitored scene changes, trigger the adjustment of the threshold R; When there are multiple moving targets interfering with each other in the scene, perform threshold adjustment.
7. A data processing system for a video transmission recorder, based on the video transmission recorder data processing method according to any one of claims 1 to 6, characterized in that: Including: A data acquisition module for collecting an image data stream through an image transmission recorder, setting a sampling time window T for the image data stream, and obtaining N frames of images within the sampling time window T; A data sequence generation module for calculating the pixel change values between adjacent frames of the N frames of images to generate a differential data sequence; A threshold adjustment module for setting a threshold R for data screening based on the differential data sequence; An abnormal judgment module for marking the differential data greater than the threshold R as abnormal frames, encoding and packaging the abnormal frames in chronological order to generate an abnormal event data packet; A recording module, configured to perform timestamp association on the abnormal event data packet and the original image data stream to form an associated data record.
Citation Information
Patent Citations
Abnormity monitoring method based on inter-frame difference algorithm, system platform and storage medium
CN117041523A