To solve the problems caused by the complexity of the settlement types and rules,this paper presents a flexible method based on component library to support the electricity settlement.This method implements the business abstraction and unified modeling of the tie-line settlement and generation settlement.Component library is composed of elements library,parameters library,types library,rules library,algorithms library,and instances library.Implemented by rule engine technologies,the method achieves the decomposition and combination of electricity settlement by establishing hierarchical business object model and designing based on componentization.The method has been used in multiple electricity settlement systems to validate its flexibility and effectiveness.