A data coding method, comprising: determining, by a data transmitting-end, a length of a current first bit-rate-control-unit data frame in to-be-transmitted data, the length of the first bit-rate-control-unit data frame being less than or equal to a length of a group of pictures data frame; determining, by the data transmitting-end, a first target bit rate of the first bit-rate-control-unit data frame according to the length of the first bit-rate-control-unit data frame, a target bit rate of the to-be-transmitted data, and a frame rate of the to-be-transmitted data; when a first difference value between a real bit rate of a second bit-rate-control-unit data frame and a second target bit rate of the second bit-rate-control-unit data frame is greater than zero, adjusting, by the data transmitting-end the first target bit rate according to the first difference value, the second bit-rate-control-unit data frame being a previous bit-rate-control-unit data frame of a first bit-rate-control-unit in the to-be-transmitted data; and coding, by the data transmitting-end, the first bit-rate-control-unit data frame according to the adjusted first target bit rate; wherein the adjusting, by the data transmitting end, the first target bit rate according to the first difference value specifically comprises: obtaining, by the data transmitting end, the adjusted first target bit rate by subtracting the first difference value from the first target bit rate, if the first difference value is greater than zero and is less than or equal to a preset difference value; and calculating, by the data transmitting end, a second difference value as the difference between the first difference value and the preset difference value, and further calculating a weighted value of the second difference value, if the first difference value is greater than the preset difference value, and obtaining the adjusted first target bit rate by subtracting the preset difference value and the weighted value of the second difference value from the first target bit rate, wherein the weighted value of the second difference value is a product of a weighting coefficient of the second difference value and the second difference value. determining, by a data transmitting-end, a length of a current first bit-rate-control-unit data frame in to-be-transmitted data, the length of the first bit-rate-control-unit data frame being less than or equal to a length of a group of pictures data frame; determining, by the data transmitting-end, a first target bit rate of the first bit-rate-control-unit data frame according to the length of the first bit-rate-control-unit data frame, a target bit rate of the to-be-transmitted data, and a frame rate of the to-be-transmitted data; when a first difference value between a real bit rate of a second bit-rate-control-unit data frame and a second target bit rate of the second bit-rate-control-unit data frame is greater than zero, adjusting, by the data transmitting-end the first target bit rate according to the first difference value, the second bit-rate-control-unit data frame being a previous bit-rate-control-unit data frame of a first bit-rate-control-unit in the to-be-transmitted data; and coding, by the data transmitting-end, the first bit-rate-control-unit data frame according to the adjusted first target bit rate; wherein the adjusting, by the data transmitting end, the first target bit rate according to the first difference value specifically comprises: obtaining, by the data transmitting end, the adjusted first target bit rate by subtracting the first difference value from the first target bit rate, if the first difference value is greater than zero and is less than or equal to a preset difference value; and calculating, by the data transmitting end, a second difference value as the difference between the first difference value and the preset difference value, and further calculating a weighted value of the second difference value, if the first difference value is greater than the preset difference value, and obtaining the adjusted first target bit rate by subtracting the preset difference value and the weighted value of the second difference value from the first target bit rate, wherein the weighted value of the second difference value is a product of a weighting coefficient of the second difference value and the second difference value.