A method for operating an electronic device includes: determining a plurality of influence parameters associated with a target disease, the influence parameters at least include a body mass index; determining calculation parameters according to the influence parameters, and determining a risk prediction model for the target disease based on the calculation parameters; collecting medical diagnosis information of an object to be tested corresponding to the influence parameters, and inputting the medical diagnosis information to the risk prediction model to obtain a first risk prediction value; substituting a value of the body mass index in the medical diagnosis information with a weight management target value, inputting the medical diagnosis information to the risk prediction model again to obtain a second risk prediction value; and calculating a weight management benefit prediction value corresponding to the weight management target value according to the first risk prediction value and the second risk prediction value.