IP Library Granted Patent US 10,574,752
Granted Patent B2
US 10,574,752 · App. 15/206,445 · Granted Feb 25, 2020

Distributed data storage method, apparatus, and system

Inventor: Yuhu Wang (Hangzhou, CN)
Assignee: HUAWEI TECHNOLOGIES CO., LTD.
H04L67/1097G06F16/2471G06F16/278
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 10,574,752
App. No.
15/206,445
Granted
Feb 25, 2020
Kind
B2
Abstract

A distributed data storage method, apparatus, and system are disclosed. After a first node receives a query request that comprises a query identifier, if first data corresponding to the query identifier is stored locally, but second data corresponding to the query identifier is not stored locally, the first node recalculates a second node configured to store the first data, and sends storage location information of the first data to the second node. The second node obtains the first data from the first node according to the storage location information after receiving a request for querying for the first data, and if the request for querying for the first data is not received subsequently, the operation of obtaining, by the second node, the first data from the first node is not triggered. In this way, network data transmission resources are reduced and storage space is saved.

Claims (67)

1. A method implemented by a first node in a distributed system comprising a service apparatus and a plurality of nodes, the method comprising:

receiving, by the first node, a query request from the service apparatus, the query request comprising a query directed to a first data and a second data;

determining, by the first node, that the first data is stored locally at the first node and that the second data is not stored locally at the first node;

identifying, by the first node, a second node capable of locating the second data using the query identifier and a preset calculation rule when the second data is not stored locally at the first node, wherein identifying the second node using the preset calculation rule comprises performing, by the first node, a hash calculation according to the query identifier to determine the second node; and

sending, by the first node, storage location information of the first data at the first node to the second node, wherein the storage location information of the first data includes an indication that the first data is currently located at the first node and an indication that the first data is located at a specified row in a specified data table.

2. The method according to claim 1 , wherein after sending the storage location information of the first data to the second node, the method further comprises:

receiving, by the first node, a second query request from the second node, wherein the second query request is a request to query the first data; and

sending, by the first node, the first data to the service apparatus in response to the second query request.

3. The method according to claim 1 , wherein after sending the storage location information of the first data to the second node, the method further comprises:

receiving, by the first node, a second query request from the second node, wherein the second query request is a request to query the first data; and

sending, by the first node, the first data to the second node in response to the second query request.

4. The method according to claim 1 , further comprising:

receiving, by the first node, a data addition request from the service apparatus, wherein the data addition request is a request to add third data to the first data;

adding, by the first node, the third data to the first data;

determining, by the first node according to the query identifier, a third node of the plurality of nodes that is configured to store the third data; and

sending, by the first node, storage information of the third data to the third node.

5. The method according to claim 1 , further comprising:

receiving, by the first node, a data deletion request sent by the service apparatus, wherein the data deletion request is a request to delete fourth data from the first data;

deleting, by the first node, the fourth data from the first data;

determining, by the first node according to the query identifier, a fourth node of the plurality of nodes that is configured to store the fourth data; and

sending, by the first node, storage location information of the fourth data to the fourth node.

6. A distributed database node implemented in a distributed system, the distributed database node comprising:

a storage configured to store data;

a memory configured to store instructions; and

a processor coupled to the memory and configured to execute the instructions to:

receive a query request from a service apparatus, the query request comprising a query directed to a first data and a second data;

determine that the first data is stored locally at the distributed database node and that the second data is not stored locally at the distributed database node;

identify a second node capable of locating the second data using the query identifier and a preset calculation rule when the second data is not stored locally at the first node, wherein identifying the second node using the preset calculation rule comprises performing a hash calculation according to the query identifier to determine the second node; and

send storage location information of the first data at the first node to the second node, wherein the storage location information of the first data includes an indication that the first data is currently located at the first node and an indication that the first data is located at a specified row in a specified data table.

7. The node according to claim 6 , wherein after sending the storage location information of the first data to the second node, the processor is further configured to execute the instructions to:

receive a second query request from the second node, wherein the second query request is a request to query the first data; and

send the first data to the service apparatus in response to the second query request.

8. The node according to claim 6 , wherein after sending the storage location information of the first data to the second node, the processor is further configured to execute the instructions to:

receive a second query request from the second node, wherein the second query request is a request to query the first data; and

send the first data to the second node in response to the second query request.

9. The node according to claim 6 , wherein the processor is further configured to execute the instructions to:

receive a data addition request from the service apparatus, wherein the data addition request is a request to add third data to the first data;

add the third data to the first data;

determine, according to the query identifier, a third node of the plurality of nodes that is configured to store the third data; and

send storage information of the third data to the third node.

10. The node according to claim 6 , wherein the processor is further configured to execute the instructions to:

receive a data deletion request sent by the service apparatus, wherein the data deletion request is a request to delete fourth data from the first data;

delete the fourth data from the first data;

determine, according to the query identifier, a fourth node of the plurality of nodes that is configured to store the fourth data; and

send storage location information of the fourth data to the fourth node.

11. A distributed data storage system, comprising:

a first node communicatively coupled to a service apparatus and a plurality of nodes, wherein the first node is configured to:

receive a first query request from the service apparatus, the query request comprising a query identifier directed to a first data and a second data;

determine that the first data is stored locally at the first node and that the second data is not stored locally at the first node;

identify a second node capable of locating the second data the query identifier and a preset calculation rule when the second data is not stored locally at the first node, wherein identifying the second node using the preset calculation rule comprises performing a hash calculation according to the query identifier to determine the second node; and

send storage location information of the first data at the first node to the second node, wherein the storage location information of the first data includes an indication that the first data is currently located at the first node and an indication that the first data is located at a specified row in a specified data table.

12. The system according to claim 11 , wherein after sending the storage location information of the first data to the second node, the first node is further configured to:

receive a second query request from the second node after the second node receives a request that is used by the service apparatus to query the first data; and

send the first data to the service apparatus in response to the second query request.

13. The system according to claim 11 , wherein after sending the storage location information of the first data to the second node, the first node is further configured to:

receive a second query request from the second node after the second node receives a request that is used by the service apparatus to query the first data; and

send the first data to the second node in response to the second query request.

14. The system according to claim 11 , wherein the first node is further configured to:

receive a data addition request from the service apparatus, wherein the data addition request is a request to add third data to the first data;

add the third data to the first data;

determine, according to the query identifier, a third node of the plurality of nodes that is configured to store the third data; and

send storage information of the third data to the third node.

15. The system according to claim 11 , the first node is further configured to:

receive a data deletion request sent by the service apparatus, wherein the data deletion request is a request to delete fourth data from the first data;

delete the fourth data from the first data;

determine, according to the query identifier, a fourth node of the plurality of nodes that is configured to store the fourth data; and

send storage location information of the fourth data to the fourth node.

Assignments (2)
CORRECTIVE ASSIGNMENT TO CORRECT THE SPELLING OF THE INVENTOR'S NAME PREVIOUSLY RECORDED ON REEL 039120 FRAME 0395. ASSIGNOR(S) HEREBY CONFIRMS THE ASSIGNMENT. Recorded Aug 2, 2016
From: WANG, YUHU
To: HUAWEI TECHNOLOGIES CO., LTD.
Reel/Frame 039537/0465 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jul 11, 2016
From: WANG, YULU
To: HUAWEI TECHNOLOGIES CO., LTD.
Reel/Frame 039120/0395 →
Priority Claims (1)
CN 2014 1 0038922 · Jan 26, 2014 · national
Continuity (2)
Continuation PCTCN2015071423 · Jan 23, 2015
Related Publication 20160323385A1 · Nov 3, 2016