A video coding parameter control method for mobile robots

By combining the heartbeat packet response mechanism and motion data between the mobile robot terminal and the server, the video encoding parameters are dynamically adjusted, which solves the impact of wireless network bandwidth fluctuations on video transmission, improves the stability and quality of video transmission, and avoids waste of resources. .

CN115474075BActive Publication Date: 2024-09-17ZHEJIANG UNIV OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210912959.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-31
Publication Date
2024-09-17
Estimated Expiration
2042-07-31

AI Technical Summary

Technical Problem

When mobile robots transmit video in a wireless network environment, due to severe bandwidth fluctuations, it is difficult for existing technologies to effectively adaptively adjust encoding parameters, resulting in unstable video quality, a waste of computing resources, and reduced image quality at the receiving end.

Method used

By establishing a heartbeat packet response mechanism between the mobile robot terminal and the server, the network status is quickly estimated, and the encoding parameters are adjusted based on the robot motion data to dynamically adjust the video transmission bit rate and resolution to match the current network and motion status.

Benefits of technology

It achieves the stability of the video transmission stream and the improvement of video quality, maximizes the use of available bandwidth, avoids the waste of computing resources and battery capacity, and improves the stability and quality of the video at the receiving end.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115474075B
    Figure CN115474075B
Patent Text Reader

Abstract

The present invention relates to a video encoding parameter control method for a mobile robot, wherein a mobile robot terminal establishes a heartbeat packet response mechanism with a server end; based on the heartbeat packet response mechanism, the terminal network state of any mobile robot is quickly estimated; the motion state of the mobile robot is set based on the current motion data of the mobile robot; and the encoding parameters are adjusted according to the current network state and the motion state of the mobile robot. The robot terminal of the present invention can more accurately reflect the overall network status within a certain period of time by counting the ratio of the number of heartbeat packets sent and the number of response packets received; accurately reflect the motion state of the robot by reading the linear velocity and angular velocity uploaded by the robot odometer; and control the video encoding parameters according to the network status and the robot motion state, which not only avoids unnecessary waste of robot computing resources and battery capacity, but also improves the video quality of the receiving end.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of methods or devices for digital video signal encoding, decoding, compression or decompression, and in particular to a video encoding parameter control method for mobile robots in the field of video compression transmission. Background Art

[0002] With the rapid development of science and technology and social economy, mobile robots have gradually entered our work and life, and have been applied to industrial, civil, military, aerospace and other fields. During the movement of mobile robots, users need to view and record their external environment in real time, so it is very important to have a video monitoring function for its safe operation. However, during the movement of the robot, from the acquisition end to the receiving end, video transmission often has to go through a relatively complex wireless network environment, and there are widespread problems of network bandwidth limitations and delay fluctuations, which affect the smoothness and clarity of the video receiving end. In order to ensure the transmission effect of remote video and improve the video viewing experience, it is necessary to optimize each link in the video transmission process, especially the encoding parameter control part of the video sending end.

[0003] The video transmitter on the mobile robot precisely controls the encoding rate because, during movement, the video transmitter is connected to the Internet via wireless networks, and the network fluctuates violently, with characteristics such as rapid changes and unpredictability. After acquiring the video image, the video transmitter needs to adaptively adjust the encoding parameters according to the bandwidth fluctuations to control the bit rate. When the real-time available bandwidth is large, the encoding bit rate can be appropriately increased to improve the picture quality. When the real-time available bandwidth decreases, the encoding bit rate of the encoder should be reduced in time to appropriately reduce the picture quality, so as to avoid network congestion and cause more serious phenomena such as video frame loss.

[0004] The mainstream video compression standards H.264 and H.265 both use the same quantization parameter (QP) method. QP is the serial number of the quantization step (Qstep). For brightness coding, Qstep has a total of 52 values, and the corresponding QP value range is 0 to 51. When QP takes the minimum value of 0, the Qstep value is the smallest, indicating the finest quantization. On the contrary, when QP takes the maximum value of 51, the Qstep value is the largest, indicating the coarsest quantization. There is a linear correlation between QP and ln(Qstep). Qstep increases with the increase of QP. Every time the QP value increases by 6, Qstep doubles. Current video codec processing chips support adjustment of quantization parameters, which is convenient for users to set according to their needs.

[0005] The User Datagram Protocol (UDP) commonly used in video transmission is a connectionless transport layer protocol that provides simple, unreliable information transmission services for transactions. The Real-time Transport Protocol (RTP) is based on UDP and is responsible for packetizing streaming media data and realizing real-time transmission of media streams. The Real-time Transport Control Protocol (RTCP) is a sister protocol of RTP. It regularly transmits control data between multimedia session participants. Its main function is to provide feedback for the Quality of Service (QoS) provided by RTP.

[0006] For the actual scenario of video coding transmission of mobile robots, the video coding bit rate is required to be adaptively adjusted with the fluctuation of wireless network bandwidth, so that the code stream can be transmitted smoothly, and the display quality of the video can be guaranteed when the mobile robot makes large movements. At present, some researchers have studied the coding rate control problem in wireless streaming media transmission. The Chinese patent with patent number 201210170301.X uses a smaller time interval than the traditional streaming media rate control method to obtain the packet loss rate and the service data pass rate, and uses the improved AIMD algorithm to predict the new transmission rate. The greater the difference between the packet loss rate and the threshold value, the greater the rate adjustment amplitude; this method can quickly reflect the changes in the wireless channel and accurately predict the new transmission rate, thereby improving the service quality of wireless streaming media transmission and the utilization rate of the wireless channel. However, when the network transmission bandwidth fluctuates violently, the packet loss rate changes greatly, causing the video transmitter to frequently adjust the video transmission bit rate, which will not only waste the limited robot computing resources and battery capacity, but also reduce the stability of the video image quality of the receiving end. It is not suitable for video coding transmission of mobile robots. Summary of the invention

[0007] The present invention solves the problems existing in the prior art and provides a video encoding parameter control method for a mobile robot, which reduces the impact of wireless network bandwidth fluctuations on video transmission during the movement of the mobile robot, ensures the stability of code stream transmission and video quality, and maximizes the use of available bandwidth.

[0008] The technical solution adopted by the present invention is a video encoding parameter control method for a mobile robot, the method comprising the following steps:

[0009] Step 1: A heartbeat packet response mechanism is established between any mobile robot terminal and the server. The robot terminal sends a heartbeat packet at regular intervals, and the server returns a response packet after receiving the heartbeat packet.

[0010] Step 2: Based on the heartbeat packet response mechanism, the terminal network state NetState of any mobile robot is quickly estimated; the robot terminal calculates the network delay between the robot terminal and the server by using the number of heartbeat packets sent and the number of response packets received within a period of time, and estimates the network bandwidth status;

[0011] Step 3: Setting the motion state MoveMode of the mobile robot based on the current motion data of the mobile robot;

[0012] Step 4: Adjust the encoding parameters according to the current network state NetState and the mobile robot motion state MoveMode.

[0013] Preferably, step 1 comprises the following steps:

[0014] Step 1.1: The mobile robot terminal sends a heartbeat packet to the server at a fixed interval dt, where the value range of dt is [50,500], and the unit is ms; in order to reduce the network bandwidth occupation, the payload of any of the heartbeat packets includes a 32-bit timestamp, that is, the content of the heartbeat packet payload is a 32-bit timestamp, which occupies 32 bits. Generally speaking, the total size of the heartbeat packet is greater than 32 bits;

[0015] Step 1.2: Every time the server receives a heartbeat packet, it returns a corresponding response packet; the payload of any of the response packets matches the heartbeat packet, that is, the payload of the response packet is the same 32-bit timestamp as the received heartbeat packet.

[0016] Preferably, step 2 comprises the following steps:

[0017] Step 2.1: Count the number of heartbeat packets P sent within the time period [t-Δt, t] t , t is the current time, Δt is the time period width, the value range is [2,20], and the unit is s;

[0018] Step 2.2: Count the number of response packets R received in the time period [t-Δt, t] t , and calculate the number of losses L t , L t =P t -R t ;

[0019] Step 2.3: Calculate the packet loss rate f(t) in the time period [t-Δt,t], that is, the number of response packet losses L t and the number of heartbeat packets P t The ratio,

[0020] Step 2.4: If a mandatory I frame signal is received from the server within the current time period [t-Δt, t], then set the I frame signal flag I of the current time period flag is 1, otherwise it is set to 0;

[0021] Step 2.5: Based on the packet loss rate f(t) and the forced I frame signal I flag , classify the network status NetState into status levels.

[0022] Preferably, in step 2.5,

[0023]

[0024] Among them, TH1 and TH2 are state discrimination threshold variables, the value range of TH1 is [0.01, 0.03], and the value range of TH2 is [0.04, 0.06];

[0025] The larger the NetState value, the more serious the network congestion; NetState is 1, indicating that the network transmission is smooth during this period, so the video transmission bit rate is kept unchanged; NetState is 2, indicating that the network transmission is basically normal during this period, so the video transmission bit rate is slowly reduced; NetState is 3, indicating that the network transmission is moderately congested during this period, so the video transmission bit rate is quickly reduced; NetState is 4, indicating that the robot terminal received a forced I frame signal during this period, the network transmission is seriously congested, resulting in a sharp decline in picture quality, and it is urgent to quickly reduce the video transmission bit rate and reduce the video image resolution;

[0026] The adjustment speed of the video transmission bit rate is realized by bit rate adjustment coefficients α and β, and the technical personnel in this field can set the standard of slow or fast adjustment speed based on the demand, wherein the value range of α is [0.8, 0.95], and the value range of β is [0.5, 0.75].

[0027] Preferably, step 3 comprises the following steps:

[0028] Step 3.1: Get the linear velocity v of the mobile robot t and angular velocity ω t ;

[0029] Step 3.2: Set the motion state of the mobile robot MoveMode,

[0030]

[0031] If v t and ω tIf both are 0, the mobile robot is stationary, and the current motion state MoveMode is set to 1. At this moment, since the camera and the mobile robot body are rigidly connected, the camera on the mobile robot is stationary, and the background of the video screen is stationary;

[0032] If v t is 0 and ω t If the absolute value is greater than 0, the mobile robot deflects at an angle in place. At this time, the image background collected by the mobile robot is offset horizontally, and the current motion state MoveMode is set to 2;

[0033] If v t The absolute value is greater than 0 and ω t If it is 0, the mobile robot moves in a straight line. At this time, the image background collected by the mobile robot is offset longitudinally, and the current motion state MoveMode is set to 3;

[0034] If v t and ω t If the absolute values ​​of are all greater than 0, the mobile robot deflects during linear motion. The image background collected by the mobile robot is offset in both the horizontal and vertical directions. The change is the most complex. Set the current motion state MoveMode to 4.

[0035] Preferably, in step 3.1, the linear velocity of the mobile robot is obtained from an encoder installed on the engine wheel of the mobile robot, and the angular velocity of the mobile robot is obtained from a posture sensor installed on the controller; the linear velocity value v of the robot movement is read from the encoder t , the unit is m / s, a linear velocity value greater than 0 indicates forward movement, and a value less than 0 indicates backward movement; read the angular velocity ω of the robot from the attitude sensor t , the unit is rad / s, an angular velocity value greater than 0 indicates turning left, and a value less than 0 indicates turning right.

[0036] Preferably, step 4 comprises the following steps:

[0037] Step 4.1: Adjust the target bit rate B. When the network status is poor, the current target bit rate is reduced;

[0038] Step 4.2: Adjust the resolution of the original encoded image IR orin , reduce the current image resolution when network transmission is severely congested;

[0039] Step 4.3: Set the minimum quantization parameter QP of video encoding according to the mobile robot's motion state MoveMode min and the maximum quantization parameter QP max , used by the encoder to control the peak bit rate and ensure the video image quality in the scene.

[0040] Preferably, in step 4.1,

[0041]

[0042] Among them, BitRate is the target bit rate of video transmission set by the user, α and β are bit rate adjustment coefficients, where the value range of α is [0.8, 0.95], and the value range of β is [0.5, 0.75].

[0043] Preferably, in step 4.2,

[0044]

[0045] Wherein, W and H are the horizontal resolution and vertical resolution of the original encoded image, respectively.

[0046] Preferably, in step 4.3,

[0047]

[0048]

[0049] Among them, BaseQP min and BaseQP max BaseQP is the basic quantization parameter min The value range of BaseQP is [18,24]. max The value range of BaseQP is [42,48]. min and BaseQP max The larger the value, the more conducive it is for the encoder to control the short-term bit rate peak and reduce the real-time bandwidth load, but it will also reduce the image quality.

[0050] The present invention relates to a video encoding parameter control method for a mobile robot. A heartbeat packet response mechanism is established between any mobile robot terminal and a server end. Based on the heartbeat packet response mechanism, a terminal network state NetState of any mobile robot is quickly estimated. The motion state MoveMode of the mobile robot is set based on the current motion data of the mobile robot. The encoding parameters are adjusted according to the current network state NetState and the motion state MoveMode of the mobile robot.

[0051] The technical concept of the present invention is as follows: the robot terminal actively sends a heartbeat packet to the server and receives a response packet from the server. The robot terminal determines the current network status based on the feedback information and adaptively adjusts the video transmission bit rate to match the current network transmission bandwidth and improve the video image quality of the transmission system. The robot terminal determines the violent movement of the robot based on the odometer information of the mobile robot and adjusts the video encoding parameters.

[0052] Compared with the prior art, the present invention has the following beneficial effects:

[0053] (1) The robot terminal can accurately reflect the overall network status within a certain period of time by counting the ratio of the number of heartbeat packets sent and the number of response packets received;

[0054] (2) Accurately reflect the robot's motion state by reading the linear velocity and angular velocity uploaded by the robot's odometer;

[0055] (3) Controlling video encoding parameters according to network conditions and robot motion status not only avoids unnecessary waste of robot computing resources and battery capacity, but also improves the video quality at the receiving end. BRIEF DESCRIPTION OF THE DRAWINGS

[0056] Figure 1 The figure is a flow chart of the method of the present invention. DETAILED DESCRIPTION

[0057] The present invention is further described in detail below in conjunction with embodiments, but the protection scope of the present invention is not limited thereto.

[0058] The present invention is implemented on a TB-RV1126Ds development board terminal based on a Rockchip RV1126 processor, which is mounted on a Songling HunterSE mobile robot chassis. During the movement of the mobile robot, video encoding parameter control is implemented according to the network status and the robot's motion state. The specific setting of the encoding parameters adopts Rockchip's MPP library, but the present invention is not limited to this.

[0059] like Figure 1 The present invention relates to a video encoding parameter control method for a mobile robot, comprising the following steps:

[0060] (1) The robot terminal establishes a heartbeat packet response mechanism with the server;

[0061] (2) Rapid estimation of robot terminal network status;

[0062] (3) Setting the motion state of the mobile robot;

[0063] (4) Adjust the encoding parameters according to the current network status and robot motion status.

[0064] In this embodiment, the TB-RV1126Ds terminal is installed on a mobile robot, and the resolution of its original encoded image is IR orin It is 1080P, that is, the number of pixels W in the horizontal direction of the original encoded image is 1920, and the number of pixels H in the vertical direction is 1080; according to the performance of video transmission under the 5G network, the target bit rate of video transmission is set to 3000Kbps.

[0065] Step (1) specifically includes:

[0066] (1-1) The TB-RV1126Ds terminal sends a heartbeat packet to the server every 100ms. The payload of the heartbeat packet contains a 32-bit timestamp. The heartbeat packet is sent using the UDP protocol.

[0067] (1-2) After receiving a heartbeat packet, the server immediately returns a response packet. The payload of the response packet is a 32-bit timestamp with the same value as the received heartbeat packet. The response packet is also sent using the UDP protocol.

[0068] Step (2) specifically includes:

[0069] (2-1) Count the number of heartbeat packets P sent within the time period [t-Δt, t] t , where Δt is 20s.

[0070] (2-2) Count the number of response packets R whose timestamps are received in the time period [t-Δt, t] t , the number of lost L t According to formula (1), we can get:

[0071] L t =P t -R t (1)

[0072] (2-3) Calculate the packet loss rate f(t) in this time period according to formula (2), that is, the number of response packet losses L t and the number of heartbeat packets P t Ratio:

[0073]

[0074] (2-4) If a mandatory I frame signal is received from the server within the current time period [t-Δt, t], the I frame signal flag I of the current time period is set. flag is 1, otherwise it is set to 0.

[0075] (2-5) The packet loss rate f(t) and the forced I frame signal I calculated using formula (2) flag , set NetState according to formula (3);

[0076]

[0077] In the formula, the value of TH1 is 0.02 and the value of TH2 is 0.05.

[0078] Step (3) specifically includes:

[0079] (3-1) Read the linear velocity v of the robot from the encoder on the robot chassis t , read the angular velocity ω of the robot from the attitude sensor t .

[0080] (3-2) According to the read v t and ω t , set the motion state MoveMode according to formula (4).

[0081]

[0082] Step (4) specifically includes:

[0083] (4-1) According to the network status NetState set in step (2), calculate B according to formula (5),

[0084]

[0085] In the formula, the value of α is 0.9 and the value of β is 0.6.

[0086] (4-2) According to the network status NetState set in step (2), the current encoded image resolution IR is calculated according to formula (6) cur .

[0087]

[0088] (4-3) According to the motion state MoveMode of the mobile robot set in step (3), QP is calculated according to formula (7) min ,

[0089]

[0090] Where BaseQP min The value is 20.

[0091] (4-4) According to the motion state MoveMode of the mobile robot set in step (3), QP is calculated according to formula (8) max ,

[0092]

[0093] Where BaseQP max The value is 43.

Claims

1. A video encoding parameter control method for a mobile robot, characterized in that: The method comprises the following steps: Step 1: Any mobile robot terminal establishes a heartbeat packet response mechanism with the server; Step 2: Based on the heartbeat packet response mechanism, quickly estimate the terminal network state NetState of any mobile robot; Step 3: Setting the motion state MoveMode of the mobile robot based on the current motion data of the mobile robot includes the following steps: Step 3.1: Get the linear velocity v of the mobile robot t and angular velocity ω t ; Step 3.2: Set the motion state of the mobile robot MoveMode, If v t and ω t If both are 0, the mobile robot is stationary, and the current motion state MoveMode is set to 1. At this moment, the camera on the mobile robot is stationary, and the background of the video screen is stationary; If v t is 0 and ω t If the absolute value is greater than 0, the mobile robot deflects at an angle in place. At this time, the image background collected by the mobile robot is offset horizontally, and the current motion state MoveMode is set to 2; If v t The absolute value is greater than 0 and ω t If it is 0, the mobile robot moves in a straight line. At this time, the image background collected by the mobile robot is offset longitudinally, and the current motion state MoveMode is set to 3; If v t and ω t If the absolute values ​​of are greater than 0, the mobile robot deflects during the linear motion, and the image background collected by the mobile robot is offset in both the horizontal and vertical directions, and the current motion state MoveMode is set to 4; Step 4: Adjust the encoding parameters according to the current network state NetState and the mobile robot motion state MoveMode, including the following steps: Step 4.1: Adjust the target bit rate B. When the network status is poor, the current target bit rate is reduced; Step 4.2: Adjust the resolution of the original encoded image IR orin , reduce the current image resolution when network transmission is severely congested; Step 4.3: Set the minimum quantization parameter QP of video encoding according to the mobile robot's motion state MoveMode min and the maximum quantization parameter QP max , used by the encoder to control the peak bit rate and ensure the video image quality in the scene.

2. The video encoding parameter control method for a mobile robot according to claim 1, characterized in that: The step 1 comprises the following steps: Step 1.1: The mobile robot terminal sends a heartbeat packet to the server at a fixed interval dt, where the value range of dt is [50,500], and the unit is ms; the payload of any of the heartbeat packets includes a 32-bit timestamp; Step 1.2: Every time the server receives a heartbeat packet, it returns a corresponding response packet; the payload of any of the response packets matches the heartbeat packet.

3. The video encoding parameter control method for a mobile robot according to claim 1, characterized in that: The step 2 comprises the following steps: Step 2.1: Count the number of heartbeat packets P sent within the time period [t-Δt, t] t , t is the current time, Δt is the time period width, the value range is [2,20], and the unit is s; Step 2.2: Count the number of response packets R received in the time period [t-Δt, t] t , and calculate the number of losses L t , L t =P t -R t ; Step 2.3: Calculate the packet loss rate f(t) within the time period [t-Δt,t], Step 2.4: If a mandatory I frame signal is received from the server within the current time period [t-Δt, t], then set the I frame signal flag I of the current time period flag is 1, otherwise it is set to 0; Step 2.5: Based on the packet loss rate f(t) and the forced I frame signal I flag , classify the network status NetState into status levels.

4. The video encoding parameter control method for a mobile robot according to claim 3, characterized in that: In step 2.5, Among them, TH1 and TH2 are state discrimination threshold variables, the value range of TH1 is [0.01, 0.03], and the value range of TH2 is [0.04, 0.06]; The larger the NetState value, the more serious the network congestion; when NetState is 1, the video transmission bit rate remains unchanged; when NetState is 2, the video transmission bit rate is slowly reduced; when NetState is 3, the video transmission bit rate is quickly reduced; when NetState is 4, the video transmission bit rate is quickly reduced while reducing the video image resolution.

5. The video encoding parameter control method for a mobile robot according to claim 1, characterized in that: In step 3.1, the linear velocity of the mobile robot is obtained from the encoder installed on the engine wheel of the mobile robot, and the angular velocity of the mobile robot is obtained from the attitude sensor installed on the controller; a linear velocity value greater than 0 indicates forward movement, and a value less than 0 indicates backward movement; an angular velocity value greater than 0 indicates turning left, and a value less than 0 indicates turning right.

6. The video encoding parameter control method for a mobile robot according to claim 1, characterized in that: In step 4.1, Among them, BitRate is the target bit rate of video transmission set by the user, α and β are bit rate adjustment coefficients, where the value range of α is [0.8, 0.95], and the value range of β is [0.5, 0.75].

7. The video encoding parameter control method for a mobile robot according to claim 1, characterized in that: In step 4.2, Wherein, W and H are the horizontal resolution and vertical resolution of the original encoded image, respectively.

8. The video encoding parameter control method for a mobile robot according to claim 1, characterized in that: In step 4.3, Among them, BaseQP min and BaseQP max BaseQP is the basic quantization parameter min The value range of BaseQP is [18,24]. max The value range is [42,48].