IP Library › Granted Patent US 11,650,754
Granted Patent B2
US 11,650,754 · App. 16/689,479 · Granted May 16, 2023

Data accessing method, device, and storage medium

Inventors: Zihao Liang (Beijing, CN); Jian Ouyang (Beijing, CN)
Assignee: KUNLUNXIN TECHNOLOGY (BEIJING) COMPANY LIMITED
G06F3/0659G06F3/0604G06F3/0653G06F3/0656G06F3/0683
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,650,754
App. No.
16/689,479
Granted
May 16, 2023
Kind
B2
Abstract

Embodiments of the present disclosure provide a data accessing method, a device and a storage medium. The method includes: obtaining a first accessing request and a second accessing request for a storage device; loading first data associated with the first accessing request from a source device to a pre-allocated buffer area with a size same as a size of a single physical storage block of the storage device; determining a first part of the second data when the first size of second data associated with the second accessing request is greater than or equal to the second size of an available space of the buffer area, a size of the first part being the same as the second size; and providing the first data and the first part to a target device associated with the first accessing request and the second accessing request.

Claims (55)

1. A data accessing method, comprising:

obtaining a first accessing request and a second accessing request for a storage device, wherein the first accessing request is associated with first data, and the second accessing request is associated with second data;

loading the first data from a source device to a pre-allocated buffer area, wherein, a size of the buffer area is the same as a size of a single physical storage block of the storage device;

determining whether a first size of the second data is lower than a second size of an available space of the buffer area, wherein the available space of the buffer area refers to a space remaining in a buffer after the first data is loaded to the buffer area;

determining a first part of the second data in response to determining that the first size of the second data is greater than or equal to the second size of the available space, wherein, a size of the first part of the second data is the same as the second size of the available space of the buffer area; and

splicing the first data and the first part of the second data, and providing the first data and the first part of the second data together to a target device associated with the first accessing request and the second accessing request;

updating the available space of the buffer area as all space of the buffer area after providing the first data and the first part of the second data to the target device; and

loading a second part of the second data which is different from the first part of the second data to the updated available space.

2. The method of claim 1 , further comprising:

determining whether a third accessing request in an instruction associated with the first accessing request and the second accessing request is received, wherein, a type of the third accessing request is the same as a type of the first accessing request and the second accessing request; and

providing the second part of the second data to the target device in response to determining that the third accessing request is not received.

3. The method of claim 1 , further comprising:

loading the second data to the available space of the buffer area in response to determining that the first size of the second data is lower than the second size of the available space.

4. The method of claim 3 , further comprising:

determining whether a third accessing request in an instruction associated with the first accessing request and the second accessing request is received, wherein, a type of the third accessing request is the same as a type of the first accessing request and the second accessing request; and

providing the first data and the second data to the target device in response to determining that the third accessing request is not received.

5. The method of claim 1 , wherein, the first accessing request and the second accessing request are reading requests, and the source device is the storage device.

6. The method of claim 1 , wherein, the first accessing request and the second accessing request are writing requests, the target device is the storage device, and a first target position of the first accessing request in the storage device is continuous with a second target position of the second accessing request in the storage device.

7. An electronic device, comprising:

one or more processors, and

a memory, configured to store one or more programs that, when executed by the one or more processors, cause the electronic device to implement a data accessing method, the method comprising:

obtaining a first accessing request and a second accessing request for a storage device, wherein the first accessing request is associated with first data, and the second accessing request is associated with second data;

loading the first data from a source device to a pre-allocated buffer area, wherein, a size of the buffer area is the same as a size of a single physical storage block of the storage device;

determining whether a first size of the second data is lower than a second size of an available space of the buffer area, wherein the available space of the buffer area refers to a space remaining in a buffer after the first data is loaded to the buffer area;

determining a first part of the second data in response to determining that the first size of the second data is greater than or equal to the second size of the available space, wherein, a size of the first part of the second data is the same as the second size of the available space of the buffer area; and

splicing the first data and the first part of the second data, and providing the first data and the first part of the second data together to a target device associated with the first accessing request and the second accessing request;

updating the available space of the buffer area as all space of the buffer area after providing the first data and the first part of the second data to the target device; and

loading a second part of the second data which is different from the first part of the second data to the updated available space.

8. The electronic device of claim 7 , the method further comprises:

determining whether a third accessing request in an instruction associated with the first accessing request and the second accessing request is received, wherein, a type of the third accessing request is the same as a type of the first accessing request and the second accessing request; and

providing the second part of the second data to the target device in response to determining that the third accessing request is not received.

9. The electronic device of claim 7 , the method further comprises:

loading the second data to the available space of the buffer area in response to determining that the first size of the second data is lower than the second size of the available space.

10. The electronic device of claim 9 , the method further comprises:

determining whether a third accessing request in an instruction associated with the first accessing request and the second accessing request is received, wherein, a type of the third accessing request is the same as a type of the first accessing request and the second accessing request; and

providing the first data and the second data to the target device in response to determining that the third accessing request is not received.

11. The electronic device of claim 7 , wherein, the first accessing request and the second accessing request are reading requests, and the source device is the storage device.

12. The electronic device of claim 7 , wherein, the first accessing request and the second accessing request are writing requests, the target device is the storage device, and a first target position of the first accessing request in the storage device is continuous with a second target position of the second accessing request in the storage device.

13. A non-transitory computer readable storage medium having a computer program stored thereon that, when executed by a processor, implements a data accessing method, the method comprising:

obtaining a first accessing request and a second accessing request for a storage device, wherein the first accessing request is associated with first data, and the second accessing request is associated with second data;

loading the first data from a source device to a pre-allocated buffer area, wherein, a size of the buffer area is the same as a size of a single physical storage block of the storage device;

determining whether a first size of the second data is lower than a second size of an available space of the buffer area, wherein the available space of the buffer area refers to a space remaining in a buffer after the first data is loaded to the buffer area;

determining a first part of the second data in response to determining that the first size of the second data is greater than or equal to the second size of the available space, wherein, a size of the first part of the second data is the same as the second size of the available space of the buffer area; and

splicing the first data and the first part of the second data, and providing the first data and the first part of the second data together to a target device associated with the first accessing request and the second accessing request;

updating the available space of the buffer area as all space of the buffer area after providing the first data and the first part of the second data to the target device; and

loading a second part of the second data which is different from the first part of the second data to the updated available space.

14. The computer readable storage medium of claim 13 , the method further comprises:

determining whether a third accessing request in an instruction associated with the first accessing request and the second accessing request is received, wherein, a type of the third accessing request is the same as a type of the first accessing request and the second accessing request; and

providing the second part of the second data to the target device in response to determining that the third accessing request is not received.

15. The computer readable storage medium of claim 13 , the method further comprises:

loading the second data to the available space of the buffer area in response to determining that the first size of the second data is lower than the second size of the available space.

16. The computer readable storage medium of claim 15 , the method further comprises:

determining whether a third accessing request in an instruction associated with the first accessing request and the second accessing request is received, wherein, a type of the third accessing request is the same as a type of the first accessing request and the second accessing request; and

providing the first data and the second data to the target device in response to determining that the third accessing request is not received.

17. The computer readable storage medium of claim 13 , wherein, the first accessing request and the second accessing request are reading requests, and the source device is the storage device.

Assignments (2)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Oct 15, 2021
From: BEIJING BAIDU NETCOM SCIENCE AND TECHNOLOGY CO., LTD.
To: KUNLUNXIN TECHNOLOGY (BEIJING) COMPANY LIMITED
Reel/Frame 058705/0909 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Nov 20, 2019
From: LIANG, ZIHAO; OUYANG, JIAN
To: BEIJING BAIDU NETCOM SCIENCE AND TECHNOLOGY CO., LTD.
Reel/Frame 051064/0636 →
Priority Claims (1)
CN 201811391728.6 · Nov 21, 2018 · national
Continuity (1)
Related Publication 20200159461A1 · May 21, 2020