A parent node selection method, applied to a wireless mesh network, wherein the method comprises: obtaining, by a network node, an identifier of each of a plurality of candidate parent nodes, a quantity of subnodes already connected to each candidate parent node, and a rank of each candidate parent node, wherein the rank of the candidate parent node is a total transmission path from the candidate parent node to a border router, BR, of the wireless mesh network and is obtained by the candidate parent node based on a default value of a current temporary expected transmission count, ETX, at the candidate parent node, the default value of the current temporary ETX at the candidate parent node is greater than R, and R represents a preset path coefficient; obtaining a candidate rank of the network node corresponding to each candidate parent node, wherein a candidate rank of the network node corresponding to a candidate parent node is a total transmission path from the network node to the BR through the candidate parent node and is obtained based on a rank of the candidate parent node and a current actual ETX at the network node, the current actual ETX at the network node is obtained based on a default value of a current temporary ETX at the network node, and the default value of the current temporary ETX at the network node is greater than R; determining, according to a first preset rule, a first candidate parent node set from the plurality of candidate parent nodes based on the identifier of each candidate parent node and the candidate rank of the network node corresponding to each candidate parent node, wherein the first preset rule is that the first candidate parent node set comprises a first candidate parent node and a candidate parent node with same communication quality as the first candidate parent node, the first candidate parent node is one of the plurality of candidate parent nodes, and a candidate rank of the network node corresponding to the first candidate parent node is smallest; and determining, based on a quantity of subnodes already connected to each candidate parent node in the first candidate parent node set, a candidate parent node that is in the first candidate parent node set and that is already connected to a smallest quantity of subnodes as a target parent node of the network node. obtaining, by a network node, an identifier of each of a plurality of candidate parent nodes, a quantity of subnodes already connected to each candidate parent node, and a rank of each candidate parent node, wherein the rank of the candidate parent node is a total transmission path from the candidate parent node to a border router, BR, of the wireless mesh network and is obtained by the candidate parent node based on a default value of a current temporary expected transmission count, ETX, at the candidate parent node, the default value of the current temporary ETX at the candidate parent node is greater than R, and R represents a preset path coefficient; obtaining a candidate rank of the network node corresponding to each candidate parent node, wherein a candidate rank of the network node corresponding to a candidate parent node is a total transmission path from the network node to the BR through the candidate parent node and is obtained based on a rank of the candidate parent node and a current actual ETX at the network node, the current actual ETX at the network node is obtained based on a default value of a current temporary ETX at the network node, and the default value of the current temporary ETX at the network node is greater than R; determining, according to a first preset rule, a first candidate parent node set from the plurality of candidate parent nodes based on the identifier of each candidate parent node and the candidate rank of the network node corresponding to each candidate parent node, wherein the first preset rule is that the first candidate parent node set comprises a first candidate parent node and a candidate parent node with same communication quality as the first candidate parent node, the first candidate parent node is one of the plurality of candidate parent nodes, and a candidate rank of the network node corresponding to the first candidate parent node is smallest; and determining, based on a quantity of subnodes already connected to each candidate parent node in the first candidate parent node set, a candidate parent node that is in the first candidate parent node set and that is already connected to a smallest quantity of subnodes as a target parent node of the network node.