An interface generation method, applied to a device having a development function, wherein the method comprises: obtaining a visual element of a reference interface, and determining a visual focus of the visual element based on attribute information of the visual element, wherein the attribute information of the visual element comprises information including a size, a center point, a resolution, and a color of the visual element; obtaining configuration information of a display of a target terminal device, and determining, based on the configuration information of the display, an interface layout template corresponding to the configuration information; and adjusting, based on the visual focus and the interface layout template, a layout of the visual element on a to-be-generated interface, and generating an interface; wherein the determining a visual focus of the visual element based on attribute information of the visual element comprises: determining a first reference visual focus, wherein the first reference visual focus is a center point of the reference interface; determining a second reference visual focus corresponding to an image content recognition result; and determining a third reference visual focus corresponding to at least one of color information of the visual element and a picture type of the visual element; and aggregating the first reference visual focus, the second reference visual focus, and the third reference visual focus to obtain the visual focus of the visual element; wherein a visual focus library is stored in the device, wherein the visual focus library stores a correspondence between the image recognition result and the visual focus, a correspondence between the color of the visual element and the visual focus, and a correspondence between the image type of the visual element and the visual focus, and the determining a visual focus of the visual element based on attribute information of the visual element specifically comprises: determining the first reference visual focus, the second reference visual focus and the third reference visual focus based on the respective correspondences in the visual focus library; wherein the interface layout template includes an interface display framework that includes at least a location, a size, and an arrangement manner of one or more to-be-displayed objects. obtaining a visual element of a reference interface, and determining a visual focus of the visual element based on attribute information of the visual element, wherein the attribute information of the visual element comprises information including a size, a center point, a resolution, and a color of the visual element; obtaining configuration information of a display of a target terminal device, and determining, based on the configuration information of the display, an interface layout template corresponding to the configuration information; and adjusting, based on the visual focus and the interface layout template, a layout of the visual element on a to-be-generated interface, and generating an interface; wherein the determining a visual focus of the visual element based on attribute information of the visual element comprises: determining a first reference visual focus, wherein the first reference visual focus is a center point of the reference interface; determining a second reference visual focus corresponding to an image content recognition result; and determining a third reference visual focus corresponding to at least one of color information of the visual element and a picture type of the visual element; and aggregating the first reference visual focus, the second reference visual focus, and the third reference visual focus to obtain the visual focus of the visual element; wherein a visual focus library is stored in the device, wherein the visual focus library stores a correspondence between the image recognition result and the visual focus, a correspondence between the color of the visual element and the visual focus, and a correspondence between the image type of the visual element and the visual focus, and the determining a visual focus of the visual element based on attribute information of the visual element specifically comprises: determining the first reference visual focus, the second reference visual focus and the third reference visual focus based on the respective correspondences in the visual focus library; wherein the interface layout template includes an interface display framework that includes at least a location, a size, and an arrangement manner of one or more to-be-displayed objects.