A data processing method, wherein the method comprises: detecting, by a first device, whether a current image frame in a display buffer is an image frame generated in a dynamic display scenario or in a static display scenario, wherein the dynamic display scenario is a display scenario in which an image frame dynamically changes in a preset time period, and the static display scenario is a display scenario in which an image frame remains unchanged in the preset time period; if the current image frame is an image frame generated in the dynamic display scenario, encoding the current image frame according to first encoding quality, wherein the first encoding quality is used to indicate a first restoration degree to which an image frame that has been encoded is restored to the image frame that has not been encoded; if the current image frame is an image frame generated in the static display scenario, encoding the current image frame according to second encoding quality, wherein the second encoding quality is used to indicate a second restoration degree to which an image frame that has been encoded is restored to the image frame that has not been encoded, and the second restoration degree is higher than the first restoration degree; and sharing the current image frame that has been encoded with a second device for displaying; wherein after the sharing the current image frame that has been encoded with a second device for displaying, the method further comprises: if the current image frame that has been encoded is obtained by encoding the current image frame according to the first encoding quality, detecting whether displaying of the current image frame by the first device satisfies a static display condition, wherein the static display condition is that the displayed current image frame remains unchanged; if displaying of the current image frame by the first device satisfies the static display condition, encoding the current image frame again according to the second encoding quality; and sharing the current image frame that has been encoded again with the second device for displaying. detecting, by a first device, whether a current image frame in a display buffer is an image frame generated in a dynamic display scenario or in a static display scenario, wherein the dynamic display scenario is a display scenario in which an image frame dynamically changes in a preset time period, and the static display scenario is a display scenario in which an image frame remains unchanged in the preset time period; if the current image frame is an image frame generated in the dynamic display scenario, encoding the current image frame according to first encoding quality, wherein the first encoding quality is used to indicate a first restoration degree to which an image frame that has been encoded is restored to the image frame that has not been encoded; if the current image frame is an image frame generated in the static display scenario, encoding the current image frame according to second encoding quality, wherein the second encoding quality is used to indicate a second restoration degree to which an image frame that has been encoded is restored to the image frame that has not been encoded, and the second restoration degree is higher than the first restoration degree; and sharing the current image frame that has been encoded with a second device for displaying; wherein after the sharing the current image frame that has been encoded with a second device for displaying, the method further comprises: if the current image frame that has been encoded is obtained by encoding the current image frame according to the first encoding quality, detecting whether displaying of the current image frame by the first device satisfies a static display condition, wherein the static display condition is that the displayed current image frame remains unchanged; if displaying of the current image frame by the first device satisfies the static display condition, encoding the current image frame again according to the second encoding quality; and sharing the current image frame that has been encoded again with the second device for displaying. if the current image frame that has been encoded is obtained by encoding the current image frame according to the first encoding quality, detecting whether displaying of the current image frame by the first device satisfies a static display condition, wherein the static display condition is that the displayed current image frame remains unchanged; if displaying of the current image frame by the first device satisfies the static display condition, encoding the current image frame again according to the second encoding quality; and sharing the current image frame that has been encoded again with the second device for displaying.