This application provides a method and electronic device for determining the attribute information of a
heavy ion beam compensator. The compensator is used to adjust the deviation of the
heavy ion beam's range when entering a biological object. The method includes: acquiring image information of the biological object, wherein the image information includes a first region and a second region, the first region being a region inside the biological object in an abnormal state, and the second region being a region inside the biological object in a
normal state, the second region being located within the surrounding area of the first region; determining first state information of the first region, second state information of the second region, and determining a target energy value of the
heavy ion beam based on the image information, wherein the target energy value is used to ensure that the
heavy ion beam successfully reaches the first region; and determining the attribute information of the compensator based on the target energy value, the first state information, and the second state information. This application solves the technical problem of the inability to effectively determine the attribute information of the compensator.