A video encoding device for monitoring of traffic on a highway, characterized in that the device comprises: - a) a video capturing unit for capturing a video image; - b) a processing unit for separating a background image and a foreground moving object in a current frame of the video image, performing compression encoding on a background image in the video image to obtain video compression data corresponding to the background image, and for analyzing a foreground image comprising a foreground moving object in the video image to obtain foreground object metadata; - c) a data transmission unit for transmitting the video compression data and the foreground object metadata to a decoding device, wherein the foreground object metadata is a semantic description of the foreground object for the decoder ; the processing unit is further configured for analyzing the foreground image by: - d) determining foreground points in the video image; - e) performing mass marking processing on the determined foreground points to generate foreground masses; - f) tracing the generated foreground masses, recording the trajectory of the foreground masses, and for each foreground mass, determining whether the foreground mass corresponds to a foreground moving object; and - g) performing size normalization on the determined foreground moving object, - h) determining an object type for selecting a closest matching pre-stored foreground object image, and the data transmission unit is further configured for: - i) transmitting the video compression data corresponding to the background image at a set time interval, and transmitting the foreground object metadata corresponding to the foreground moving object in real time, - j) wherein the metadata comprises object type, object position and the time at which the object appears. - a) a video capturing unit for capturing a video image; - b) a processing unit for separating a background image and a foreground moving object in a current frame of the video image, performing compression encoding on a background image in the video image to obtain video compression data corresponding to the background image, and for analyzing a foreground image comprising a foreground moving object in the video image to obtain foreground object metadata; - c) a data transmission unit for transmitting the video compression data and the foreground object metadata to a decoding device, wherein the foreground object metadata is a semantic description of the foreground object for the decoder ; - d) determining foreground points in the video image; - e) performing mass marking processing on the determined foreground points to generate foreground masses; - f) tracing the generated foreground masses, recording the trajectory of the foreground masses, and for each foreground mass, determining whether the foreground mass corresponds to a foreground moving object; and - g) performing size normalization on the determined foreground moving object, - h) determining an object type for selecting a closest matching pre-stored foreground object image, and - i) transmitting the video compression data corresponding to the background image at a set time interval, and transmitting the foreground object metadata corresponding to the foreground moving object in real time, - j) wherein the metadata comprises object type, object position and the time at which the object appears. <EOS>