CN110099276B - Self-adaptive coding method and device based on monitoring early warning state - Google Patents

Self-adaptive coding method and device based on monitoring early warning state Download PDF

Info

Publication number
CN110099276B
CN110099276B CN201910486722.5A CN201910486722A CN110099276B CN 110099276 B CN110099276 B CN 110099276B CN 201910486722 A CN201910486722 A CN 201910486722A CN 110099276 B CN110099276 B CN 110099276B
Authority
CN
China
Prior art keywords
early warning
bit
parameter
quantization parameter
module
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910486722.5A
Other languages
Chinese (zh)
Other versions
CN110099276A (en
Inventor
舒倩
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Mengwang Video Co ltd
Original Assignee
Shenzhen Mengwang Video Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Mengwang Video Co ltd filed Critical Shenzhen Mengwang Video Co ltd
Priority to CN201910486722.5A priority Critical patent/CN110099276B/en
Publication of CN110099276A publication Critical patent/CN110099276A/en
Application granted granted Critical
Publication of CN110099276B publication Critical patent/CN110099276B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/124Quantisation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/136Incoming video signal characteristics or properties
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/146Data rate or code amount at the encoder output
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/184Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being bits, e.g. of the compressed video stream

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)
  • Closed-Circuit Television Systems (AREA)

Abstract

The invention provides a self-adaptive coding method and device based on monitoring and early warning states. The method of the invention adjusts the coding method in a self-adaptive way according to the early warning state, when no early warning exists, the low code rate and high quantization parameter are allocated to the current video frame, and once the early warning is triggered, the encoder allocates higher code rate and low quantization parameter to the subsequent frame immediately. Therefore, the effective code rate is distributed to the video frames where the abnormal events occur, and the quality of the video in the monitoring core time period is improved. Meanwhile, by reducing the code rate of the large-probability conventional anomaly-free monitoring video, more recorded video monitoring data are stored under the same memory condition.

Description

Self-adaptive coding method and device based on monitoring early warning state
Technical Field
The invention relates to the field of video coding, in particular to a self-adaptive coding method and device based on monitoring and early warning states.
Background
The security monitoring is a main direction of video application in recent years, and is a research on the problem of high-efficiency early warning for the application at present, but neglecting the early warning, the security monitoring can further provide higher-quality video data for suspicious abnormal events.
Disclosure of Invention
The embodiment of the invention aims to provide a self-adaptive coding method based on a monitoring early warning state, and aims to solve the problem of low quality of suspicious abnormal event video data in security monitoring in the prior art.
The embodiment of the invention is realized in such a way that the self-adaptive coding method based on the monitoring and early warning state comprises the following steps:
step1: encoding the acquired image by adopting a first correction quantization parameter or a first correction bit parameter, simultaneously acquiring early warning state data in real time, and entering Step2 when an early warning point is acquired;
step2: and adopting a corresponding coding mode for the image according to different shielding identifiers.
Further, the early warning state data comprises an early warning point, a shielding identifier and an early warning ending point.
The early warning state data is provided by transmission of an external early warning monitoring system, the external early warning monitoring system comprises functions of complete early warning event monitoring and lens shielding judgment, and the early warning state data is transmitted to the outside through an early warning state data transmitting module.
Further, the adoption of the corresponding coding mode for the image according to different shielding identifiers is specifically as follows:
when the shielding identifier is a first numerical value, adopting a second coding mode;
and when the occlusion identifier is a second value, adopting a third coding mode.
Second coding mode: if the time point of the second numerical value of the shielding mark Fu Chonghui is earlier than the early warning ending point, encoding the image acquired from the early warning point to the time point of the second numerical value of the shielding mark Fu Chonghui by adopting a second correction quantization parameter or a second correction bit parameter, encoding the image acquired from the time point of the second numerical value of the shielding mark Fu Chonghui to the early warning ending point by adopting a third correction quantization parameter or a third correction bit parameter, and returning to Step1; otherwise, encoding the image acquired from the early warning point to the early warning ending point by adopting a second correction quantization parameter or a second correction bit parameter, and then returning to Step1;
third coding mode: and encoding the image acquired from the early warning point to the early warning ending point by adopting a fourth correction quantization parameter or a fourth correction bit parameter, and then returning to Step1.
Another object of an embodiment of the present invention is to provide an adaptive coding apparatus based on monitoring and early warning states, where the apparatus includes:
the first coding module is used for coding the acquired image by adopting a first modified quantization parameter or a first modified bit parameter;
the early warning state data acquisition module is used for acquiring early warning state data in real time; the first coding module and the early warning state data acquisition module operate simultaneously;
the early warning point acquisition judging module is used for judging whether the acquired early warning state data comprise early warning points, if yes, entering the coding mode selecting module, and if not, returning to enter the first coding module and the early warning state data acquisition module;
and the coding mode selection module is used for adopting a corresponding coding mode for the image according to different shielding identifiers.
Further, the early warning state data comprises an early warning point, a shielding identifier and an early warning ending point.
The early warning state data is provided by transmission of an external early warning monitoring system, the external early warning monitoring system comprises functions of complete early warning event monitoring and lens shielding judgment, and the early warning state data is transmitted to the outside through an early warning state data transmitting module.
Further, the method comprises the steps of,
when the shielding identifier is a first numerical value, starting a second coding module; when the shielding identifier is a second numerical value, a third coding module is adopted;
the second encoding module is configured to determine that if the time point of the second value of the shielding identifier Fu Chonghui is earlier than the early warning end point, encode the image acquired from the early warning point to the time point of the second value of the shielding identifier Fu Chonghui by using a second modified quantization parameter or a second modified bit parameter, encode the image acquired from the time point of the second value of the shielding identifier Fu Chonghui to the early warning end point by using a third modified quantization parameter or a third modified bit parameter, and then return to the first encoding module and the early warning state data acquisition module; otherwise, the image acquired from the early warning point to the early warning ending point is encoded by adopting a second correction quantization parameter or a second correction bit parameter, and then the first encoding module and the early warning state data acquisition module are returned.
And the third coding module is used for coding the image acquired from the early warning point to the early warning ending point by adopting a fourth correction quantization parameter or a fourth correction bit parameter, and then returning to the first coding module and the early warning state data acquisition module.
The beneficial effects of the invention are that
The invention provides a self-adaptive coding method and device based on monitoring and early warning states. The method of the invention adjusts the coding method in a self-adaptive way according to the early warning state, when no early warning exists, the low code rate and high quantization parameter are allocated to the current video frame, and once the early warning is triggered, the encoder allocates higher code rate and low quantization parameter to the subsequent frame immediately. Therefore, the effective code rate is distributed to the video frames where the abnormal events occur, and the quality of the video in the monitoring core time period is improved. Meanwhile, by reducing the code rate of the large-probability conventional anomaly-free monitoring video, more recorded video monitoring data are stored under the same memory condition.
Drawings
FIG. 1 is a flow chart of an adaptive coding method based on monitoring and early warning states according to a preferred embodiment of the present invention;
FIG. 2 is a block diagram of an early warning monitoring system according to a preferred embodiment of the present invention;
fig. 3 is a block diagram of an adaptive coding device based on monitoring and early warning states according to a preferred embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention will be further described in detail with reference to the accompanying drawings and examples, and only the portions related to the examples of the present invention are shown for convenience of description. It should be understood that the particular embodiments described herein are illustrative only and are not intended to limit the invention.
The embodiment of the invention provides a self-adaptive coding method and device based on monitoring and early warning states. The method of the embodiment of the invention adaptively adjusts the coding method according to the early warning state, when no early warning exists, the low code rate and high quantization parameter are allocated to the current video frame, and once the early warning is triggered, the encoder allocates higher code rate and low quantization parameter to the subsequent frame immediately. Therefore, the effective code rate is distributed to the video frames where the abnormal events occur, and the quality of the video in the monitoring core time period is improved. Meanwhile, by reducing the code rate of the large-probability conventional anomaly-free monitoring video, more recorded video monitoring data are stored under the same memory condition.
Example 1
FIG. 1 is a flow chart of an adaptive coding method based on monitoring and early warning states according to a preferred embodiment of the present invention; the method comprises the following steps:
step1: and encoding the acquired image by adopting a first correction quantization parameter or a first correction bit parameter, simultaneously acquiring early warning state data in real time, and entering Step2 when an early warning point is acquired.
First modified quantization parameter Qp m1 =clip(Qp+ΔQp 1 ,QP min ,QP max );
First modified bit parameter bit m1 =bit-Δb 1
Wherein QP is min Setting a minimum quantization parameter for an encoder; QP (QP) max Maximum quantization parameter set for encoder; QP is the quantization parameter of the code rate control output; ΔQP 1 For the first modified quantization parameter delta value,
Figure BDA0002085631140000041
wherein, bit is bit parameter of code rate control output; Δb 1 Representing the first modified bit parameter delta value.
The early warning state data comprise early warning points (early warning event starting time), shielding identifiers and early warning ending points (early warning event ending time).
The early warning state data is provided by transmission of an external early warning monitoring system, the external early warning monitoring system comprises functions of complete early warning event monitoring and lens shielding judgment, and the early warning state data is transmitted to the outside through an early warning state data transmitting module; or the early warning monitoring system of the embodiment of the invention is provided; when the camera is monitored to be blocked maliciously, the detection of the early warning point is judged.
Step2: and adopting a corresponding coding mode for the image according to different shielding identifiers.
The method comprises the following steps: when the shielding identifier is a first numerical value (representing that the lens is maliciously shielded), adopting a second coding mode; when the occlusion identifier is a second value (indicating that the lens is not maliciously occluded), adopting a third coding mode;
in the embodiment of the invention, when the shielding identifier is 1, the lens is maliciously shielded, and a first coding mode is adopted; and when the shielding identifier is 0, the lens is not maliciously shielded, and a second coding mode is adopted. It will be appreciated that the occlusion identifier may be other values, different values representing different lens occlusion conditions.
Second coding mode:
if the time point of the second numerical value of the shielding mark Fu Chonghui is earlier than the early warning ending point, encoding the image acquired from the early warning point to the time point of the second numerical value of the shielding mark Fu Chonghui by adopting a second correction quantization parameter or a second correction bit parameter, encoding the image acquired from the time point of the second numerical value of the shielding mark Fu Chonghui to the early warning ending point by adopting a third correction quantization parameter or a third correction bit parameter, and returning to Step1; otherwise, the image collected from the early warning point to the early warning ending point is encoded by adopting a second correction quantization parameter or a second correction bit parameter, and then Step1 is returned.
Second modified quantization parameter Qp m2 =clip(Qp+ΔQp 2 ,QP min ,QP max );
Second modified bit parameter bit m2 =bit-Δb 2
Third modified quantization parameter Qp m3 =clip(Qp-ΔQp 3 ,QP min ,QP max );
Third correction bit parameter bit m3 =bit+Δb 3
Wherein ΔQP 2 Delta value for second modified quantization parameter Δqp 3 Delta value for third modified quantization parameter, 0 < ΔQP 1 <ΔQP 2 <ΔQP 3 <QP/2;Δb 2 Representing a second modified bit parameter delta value; Δb 3 Representing a third modified bit parameter delta value;
0<Δb 1 <Δb 2 <Δb 3 <bit/4。
third coding mode:
and encoding the image acquired from the early warning point to the early warning ending point by adopting a fourth correction quantization parameter or a fourth correction bit parameter, and then returning to Step1.
Fourth modified quantization parameter Qp m4 =clip(Qp-ΔQp 1 ,QP min ,QP max );
Fourth modified bit parameter bit m4 =bit+Δb 1
FIG. 2 is a block diagram of an early warning monitoring system according to a preferred embodiment of the present invention; the early warning monitoring system of the embodiment of the invention comprises:
the initial frame setting module is used for setting initial values of initial detection frame numbers of the current detection video frames and the current audio valid data;
and the initial value of the initial detection frame sequence number of the current audio valid data is num+1, wherein Num represents the audio frame number used for estimating the environment signal-to-noise ratio or calculating the threshold value when the audio valid data is detected.
And the early warning point detection processing device is used for detecting early warning points according to the early warning mode, entering the early warning event first relevant parameter updating module when the early warning event is detected, and continuously detecting the early warning points until the early warning event is finished.
The early warning event first relevant parameter updating module is used for updating the current early warning event first relevant parameter and then entering the early warning event tracking and second relevant parameter updating module;
the first related parameters comprise a current early warning event sequence number n and a current early warning event early warning level n Occlusion identifier sign n Current early warning event start time s n (i.e., the early warning point); the initial values of the first related parameters are all 0;
the early warning point detection according to the early warning mode specifically comprises the following steps: detecting the signal-to-noise ratio of the environment; if the signal-to-noise ratio is fixed, entering a second early warning module; if the signal to noise ratio has time periodicity, entering a third early warning module; otherwise, the first early warning module is entered.
The method for detecting the signal-to-noise ratio of the environment adopts a method conventional in the technical field; the fixed signal-to-noise ratio refers to the signal-to-noise ratio with consistency, namely the signal-to-noise ratio is in a preset threshold range, and is considered as a fixed signal-to-noise ratio state environment at the moment; the fixed signal-to-noise ratio comprises a fixed high signal-to-noise ratio and a fixed low signal-to-noise ratio;
the signal-to-noise ratio has time periodicity, which means that the signal-to-noise ratio changes obviously and has consistency in a certain time period; for example, the signal-to-noise ratio of the household anti-theft monitoring application environment has the characteristics of high, low and high periodicity: the working period of the white day is basically in an unmanned state (high signal to noise ratio), and family personnel return (low signal to noise ratio) at the working time, and the sleeping time returns to silence (high signal to noise ratio) at night; for example, the signal-to-noise ratio of the office anti-theft monitoring application environment has the characteristics of low periodicity: the staff activities are frequent (low signal to noise ratio) during the on-duty hours of the daytime and during the regular on-duty hours, and basically belong to the unmanned state (high signal to noise ratio) from midnight to the next morning.
The early warning event tracking and second related parameter updating module is used for tracking the current early warning event until the early warning event is terminated according to the early warning level of the current early warning event and updating the second related parameter of the current early warning event; the second related parameter is the current early warning event termination time d n (i.e., the early warning end point).
The method comprises the following steps:
if the current early warning event early warning level is a third numerical value, the search code rate is larger than bit nfr X Thres image, if found, the frame number of the image is nfd, let d n = nfd/fps; otherwise set d n Ending for the current recording file ending time.
If the current early warning event early warning level is a fourth value, firstly finding a frame with the largest playing serial number in image frames taking an intrusion body constituent block in early warning point detection as a reference block, and then setting d n For the frame number/fps.
Wherein nfr represents the image frame number of the detected early warning point; bit nfr A code rate representing an image frame with a frame number nfr; thres represents a threshold value, typically selectable Thres > 2.
The first tail frame judging and processing module is used for judging that if the next frame of the current video detection frame exists, setting the next frame of the current video detection frame as the current video detection frame, setting an audio frame at a corresponding time point of the current video detection frame as the initial detection frame of the current audio valid data, and then returning to the early warning point detection and processing device; otherwise, recording the number of the early warning events and ending. Wherein the number of early warning events n=n.
The early warning state data transmitting module is connected with the early warning event first related parameter updating module and the early warning event second related parameter updating module and is used for transmitting the early warning state data to an external coding device in real time. The early warning state data comprises an early warning point (early warning event starting moment), a shielding identifier and an early warning ending point (early warning event ending moment).
Further, the first early warning module comprises
The camera malicious shielding monitoring processing module is used for carrying out camera malicious shielding monitoring, judging that an early warning point is detected when the camera malicious shielding is monitored, updating the current early warning event sequence number, setting a shielding identifier as a first value, setting the current early warning event early warning level as a third value, updating the starting moment of an early warning event, and then entering the early warning event tracking and second related parameter updating module; otherwise, entering an early warning judging and processing module.
Wherein, the current early warning event starts at the moment s n = nfr/fps, nfr denotes the image frame number of the detected early warning point; fps denotes the video acquisition frame rate;
the malicious shielding monitoring method of the camera comprises the following steps: if the current detection video frame is an I frame and the division modes of all blocks are consistent or the current detection video frame is a non-I frame and the inter-frame prediction reference block is consistent with the division mode of the intra-frame prediction block, outputting a monitoring result that the camera is maliciously shielded (the shielding identifier is a first numerical value); otherwise, outputting a monitoring result that the camera is not maliciously shielded (the shielding identifier is a second numerical value).
The early warning judgment processing module is used for carrying out early warning judgment according to the category of the current detection video frame, updating the current early warning event sequence number, setting the early warning level of the current early warning event as a fourth value, updating the starting moment of the current early warning event, and then entering the early warning event tracking and second related parameter updating module; otherwise, the second tail frame judging and processing module is entered.
The second tail frame judging and processing module is used for judging that if the next frame of the current detection video frame exists, setting the next frame of the current detection video frame as the current detection video frame, and returning to the malicious shielding and monitoring and processing module of the camera; otherwise, ending.
Further, the early warning judgment according to the category of the current detected video frame specifically comprises:
case1: non-I frame mode (for non-I frame)
Step a1: judging whether an I block exists or not, if not, directly judging that the current detected video frame has no early warning possibility, and entering a second tail frame judging and processing module; otherwise, firstly dividing all I blocks into a set to be detected, and then dividing the communicated I blocks into different subsets according to the adjacent relation.
Step a2: taking the subset as an independent invading individual to carry out early warning judgment:
the early warning judgment is judged step by the characteristics of the monitoring main body, and the arrangement sequence can be arranged from small to large according to the judged calculated amount; this maximizes the amount of unnecessary computation to be curtailed.
Case2: i frame mode (for I frame)
If the frame is the first frame, directly judging that no early warning is possible, and entering a second tail frame judging and processing module; otherwise, taking the full-frame image as an intrusion main body, carrying out video early warning judgment on the full-frame image, and entering an early warning event tracking and second related parameter updating module when an early warning point is detected; otherwise, the second tail frame judging and processing module is entered.
Further, the second early warning module comprises
The audio early warning detection and judgment processing module is used for starting audio early warning detection, and entering the temporary early warning time point setting module when audio effective data are detected; otherwise, continuing to detect until the detection is finished.
The audio early warning point detection method can be selected from a corresponding method disclosed in the industry or a method of the embodiment of the invention; the method of the embodiment of the invention comprises the following steps:
if the signal to noise ratio is high, detecting the effective data of the audio frequency by using a double-threshold method; otherwise, audio valid data detection is performed using frequency domain parameters such as MFCC (mel frequency cepstral coefficient).
The double-threshold method and the mel-frequency cepstrum coefficient are all well known methods in the art, and are not described herein.
The temporary early warning time point setting module is used for setting the temporary early warning time point as the time point corresponding to the current audio valid data initial frame, and then entering the video early warning detection and judgment processing module.
The video early warning detection and judgment processing module is used for starting video early warning judgment, and entering the early warning event tracking and second related parameter updating module if the video early warning judgment is judged to detect an early warning point; otherwise, directly entering a third tail frame judging and processing module.
The third tail frame judging and processing module is used for setting an audio frame of a time point corresponding to the next frame of the current detection video frame as an audio early warning detection time point if the next frame of the current detection video frame exists, and then returning to the audio early warning detection and judging and processing module again; otherwise, ending.
Further, the third early warning module is configured to send a start signal to the second early warning module at a time with a fixed high signal-to-noise ratio, and send the rest start signals to the first early warning module.
Fig. 3 is a block diagram of an adaptive coding device based on monitoring and early warning states according to a preferred embodiment of the present invention. The device comprises:
the first coding module is used for coding the acquired image by adopting a first modified quantization parameter or a first modified bit parameter;
first modified quantization parameter Qp m1 =clip(Qp+ΔQp 1 ,QP min ,QP max );
First modified bit parameter bit m1 =bit-Δb 1
Wherein QP is min Setting a minimum quantization parameter for an encoder; QP (QP) max Maximum quantization parameter set for encoder; QP is codeA quantization parameter of the rate control output; ΔQP 1 For the first modified quantization parameter delta value,
Figure BDA0002085631140000101
wherein, bit is bit parameter of code rate control output; Δb 1 Representing the first modified bit parameter delta value.
The early warning state data acquisition module is used for acquiring early warning state data in real time;
and the first coding module and the early warning state data acquisition module operate simultaneously.
The early warning state data comprise early warning points (early warning event starting time), shielding identifiers and early warning ending points (early warning event ending time).
The early warning state data is provided by transmission of an external early warning monitoring system, the external early warning monitoring system comprises functions of complete early warning event monitoring and lens shielding judgment, and the early warning state data is transmitted to the outside through an early warning state data transmitting module; or the early warning monitoring system of the embodiment of the present invention is provided, and the detailed structure of the early warning monitoring system of the embodiment of the present invention is described in detail in the embodiment, and is not described herein again; when the camera is monitored to be blocked maliciously, the detection of the early warning point is judged.
The early warning point acquisition judging module is used for judging whether the acquired early warning state data comprise early warning points, if yes, entering the coding mode selecting module, and if not, returning to enter the first coding module and the early warning state data acquisition module.
And the coding mode selection module is used for adopting a corresponding coding mode for the image according to different shielding identifiers.
The method comprises the following steps: when the shielding identifier is a first numerical value (representing that the lens is maliciously shielded), starting a second coding module; when the shielding identifier is a second numerical value (which indicates that the lens is not maliciously shielded), a third coding module is adopted;
the second encoding module is configured to determine that if the time point of the second value of the shielding identifier Fu Chonghui is earlier than the early warning end point, encode the image acquired from the early warning point to the time point of the second value of the shielding identifier Fu Chonghui by using a second modified quantization parameter or a second modified bit parameter, encode the image acquired from the time point of the second value of the shielding identifier Fu Chonghui to the early warning end point by using a third modified quantization parameter or a third modified bit parameter, and then return to the first encoding module and the early warning state data acquisition module; otherwise, the image acquired from the early warning point to the early warning ending point is encoded by adopting a second correction quantization parameter or a second correction bit parameter, and then the first encoding module and the early warning state data acquisition module are returned.
Second modified quantization parameter Qp m2 =clip(Qp+ΔQp 2 ,QP min ,QP max );
Second modified bit parameter bit m2 =bit-Δb 2
Third modified quantization parameter Qp m3 =clip(Qp-ΔQp 3 ,QP min ,QP max );
Third correction bit parameter bit m3 =bit+Δb 3
Wherein ΔQP 2 Delta value for second modified quantization parameter Δqp 3 Delta value for third modified quantization parameter, 0 < ΔQP 1 <ΔQP 2 <ΔQP 3 <QP/2;Δb 2 Representing a second modified bit parameter delta value; Δb 3 Representing a third modified bit parameter delta value;
0<Δb 1 <Δb 2 <Δb 3 <bit/4。
and the third coding module is used for coding the image acquired from the early warning point to the early warning ending point by adopting a fourth correction quantization parameter or a fourth correction bit parameter, and then returning to the first coding module and the early warning state data acquisition module.
Fourth modified quantization parameter Qp m4 =clip(Qp-ΔQp 1 ,QP min ,QP max );
Fourth modified bit parameter bit m4 =bit+Δb 1
It will be appreciated by those of ordinary skill in the art that implementing all or part of the steps of the methods of the embodiments described above may be accomplished by program instruction related hardware, and the program may be stored on a computer readable storage medium, which may be a ROM, a RAM, a magnetic disk, an optical disk, etc.
The foregoing description of the preferred embodiments of the invention is not intended to be limiting, but rather is intended to cover all modifications, equivalents, and alternatives falling within the spirit and principles of the invention.

Claims (7)

1. An adaptive coding method based on monitoring and early warning states is characterized by comprising the following steps:
step1: encoding the acquired image by adopting a first correction quantization parameter or a first correction bit parameter, simultaneously acquiring early warning state data in real time, and entering Step2 when an early warning point is acquired;
the early warning state data comprise early warning points, shielding identifiers and early warning ending points;
the early warning state data is provided by transmission of an external early warning monitoring system, the external early warning monitoring system comprises functions of complete early warning event monitoring and lens shielding judgment, and the early warning state data is transmitted to the outside through an early warning state data transmitting module;
step2: adopting corresponding coding modes for the image according to different shielding identifiers;
when the early warning point is not acquired, the acquired image is returned to be encoded by adopting a first correction quantization parameter or a first correction bit parameter, and early warning state data are acquired in real time;
when the shielding identifier is a first numerical value, adopting a second coding mode;
when the shielding identifier is a second numerical value, adopting a third coding mode;
second coding mode: if the time point of the second numerical value of the shielding mark Fu Chonghui is earlier than the early warning ending point, encoding the image acquired from the early warning point to the time point of the second numerical value of the shielding mark Fu Chonghui by adopting a second correction quantization parameter or a second correction bit parameter, encoding the image acquired from the time point of the second numerical value of the shielding mark Fu Chonghui to the early warning ending point by adopting a third correction quantization parameter or a third correction bit parameter, and returning to Step1; otherwise, encoding the image acquired from the early warning point to the early warning ending point by adopting a second correction quantization parameter or a second correction bit parameter, and then returning to Step1;
third coding mode: and encoding the image acquired from the early warning point to the early warning ending point by adopting a fourth correction quantization parameter or a fourth correction bit parameter, and then returning to Step1.
2. The adaptive coding method based on monitoring and early warning state according to claim 1, characterized in that,
first modified quantization parameter Qp m1 =clip(Qp+ΔQp 1 ,QP min ,QP max );
First modified bit parameter bit m1 =bit-Δb 1
Wherein QP is min Setting a minimum quantization parameter for an encoder; QP (QP) max Maximum quantization parameter set for encoder; QP is the quantization parameter of the code rate control output; ΔQP 1 For the first modified quantization parameter delta value,
Figure QLYQS_1
bit is bit parameter outputted by code rate control; Δb 1 Representing the first modified bit parameter delta value.
3. The adaptive coding method based on monitoring and early warning state according to claim 1, characterized in that,
second modified quantization parameter Qp m2 =clip(Qp+ΔQp 2 ,QP min ,QP max );
Second modified bit parameter bit m2 =bit-Δb 2
Third modified quantization parameter Qp m3 =clip(Qp-ΔQp 3 ,QP min ,QP max );
Third correction bit parameter bit m3 =bit+Δb 3
Wherein ΔQP 2 Delta value for second modified quantization parameter Δqp 3 Delta value for third modified quantization parameter, 0 < ΔQP 1 <ΔQP 2 <ΔQP 3 <QP/2;Δb 2 Representing a second modified bit parameter delta value; Δb 3 Representing a third modified bit parameter delta value; 0 < Deltab 1 <Δb 2 <Δb 3 <bit/4;
Fourth modified quantization parameter Qp m4 =clip(Qp-ΔQp 1 ,QP min ,QP max );
Fourth modified bit parameter bit m4 =bit+Δb 1
4. An adaptive coding device based on monitoring and early warning states, characterized in that the device comprises:
the first coding module is used for coding the acquired image by adopting a first modified quantization parameter or a first modified bit parameter;
the early warning state data acquisition module is used for acquiring early warning state data in real time; the first coding module and the early warning state data acquisition module operate simultaneously; the early warning state data comprises early warning points, shielding identifiers and early warning ending points, the early warning state data is provided by transmission of an external early warning monitoring system, the external early warning monitoring system comprises functions of complete early warning event monitoring and lens shielding judgment, and the early warning state data is sent to the outside through an early warning state data sending module;
the early warning point acquisition judging module is used for judging whether the acquired early warning state data comprise early warning points, if yes, entering the coding mode selecting module, and if not, returning to enter the first coding module and the early warning state data acquisition module;
the coding mode selection module is used for adopting corresponding coding modes for the image according to different shielding identifiers;
when the shielding identifier is a first numerical value, starting a second coding module; when the shielding identifier is a second numerical value, a third coding module is adopted;
the second encoding module is configured to determine that if the time point of the second value of the shielding identifier Fu Chonghui is earlier than the early warning end point, encode the image acquired from the early warning point to the time point of the second value of the shielding identifier Fu Chonghui by using a second modified quantization parameter or a second modified bit parameter, encode the image acquired from the time point of the second value of the shielding identifier Fu Chonghui to the early warning end point by using a third modified quantization parameter or a third modified bit parameter, and then return to the first encoding module and the early warning state data acquisition module; otherwise, the image acquired from the early warning point to the early warning ending point is encoded by adopting a second correction quantization parameter or a second correction bit parameter, and then the first encoding module and the early warning state data acquisition module are returned;
and the third coding module is used for coding the image acquired from the early warning point to the early warning ending point by adopting a fourth correction quantization parameter or a fourth correction bit parameter, and then returning to the first coding module and the early warning state data acquisition module.
5. The adaptive coding apparatus based on monitoring and early warning state of claim 4, wherein,
first modified quantization parameter Qp m1 =clip(Qp+ΔQp 1 ,QP min ,QP max );
First modified bit parameter bit m1 =bit-Δb 1
Wherein QP is min Setting a minimum quantization parameter for an encoder; QP (QP) max Maximum quantization parameter set for encoder; QP is the quantization parameter of the code rate control output; ΔQP 1 For the first modified quantization parameter delta value,
Figure QLYQS_2
bit is bit parameter outputted by code rate control; Δb 1 Representing the first modified bit parameter delta value.
6. The adaptive coding device based on monitoring and early warning state of claim 4, wherein,
second modified quantization parameter Qp m2 =clip(Qp+ΔQp 2 ,QP min ,QP max );
Second modified bit parameter bit m2 =bit-Δb 2
Third modified quantization parameter Qp m3 =clip(Qp-ΔQp 3 ,QP min ,QP max );
Third correction bit parameter bit m3 =bit+Δb 3
Wherein ΔQP 2 Delta value for second modified quantization parameter Δqp 3 Delta value for third modified quantization parameter, 0 < ΔQP 1 <ΔQP 2 <ΔQP 3 <QP/2;Δb 2 Representing a second modified bit parameter delta value; Δb 3 Representing a third modified bit parameter delta value;
0<Δb 1 <Δb 2 <Δb 3 <bit/4;
fourth modified quantization parameter Qp m4 =clip(Qp-ΔQp 1 ,QP min ,QP max );
Fourth modified bit parameter bit m4 =bit+Δb 1
7. The adaptive coding device based on monitoring and early warning states of claim 4, wherein the early warning and monitoring system comprises:
the initial frame setting module is used for setting initial values of initial detection frame numbers of the current detection video frames and the current audio valid data;
the early warning point detection processing device is used for detecting early warning points according to an early warning mode, entering an early warning event first related parameter updating module when an early warning event is detected, and continuously detecting the early warning points until the early warning event is finished;
the early warning event first relevant parameter updating module is used for updating the current early warning event first relevant parameter and then entering the early warning event tracking and second relevant parameter updating module; the first related parameters comprise a current early warning event sequence number, a current early warning event early warning level, a shielding identifier and an early warning point;
the early warning event tracking and second related parameter updating module is used for tracking the current early warning event until the early warning event is terminated according to the early warning level of the current early warning event and updating the second related parameter of the current early warning event; the second related parameter is an early warning ending point;
the first tail frame judging and processing module is used for judging that if the next frame of the current video detection frame exists, setting the next frame of the current video detection frame as the current video detection frame, setting an audio frame at a corresponding time point of the current video detection frame as the initial detection frame of the current audio valid data, and then returning to the early warning point detection and processing device; otherwise, recording the number of early warning events and ending; the number of early warning events;
the early warning state data transmitting module is connected with the early warning event first related parameter updating module and the early warning event second related parameter updating module and is used for transmitting the early warning state data to an external encoding device in real time; the early warning state data comprise early warning points, shielding identifiers and early warning ending points.
CN201910486722.5A 2019-06-05 2019-06-05 Self-adaptive coding method and device based on monitoring early warning state Active CN110099276B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910486722.5A CN110099276B (en) 2019-06-05 2019-06-05 Self-adaptive coding method and device based on monitoring early warning state

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910486722.5A CN110099276B (en) 2019-06-05 2019-06-05 Self-adaptive coding method and device based on monitoring early warning state

Publications (2)

Publication Number Publication Date
CN110099276A CN110099276A (en) 2019-08-06
CN110099276B true CN110099276B (en) 2023-05-16

Family

ID=67450335

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910486722.5A Active CN110099276B (en) 2019-06-05 2019-06-05 Self-adaptive coding method and device based on monitoring early warning state

Country Status (1)

Country Link
CN (1) CN110099276B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112351254A (en) * 2020-10-30 2021-02-09 重庆中星微人工智能芯片技术有限公司 Monitoring video coding and decoding device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1089257A2 (en) * 1999-09-30 2001-04-04 Motorola, Inc. Header data formatting for a vocoder
CN101778265A (en) * 2010-01-13 2010-07-14 上海交通大学 Exception event detection and double-stream coding-based video monitoring method
CN102497541A (en) * 2011-12-21 2012-06-13 北京硅盾安全技术有限公司 Intelligent video information distribution and coding method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1089257A2 (en) * 1999-09-30 2001-04-04 Motorola, Inc. Header data formatting for a vocoder
CN101778265A (en) * 2010-01-13 2010-07-14 上海交通大学 Exception event detection and double-stream coding-based video monitoring method
CN102497541A (en) * 2011-12-21 2012-06-13 北京硅盾安全技术有限公司 Intelligent video information distribution and coding method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于自适应二次模型视频编码码率控制的研究;林金发;《福建电脑》;20180522(第05期);全文 *

Also Published As

Publication number Publication date
CN110099276A (en) 2019-08-06

Similar Documents

Publication Publication Date Title
US7236690B2 (en) Event management system
US8811661B2 (en) Monitoring camera system, monitoring camera, and monitoring camera control apparatus
US7609941B2 (en) Multimedia data recording apparatus, monitor system, and multimedia data recording method
US20150332095A1 (en) Relevant image detection in a camera, recorder, or video streaming device
US20070189728A1 (en) Method of recording and reproducing surveillance images in DVR
CN102780882B (en) Image processing equipment and image processing method
CN106454282A (en) Security and protection monitoring method, apparatus and system
US6236970B1 (en) Adaptive speech rate conversion without extension of input data duration, using speech interval detection
CN100493184C (en) TV monitor system and implement method
CN108965831B (en) Video processing method and device and intelligent visual doorbell
KR101899436B1 (en) Safety Sensor Based on Scream Detection
CN110099276B (en) Self-adaptive coding method and device based on monitoring early warning state
TWI408623B (en) Monitoring system and related recording methods for recording motioned image, and machine readable medium thereof
CN110211319B (en) Security monitoring early warning event tracking method and system
CN1954347A (en) Transmitter and receiver for a surveillance system
CN111277864B (en) Encoding method and device of live data, streaming system and electronic equipment
JPH09298739A (en) Image extraction device
CN1917630A (en) Monitoring and controlling system vor TV set, and monitoring and controlling method
KR101033922B1 (en) Intelligent Voice Recognition CCTV System
KR101119846B1 (en) Apparatus and method for detecting the storage trouble of the server
JP2012004720A (en) Monitor, and monitoring system
KR101418208B1 (en) Method and Apparatus for bit rate Allocation
CN113240873B (en) Fire door monitoring system
CN116824673B (en) Safety protection method and device for identifying user identity based on intelligent camera
CN115359641B (en) Regular false alarm judging method for photoelectric sensing equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information

Address after: 518000 Guangdong city of Shenzhen province Nanshan District Guangdong streets high in the four Longtaili Technology Building Room 325 No. 30

Applicant after: Shenzhen mengwang video Co.,Ltd.

Address before: 518000 Guangdong city of Shenzhen province Nanshan District Guangdong streets high in the four Longtaili Technology Building Room 325 No. 30

Applicant before: SHENZHEN MONTNETS ENCYCLOPEDIA INFORMATION TECHNOLOGY Co.,Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant