The diversity of individual attributes plays an important role in the evolution of social dilemmas. Inspired by this fact, we propose a new attribute- updating mechanism which is related with the willingness-rate value and the alternation period to update their strategies. We explore from the following aspects: At the beginning, we regard strategy-updating rules as individual attributes with the conformity attribute and the benefit-driven attribute. Besides, we also investigate that after each individual adheres to his own attributes in Monte Carlo Steps (MCS), it will determine whether to update its attribute with a certain probability. In other words, once the update conditions are met, all individuals will have the right to choose whether to update their attributes or not. From our numerical results, we find that the attribute-updating mechanism can promote cooperation in scale-free networks. Specifically, the cooperation level becomes higher as the alternation period decreases or the willingness-rate value increases. At the same time, the moderate conformity proportion can enhance the reciprocity of networks.