IP Library › Granted Patent US 12,386,671
Granted Patent B2
US 12,386,671 · App. 17/588,983 · Granted Aug 12, 2025

Resource allocation method and resource borrowing method

Inventors: Yan Zeng (Shenzhen, CN); Hui Jiang (Beijing, CN); Jizhong Li (Shenzhen, CN); Min Liu (Beijing, CN)
Assignee: Huawei Technologies Co., Ltd.
G06F9/505G06F9/4881
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12,386,671
App. No.
17/588,983
Granted
Aug 12, 2025
Kind
B2
Abstract

Embodiments of this application provide example resource allocation methods. One example method includes determining, by a first node, a hash value corresponding to a first cluster. The first node can obtain a hash ring, where the hash ring includes at least one hash value interval, and each hash value interval corresponds to one second cluster. The first node can determine a target second cluster based on the hash value corresponding to the first cluster, where the hash value corresponding to the first cluster belongs to a target hash interval, the target hash interval is a hash value interval in the at least one hash value interval, and the target hash interval corresponds to the target second cluster. The first node can establish an association relationship between the first cluster and a target second cluster, where the target second cluster is allowed to apply for a resource from the first cluster.

Claims (44)

1. A resource allocation method, wherein the method comprises:

determining, by a first node, a hash value corresponding to a first cluster;

obtaining, by the first node, a hash ring, wherein the hash ring comprises at least one hash value interval, and each hash value interval corresponds to one second cluster;

determining, by the first node, that the hash value corresponding to the first cluster belongs to a target hash value interval of the at least one hash value interval;

determining, by the first node, a second cluster corresponding to the target hash value interval as a target second cluster;

and

establishing, by the first node, an association relationship between the first cluster and the target second cluster, wherein the target second cluster is allowed to apply for a resource from the first cluster.

2. The method according to claim 1 , wherein the hash ring comprises a first hash node and a second hash node, the first hash node corresponds to the target second cluster, the first hash node is an adjacent successor node of the second hash node on the hash ring, and the target hash value interval is between a hash value of the first hash node and a hash value of the second hash node.

3. The method according to claim 1 wherein the method further comprises:

dividing, by the first node, an idle cluster comprising a plurality of computing nodes to obtain a plurality of sub-clusters, wherein the first cluster is one of the plurality of sub-clusters.

4. The method according to claim 3 , wherein the plurality of sub-clusters comprise a third sub-cluster and a fourth sub-cluster, the third sub-cluster has a maximum idle resource amount in the plurality of sub-clusters, the fourth sub-cluster has a minimum idle resource amount in the plurality of sub-clusters, and an absolute value of a difference between an idle resource amount of the third sub-cluster and an idle resource amount of the fourth sub-cluster is less than a first threshold.

5. The method according to claim 3 , wherein an absolute value of a difference between an idle resource amount of each of the plurality of sub-clusters and a preset idle resource amount is less than or equal to a second threshold, and the preset idle resource amount is related to a historical requested resource amount.

6. The method according to claim 1 , wherein the method further comprises:

receiving, by the first node, a first resource borrowing request sent by the target second cluster, wherein the first resource borrowing request comprises task data and an identifier of the first cluster; and

sending, by the first node, the task data to the first cluster based on the identifier of the first cluster.

7. The method according to claim 1 , wherein the hash ring comprises Y hash nodes, each second cluster corresponds to at least one hash node, hash values corresponding to the Y hash nodes and the hash value corresponding to the first cluster are generated according to a same hash algorithm, and Y is a positive integer.

8. The method according to claim 1 , wherein obtaining, by the first node, the hash ring comprises:

determining, by the first node, Y hash values corresponding to X second clusters, wherein each second cluster corresponds to at least one hash value, X is a positive integer, and Y is a positive integer greater than or equal to X; and

generating, by the first node, the hash ring based on the Y hash values, wherein the hash ring comprises Y hash nodes, each second cluster corresponds to at least one hash node, the Y hash nodes divide the hash ring into Y hash value intervals, and each hash node corresponds to one hash value interval.

9. An apparatus for resource allocation, wherein the apparatus comprises:

at least one processor; and

one or more memories coupled to the at least one processor and storing programming instructions for execution by the at least one processor to:

determine a hash value corresponding to a first cluster;

obtain a hash ring, wherein the hash ring comprises at least one hash value interval, and each hash value interval corresponds to one second cluster;

determine that the hash value corresponding to the first cluster belongs to a target hash value interval of the at least one hash value interval;

determine a second cluster corresponding to the target hash value interval as a target second cluster;

and

establish an association relationship between the first cluster and the target second cluster, wherein the target second cluster is allowed to apply for a resource from the first cluster.

10. The apparatus according to claim 9 , wherein the hash ring comprises a first hash node and a second hash node, the first hash node corresponds to the target second cluster, the first hash node is an adjacent successor node of the second hash node on the hash ring, and the target hash value interval is between a hash value of the first hash node and a hash value of the second hash node.

11. The apparatus according to claim 9 , wherein the programming instructions are for execution by the at least one processor to:

divide an idle cluster comprising a plurality of computing nodes to obtain a plurality of sub-clusters, wherein the first cluster is one of the plurality of sub-clusters.

12. The apparatus according to claim 11 , wherein the plurality of sub-clusters comprise a third sub-cluster and a fourth sub-cluster, the third sub-cluster has a maximum idle resource amount in the plurality of sub-clusters, the fourth sub-cluster has a minimum idle resource amount in the plurality of sub-clusters, and an absolute value of a difference between an idle resource amount of the third sub-cluster and an idle resource amount of the fourth sub-cluster is less than a first threshold.

13. A computer-readable storage medium storing a program, wherein the program comprises instructions, and when the instructions are executed by a computer, cause the computer to perform operations comprising:

determining a hash value corresponding to a first cluster;

obtaining a hash ring, wherein the hash ring comprises at least one hash value interval, and each hash value interval corresponds to one second cluster;

determining that the hash value corresponding to the first cluster belongs to a target hash value interval of the at least one hash value interval;

determining a second cluster corresponding to the target hash value interval as a target second cluster;

and

establishing an association relationship between the first cluster and the target second cluster, wherein the target second cluster is allowed to apply for a resource from the first cluster.

14. The computer-readable storage medium according to claim 13 , wherein the hash ring comprises a first hash node and a second hash node, the first hash node corresponds to the target second cluster, the first hash node is an adjacent successor node of the second hash node on the hash ring, and the target hash value interval is between a hash value of the first hash node and a hash value of the second hash node.

15. The computer-readable storage medium according to claim 13 , wherein the operations further comprise:

dividing an idle cluster comprising a plurality of computing nodes to obtain a plurality of sub-clusters, wherein the first cluster is one of the plurality of sub-clusters.

16. The computer-readable storage medium according to claim 15 , wherein the plurality of sub-clusters comprise a third sub-cluster and a fourth sub-cluster, the third sub-cluster has a maximum idle resource amount in the plurality of sub-clusters, the fourth sub-cluster has a minimum idle resource amount in the plurality of sub-clusters, and an absolute value of a difference between an idle resource amount of the third sub-cluster and an idle resource amount of the fourth sub-cluster is less than a first threshold.

17. The computer-readable storage medium according to claim 15 , wherein an absolute value of a difference between an idle resource amount of each of the plurality of sub-clusters and a preset idle resource amount is less than or equal to a second threshold, and the preset idle resource amount is related to a historical requested resource amount.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded May 27, 2025
From: ZENG, YAN; JIANG, HUI; LI, JIZHONG; LIU, MIN
To: HUAWEI TECHNOLOGIES CO., LTD.
Reel/Frame 071229/0724 →
Priority Claims (1)
CN 201910704756.7 · Jul 31, 2019 · national
Continuity (2)
Continuation PCTCN2020105476 · Jul 29, 2020
Related Publication 20220156115A1 · May 19, 2022
References Cited (41)
US 5612865A · Dasgupta · 1997 [cited by applicant]
US 7623460B2 · Miyazaki · 2009 [cited by examiner]
US 8484354B2 · Schlack · 2013 [cited by applicant]
US 8949308B2 · Chintalapati · 2015 [cited by examiner]
US 10346191B2 · Krishnan · 2019 [cited by examiner]
US 10924535B2 · Du · 2021 [cited by examiner]
US 11023145B2 · Danilov · 2021 [cited by examiner]
US 11294601B2 · Hao · 2022 [cited by examiner]
US 20050114862A1 · Bisdikian et al. · 2005 [cited by applicant]
US 20090172139A1 · Wong et al. · 2009 [cited by applicant]
US 20110153826A1 · Ananthanarayanan et al. · 2011 [cited by applicant]
US 20120233251A1 · Holt · 2012 [cited by examiner]
US 20140325182A1 · Varakur · 2014 [cited by examiner]
US 20160088072A1 · Likhtarov · 2016 [cited by examiner]
US 20160105323A1 · Haeupler · 2016 [cited by examiner]
US 20160350226A1 · Agarwal · 2016 [cited by examiner]
US 20160378846A1 · Luse · 2016 [cited by examiner]
US 20170070567A1 · Lee · 2017 [cited by applicant]
CN 102130938A · 2011 [cited by applicant]
CN 104461740A · 2015 [cited by applicant]
CN 106991008A · 2017 [cited by applicant]
CN 107197035A · 2017 [cited by applicant]
CN 107801086A · 2018 [cited by applicant]
CN 108132830A · 2018 [cited by applicant]
CN 108173937A · 2018 [cited by applicant]
CN 109040212A · 2018 [cited by applicant]
CN 109347917A · 2019 [cited by applicant]
CN 110071978B · 2022 [cited by examiner]
CN 110489059B · 2022 [cited by examiner]
EP 3739845B1 · 2023 [cited by examiner]
GB 2417580A · 2006 [cited by applicant]
JP 2007325235A · 2007 [cited by applicant]
WO 2020238989A1 · 2020 [cited by applicant]
Chae et al., “DynaMix: Dynamic Mobile Device Integration for Efficient Cross-device Resource Sharing,” 2018 USENIX Annual Technical Conference (UNSENIX ATC '18) Jul. 2018, 14 pages. [cited by applicant]
Ko et al., “Computation Offloading for Energy Efficiency of Smart Devices,” ACM International Joint Conference on Pervasive and Ubiquitous Computing and Proceedings of the 2017 ACM International Symposium on Wearable Co… [cited by applicant]
Oh et al., “Mobile Plus: Multi-device Mobile Platform for Cross-device Functionality Sharing,” 15th Annual International Conference on Mobile Systems, Applications, and Services, Jun. 2017, 13 pages. [cited by applicant]
PCT International Search Report and Written Opinion issued in International Application No. PCT/CN2020/105476 on Oct. 28, 2020, 16 pages (with English translation). [cited by applicant]
Preti et al., “Interaction Modality Mapping Service for devices in a P2P network,” 2014 Workshop on Distributed User Interfaces and Multimodal Interaction (DUI '14), Jul. 2014, 4 pages. [cited by applicant]
King et al., “Enabling Edge Devices that Learn from Each Other: Cross Modal Training for Activity Recognition,” 1st International Workshop on Edge Systems, Analytics and Networking (EdgeSys '18), Jun. 2018, 6 pages. [cited by applicant]
Yu et al., “Decentralized and Optimal Resource Cooperation in Geo-Distributed Mobile Cloud Computing,” IEEE Transactions on Emerging Topics in Computing, Sep. 2015, 13 pages. [cited by applicant]
Extended European Search Report in European Appln No. 20846626.8, dated Nov. 9, 2022, 10 pages. [cited by applicant]