A method and system for monitoring broadcast anomalies
Through the hash algorithm and feature point matching technology, the real-time and accuracy of live broadcast monitoring are optimized, solving the problems of insufficient computing efficiency and accuracy in the existing technology, and realizing the picture difference between the broadcast source and the broadcast source. efficient identification and monitoring.
Patent Information
- Application Number
- CN202310276837.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-21
- Publication Date
- 2024-10-15
- Estimated Expiration
- 2043-03-21
AI Technical Summary
Existing live broadcast monitoring methods have insufficient computational efficiency and accuracy when dealing with picture differences and additional marks between the broadcast source and the broadcast source. In particular, the perceptual hashing algorithm has a high false alarm rate and the image feature comparison algorithm requires a lot of calculations. It is large and not real-time enough to meet the needs of live broadcast monitoring.
The image frame is compressed and grayscale processed through the hash algorithm, the Hamming distance is calculated, and the image feature matching algorithm is used when identifying anomalies. The broadcast status is determined based on the matching ratio of feature points, and the main direction and vector features of the feature points are used to supplement Identify, reduce computing resource consumption and reduce false alarms.
It improves the real-time and accuracy of live broadcast monitoring, saves computing resources, reduces false alarms, and meets the real-time and accuracy requirements of live broadcast monitoring.
Smart Images

Figure CN116320624B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to a method and system for monitoring relay anomalies, belonging to the technical field of video relay. Background Art
[0002] In recent years, the user scale of Internet TV and Internet video has been growing. This is a new technology that uses broadband network, integrates Internet, multimedia, communication and other technologies, and provides home users with a variety of interactive services including digital TV. It can well adapt to the trend of rapid development of the current network, fully and effectively utilize network resources, and meet the new viewing needs of the audience. At the same time, compared with traditional radio and television, its supervision methods and difficulties have undergone new changes. Among them, the monitoring of live broadcasts is the focus due to its special nature.
[0003] There are two widely used processing methods at present, the perceptual hash algorithm and the image feature comparison algorithm. However, the perceptual hash algorithm has a higher computational efficiency and can meet the real-time requirements. However, when the resolution difference between the broadcast source and the broadcast source is too large, and black bars are added to the broadcast source screen (usually appearing when HD is converted to SD, and wide screen is converted to normal screen, including up and down and left and right), its accuracy will be significantly reduced. In addition, the broadcast source usually carries its own channel logo, superscript, subtitles, emergency broadcasts, etc., which further reduces the accuracy of its judgment and usually causes a large number of false alarms. The most representative image feature comparison algorithm, such as the SURF algorithm, usually requires the use of GPU for calculation due to its large amount of calculation, and its real-time performance cannot be guaranteed (the live broadcast frame rate is usually not less than 25), and it cannot meet the needs of live broadcast monitoring. Summary of the invention
[0004] The purpose of the present invention is to provide a method and system for monitoring relay anomalies, which are optimized in terms of real-time performance and accuracy to meet the needs of live broadcasting.
[0005] In order to achieve the above object, the present invention is implemented through the following technical solutions:
[0006] A method for monitoring relay anomalies, characterized by comprising the following steps:
[0007] Step 1: Obtain data information of the broadcast source and the broadcast source, and extract frames of the broadcast source and the broadcast source in real time.
[0008] Step 2: Compress the extracted image frame through the hash algorithm and uniformly compress it to 32×32 size through the transformation matrix. The specific formula is as follows: W2=M×W1; where W1 represents the original frame image, M is the transformation matrix, and W2 represents the compressed image.
[0009] Step 3: Perform grayscale processing on the compressed image W2 and calculate the grayscale average value of each pixel. The specific formula is as follows:
[0010]
[0011] Where: g avg Represents the average gray value of all pixels, g i Represents the gray value of the i-th pixel.
[0012] Step 4: Compare the grayscale of each pixel with the average grayscale value. If the grayscale value of the pixel is greater than or equal to the average grayscale value, the pixel is recorded as 1. If it is less than the average grayscale value, it is recorded as 0. The obtained values are organized into a feature sequence according to the order of the pixels.
[0013] Step 5: Compare the feature sequence of the current frame of the broadcast source with the feature sequence within 10 seconds before the current time of the broadcast source, and calculate the Hamming distance; if the Hamming distance is less than 8, it is a normal broadcast; if the Hamming distance is greater than 8, extract the feature points of the original image and the feature points of the broadcast source image, and judge whether it is an abnormal broadcast based on the matching ratio of the feature points; if the matching ratio is higher than 85%, it is judged as a normal broadcast; if the ratio is lower than 85%, it is judged as an abnormal broadcast.
[0014] Preferably, the real-time frame extraction method is as follows: the broadcast source extracts each frame image, and the broadcast source extracts the key frame image.
[0015] Preferably, the Hamming distance is calculated as follows: (s,t) =Count(s i ≠t i ), where: H (s,t) represents the Hamming distance between image s and image t, Count() represents the counting function, s i represents the value of the i-th bit of the feature sequence of image s, t i Represents the value of the i-th bit of the feature sequence of image t.
[0016] Preferably, the specific method of judging whether it is abnormal retransmission according to the matching ratio of the feature points is as follows: constructing the Hessian matrix using the determinant approximation, calculating the main direction and vector features of the feature points, the formula is as follows:
[0017] Vec p =(Σ|d x |,Σd x ,Σ|d y |,∑d y )
[0018] Where: Vec p The feature vector representing the feature point p, dx represents the wavelet response value in the x direction with the feature point p as the center, d y Represents the wavelet response value in the y direction centered at feature point p.
[0019] A system for monitoring broadcasting, characterized by comprising a frame extraction module, a hash calculation module, a hash comparison module, a feature extraction module, and a feature matching module
[0020] The frame extraction module extracts frames from the broadcast source and the broadcast source; the hash calculation module compresses and grayscales the extracted images; the hash comparison module calculates the Hamming distance by comparing the feature sequence of the current frame of the broadcast source with the feature sequence of the frame within a certain time range of the broadcast source, and determines whether the Hamming distance is less than 8; the feature extraction module extracts feature points of the original image; the feature matching module matches the feature points extracted by the feature extraction module to determine the current broadcast status.
[0021] The advantages of the present invention are that the present invention first uses a hash algorithm to calculate the feature sequence of the picture, and only when a suspected abnormality is identified, the image feature matching algorithm with a large amount of calculation is used. The first step is to filter out the pictures that are completely the same or nearly completely the same in most cases, and the second step is to supplement the recognition of the pictures after scaling, adding black edges, etc., which effectively saves computing resources and reduces false positives.
[0022] There is usually a certain time delay between the relay source and the relayed source, and it is very easy to generate false alarms if the comparison is performed in real time. The present invention caches the relayed source for a certain period of time, and performs a one-to-many comparison when the relay source is compared, so as to avoid the influence of time delay on accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] The accompanying drawings are used to provide further understanding of the present invention and constitute a part of the specification. They are used to explain the present invention together with the embodiments of the present invention and do not constitute a limitation of the present invention.
[0024] Figure 1 It is a schematic diagram of the system structure of the present invention.
[0025] Figure 2 This is a schematic diagram of calculating characteristic sequences in the present invention.
[0026] Figure 3 Schematic diagram of image feature matching of the present invention. DETAILED DESCRIPTION
[0027] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0028] Example 1
[0029] A method for monitoring broadcast anomalies to monitor live broadcast quality includes the following steps:
[0030] Step 1: Obtain data information of the broadcast source and the broadcast source, and extract frames of the broadcast source and the broadcast source in real time; the broadcast source extracts each frame image, and the broadcast source extracts the key frame image.
[0031] Step 2: Compress the extracted image frame through the hash algorithm and uniformly compress it to 32×32 size through the transformation matrix. The specific formula is as follows: W2=M×W1; where W1 represents the original frame image, M is the transformation matrix, and W2 represents the compressed image.
[0032] Step 3: Perform grayscale processing on the compressed image W2 and calculate the grayscale average value of each pixel. The specific formula is as follows:
[0033]
[0034] Where: g avg Represents the average gray value of all pixels, g i Represents the gray value of the i-th pixel.
[0035] Step 4: Compare the grayscale of each pixel with the average grayscale value. If the grayscale value of the pixel is greater than or equal to the average grayscale value, the pixel is recorded as 1. If it is less than the average grayscale value, it is recorded as 0. The obtained values are organized into a feature sequence according to the order of the pixels.
[0036] Step 5: Compare the feature sequence of the current frame of the broadcast source with the feature sequence of the broadcast source within a certain time range, and calculate the Hamming distance.
[0037] The Hamming distance is calculated as follows: (s,t) =Count(s i ≠t i ), where: H (s,t) represents the Hamming distance between image s and image t, Count() represents the counting function, s i represents the value of the i-th bit of the feature sequence of image s, t i Represents the value of the i-th bit of the feature sequence of image t.
[0038] If the Hamming distance is less than a certain threshold, the broadcast is normal. If the Hamming distance is greater than a certain threshold, the feature points of the original image and the feature points of the broadcast source image are extracted. The specific method is as follows: the Hessian matrix is constructed using the determinant approximation, and the main direction and vector features of the feature points are calculated. The formula is as follows:
[0039] Vec p =(∑|d x |,∑d x ,∑|d y |,∑d y )
[0040] Where: Vec p The feature vector representing the feature point p, d x represents the wavelet response value in the x direction with the feature point p as the center, d y Represents the wavelet response value in the y direction centered at feature point p.
[0041] Whether it is an abnormal broadcast is determined based on the matching ratio of the feature points. If the matching ratio is higher than 85%, it is determined to be a normal broadcast; if the ratio is lower than 85%, it is determined to be an abnormal broadcast.
[0042] Example 2
[0043] A system for monitoring broadcasting includes a frame extraction module, a hash calculation module, a hash comparison module, a feature extraction module, and a feature matching module.
[0044] The frame extraction module extracts frames from the broadcast source and the broadcast source; the hash calculation module compresses and grayscales the extracted images; the hash comparison module calculates the Hamming distance by comparing the feature sequence of the current frame of the broadcast source with the feature sequence of the frame within a certain time range of the broadcast source, and compares it with the specified threshold; the feature extraction module extracts feature points of the original image; the feature matching module matches the feature points extracted by the feature extraction module to determine the current broadcast status.
[0045] Finally, it should be noted that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art can still modify the technical solutions described in the aforementioned embodiments or replace some of the technical features therein by equivalents. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A method for monitoring relay anomalies, characterized in that: The following steps are involved: Step 1: Obtain data information of the broadcast source and the broadcast source, and extract frames of the broadcast source and the broadcast source in real time; Step 2: Compress the extracted image frames through the hash algorithm and uniformly compress them into 32×32 size through the transformation matrix. The specific formula is as follows: ;in, Represents the original frame image, is the transformation matrix, Represents a compressed image; Step 3: Compress the image Perform grayscale processing and calculate the grayscale average value of each pixel. The specific formula is as follows: in: Represents the average gray value of all pixels. Indicates The gray value of each pixel; Step 4: Compare the grayscale of each pixel with the average grayscale value. If the grayscale value of the pixel is greater than or equal to the average grayscale value, the pixel is recorded as 1. If it is less than the average grayscale value, it is recorded as 0. The obtained values are combined into a feature sequence according to the order of the pixels. Step 5: Compare the feature sequence of the current frame of the broadcast source with the feature sequence within 10 seconds before the current time of the broadcast source, and calculate the Hamming distance; if the Hamming distance is less than 8, it is a normal broadcast; if the Hamming distance is greater than 8, extract the feature points of the original image and the feature points of the broadcast source image, and judge whether it is an abnormal broadcast based on the matching ratio of the feature points; if the matching ratio is higher than 85%, it is judged as a normal broadcast; if the ratio is lower than 85%, it is judged as an abnormal broadcast.
2. The method for monitoring relay anomalies according to claim 1, characterized in that: The real-time frame extraction method is as follows: the broadcast source extracts each frame image, and the broadcast source extracts the key frame image.
3. The method for monitoring relay anomalies according to claim 1, characterized in that: The Hamming distance is calculated as follows: ,in: Representing images and images The Hamming distance of represents the counting function, Representing images Feature sequence The value of the bit, Representing images Feature sequence The value of the bit.
4. The method for monitoring relay anomalies according to claim 1, characterized in that: The specific method of judging whether it is an abnormal broadcast according to the matching ratio of the feature points is as follows: constructing the Hessian matrix using the determinant approximation, calculating the main direction and vector features of the feature points, the formula is as follows: in: Representing feature points The characteristic vector of Represented by feature points Centered on The wavelet response value in the direction, Represented by feature points Centered on The wavelet response value in the direction.
5. A system for monitoring and relaying using the method according to any one of claims 1 to 4, characterized in that: Including frame extraction module, hash calculation module, hash comparison module, feature extraction module, feature matching module The frame extraction module extracts frames from the broadcast source and the broadcast source; the hash calculation module compresses and grayscales the extracted images; the hash comparison module calculates the Hamming distance by comparing the feature sequence of the current frame of the broadcast source with the feature sequence of the frame within 10 seconds before the current time of the broadcast source, and compares whether the Hamming distance is less than 8; the feature extraction module extracts feature points of the original image; the feature matching module matches the feature points extracted by the feature extraction module, and determines the current broadcast status according to the proportion of the number of matched feature points to all feature points.
