A resource obtaining method, wherein the method is applied to a case in which a first base station and a second base station access an external network by using a same gateway device, a first edge node is deployed on the first base station, a second edge node is deployed on the second base station, and the method comprises: receiving, by the first edge node, a first resource obtaining request sent by the second edge node, wherein the first resource obtaining request carries a resource identifier of a first target resource; determining, by the first edge node, that the first target resource corresponding to the resource identifier of the first target resource is not locally cached; determining, by the first edge node based on shared popularity information of the first target resource, whether the first target resource needs to be cached, wherein the shared popularity information of the first target resource is determined by the first edge node from a quantity of obtaining requests for the first target resource that are received by the first edge node and another edge node, and the another edge node comprises any edge node other than the first edge node deployed on a base station that accesses an external network by using the same gateway device; when the first target resource needs to be cached, obtaining, by the first edge node, the first target resource from a central node deployed on the same gateway device or a source site of the first target resource; and caching, by the first edge node, the first target resource, and sending the first target resource to the second edge node, wherein the method further comprises: receiving, by the first edge node, a second resource obtaining request sent by a terminal, wherein the second resource obtaining request carries a resource identifier of a second target resource; determining, by the first edge node, that a second target resource corresponding to the resource identifier of the second target resource is not locally cached; determining, by the first edge node, a node identifier of a third edge node based on the resource identifier of the second target resource and a stored hash table, wherein the hash table comprises a mapping relationship between a node identifier of an edge node deployed on the base station that accesses the external network by using the same gateway device and a corresponding hash value; and sending, by the first edge node, the second resource obtaining request to a third edge node corresponding to the node identifier of the third edge node. receiving, by the first edge node, a first resource obtaining request sent by the second edge node, wherein the first resource obtaining request carries a resource identifier of a first target resource; determining, by the first edge node, that the first target resource corresponding to the resource identifier of the first target resource is not locally cached; determining, by the first edge node based on shared popularity information of the first target resource, whether the first target resource needs to be cached, wherein the shared popularity information of the first target resource is determined by the first edge node from a quantity of obtaining requests for the first target resource that are received by the first edge node and another edge node, and the another edge node comprises any edge node other than the first edge node deployed on a base station that accesses an external network by using the same gateway device; when the first target resource needs to be cached, obtaining, by the first edge node, the first target resource from a central node deployed on the same gateway device or a source site of the first target resource; and caching, by the first edge node, the first target resource, and sending the first target resource to the second edge node, wherein the method further comprises: receiving, by the first edge node, a second resource obtaining request sent by a terminal, wherein the second resource obtaining request carries a resource identifier of a second target resource; determining, by the first edge node, that a second target resource corresponding to the resource identifier of the second target resource is not locally cached; determining, by the first edge node, a node identifier of a third edge node based on the resource identifier of the second target resource and a stored hash table, wherein the hash table comprises a mapping relationship between a node identifier of an edge node deployed on the base station that accesses the external network by using the same gateway device and a corresponding hash value; and sending, by the first edge node, the second resource obtaining request to a third edge node corresponding to the node identifier of the third edge node. receiving, by the first edge node, a second resource obtaining request sent by a terminal, wherein the second resource obtaining request carries a resource identifier of a second target resource; determining, by the first edge node, that a second target resource corresponding to the resource identifier of the second target resource is not locally cached; determining, by the first edge node, a node identifier of a third edge node based on the resource identifier of the second target resource and a stored hash table, wherein the hash table comprises a mapping relationship between a node identifier of an edge node deployed on the base station that accesses the external network by using the same gateway device and a corresponding hash value; and sending, by the first edge node, the second resource obtaining request to a third edge node corresponding to the node identifier of the third edge node.