Security and protection monitoring video real-time transmission method based on Internet of Things

By identifying and processing the discrete motion vector direction problem of texture repetitive areas during the encoding process of security monitoring videos, and dynamically adjusting the motion vector selection strategy, the problem of image block restoration position offset in the prior art is solved, and image clarity and intelligent response capabilities of the security system are improved.

CN120050421AActive Publication Date: 2025-05-27ANHUI CHANGTIAN INFORMATION TECH CO LTD

Patent Information

Application Number
CN202510499361.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-21
Publication Date
2025-05-27
Estimated Expiration
2045-04-21

AI Technical Summary

Technical Problem

During the encoding process, the existing security monitoring video real-time transmission technology based on the Internet of Things cannot effectively deal with the discrete motion vector direction caused by the texture repetition area in the image frame, resulting in offsetting the image block at the restored position of the decoding end, causing block boundary misalignment, ghosting or contour blur.

Method used

By performing macroblock division and texture repetition area identification of image frames in security monitoring videos, the degree of direction dispersion of candidate motion vectors is evaluated, and the motion vector selection strategy is dynamically regulated based on the evaluation results, including direction locking, weighting and direction restriction strategies.

Benefits of technology

It effectively suppresses the diffusion of prediction errors caused by directional dispersion, enhances the restoration consistency and clarity of image blocks, and improves the intelligent response efficiency and service stability of the security system in complex environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120050421A_ABST
    Figure CN120050421A_ABST
Patent Text Reader

Abstract

The invention discloses a security and protection monitoring video real-time transmission method based on the Internet of Things, and relates to the technical field of security and protection monitoring video transmission, and the method specifically comprises the following steps: when a texture repetition region exists in an image frame, determining all macro blocks forming the texture repetition region in the image frame, and marking the macro blocks as texture repetition blocks; performing comprehensive analysis on each texture repetition block, and evaluating a candidate motion vector direction dispersion degree when an image frame in the security and protection monitoring video has a texture repetition area; based on the evaluation result, determining whether to classify each texture repetition block and whether to respectively match a corresponding motion vector selection strategy; and according to the matched motion vector selection strategy, respectively executing corresponding dynamic regulation and control operations. According to the method, the problem that the direction of the motion vector is discrete and uncontrollable in a texture repetition area is solved, dynamic regulation and control of a coding strategy and synchronous optimization of a decoding end are realized, and the image reconstruction precision and the intelligent analysis stability are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of security monitoring video transmission, and particularly to a real-time transmission method for security monitoring videos based on the Internet of Things. Background Art

[0002] Security monitoring videos refer to the real-time collection of on-site images by monitoring cameras installed in key locations (such as residential communities, commercial buildings, public places, transportation hubs, etc.) and the conversion of these images into digital video signals to achieve all-weather and all-round security monitoring and management of specific areas. With the evolution of monitoring systems from "local storage + passive viewing" to "remote networking + active response", traditional centralized and wired transmission modes have gradually revealed problems such as limited bandwidth, large transmission delays, and high maintenance costs in terms of coverage, deployment flexibility, real-time performance, and fault response. The introduction of Internet of Things technology provides a more intelligent and efficient solution for security monitoring video systems. By closely connecting front-end monitoring devices with back-end management platforms through wireless communication networks, distributed collection, edge processing, and real-time transmission of video data are achieved, enabling video content to be stably and quickly transmitted to the command center or user terminals in complex environments, thereby improving the timeliness of security response and the overall intelligent level of the system. Therefore, real-time transmission of security monitoring videos based on the Internet of Things is not only an inevitable choice to meet the needs of large-scale monitoring deployment and remote access, but also a key technical support for promoting the development of smart cities and intelligent security systems.

[0003] The existing real-time transmission technology for security monitoring videos based on the Internet of Things mainly realizes the full-process automation and intelligence of video data from acquisition to display by embedding front-end monitoring devices into the Internet of Things architecture. During the entire transmission process, first, high-definition cameras deployed in the target area continuously collect monitoring images, and the original videos are compressed into data formats suitable for network transmission through local encoding modules (such as H.264 or H.265); then, the acquisition terminal sends the video data to the edge gateway or edge computing node by accessing a wireless network (such as Wi-Fi, 4G / 5G, NB-IoT, etc.). In this link, the edge device not only undertakes the relay forwarding function but also can perform preliminary analysis, denoising, caching, packet loss retransmission, etc. on the video data to improve the overall transmission efficiency and stability; subsequently, the optimized data is transmitted to the cloud platform or the back-end monitoring center through the core network of the Internet of Things, and the server completes unified storage, decoding, and scheduling. Finally, it is played in real-time or viewed remotely through client applications (such as security monitoring APPs, web platforms, management terminals). The entire process relies on the advantages of the Internet of Things in device interconnection, data scheduling, and network resource management, forming a closed-loop system from data acquisition, edge processing, network transmission, platform access to terminal display, and realizing the high-efficiency, low-latency, and scalable real-time transmission ability of security monitoring videos in a wide-area environment.

[0004] The existing technology has the following deficiencies: During the encoding process of security monitoring videos, when there are large areas of texture repetition regions in the image frames of security monitoring videos, such as regularly arranged wall bricks or dense vegetation patterns, the gray-scale features of multiple macroblocks will be highly similar. At this time, when the encoder performs inter-frame motion estimation on this image frame, it will generate multiple candidate motion vectors with similar amplitudes but scattered directions for these macroblocks. Since the differences in the residual values of these vectors are very small, the encoder only selects one of them based on the minimum residual principle, ignoring the degree of dispersion of the candidate vectors in the direction distribution, resulting in the finally selected vectors may deviate from each other in the spatial direction. When such motion vectors with large direction dispersion are used for predictive reconstruction, it will cause slight offsets in the restored positions of image blocks at the decoding end, leading to phenomena such as block boundary misalignment, ghosting, or contour blurring. The existing real-time transmission technology for security monitoring videos based on the Internet of Things cannot dynamically adjust the selection strategy of motion vectors according to the degree of direction dispersion of candidate motion vectors in the case of texture repetition regions in the image frames of security monitoring videos, resulting in the encoder still using the default minimum residual strategy for vector selection in this case, which will cause the spread of prediction errors, and then form visual distortion at the decoding end, reducing the image clarity and affecting the accuracy of intelligent analysis results such as object detection and behavior recognition based on image content.

[0005] The above information disclosed in the background art section is only used to enhance the understanding of the background of the present disclosure. Therefore, it may include information that does not constitute the prior art known to those of ordinary skill in the art. Summary of the Invention

[0006] The object of the present invention is to provide a real-time transmission method for security monitoring videos based on the Internet of Things to solve the problems in the above background art.

[0007] To achieve the above object, the present invention provides the following technical solutions: A real-time transmission method for security monitoring videos based on the Internet of Things, specifically including the following steps: During the encoding process of the security monitoring video, perform macroblock partitioning on the image frames in the security monitoring video, and monitor all the partitioned macroblocks to determine whether there are texture repetition regions in the image frames; When there are texture repetition regions in the image frames, determine all the macroblocks that constitute the texture repetition regions in the image frames and mark them as texture repetition blocks; Conduct comprehensive analysis on each texture repetition block to evaluate the discrete degree of candidate motion vector directions when there are texture repetition regions in the image frames of the security monitoring video; Based on the evaluation results, decide whether to classify each texture repetition block and whether to respectively match the corresponding motion vector selection strategy; Execute the corresponding dynamic regulation operations respectively according to the matched motion vector selection strategy; Transmit the encoded video compression stream in real time through the Internet of Things channel, and attach identification information corresponding to the motion vector selection strategy to the video stream, so that the receiving end adjusts the decoding control strategy according to the identification information.

[0008] Preferably, when there are texture repetition regions in the image frames, determine all the macroblocks that constitute the texture repetition regions in the image frames and mark them as texture repetition blocks, specifically as follows: Extract the gray histogram distribution, edge gradient direction distribution, and frequency domain feature parameters for each macroblock in the image frame respectively. By calculating the feature similarity between adjacent macroblocks, identify the set of macroblocks with texture feature similarity higher than the preset threshold and continuously distributed in space, and determine them as the macroblocks that constitute the texture repetition regions; Group the identified set of macroblocks in a logical identification manner, and assign texture repetition block marks to each group of macroblocks during the encoding preprocessing process.

[0009] Preferably, conducting comprehensive analysis on each texture repetition block to evaluate the discrete degree of candidate motion vector directions when there are texture repetition regions in the image frames of the security monitoring video specifically includes the following steps: Extract the motion feature distribution information of each marked texture repeated block from the image frames in the security monitoring video, and perform preprocessing after extraction; Extract the direction consistency information and amplitude stability information from the motion feature distribution information of each preprocessed texture repeated block, and perform analysis after extraction to generate the direction distribution index and amplitude offset coefficient of each texture repeated block respectively; Based on the generated direction distribution index and amplitude offset coefficient of each texture repeated block, construct a weighted summation model, and generate the discrete coefficient of each texture repeated block through weighted summation respectively; Generate the standard deviation of the discrete coefficient from the discrete coefficients of each generated texture repeated block through the standard deviation formula; Determine the preset threshold of the standard deviation of the discrete coefficient, and compare it with the generated standard deviation of the discrete coefficient after determination, and evaluate the discrete degree of the candidate motion vector direction when there is a texture repeated area in the image frame of the security monitoring video according to the comparison result.

[0010] Preferably, the acquisition logic of the direction distribution index of each texture repeated block is as follows: Extract the direction consistency information from the motion feature distribution information of each preprocessed texture repeated block, specifically including the direction angles of each candidate motion vector in each texture repeated block, and mark them as , indicating the direction angle of the th candidate motion vector in the th texture repeated block, , , and are both positive integers; Calculate the cosine value of the direction angle difference between any two candidate vectors in each texture repeated block according to the formula: wherein, represents the cosine value of the direction angle difference between the th candidate vector and the th candidate vector in the th texture repeated block, and , are both positive integers; Calculate the direction distribution index of each texture repeated block. The specific calculation formula is as follows: wherein, is the direction distribution index of the th texture repeated block.

[0011] Preferably, the obtaining logic of the amplitude offset coefficient of each texture repetition block is as follows: Extract the direction consistency information and amplitude stability information from the motion feature distribution information of each preprocessed texture repetition block, specifically including the modulus length of each candidate motion vector in each texture repetition block, and calibrate it as , indicating the th candidate motion vector modulus length in the th texture repetition block, and are both positive integers; Calculate the average value of the modulus lengths of all candidate motion vectors in each texture repetition block, according to the formula: ; Calculate the amplitude offset coefficient of each texture repetition block, and the specific calculation formula is as follows: In the formula, is the amplitude offset coefficient of the th texture repetition block.

[0012] Preferably, based on the generated direction distribution index and amplitude offset coefficient of each texture repetition block, construct a weighted summation model, and generate the discrete coefficient of each texture repetition block through weighted summation respectively. The specific calculation formula is as follows: In the formula, is the discrete coefficient of the th texture repetition block, and are the non-zero weight coefficients of the direction distribution index and amplitude offset coefficient of each texture repetition block respectively, and ; Generate the discrete coefficient standard deviation from the generated discrete coefficients of each texture repetition block through the standard deviation formula, according to the formula: .

[0013] Preferably, determine the preset discrete coefficient standard deviation threshold , and compare it with the generated discrete coefficient standard deviation after determination, and evaluate the direction dispersion degree of the candidate motion vectors when there are texture repetition regions in the image frames of the security monitoring video according to the comparison result. The specific comparison and analysis are as follows: If When there are texture repetition regions in the image frames of the security monitoring video, the degree of dispersion of the candidate motion vector directions is within the normal range; If When there are texture repetition regions in the image frames of the security monitoring video, the degree of dispersion of the candidate motion vector directions is in an abnormal fluctuation state.

[0014] Preferably, based on the evaluation results, it is determined whether to classify each texture repetition block and whether to respectively match the corresponding motion vector selection strategy, specifically as follows: When the evaluation result shows that the degree of dispersion of the candidate motion vector directions in the case of texture repetition regions in the image frame is within the normal range, do not classify each texture repetition block, and uniformly adopt the initial motion vector selection strategy; When the evaluation result shows that the degree of dispersion of the candidate motion vector directions in the case of texture repetition regions in the image frame is in an abnormal fluctuation state, determine the preset discrete coefficient threshold interval and, after determination, compare it with the discrete coefficient of each texture repetition block, classify each texture repetition block according to the comparison result, and match the corresponding motion vector selection strategy, specifically as follows: If , divide the texture repetition block into a low dispersion level block and match the direction-locked type vector selection strategy. Specifically, based on the preset reference direction angle, screen the vector set with the direction angle deviating from the reference angle less than the first threshold among all candidate motion vectors in the low dispersion level block, calculate the predicted residual value of each vector, and select the vector whose predicted residual meets the predetermined range condition as the final motion vector; If , divide the texture repetition block into a medium dispersion level block and match the direction-weighted type vector selection strategy. Specifically, for each candidate motion vector in the medium dispersion level block, according to the included angle between its direction angle and the reference direction angle, assign a preset weighting factor, perform weighted processing on the predicted residual, and select the final motion vector with the weighted residual as the objective function; If , divide the texture repetition block into a high dispersion level block and match the direction-restricted type vector selection strategy. Specifically, set the allowable deviation range of the direction angle, and only retain the candidate motion vectors with the direction angle within this range to participate in the calculation of the predicted residual, and exclude the candidate vectors outside this range.

[0015] Preferably, perform corresponding dynamic regulation operations according to the matched motion vector selection strategy, specifically as follows: When the matching direction-locked vector selection strategy is adopted, the specific dynamic regulation operation is as follows: set a reference direction angle and a first deviation threshold, compare the direction angles of candidate motion vectors one by one, and only retain the vectors whose direction angles deviate from the reference angle by no more than the first deviation threshold to form a restricted candidate set, and limit the subsequent residual calculation and vector selection to be carried out only within this restricted candidate set; When the matching direction-weighted vector selection strategy is adopted, the specific dynamic regulation operation is as follows: according to the included angle between each candidate motion vector and the reference direction angle, call a weighting function to dynamically calculate its direction deviation weight, apply this weight to the predicted residual value corresponding to this vector to generate a weighted residual result, and perform optimal vector selection with the weighted residual as the target; When the matching direction-restricted vector selection strategy is adopted, the specific dynamic regulation operation is as follows: preset a direction angle restriction interval, traverse the direction angles of candidate motion vectors, and only construct an effective candidate vector set with all motion vectors whose direction angles fall within the restriction interval, and limit the residual calculation and the final vector selection operation within this effective candidate vector set, and shield all vectors outside the range from participating.

[0016] In the above technical solutions, the technical effects and advantages provided by the present invention are as follows: 1. The present invention realizes the accurate calibration of high-risk areas by extracting the macroblock structure of image frames in security monitoring videos and identifying texture repetition areas based on multi-modal features such as grayscale, edges, and frequency domains. Further, by constructing a direction distribution index and an amplitude offset coefficient, a quantifiable expression model for the direction discreteness of candidate motion vectors is formed and fused into a discrete coefficient, so as to mathematically model the local direction fluctuation degree. This solution breaks the existing coding method that only uses the minimum residual as the single selection basis, realizes the early identification of hidden prediction instability factors in motion estimation, and improves the adaptability of the prediction model to complex image structures.

[0017] 2. The present invention innovatively classifies texture repetition blocks dynamically according to the evaluation result of the discrete coefficient standard deviation, and matches three types of motion vector selection strategies: direction-locked type, weighted type, and restricted type. Each type of strategy sets targeted parameters in terms of direction constraint intensity, candidate vector screening method, residual weighting method, etc., and limits the vector selection path through dynamic regulation operations, so that the encoder can finely control the vector generation and selection process according to local direction behavior characteristics. This mechanism enables the coding behavior to no longer be a global unified template processing, but to have the ability to be driven by local differences, effectively suppressing the spread of prediction errors caused by direction dispersion, and enhancing the consistency and clarity of image block restoration.

[0018] 3. The present invention not only introduces a direction discrete control mechanism at the encoding end, but also realizes the transparent carrying of the encoding strategy in the transmission link by attaching identification information corresponding to the vector selection strategy to the compressed stream. During the decoding process, the receiving end can automatically adjust the decoding parameters according to the strategy identifier, so as to maintain the consistency between the prediction path and the decoded restoration under different direction control models, and prevent decoding distortion caused by information fragmentation. At the same time, this mechanism can also improve the image basic quality of subsequent video structured analysis (such as object detection, behavior recognition), enhance the intelligent response efficiency and service stability of the security system in actual deployment, and reflect the end-to-end control advantage in the Internet of Things scenario. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings required in the embodiments. Obviously, the drawings described below are only some embodiments recorded in the present invention. For those of ordinary skill in the art, other drawings can also be obtained according to these drawings.

[0020] Figure 1 It is a schematic flowchart of the real-time transmission method of security monitoring video based on the Internet of Things according to the present invention; Figure 2 It is a method mind map of the real-time transmission method of security monitoring video based on the Internet of Things according to the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0021] Now, the example embodiments will be described more fully with reference to the accompanying drawings. However, the example embodiments can be implemented in various forms and should not be construed as limited to the examples set forth herein; rather, these example embodiments are provided so that this disclosure will be more thorough and complete, and will fully convey the concept of the example embodiments to those skilled in the art.

[0022] The present invention provides a real-time transmission method of security monitoring video based on the Internet of Things as shown in Figure 1 and Figure 2 Specifically, it includes the following steps: During the encoding process of the security monitoring video, the image frames in the security monitoring video are divided into macroblocks, and all the divided macroblocks are monitored to determine whether there are texture repetition regions in the image frames; During the encoding process of security surveillance videos, image frames can be divided into blocks according to a grid of fixed size through software means to achieve macroblock partitioning. A common approach is to perform equally spaced cutting based on the two-dimensional pixel matrix of the image according to a preset macroblock size (such as 16×16 or 32×32 pixels), forming a macroblock matrix structure. This partitioning process can be achieved by iteratively traversing the pixel coordinates of the image frame, creating a data block object for each partition area, and recording its position index in the image. After partitioning, each macroblock serves as an independent processing unit and will be used in subsequent texture analysis and motion estimation stages. This process can be fully executed by software during the initialization stage of the image frame data structure and can be flexibly adapted to image frames of different resolutions.

[0023] After completing the macroblock partitioning, the texture features of each macroblock can be analyzed by software means to determine whether there are texture repeated regions in the image frame. Specifically, the following types of indicators can be extracted: one is the gray histogram distribution of the macroblock, which is used to measure its brightness structure; the second is the edge direction histogram, such as the edge gradient direction obtained through Sobel or Prewitt operators; the third is the frequency domain feature, such as the low-frequency energy distribution extracted after performing DCT transformation on the macroblock. The system determines whether there are large-area and continuous high-similarity regions by calculating the feature similarity (such as Euclidean distance or cosine similarity) between each macroblock and its adjacent macroblocks. When there is a high degree of texture similarity among multiple macroblocks and they are spatially aggregated, it can be determined that this region is a texture repeated region, and the relevant macroblocks are marked for subsequent processing.

[0024] The main purpose of performing macroblock partitioning and texture repeated region recognition on image frames is to discover high-risk coding regions in the image in advance, thereby providing a basis for the adaptive adjustment of the subsequent motion vector prediction strategy. In the actual encoding process, the macroblocks in the texture repeated region often generate multiple candidate motion vectors with similar residuals but different directions. If the motion direction is directly selected according to the minimum residual principle, it may misjudge the motion direction and lead to the diffusion of image prediction errors. Only by deeply understanding the local structure of the image at the macroblock level and identifying the coding risks brought by texture repetition can these macroblocks be differentially processed in the motion estimation stage to achieve targeted regulation of motion vectors. This process can be fully completed by software during the encoding preprocessing stage and is of crucial value for improving the subsequent prediction accuracy and image clarity.

[0025] When there is a texture repeated region in the image frame, determine all the macroblocks that make up the texture repeated region in the image frame and mark them as texture repeated blocks; In this embodiment, when there is a texture repeated region in the image frame, determining all the macroblocks that make up the texture repeated region in the image frame and marking them as texture repeated blocks is specifically as follows: Extract the grayscale histogram distribution, edge gradient direction distribution, and frequency domain feature parameters for each macroblock in the image frame. By calculating the feature similarity between adjacent macroblocks, identify the set of macroblocks with texture feature similarity higher than a preset threshold and continuously distributed in space, and determine them as the macroblocks constituting the texture repetition region; The texture structure recognition and similarity analysis of each macroblock can be implemented in software through image processing and feature extraction algorithms. Specifically, first extract the grayscale histogram of each macroblock in the image frame to characterize the brightness distribution pattern of the macroblock; then extract the edge gradient direction distribution of the macroblock. The edge direction of each pixel point can be calculated through a gradient operator (such as Sobel or Prewitt), and then the distribution histogram of the direction angle is statistically calculated to describe the texture direction feature; further, the discrete cosine transform (DCT) or discrete wavelet transform (DWT) can be performed on the macroblock to extract its frequency domain low-frequency energy feature, which reflects the periodicity and complexity of the texture. After combining these features to form a unified texture feature vector, calculate the similarity between the current macroblock and several adjacent macroblocks through similarity measurement between feature vectors (such as cosine similarity, Euclidean distance, or correlation coefficient). If the feature similarity between a group of spatially adjacent macroblocks all exceeds the preset threshold, the set of macroblocks in this continuous region can be identified as a texture repetition region in the software, and the coordinate indexes of these macroblocks are recorded in the form of logical tags for subsequent process calls.

[0026] The reason for identifying the texture repetition region in the image frame based on the similarity of macroblock texture features is that such regions are often the "high-risk regions" that are most likely to cause misselection of motion vectors in video coding. In the texture repetition region, the visual features (brightness, edge, frequency) of the macroblocks show high repetition or regularity, which will cause the encoder to generate multiple candidate motion vectors with similar residuals but scattered directions for similar macroblocks during inter-frame motion estimation, thus reducing the uniqueness and stability of vector selection and ultimately causing image prediction error diffusion. By identifying these regions in the pre-encoding stage through the above method and accurately marking the relevant set of macroblocks, it is possible to introduce a differential processing logic in the subsequent vector generation and selection stage to achieve a more intelligent and robust motion prediction strategy. This method based on image feature modeling and clustering analysis can be fully implemented by software without modifying the hardware, and can be flexibly deployed in the preprocessing stage of the encoder module or edge computing terminals, with extremely high engineering adaptability and practicality.

[0027] Group the identified set of macroblocks in the form of logical identifiers, and assign texture repetition block tags to each group of macroblocks during the encoding preprocessing process to indicate the processing strategy in the motion vector selection stage.

[0028] After identifying the set of macroblocks that constitute the texture repeating region, a logical identification field can be added to the macroblock data structure of the image frame through software to achieve the marking of the region belonging of the macroblock. Specifically, the system maintains a metadata field for each macroblock, such as a region type identifier, a label index, or a boolean flag. When multiple macroblocks are spatially continuous and have highly similar texture features, the system can group them into the same logical group and assign a unified "texture repeating block" identification code. For example, a unique label ID can be assigned to each group, or a texture repeating flag can be set to "1". This process can be achieved through a region numbering algorithm driven by the clustering result, such as a density-based macroblock numbering or a region expansion method based on the adjacency relationship of image coordinates. In the encoding preprocessing stage, this marking information will be passed into the main encoding process together with the macroblock metadata, and used to control the policy judgment logic of the subsequent motion vector generation module, so as to achieve the differential identification and processing of the repeating region at the encoding layer.

[0029] The purpose of logically grouping and uniformly marking the macroblocks in the texture repeating region is to achieve context awareness at the structural level and targeted processing strategies in the subsequent encoding process. Since in the texture repeating region, the macroblocks have similar visual structures but lack unique spatial motion features, without region-level identification, the encoder will not be able to distinguish which macroblocks belong to the repeating structure, and thus cannot be treated differently. In the motion vector selection, it is easy to misuse the vectors with "scattered directions but close residuals", resulting in prediction drift. By pre-assigning the "texture repeating block" identification to these macroblocks, the encoder can read this mark in the subsequent motion estimation or vector screening stage and automatically switch to a specific prediction strategy, such as restricting the candidate direction range, adjusting the vector scoring formula, or starting the direction aggregation algorithm, so as to optimize the vector selection purposefully. The entire grouping and marking process can be independently completed in the software module of the encoder, which not only does not affect the generality of the encoding structure, but also enhances the adaptability to complex image regions and improves the overall encoding quality and image restoration accuracy.

[0030] Comprehensively analyze each texture repeating block to evaluate the degree of dispersion of the candidate motion vector directions when there is a texture repeating region in the image frame of the security monitoring video; In this embodiment, comprehensively analyzing each texture repeating block to evaluate the degree of dispersion of the candidate motion vector directions when there is a texture repeating region in the image frame of the security monitoring video specifically includes the following steps: Extract the motion feature distribution information of each marked texture repeating block from the image frame of the security monitoring video, and perform preprocessing after extraction; After completing the marking of texture - repeating blocks in the image frame, the software system can extract a set of candidate motion vectors corresponding to these blocks from the motion - estimation module in the encoder, and further obtain the basic data for calculating motion features, including the direction angle and magnitude information. Specifically, during the inter - frame motion search process executed by the encoder, the system can access the candidate motion - vector generation record and extract multiple candidate vectors corresponding to each macro - block. For each texture - repeating block, the extraction operation will traverse all its macro - blocks and construct a vector - attribute set for each macro - block. This attribute set includes: the direction angle (in radians, derived from the polar angle of the vector in the two - dimensional coordinate system) of each candidate motion vector and the magnitude (i.e., the pixel distance from the starting point to the ending point, obtained through vector - coordinate calculation). Finally, the system aggregates the vector - attribute data of multiple macro - blocks corresponding to each texture - repeating block into a data structure as the "motion - feature distribution information" of this block, providing basic data support for subsequent analysis.

[0031] The purpose of pre - processing is to improve the accuracy and reliability of subsequent direction - consistency and amplitude - stability analysis, and avoid evaluation biases caused by noise vectors, invalid data, or outliers. The pre - processing operations mainly include three categories: First, outlier removal, which detects and removes candidate vectors with direction angles or magnitudes that significantly deviate from their average values in each block. Common methods include Z - Score analysis or outlier judgment based on IQR. Second, data standardization processing, such as uniformly converting all vector direction angles to radians and normalizing the magnitudes, so that vector features in different regions are comparable. Third, vector - number regularization. When the number of candidate vectors generated by some macro - blocks is insufficient, the vector set with a standard length can be constructed by nearest - neighbor macro - block complement or by applying the default interpolation strategy to maintain sample consistency between blocks. These pre - processing operations can be automatically completed by the software - encoder module through data scanning, statistical operations, and conditional screening, without manual intervention, and have generality and real - time processing capabilities, which can effectively improve the robustness and stability of subsequent parameter calculation.

[0032] Extract the direction - consistency information and amplitude - stability information from the motion - feature distribution information of each pre - processed texture - repeating block, and perform analysis after extraction to generate the direction - distribution index and amplitude - offset coefficient of each texture - repeating block respectively; After completing the preprocessing of the motion feature distribution information of each texture repeating block, the system can structurally decompose this information through software algorithms to separately extract the direction-consistent information and amplitude-stable information for analysis. Specifically, when extracting the direction-consistent information, the system reads the direction angle data from the preprocessed candidate motion vector set in each texture repeating block, constructs it into a direction angle vector array, calculates the direction differences between all candidate vectors through a combination method, then calculates the cosine values of each group of differences to represent the similarity between direction pairs, and finally uses all the cosine values as the data basis for the direction consistency evaluation; when extracting the amplitude-stable information, the system reads the modulus length data of each vector in the same set, calculates the absolute value of the deviation between its mean and each data item based on this group of modulus length data, and then constructs a modulus length fluctuation sequence using these deviation values and their statistical characteristics as the input for the amplitude stability analysis. The entire extraction process can be completed through vector matrix processing, standard mathematical transformations, and array operations in the pre-analysis module of the image encoder, with high automation and scalability, ensuring that the direction and amplitude characteristics of each texture repeating block are clearly distinguished logically and can be independently quantified.

[0033] Based on the generated direction distribution index and amplitude offset coefficient of each texture repeating block, construct a weighted summation model, and generate the discrete coefficient of each texture repeating block through weighted summation respectively; Generate the standard deviation of the discrete coefficient from the generated discrete coefficients of each texture repeating block through the standard deviation formula; Determine the preset threshold of the standard deviation of the discrete coefficient, and after determination, compare it with the generated standard deviation of the discrete coefficient, and evaluate the direction discreteness of the candidate motion vectors when there are texture repeating regions in the image frames of the security monitoring video according to the comparison result.

[0034] The pre-set standard deviation threshold of the coefficient of variation can be automatically determined in the software system through an offline statistical modeling method based on historical video data samples and stored as a parameter in the system configuration module for real-time evaluation and invocation. Specifically, the system can introduce a large number of representative security monitoring video samples in the initialization stage. For the marked texture repeated blocks in each frame of the image, calculate their corresponding coefficients of variation (generated by weighting the direction distribution index and the amplitude offset coefficient), and further statistically calculate the standard deviation values of all coefficients of variation in each frame of the image, finally forming a distribution sequence of the standard deviation of the coefficient of variation containing multiple sample frames. The software system can perform clustering analysis or probability density estimation on this distribution sequence, such as fitting a normal distribution or a piecewise frequency distribution, and extract the quantile values or characteristic interval boundaries with statistical significance accordingly as the threshold candidates for the standard deviation of the coefficient of variation. For example, multi-level threshold intervals can be constructed based on quantiles such as 33%, 66%, 90%, etc. to distinguish the state of the image frame as "low dispersion trend", "medium dispersion trend" or "high dispersion trend". All threshold data are finally solidified through the software configuration parameter table and loaded into the memory during encoding operation for fast comparison. The entire determination process requires no manual intervention and has high repeatability, adaptability and systematicness.

[0035] In this embodiment, the acquisition logic of the direction distribution index of each texture repeated block is as follows: Extract the direction consistency information from the motion feature distribution information of each pre-processed texture repeated block, specifically including the direction angles of each candidate motion vector in each texture repeated block, and mark them as , indicating the direction angle of the th candidate motion vector in the th texture repeated block, , , and are both positive integers; During the encoding process of the security monitoring video, the direction angles of each candidate motion vector in each texture repeated block can be obtained in real time through the motion estimation module of the encoder. Specifically, in the inter-frame prediction stage, the encoder will perform a block matching operation for each macroblock in the image frame within the search window of the reference frame to find multiple positions with the smallest matching error. These positions form a set of candidate reference blocks, and the spatial displacement between each reference block and the current macroblock constitutes a candidate motion vector. For each motion vector, the system can calculate the direction angle of the vector according to its two-dimensional displacement components (horizontal offset and vertical offset) through the arctangent function. The direction angle is usually expressed in radians and is defined in Within a certain range, it is used to describe the angle of the vector relative to the horizontal direction of the image coordinate system. In actual implementation, the software system can record the direction angle values of multiple candidate vectors within each macroblock as a vector feature set in the memory data structure for subsequent texture repetition block feature integration calls. Since the motion estimation module itself contains vector generation logic, extracting the direction angle requires no additional computational overhead and has the characteristics of strong real-time performance and high data accuracy. As a key quantitative indicator for describing the motion direction, the direction angle is the basic information for judging whether the vector distribution is concentrated or dispersed.

[0036] Calculate the cosine value of the direction angle difference between any two candidate vectors in each texture repetition block , according to the formula: , where represents the cosine value of the direction angle difference between the th candidate vector and the th candidate vector in the th texture repetition block, , and , both are positive integers; Calculate the direction distribution index of each texture repetition block. The specific calculation formula is as follows: where is the direction distribution index of the th texture repetition block.

[0037] In order to quantitatively evaluate the dispersion degree of candidate motion vectors in the direction in the texture repetition area, the present invention models this characteristic by constructing a direction distribution index . Specifically, first obtain the direction angles of all candidate motion vectors in the iii-th texture repetition block, and calculate the cosine value of the direction angle difference between any two vectors based on the cosine function , and then take its absolute value to measure the degree of consistency of the directions of the two vectors. Since approaching 1 indicates a high degree of direction consistency, and approaching 0 indicates a high degree of direction divergence, so through a positive measure of the direction difference can be obtained. The greater the difference, the greater this value. Subsequently, sum up and average all candidate vector pairs to obtain the overall average direction dispersion degree of this block. And to ensure numerical stability and avoid logarithmic operation anomalies, finally add a constant 1 to this mean value, and then take the natural logarithm to form the direction distribution index. This calculation method can not only reflect the strength of the dispersion of the motion vector direction distribution, but also the numerical result increases monotonically with the dispersion degree, which is convenient to be used in coordination with other parameters to realize strategy classification and control based on quantitative thresholds.

[0038] The Direction distribution index of a texture repetition block is an important component factor that constitutes the dispersion of the motion characteristics of this block. The larger its value, the greater the difference in the candidate motion vectors in the direction dimension and the worse the direction aggregation. The system generates the dispersion coefficient of this block through a weighted summation model based on the sum amplitude offset coefficient of each texture repetition block, and calculates the standard deviation of the dispersion coefficients of all blocks to obtain the standard deviation of the frame-level dispersion coefficient. This index is used to evaluate whether the motion vector dispersion trend in the texture repetition area of the entire image frame is consistent or has local severe fluctuations. Subsequently, the system compares the standard deviation of the dispersion coefficient with a preset standard deviation threshold of the dispersion coefficient, and evaluates the direction dispersion degree of the candidate motion vectors when there are texture repetition areas in the image frames in the security monitoring video based on the comparison result. After completing the evaluation, the system then backtracks and calls a set of "dispersion coefficient threshold intervals" adapted to this global determination result, and compares the dispersion coefficients of each previously generated texture repetition block with this set of intervals to achieve fine-grained classification of each texture repetition block, and finally matches each type of block with a suitable motion vector selection strategy to achieve an accurate and controllable coding optimization logic.

[0039] In this embodiment, the acquisition logic of the amplitude offset coefficient of each texture repetition block is as follows: Extract the direction consistency information and amplitude stability information from the motion feature distribution information of each preprocessed texture repetition block, specifically including the modulus length of each candidate motion vector in each texture repetition block, and calibrate it as , indicating the modulus length of the th candidate motion vector in the th texture repetition block, , and are both positive integers; During the encoding process of security surveillance videos, when the encoder performs inter-frame prediction, it selects multiple matching positions within the search area of the reference frame for each macroblock in the image frame. These matching positions form multiple candidate motion vectors with the current macroblock. Each motion vector represents the spatial displacement relationship between the current macroblock and a certain matching block in the reference frame. This displacement is composed of two components, the horizontal offset and the vertical offset, in the image coordinate system. The magnitude of the motion vector refers to the overall displacement size and can be obtained by calculating the distance of the offsets in these two directions. While the encoder generates these candidate motion vectors, the system software can internally call the vector generation results in the motion estimation module, extract the magnitude data of each candidate vector in real time, and record it as one of the attributes of the vector in memory to form a data structure for subsequent calls. This magnitude data is used to describe the motion amplitude of the candidate vector in space and reflects the actual displacement degree of the image block from the current position to the matching position in the reference frame. In texture repetition regions, different candidate vectors may have similar directions but different magnitudes, or similar magnitudes but large differences in directions. Therefore, obtaining and analyzing the magnitude data is of great significance for subsequent evaluation of amplitude volatility and motion prediction uncertainty. The entire data extraction process is completely completed through software logic, featuring real-time, automatic, and high-precision characteristics.

[0040] Calculate the average value of the magnitudes of all candidate motion vectors in each texture repetition block , according to the formula: ; Calculate the amplitude offset coefficient of each texture repetition block. The specific calculation formula is as follows: In the formula, is the amplitude offset coefficient of the th texture repetition block.

[0041] To accurately measure the volatility of the candidate motion vectors in terms of magnitude (i.e., motion amplitude) in the th texture repetition block, a calculation model for the amplitude offset coefficient is proposed. First, extract the magnitudes of all candidate vectors in this block and calculate their mean value , which is used to measure the overall trend of the amplitude of movement in the area. Subsequently, for each candidate vector, the system calculates the absolute deviation between its modulus and the average modulus, reflecting the degree to which the vector deviates from the overall trend; by squaring the deviation, the influence weight of individuals with larger offset values ​​in the overall statistics is enhanced; further, an exponential function is introduced to nonlinearly amplify each deviation value, forming an "amplitude fluctuation amplification mechanism", so that candidate vectors with violent modulus fluctuations present a stronger warning effect in the overall evaluation. Finally, the composite offset term of all vectors is summed and averaged to obtain The larger the value, the more drastic the amplitude fluctuation of the candidate motion vector in the texture repetitive block, and the higher the uncertainty of motion estimation. This calculation method not only comprehensively reflects the breadth and intensity of the modulus deviation, but also improves the sensitivity to abnormal vectors, which is an important basis for constructing image motion stability evaluation indicators.

[0042] No. Amplitude offset coefficient for texture repeat blocks The larger the value, the more drastic the fluctuation of the modulus length of the candidate motion vector in the block, that is, under similar texture structures, the vector displacement size varies significantly, making it difficult to form a stable and consistent motion prediction trend. When evaluating the overall candidate motion vector direction discreteness when there are texture repetitive areas in the image frames of the security surveillance video, the system will use the amplitude offset coefficient of each block. Directional Distribution Index The discrete coefficients are generated by joint weighting, and the standard deviation of all discrete coefficients is calculated to evaluate the degree of discreteness of the candidate motion vector directions when there are texture repetitive areas in the image frames of the security surveillance video. The evaluation result is used as a global judgment basis to determine the subsequent classification intervals. When the classification standard is established, the system will compare the discrete coefficient corresponding to each texture repetitive block with the matching discrete coefficient threshold interval to determine the discrete level of the direction to which the block belongs, and then match the motion vector selection strategy corresponding to the level. In this process, It plays a key role in the stability assessment and strategy adaptive adjustment of the entire prediction structure, and is one of the core parameters for building a dynamic control model.

[0043] In this embodiment, based on the direction distribution index of each texture repetitive block generated and amplitude offset coefficient , construct a weighted summation model, and generate the discrete coefficients of each texture repetitive block through weighted summation. The specific calculation formula is as follows: In the formula, For the The discrete coefficient of the texture repetition block, and The direction distribution index for each texture repetition block and the amplitude offset coefficient of the non-zero weight coefficients, and ; After obtaining the direction distribution index and amplitude offset coefficient for each texture repetition block respectively, the system can fuse the two metrics by constructing a weighted summation model, calculate the dispersion coefficient of each block, and use it to comprehensively reflect the inconsistency of its motion vector in the two dimensions of direction and amplitude. In specific implementation, the software system will extract the corresponding direction distribution index and amplitude offset coefficient for each texture repetition block, substitute the two into a unified linear combination model, that is, use two preset non-zero weight coefficients to assign values to these two parameters respectively, and then add them. These two weight coefficients are the weight of the direction distribution index (denoted as ) and the weight of the amplitude offset coefficient (denoted as ), and their sum is 1 and both are non-zero to ensure that the model considers the information in both dimensions. The specific setting of the weight value can be obtained through offline training using a large number of sample analyses and empirical models. For example, by comparing the system recognition accuracy and image reconstruction quality in different scenarios, the optimal weighted ratio is extracted; it can also be fine-tuned through a dynamic update mechanism based on the feedback of real-time recognition results during operation. During the software execution process, this weighted model can be completed through a matrix operation module or simple multiplication and addition logic, without additional resource overhead, and can realize the unified modeling and efficient processing of the discrete behaviors of all texture repetition blocks, providing a stable basic index for subsequent frame-level evaluation and block classification strategies.

[0044] Generate the standard deviation of the dispersion coefficient for each generated texture repetition block through the standard deviation formula , according to the formula: .

[0045] In this embodiment, determine the preset standard deviation threshold of the dispersion coefficient , and after determination, compare it with the generated standard deviation of the dispersion coefficient , and evaluate the discrete degree of the candidate motion vector direction when there is a texture repetition area in the image frame of the security monitoring video according to the comparison result. The specific comparison and analysis are as follows: If , the discrete degree of the candidate motion vector direction when there is a texture repetition area in the image frame of the security monitoring video is within the normal range; This situation indicates that the discrete behavior of the candidate motion vectors of each texture repeating block in the current image frame is relatively consistent in terms of both direction and amplitude, and the fluctuation amplitude is controlled within the normal range acceptable to the system, without any local abnormal areas showing significant deviation. In this case, the system can consider that the image frame does not exhibit complex motion prediction abnormal characteristics during the encoding process, and it is suitable to continue using the default or standardized motion vector selection strategy without triggering special processing procedures. The impact is to ensure the encoding efficiency without increasing data processing resources, and at the same time ensure the stability of the image restoration quality in the video transmission link, which is beneficial to guaranteeing the accuracy and coherence of the back-end intelligent analysis algorithms (such as object recognition and behavior analysis) under the large-scene consistency.

[0046] If , the discrete degree of the candidate motion vector directions in the image frames of security surveillance videos with texture repeating areas is in an abnormal fluctuation state.

[0047] This situation shows that the discrete behavior of the motion vectors of each texture repeating block in the current image frame is significantly different, that is, there are obvious deviations in the vector direction or amplitude distribution of some areas from other areas. This phenomenon means that local areas may have unstable trends in motion prediction due to factors such as highly repeated textures, occlusion interference, or in-frame image noise, which may potentially pose risks to the coherence and clarity of the entire frame image reconstruction. In this case, the system needs to actively adjust the motion prediction strategy, such as switching to a more conservative vector selection mechanism, restricting the prediction direction range, or strengthening the boundary consistency control, to mitigate the impact of abnormal fluctuations on the encoding performance. If no intervention is carried out, it may cause problems such as image misalignment, blurred contours, and ghosting diffusion at the decoding end, and at the same time reduce the discrimination accuracy of the intelligent perception module based on image content, affecting the reliability and response speed of the overall security system.

[0048] Based on the evaluation results, decide whether to classify each texture repeating block and whether to match corresponding motion vector selection strategies respectively; In this embodiment, based on the evaluation results, decide whether to classify each texture repeating block and whether to match corresponding motion vector selection strategies respectively, specifically: When the evaluation result shows that the discrete degree of the candidate motion vector directions in the texture repeating area of the image frame is within the normal range, do not classify each texture repeating block, and uniformly adopt the initial motion vector selection strategy; When the system evaluation result indicates that the discrete degree of the candidate motion vector directions in the case of the image frame in the texture repetition area is within the normal range, it means that the texture repetition blocks in the image frame are relatively consistent in terms of direction distribution and amplitude fluctuation, without showing obvious local fluctuations or abnormal distributions. Therefore, the system does not need to perform classification operations on each block separately. In software implementation, a unified process can be triggered through frame-level control parameters. That is, after the judgment result that the standard deviation of the discrete coefficient is less than or equal to the set threshold holds, the software process will skip the call of the classification module and directly enter the motion vector selection stage, and call the predefined "initial selection strategy template". This initial strategy is usually based on the principle of minimum residual. It traverses all candidate motion vectors in each texture repetition block, calculates their prediction residuals respectively, and selects the vector with the smallest prediction error as the final motion compensation vector. In this way, the system maintains a unified and simplified processing flow during the motion estimation process, which not only reduces the consumption of computing resources but also avoids introducing additional processing delays caused by classification and strategy differentiation in unnecessary situations, thereby ensuring the stability of the coding efficiency and real-time transmission performance. It is an effective strategy for dynamically balancing the overall resources and coding quality.

[0049] When the evaluation result is that the discrete degree of the candidate motion vector directions in the case of the image frame in the texture repetition area is in an abnormal fluctuation state, determine the preset discrete coefficient threshold interval , and after determination, compare it with the discrete coefficient of each texture repetition block , classify each texture repetition block according to the comparison result, and match the corresponding motion vector selection strategy, specifically as follows: If , divide the texture repetition block into a low-discrete level block and match the direction-locked vector selection strategy. The specific strategy is: based on the preset reference direction angle, screen the vector set whose direction angle deviates from the reference angle by less than the first threshold among all candidate motion vectors in the low-discrete level block, calculate the prediction residual value of each vector, and select the vector whose prediction residual meets the predetermined range condition as the final motion vector; After dividing a certain texture repeating block into low-discreteness-level blocks, the system can screen and select its candidate motion vectors through a direction-locked vector selection strategy. In the specific implementation process, the software system first calls the direction angle data of all candidate motion vectors in this block extracted previously, and uses the average direction angle or weighted direction angle of this block as the reference direction angle, serving as the unified direction benchmark for this block. Subsequently, the system traverses all candidate vectors within this block, calculates the deviation angle between the direction angle of each vector and the reference direction angle, and determines whether it is less than a preset first angle threshold; only the vectors that meet this condition are included in the "constrained vector set". On this basis, for each vector in this set, the predicted residual value is further calculated, and it is judged whether it meets the quality requirements according to the preset residual tolerance interval. Finally, the final vector for motion compensation is preferably selected from the vectors that meet the direction deviation limit and residual requirements. The design purpose of this strategy is to strengthen the consistency of the motion vector direction and suppress the risk of spatial misalignment at the decoding end caused by minute fluctuations on the premise of highly concentrated direction distribution and low volatility, so as to further improve the prediction accuracy of image blocks and the decoding restoration stability in the low-discreteness scenario, and achieve double guarantees of refined control and coding quality.

[0050] If , divide the texture repeating block into medium-discreteness-level blocks and match the direction-weighted vector selection strategy. Specifically, for each candidate motion vector in the medium-discreteness-level block, according to the included angle between its direction angle and the reference direction angle, a preset weighting factor is assigned to perform weighted processing on the predicted residual, and the final motion vector is selected with the weighted residual as the objective function; When a certain texture repeating block is divided into medium-discreteness-level blocks, the system performs differential processing on the candidate motion vectors through the direction-weighted vector selection strategy. In the software implementation, first extract the direction angles of all candidate motion vectors in this block and calculate the included angle value between them and the reference direction angle; subsequently, the system assigns a weighting factor to each candidate vector based on a set of preset direction weighting functions (such as a decreasing cosine weight model or an exponential decay model), and this factor usually decreases as the direction deviation degree increases. Next, the system calculates the predicted residual for each candidate vector and multiplies the residual value by the weighting factor of this vector to generate the weighted residual; all candidate vectors are sorted according to the weighted residual values, and the motion vector finally used for coding is selected with the minimum weighted residual value as the objective function. The core of the design of this strategy lies in: in the medium-discreteness scenario, the direction distribution has a certain degree of volatility. If only fixed directions or unified rules are used for screening, it may lead to prediction imbalance. Therefore, by introducing a weighting mechanism, the influence degree of candidate vectors in different directions on the final decision is dynamically adjusted to achieve elastic tolerance of direction deviation, so as to avoid over-compressing the flexibility of the coding path while maintaining prediction robustness, which helps to improve the balance between coding efficiency and image restoration quality.

[0051] If ,the texture repeating block is divided into high - dispersion - level blocks, and a direction - restricted vector selection strategy is adopted. Specifically, a range of allowable direction - angle deviation is set, and only the candidate motion vectors with direction angles within this range are retained to participate in the prediction residual calculation, while the candidate vectors outside this range are excluded.

[0052] After a texture repeating block is divided into high - dispersion - level blocks, it indicates that there is significant divergence in the direction dimension of the candidate motion vectors within this block, which may lead to prediction error diffusion and image misalignment at the decoding end. Therefore, the system adopts a direction - restricted vector selection strategy to compress the range of direction fluctuations. In software implementation, the system first sets a range of allowable direction - angle deviation, which is usually centered around the reference direction angle of the block, and defines a symmetric direction - deviation tolerance (such as ±θ threshold) to construct an acceptable direction interval. The system then extracts the direction angles of all candidate motion vectors in the high - dispersion block and compares them with the reference direction angle, only retaining the vectors whose direction angles fall within the allowable deviation interval to form a "restricted candidate set"; the remaining vectors outside this direction range are excluded in the current processing cycle and do not participate in the subsequent prediction residual calculation. The system then performs the prediction residual calculation for each vector in the restricted candidate set and selects the vector with the optimal residual value as the final motion vector for encoding. The technical intention of this strategy is to exclude those motion vectors whose directions deviate significantly and may cause prediction instability by strictly restricting the range of candidate directions for selection, so as to suppress the interference of discrete noise sources on the image - block reconstruction quality to the greatest extent, enhance the adaptive control ability for high - dispersion behaviors in texture - repeating regions, and thus improve the overall image clarity and system decoding consistency.

[0053] After the system calculates the discrete coefficients of each texture repeating block in the image frame, to achieve subsequent classification and policy matching, a set of discrete coefficient threshold intervals for distinguishing discrete levels need to be preset in advance, usually including a lower threshold and an upper threshold. The determination of this interval can be configured through the parameter learning module built into the software system. In specific implementation, the system first uses a large number of labeled historical image samples to statistically analyze the discrete coefficient distribution formed by the combination of the direction distribution index and the amplitude offset coefficient of each texture repeating block under different texture distributions and motion states. Based on this statistical result, the system can use clustering analysis or histogram density estimation methods to identify multiple stable concentration regions in the numerical distribution of discrete coefficients, so as to delimit a reasonable segmentation interval. For example, the discrete coefficients corresponding to two probability quantiles (such as the 25% quantile and the 75% quantile) can be set as the threshold boundaries to form an interval range supported by engineering experience. At the same time, the software system supports a dynamic adjustment mechanism for this threshold interval: during the actual coding process, the threshold interval can be fine-tuned or adaptively reset in combination with real-time evaluation feedback. This method avoids the adaptability limitations brought by artificially setting fixed thresholds, makes the discrete level division closer to the actual characteristics of image motion, ensures more accurate subsequent classification and policy matching, and thus improves the intelligence and robustness of the overall system processing.

[0054] Execute corresponding dynamic regulation operations according to the selected motion vector selection strategy; In this embodiment, executing corresponding dynamic regulation operations according to the selected motion vector selection strategy specifically includes: When the direction-locked vector selection strategy is matched, the specific dynamic regulation operation to be executed is: set a reference direction angle and a first deviation threshold, compare the direction angles of candidate motion vectors one by one, and only retain the vectors whose direction angles deviate from the reference angle by no more than the first deviation threshold to form a restricted candidate set, and limit subsequent residual calculation and vector selection to be only carried out within this restricted candidate set;

[0055] In the scenario of matching the direction-locked vector selection strategy, the dynamic regulation operation can be achieved by setting a "reference direction angle" and a "first deviation threshold" in the coding preprocessing module. The software system will extract the direction angles of all candidate motion vectors in this texture repeating block one by one and calculate the difference from the reference direction angle to determine whether their direction deviations are within the threshold allowable range. Only the vectors that meet the deviation range requirements are retained to form a "restricted candidate vector set". The system restricts the subsequent prediction residual calculation process to be executed within this set and selects the motion vector whose prediction residual value meets a specific optimization goal within this range. The purpose of this regulation mechanism is to avoid introducing motion vectors with sudden direction changes in blocks with strong direction consistency, so as to maintain the consistency and stability of motion compensation, and reduce image block reconstruction errors and spatial misalignment phenomena.

[0056] When the matching direction weighted vector selection strategy is adopted, the specific dynamic regulation operation is as follows: according to the angle between each candidate motion vector and the reference direction angle, call the weighted function to dynamically calculate its direction deviation weight, apply this weight to the predicted residual value corresponding to this vector, generate a weighted residual result, and select the optimal vector with the weighted residual as the target; For the blocks with the matching direction weighted vector selection strategy, the dynamic regulation mechanism of the software system adopts a direction deviation weighted model. Specifically, the system first calculates the angle between each candidate motion vector and the reference direction angle through an algorithm module, and inputs this angle value into the set direction weighted function, such as using cosine, exponential or Gaussian function to generate a weight factor. This weight factor is then multiplied by the predicted residual value of this vector in the motion estimation process to generate a weighted residual. The weighted residuals of all candidate vectors will be used as the objective function to input the optimization path for determining the final motion vector. By introducing a direction deviation adjustment factor in the residual calculation stage, this dynamic regulation mechanism automatically reduces the weight of vectors deviating from the reference direction when participating in the selection, avoids the interference of direction fluctuations on the prediction accuracy, and takes into account both direction diversity and stability. It is an adaptive balance strategy for medium direction discrete situations.

[0057] When the matching direction restricted vector selection strategy is adopted, the specific dynamic regulation operation is as follows: preset a direction angle restriction interval, traverse the direction angles of candidate motion vectors, and only construct an effective candidate vector set for all motion vectors whose direction angles fall within the restriction interval, and limit the residual calculation and final vector selection operations within this effective candidate vector set, shielding all vectors outside the range from participating.

[0058] Under the direction restricted vector selection strategy, the dynamic regulation operation is implemented through the "direction angle restriction interval" configured by the software. This interval is defined by the reference direction angle and the allowable deviation range. The system will retrieve the direction angles of all candidate motion vectors of the current block one by one and judge whether they fall within this preset interval. Only the vectors with direction angles within the restricted range are marked as "valid vectors" and enter the subsequent residual calculation and vector optimization process; all candidate vectors that do not meet the conditions are excluded within the current processing cycle and do not participate in the prediction calculation. This regulation method can effectively prevent motion vectors with large direction deviations from being wrongly selected, especially suitable for texture regions with severe direction dispersion, helps to converge the prediction path, suppress abnormal fluctuations, and thus improve the overall coding stability and decoded image quality.

[0059] Transmit the encoded video compression stream in real time through the Internet of Things channel, and attach identification information corresponding to the motion vector selection strategy to the video stream, so that the receiving end can execute the decoding control strategy adjustment according to this identification information to optimize the image reconstruction effect and subsequent analysis performance.

[0060] After video compression is completed, the software system at the encoding end will convert the type of motion vector selection strategy (such as direction locking type, direction weighting type, direction limiting type) adopted by each image frame or encoding block into a type of structured identification information, and insert it into the compressed stream, for example, through binary marking, frame header extension fields or metadata tag embedding methods. This identification information is packaged together with the encoded data and encapsulated into a structured video data frame that can be transmitted in real time through Internet of Things communication protocols (such as MQTT, CoAP, WebSocket, etc.), and maintains low latency and high reliability during the transmission process. At the decoding end, the software system reads this strategy identification information during the unpacking process and dynamically adjusts the decoding control parameters accordingly. For example, under the direction locking type, the motion compensation smoothing weight is increased, and under the direction limiting type, the error diffusion suppression is strengthened, so as to achieve the strategy-level coordination of the decoding process and ensure that the image block restoration process is consistent with the encoding strategy.

[0061] The implementation of this step can achieve synchronous adaptation and semantic alignment between the encoding strategy and the decoding behavior, and solve the fragmentation problem of "only decoding data but not strategies" in existing video decoding, which is particularly crucial in complex texture repetition scenarios. By introducing the strategy identification information, the receiving end can real-time perceive the motion vector selection logic adopted by the encoding end in a specific block, thus avoiding image reconstruction deviations, boundary misalignments or ghosting blurs caused by inconsistent decoding assumptions. In addition, this mechanism also provides a higher consistency of basic image quality for subsequent intelligent analysis algorithms such as image content-based behavior recognition and object tracking, improving the analysis accuracy and response stability of the security system at the terminal side. Therefore, this step not only completes the data transmission itself, but is also a key link to achieve the full-link collaborative control of "encoding - decoding - analysis".

[0062] The above formulas are all dimensionless and take their numerical calculations. The formula is obtained by collecting a large amount of data for software simulation to get a formula that is closest to the real situation. The preset parameters in the formula are set by technicians in this field according to the actual situation.

[0063] The above embodiments can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, the above embodiments can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, the processes or functions described in the embodiments of the present application are generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center in a wired or wireless (such as infrared, wireless, microwave, etc.) manner. The computer-readable storage medium can be any available medium that can be accessed by a computer, or a data storage device such as a server or data center that includes one or more collections of available media. The available media can be magnetic media (such as floppy disks, hard disks, magnetic tapes), optical media (such as DVDs), or semiconductor media. The semiconductor media can be a solid-state drive.

[0064] It should be understood that in various embodiments of the present application, the magnitudes of the sequence numbers of the above processes do not mean the order of execution, and the order of execution of each process should be determined by its function and internal logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.

[0065] Those of ordinary skill in the art can realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. A professional technician can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present application.

[0066] In several embodiments provided in the present application, it should be understood that the disclosed systems and methods can be implemented in other ways. For example, the above-described embodiments are merely illustrative. For example, the division of the units is only a logical function division, and there can be other division methods in actual implementation. For example, multiple 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 displayed or discussed couplings or direct couplings or communication connections to each other can be indirect couplings or communication connections through some interfaces, devices, or units, and can be in electrical, mechanical, or other forms.

[0067] The unit described as a separation component may or may not be physically separated. The component shown as a unit may or may not be a physical unit, that is, it may be located in one place or distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0068] In addition, each functional unit in various embodiments of the present application may be integrated into one processing unit, may exist separately as individual physical units, or two or more units may be integrated into one unit.

[0069] As described above, the above are only specific embodiments of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art within the technical scope disclosed in the present application can easily think of changes or substitutions, which should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims

1. A real-time transmission method for security monitoring video based on the Internet of Things, characterized in that: The specific steps include: In the encoding process of the security monitoring video, the image frame in the security monitoring video is divided into macroblocks, and all the divided macroblocks are monitored to determine whether there is a texture repetitive area in the image frame; When there is a texture repetition area in the image frame, all macroblocks constituting the texture repetition area in the image frame are determined and marked as texture repetition blocks; Comprehensively analyze each texture repetitive block to evaluate the degree of discreteness of candidate motion vector directions when there are texture repetitive areas in image frames in security surveillance videos; Based on the evaluation results, decide whether to classify each texture repetitive block and whether to match the corresponding motion vector selection strategy respectively; According to the matching motion vector selection strategy, corresponding dynamic control operations are performed respectively; The encoded video compression stream is transmitted in real time through the Internet of Things channel, and identification information corresponding to the motion vector selection strategy is added to the video stream, so that the receiving end performs decoding control strategy adjustment according to the identification information.

2. The method for real-time transmission of security monitoring video based on the Internet of Things according to claim 1 is characterized in that: When there is a texture repetition area in an image frame, all macroblocks constituting the texture repetition area in the image frame are determined and marked as texture repetition blocks, specifically: Extracting grayscale histogram distribution, edge gradient direction distribution and frequency domain feature parameters for each macroblock in the image frame, respectively, and calculating feature similarity between adjacent macroblocks to identify a set of macroblocks whose texture feature similarity is higher than a preset threshold and is continuously distributed in space, and determine them as macroblocks constituting a texture repetition area; The identified macroblock sets are grouped in a logical identification manner, and a texture repeat block mark is assigned to each group of macroblocks during encoding preprocessing.

3. The method for real-time transmission of security monitoring video based on the Internet of Things according to claim 2 is characterized in that: Comprehensively analyzing each texture repetitive block to evaluate the degree of discreteness of candidate motion vector directions when there are texture repetitive areas in the image frame of the security surveillance video, specifically includes the following steps: Extracting the motion feature distribution information of each marked texture repetitive block from the image frame in the security monitoring video, and performing preprocessing after extraction; Extracting direction consistency information and amplitude stability information from the preprocessed motion feature distribution information of each texture repetitive block, and analyzing them after extraction to generate direction distribution index and amplitude deviation coefficient of each texture repetitive block respectively; Based on the generated directional distribution index and amplitude offset coefficient of each texture repetitive block, a weighted summation model is constructed, and the discrete coefficient of each texture repetitive block is generated respectively through weighted summation; The discrete coefficients of each generated texture repetitive block are used to generate the standard deviation of the discrete coefficients through the standard deviation formula; A preset discrete coefficient standard deviation threshold is determined, and after determination, it is compared with the generated discrete coefficient standard deviation, and the degree of discreteness of the candidate motion vector direction when there is a texture repetitive area in the image frame of the security monitoring video is evaluated according to the comparison result.

4. The method for real-time transmission of security monitoring video based on the Internet of Things according to claim 3 is characterized in that: The logic for obtaining the directional distribution index of each texture repeating block is as follows: The direction consistency information is extracted from the motion feature distribution information of each texture repetitive block after preprocessing, specifically including the direction angle of each candidate motion vector in each texture repetitive block, and calibrated as , Indicates Texture repeating block The direction angles of candidate motion vectors, , , and All are positive integers; Calculate the cosine of the angular difference between any two candidate vectors in each texture repeating block , according to the formula: , where Indicates Texture repeating block candidate vectors and the The cosine value of the angular difference between the candidate vectors, ,and , All are positive integers; Calculate the directional distribution index of each texture repeating block. The specific calculation formula is as follows: In the formula, For the Directional distribution index of the texture repeating blocks.

5. The method for real-time transmission of security monitoring video based on the Internet of Things according to claim 4 is characterized in that: The logic for obtaining the amplitude offset coefficient of each texture repeating block is as follows: The direction consistency information and amplitude stability information are extracted from the motion feature distribution information of each preprocessed texture repetitive block, including the modulus length of each candidate motion vector in each texture repetitive block, and calibrated as , Indicates Texture repeating block The modulus of the candidate motion vectors, , , and All are positive integers; Calculate the average value of the modulus of all candidate motion vectors in each texture repeat block , according to the formula: ; Calculate the amplitude offset coefficient of each texture repeating block. The specific calculation formula is as follows: In the formula, For the Amplitude offset factor for each texture repeat block.

6. The method for real-time transmission of security monitoring video based on the Internet of Things according to claim 5 is characterized in that: Directional distribution index based on the generated repetitive blocks of each texture and amplitude offset coefficient , construct a weighted summation model, and generate the discrete coefficients of each texture repetitive block through weighted summation. The specific calculation formula is as follows: In the formula, For the The discrete coefficient of the texture repetition block, and are the directional distribution index of each texture repeating block and amplitude offset coefficient The non-zero weight coefficient of ; The discrete coefficients of each texture repetitive block generated are used to generate the standard deviation of the discrete coefficients through the standard deviation formula , according to the formula: .

7. The method for real-time transmission of security monitoring video based on the Internet of Things according to claim 6 is characterized in that: Determine the pre-set standard deviation threshold of the coefficient of variation , and after determination, the standard deviation of the generated coefficient of dispersion The comparison is performed, and the degree of discreteness of the candidate motion vector direction when there is a texture repetitive area in the image frame of the security surveillance video is evaluated based on the comparison results. The specific comparison analysis is as follows: like ,The discrete degree of the direction of the candidate motion vector is in a normal range when the image frame in the security surveillance video has a texture repetitive area; like ,When there are texture repetitive regions in the image frames of the security surveillance video, the ,degree of discrete direction of candidate motion vectors is in an abnormal ,fluctuation state.

8. The method for real-time transmission of security monitoring video based on the Internet of Things according to claim 7 is characterized in that: Based on the evaluation results, decide whether to classify each texture repetitive block and whether to match the corresponding motion vector selection strategy respectively, specifically: When the evaluation result shows that the discrete degree of the candidate motion vector direction in the image frame in the texture repetition area is within the normal range, each texture repetition block is not classified, and the initial motion vector selection strategy is uniformly adopted; When the evaluation result shows that the discrete degree of the candidate motion vector direction in the image frame in the texture repetition area is in an abnormal fluctuation state, a predetermined discrete coefficient threshold interval is determined. , and after determination, the discrete coefficients of each texture repetition block Perform a comparison, classify each texture repetitive block according to the comparison results, and match the corresponding motion vector selection strategy, as follows: like , dividing the texture repetitive block into low discrete level blocks, matching the direction locking type vector selection strategy, the strategy is specifically: based on the preset reference direction angle, screening the vector set whose direction angle deviates from the reference angle less than the first threshold from all candidate motion vectors of the low discrete level block, calculating the prediction residual value of each vector, and selecting the vector whose prediction residual meets the predetermined range condition as the final motion vector; like , the texture repetitive block is divided into medium discrete level blocks, and a direction weighted vector selection strategy is matched. Specifically, for each candidate motion vector in the medium discrete level block, a preset weighting factor is assigned according to the angle between its direction angle and the reference direction angle, and the prediction residual is weighted, and the final motion vector is selected with the weighted residual as the objective function; like , divide the texture repetitive block into high discrete level blocks, and match the direction-restricted vector selection strategy. The specific strategy is: set the allowable deviation range of the direction angle, and only retain the candidate motion vectors whose direction angles are within the range to participate in the prediction residual calculation, and exclude the candidate vectors outside the range.

9. The method for real-time transmission of security monitoring video based on the Internet of Things according to claim 8, characterized in that: According to the matching motion vector selection strategy, the corresponding dynamic control operations are performed respectively, specifically: When matching the direction-locked vector selection strategy, the dynamic control operation performed is specifically as follows: setting a reference direction angle and a first deviation threshold, comparing the direction angles of candidate motion vectors one by one, retaining only vectors whose direction angles deviate from the reference angle by no more than the first deviation threshold, forming a restricted candidate set, and limiting subsequent residual calculation and vector selection to be performed only in the restricted candidate set; When matching the direction-weighted vector selection strategy, the dynamic control operation performed is as follows: according to the angle between each candidate motion vector and the reference direction angle, the weighting function is called to dynamically calculate its direction deviation weight, the weight is applied to the prediction residual value corresponding to the vector, a weighted residual result is generated, and the optimal vector is selected with the weighted residual as the target; When matching the direction-restricted vector selection strategy, the dynamic control operation performed is specifically: preset the direction angle restriction interval, traverse the direction angles of the candidate motion vectors, and only construct a valid candidate vector set for all motion vectors whose direction angles fall within the restriction interval, and limit the residual calculation and final vector selection operations to the valid candidate vector set, shielding all vectors out of the range from participating.

Citation Information

Patent Citations

  • Motion vector estimating apparatus, encoder and camera

    CN101340578A

  • Method and system for detecting repeated structure in motion estimation and motion compensation algorithm

    CN107426577A

  • Nano hybrid P(VDF-TrFE)(polyvinylidene fluoride copolymer) composite film as well as preparation method and application thereof

    CN108822449A

  • Code rate determining method for video coding and decoding

    CN109462759A

  • Motion estimation technique for digital video encoding applications

    US20030053543A1

Cited By

  • Real-time image stabilization method and system for intelligent image processing

    CN120833277A

  • A real-time image stabilization method and system for intelligent image processing

    CN120833277B

  • Ultrahigh-definition video noise reduction method

    CN121010522A

  • An ultra-high-definition video noise reduction method

    CN121010522B

  • Construction engineering safety monitoring method and system based on artificial intelligence

    CN121509619A