Abstract In order to improve the settlement speed and efficiency of electricity charges, an optimization method based on a flexible computing algorithm for complex customers’ electricity charges is proposed. The model first learns the label of user information and electricity consumption data, and uses convolutional neural network to generate multiple label sets of electricity consumption data information. By establishing the flexible computing correlation model and using the improved flexible neural tree method, the hierarchical flexible classification calculation based on the electricity package is realized, and the matching between the user and the package is automatically completed by training the correlation between the labels, so as to improve the efficiency of the algorithm.