Structure entropy can evaluate the heterogeneity of complex networks, but traditional structure entropy has deficiencies in comprehensively reflecting the global and local network features. In this paper, we define a new structure entropy based on the number of the
K-order neighbor nodes which refer to those nodes which a node can reach within
Ksteps. It can be supposed that the more
K-order neighbors a node has, the more important role the node plays in the network structure. Combining the formula of Shannon entropy, the
K-order structure entropy can be defined and figured out to explain the differences among the relative importance among nodes. Meanwhile, the new structure entropy can describe the network heterogeneity from the following three aspects. The first aspect is the change tendency of structure entropy with the value of
K. The second aspect is the structure entropy under a maximum influence scale
K. The last aspect is the minimum value of the
K-order structure entropy. The simulation compares the heterogeneities of five classic networks from the above three aspects, and the result shows that the heterogeneity strengthens in the from-weak-to -strong sequence:regular network, random network, WS (Watts-Strogatz) small-world network, BA (Barabási-Albert) scale-free network and star network. This conclusion is consistent with the previous theoretical research result, but hard to obtain from the traditional structure entropy. It is remarkable that the
K-order structure entropy can better evaluate the heterogeneity of WS small-world networks and suggests that the greater small-world coefficients a network has, the stronger heterogeneity the network has. Besides, the
K-order structure entropy can fully reflect the heterogeneity variation of star networks with network size, and reasonably explain the heterogeneity of regular networks with additional isolated nodes. It suggests that when i additional isolated nodes are added to a regular network with
nnodes, the new network has weaker heterogeneity than the old one, but has stronger heterogeneity than the regular network with
n+i nodes. Finally, the validity of the
K-order structure entropy is further confirmed by simulations for the western power grid of the United States. Based on the minimum value of the
K-order structure entropy, the heterogeneity of the western power grid is the closest to that of WS small-world networks.