IP Library › Granted Patent US 11,620,082
Granted Patent B2
US 11,620,082 · App. 17/206,903 · Granted Apr 4, 2023

Data retrieval method and apparatus

Inventors: Fangzhou Zheng (Shenzhen, CN); Jian Gao (Hangzhou, CN); Chunhui Ma (Hangzhou, CN)
Assignee: HUAWEI TECHNOLOGIES CO., LTD.
G06F3/0659G06F3/0611G06F3/0673G06F12/0646G06F2212/1008
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 11,620,082
App. No.
17/206,903
Granted
Apr 4, 2023
Kind
B2
Abstract

This application provides a data reading method for a retrieval task and a retrieval apparatus. The method includes receiving a first retrieval task request, where the first retrieval task request corresponds to a first retrieval start address and a first retrieval end address in a target data area, and reading data for a first retrieval task starting from the first retrieval start address. The method includes receiving a second retrieval task request in a process of reading data for the first retrieval task. The method further includes obtaining an address of data to be read for the first retrieval task after receiving the second retrieval task request, and determining a second retrieval start address of a second retrieval task in the target data area based on the address of the data to be read. The method further includes reading data for the second retrieval task starting from the second retrieval start address.

Claims (51)

1. A data reading method comprising:

receiving a first retrieval task request corresponding to a first retrieval start address and a first retrieval end address in a target data area;

reading data for a first retrieval task starting from the first retrieval start address, comprising sequentially reading data in the target data area from the first retrieval start address to the first retrieval end address;

receiving a second retrieval task request in a process of reading data for the first retrieval task;

determining a second retrieval start address of a second retrieval task in the target data area based on an address of data to be read for the first retrieval task, wherein the second retrieval start address falls in a range from the address of the data to be read for the first retrieval task to the first retrieval end address; and

reading data for the second retrieval task starting from the second retrieval start address, wherein

the target data area is a range of data that needs to be traversed when a retrieval is performed for both the first retrieval task and the second retrieval task.

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

determining a second retrieval end address of the second retrieval task in the target data area based on the address of the data to be read for the first retrieval task.

3. The method according to claim 1 , wherein after the determining a second retrieval start address of the second retrieval task in the target data area based on an address of data to be read for the first retrieval task, the method further comprises: continuing to read data starting from the address of the data to be read for the first retrieval task to obtain a read data, and determining whether an address of the read data is the second retrieval start address, wherein if the address of the read data is the second retrieval start address, the read data is used to perform the second retrieval task.

4. The method according to claim 1 , wherein after the determining a second retrieval start address of the second retrieval task in the target data area based on an address of data to be read for the first retrieval task, the method further comprises:

continuing to read data starting from the address of the data to be read for the first retrieval task to obtain a read data, and determining whether an address of the read data is the first retrieval end address, wherein if the address of the read data is not the first retrieval end address, the read data is further used to perform the first retrieval task.

5. The method according to claim 1 , wherein the second retrieval task request corresponds to the second retrieval start address and a second retrieval end address in the target data area.

6. The method according to claim 1 , wherein the determining a second retrieval start address of the second retrieval task in the target data area based on an address of data to be read comprises:

setting the address of the data to be read for the first retrieval task as the second retrieval start address, or setting a next address of the address of the data to be read for the first retrieval task as the second retrieval start address.

7. The method according to claim 1 , further comprising determining a second retrieval end address of the second retrieval task in the target data area based on the address of the data to be read for the first retrieval task, comprising:

setting a previous data address of the address of the data to be read for the first retrieval task as the second retrieval end address, or

setting the address of the data to be read for the first retrieval task as the second retrieval end address.

8. A data retrieval apparatus comprising:

a processor; and

a memory coupled to the processor to store instructions, which when executed by the

processor, cause the processor to perform operations, the operations comprising:

receiving a first retrieval task request corresponding to a first retrieval start address and a first retrieval end address in a target data area, and receiving a second retrieval task request in a process of reading data for a first retrieval task;

determining a second retrieval start address of a second retrieval task in the target data area based on an address of data to be read for the first retrieval task, wherein

the second retrieval start address falls in a range from the address of the data to be read for the first retrieval task to the first retrieval end address;

reading data for the first retrieval task starting from the first retrieval start address, comprising sequentially reading data in the target data area from the first retrieval start address to the first retrieval end address; and

reading data for a second retrieval task starting from the second retrieval start address; wherein

the target data area is a range of data that needs to be traversed when a retrieval is performed for both the first retrieval task and the second retrieval task.

9. The apparatus according to claim 8 , wherein the operations further comprise:

continuing to read data starting from the address of the data to be read for the first retrieval task to obtain a read data; and

determining whether an address of the read data is the second retrieval start address, wherein if the address of the read data is the second retrieval start address, the read data is used to perform the second retrieval task.

10. The apparatus according to claim 8 , wherein the operations further comprise: continuing to read data starting from the address of the data to be read for the first

retrieval task to obtain a read data; and

determining whether the address of the read data is the first retrieval end address, wherein if the address of the read data is not the first retrieval end address, the read data is further used to perform the first retrieval task.

11. The apparatus according to claim 8 , wherein the operations further comprise performing the retrieval based on the data read by the processor and a retrieval task corresponding to the read data.

12. The apparatus according to claim 8 , wherein the operations further comprise determining a second retrieval end address of the second retrieval task in the target data area based on the address of the data to be read.

13. The apparatus according to claim 8 , wherein determining a second retrieval start address of a second retrieval task in the target data area based on an address of data to be read comprises setting the address of the data to be read as the second retrieval start address.

14. The apparatus according to claim 12 , wherein determining a second retrieval end address of a second retrieval task in the target data area based on an address of data to be read comprises

setting a previous data address of the address of the data to be read as the second retrieval end address.

15. A data retrieval system, wherein the system comprises a data retrieval apparatus and a memory, wherein

the memory is configured to store data required by a retrieval task of the data retrieval system, and the retrieval task of the data retrieval system needs to traverse the data in the memory; and

the data retrieval apparatus is configured to:

receive a first retrieval task request corresponding to a first retrieval start address and a first retrieval end address in the memory; read data for a first retrieval task starting from the first retrieval start address, comprising sequentially reading data in a target data area from the first retrieval start address to the first retrieval end address; receive a second retrieval task request in a process of reading data for the first retrieval task; determine a second retrieval start address of a second retrieval task in the memory based on an address of data to be read for the first retrieval task, wherein the second retrieval start address falls in a range from the address of the data to be read for the first retrieval task and the first retrieval end address; and read data for the second retrieval task starting from the second retrieval start address.

16. The system according to claim 15 , wherein the data retrieval apparatus is further configured to, after determining the second retrieval start address of the second retrieval task in the target data area based on the address of the data to be read for the first retrieval task, continue to read data starting from the address of the data to be read for the first retrieval task to obtain a read data, and determine whether an address of the read data is the second retrieval start address, wherein if the address of the read data to be read is the second retrieval start address, the read data is used to perform the second retrieval task.

17. The system according to claim 15 , wherein the data retrieval apparatus is further configured to, after determining the second retrieval start address of the second retrieval task in the target data area based on the address of the data to be read for the first retrieval task, continue to read data starting from the address of the data to be read for the first retrieval task to obtain a read data, and determine whether an address of the read data is the first retrieval start address, wherein if the address of the read data is not the first retrieval end address, the read data is further used to perform the first retrieval task.

18. The system according to claim 15 , wherein the data retrieval apparatus is further configured to determine a second retrieval end address of the second retrieval task in the target data area based on the address of the data to be read for the first retrieval task.

19. The system according to claim 15 , wherein the data retrieval apparatus is configured to:

set the address of the data to be read as the second retrieval start address, or set a next address of the address of the data to be read for the first retrieval task as the second retrieval start address.

20. The system according to claim 15 , wherein the data retrieval apparatus is further configured to determine a second retrieval end address of the second retrieval task in the target data area based on the address of the data to be read for the first retrieval task, wherein the data retrieval apparatus is further configured to:

set, by the data retrieval apparatus, a previous data address of the address of the data to be read as the second retrieval end address; or

set the address of the data to be read for first retrieval task as the second retrieval end address.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded May 7, 2021
From: ZHENG, FANGZHOU; GAO, JIAN; MA, CHUNHUI
To: HUAWEI TECHNOLOGIES CO., LTD.
Reel/Frame 056168/0709 →
Priority Claims (1)
CN 201811106483.8 · Sep 21, 2018 · national
Continuity (2)
Continuation PCTCN2019094378 · Jul 2, 2019
Related Publication 20210208818A1 · Jul 8, 2021