Data read / write processing method, device and computer-readable storage medium

By determining the address conflict of data read and write requests, the data in the write command queue is directly read, which solves the problem of read command request delay and improves the efficiency and consistency of data read and write processing.

CN113918216BActive Publication Date: 2025-09-30FU TAI HUA IND SHENZHEN +1
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202010664093.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-07-10
Publication Date
2025-09-30
Estimated Expiration
2040-07-10

AI Technical Summary

Technical Problem

In the prior art, when a read command request is executed after a write command request, data reading is delayed.

Method used

By determining whether a data read/write request is a read request and directly reading data corresponding to a write request with an address conflict when the first placement rule is not satisfied, a read operation delay is reduced.

Benefits of technology

It reduces the latency of read operations and optimizes the processing efficiency of data read and write requests by detecting address conflicts, thereby maintaining data consistency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113918216B_ABST
    Figure CN113918216B_ABST
Patent Text Reader

Abstract

A data read / write processing method, device, and computer-readable storage medium, the method comprising: receiving a data read / write request; the data read / write request including a request type, data, and an address; determining whether the data read / write request is a read request; if the data read / write request is a read request, determining whether the data read / write request satisfies a first placement rule; wherein the first placement rule is that an address corresponding to the data read / write request does not conflict with an address corresponding to any write request in a write command queue; and if the data read / write request does not satisfy the first placement rule, directly reading data corresponding to the write request with the conflicting address, thereby reducing data read / write delays.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a data reading / writing processing method, device and computer-readable storage medium. Background Art

[0002] The memory receives read / write command requests from external components such as processors, retrieves the associated data based on the read / write requests, and returns it to the processor or other external component. The memory maintains a read command queue and a write command queue. Command requests in these queues are arranged based on the order of receipt or priority. If a read command request and a write command request correspond to the same address, there's a risk that the read request will be executed after the write request, causing data read delays. Summary of the Invention

[0003] The main purpose of the present invention is to provide a data read / write processing method, device and computer-readable storage medium, aiming to solve the problem of data read / write delay in the prior art.

[0004] A data read / write processing method, the method comprising:

[0005] Receive a data read / write request; the data read / write request includes a request type, data, and address;

[0006] Determining whether the data read / write request is a read request;

[0007] When the data read / write request is a read request, determining whether the data read / write request satisfies a first placement rule; wherein the first placement rule is that an address corresponding to the data read / write request does not conflict with an address corresponding to any write request in the write command queue;

[0008] When the data read / write request does not satisfy the first placement rule, data corresponding to the write request with the address conflict is directly read.

[0009] In addition, to achieve the above-mentioned objectives, the present invention further provides a data read / write processing device, the data read / write processing device comprising a memory and at least one processor, the memory storing at least one instruction, the at least one instruction implementing a corresponding function when executed by the at least one processor, the memory comprising:

[0010] A receiving module, configured to receive a data read / write request, wherein the data read / write request includes a request type, data, and address;

[0011] a judgment module, configured to judge whether the data read / write request is a read request; if the data read / write request is a read request, the judgment module further judges whether the data read / write request satisfies a first placement rule; wherein the first placement rule is to judge whether an address corresponding to the data read / write request and an address corresponding to any write request in a write command queue do not conflict with each other;

[0012] An acquisition module is configured to directly read data corresponding to the write request with an address conflict when the data read or write request does not satisfy the first placement rule.

[0013] In addition, to achieve the above-mentioned object, the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores at least one instruction, and when the at least one instruction is executed by a processor, the following steps are implemented:

[0014] Receive a data read / write request; the data read / write request includes a request type, data, and address;

[0015] Determining whether the data read / write request is a read request;

[0016] When the data read / write request is a read request, determining whether the data read / write request satisfies a first placement rule; wherein the first placement rule is that an address corresponding to the data read / write request does not conflict with an address corresponding to any write request in the write command queue;

[0017] When the data read / write request does not satisfy the first placement rule, data corresponding to the write request with the address conflict is directly read.

[0018] The above-mentioned data read / write processing method, device and storage medium compare the address corresponding to the read request with the address corresponding to the write command request in the write command queue, and directly obtain the corresponding data from the write command queue when there is a conflict, thereby reducing the delay of the read operation. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are merely embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.

[0020] Figure 1 Schematic diagram of a data read / write processing method according to a preferred embodiment of the present invention.

[0021] Figure 2 FIG. 1 is an architecture diagram of a data read / write processing device according to a preferred embodiment of the present invention.

[0022] Figure 3 for Figure 2 Functional module diagram of the data read / write processing system.

[0023] Description of main component symbols

[0024] Data read / write processing device 100

[0025] Processor 106

[0026] Memory 102

[0027] Communication bus 104

[0028] Data read / write processing system 10

[0029] Receiving module 12

[0030] Judgment module 14

[0031] Get Module 16

[0032] Insert module 18

[0033] Steps S10 to S19

[0034] The following specific embodiments will further illustrate the present invention in conjunction with the above-mentioned drawings. DETAILED DESCRIPTION

[0035] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present invention.

[0036] The terms "first," "second," and "third," etc., in the specification and claims of the present invention and the accompanying drawings are used to distinguish between different objects, not to describe a specific order. Furthermore, the terms "comprise," "comprising," and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or apparatus comprising a series of steps or modules is not limited to the listed steps or modules, but may optionally include steps or modules not listed, or may optionally include other steps or modules inherent to the process, method, product, or apparatus.

[0037] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art of the present invention. The terms used in this specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention.

[0038] The specific implementation of the data read / write processing method of the present invention is described below with reference to the accompanying drawings.

[0039] In at least one embodiment of the present invention, the data read / write processing method is applied to a data read / write processing device 100 (eg Figure 2 The data read / write processing method specifically includes the following steps. According to different requirements, the order of the steps in the flowchart can be changed, and some steps can be omitted.

[0040] Step S10: receiving a data read / write request.

[0041] In at least one embodiment of the present invention, the data read and write request may include a command type, data, address, resource identifier, and priority. In at least one embodiment of the present invention, the data read and write request may be executed by the processor 106 (e.g., Figure 2 shown) is produced.

[0042] Step S11, determining whether the data read / write request is a read request.

[0043] Step S12: When the data read / write request is a read request, determine whether the data read / write request satisfies a first placement rule.

[0044] In at least one embodiment of the present invention, the first placement rule is that the address corresponding to the data read / write request does not conflict with the address corresponding to the write request in the write command queue.

[0045] Step S13: When the data read / write request does not satisfy the first placement rule, directly read the data corresponding to the write request with the address conflict.

[0046] Step S14: When the data read / write request satisfies the first placement rule, determine whether the data read / write request satisfies the second placement rule.

[0047] In at least one embodiment of the present invention, the second placement rule is that the resource identifier corresponding to the data read / write request does not conflict with the resource identifier corresponding to the write request in the write command queue.

[0048] Step S15 : When the data read / write request does not satisfy the second placement rule, the data read / write request is stored in the read command queue according to the reception time.

[0049] Step S16: When the data read / write request satisfies the second placement rule, insert the data read / write request into the read command queue according to a third placement rule.

[0050] In at least one embodiment of the present invention, the third placement rule is to insert the data read / write request into the read command queue according to the priority level corresponding to the data read / write request.

[0051] Step S17: When the data read / write request is a write request, determine whether the data read / write request satisfies a fourth placement rule.

[0052] In at least one embodiment of the present invention, the fourth placement rule is that the address and resource identifier corresponding to the data read and write request do not conflict with the address or resource identifier corresponding to any read request in the read command queue.

[0053] Step S18: When the data read / write request does not satisfy the fourth placement rule, the data read / write request is stored in the write command queue according to the reception time.

[0054] Step S19: When the data read / write request satisfies the fourth placement rule, insert the data read / write request into the write command queue according to the fifth placement rule.

[0055] In at least one embodiment of the present invention, the fifth placement rule is to insert the data read / write request into the current write command queue according to the priority level corresponding to the data read / write request.

[0056] The above-mentioned data read / write processing method compares the address corresponding to the read request with the address corresponding to the write request in the write command queue, and directly obtains the corresponding data from the write command queue in the event of a conflict, thereby reducing the delay of the read operation and maintaining data consistency. At the same time, the processing efficiency of data read and write requests is optimized by detecting address conflicts, resource identification conflicts, data conflicts, etc. In addition, the enabling and disabling of multiple placement rules can be set according to needs to achieve flexible adjustment of placement rules. When the second placement rule is effective, when multiple read or write requests access the same address, they are sorted according to the reception time, and the order will not be adjusted due to priority, thereby ensuring data integrity.

[0057] Please also refer to Figure 2 and Figure 3 , Figure 2 The present invention provides an architecture diagram of a data read / write processing device 100. Figure 3This is a block diagram of a data read / write processing system 10 provided by the present invention. The data read / write processing device 100 can be any terminal with network connection capabilities. For example, the data read / write processing device 100 can be a mobile device such as a personal computer, tablet computer, smart phone, personal digital assistant (PDA), game console, interactive network television (Internet Protocol Television, IPTV), smart wearable device, navigation device, etc., or a fixed device such as a desktop computer, digital TV, etc. The data read / write processing device 100 includes a memory 102, a communication bus 104, and a processor 106.

[0058] The memory 102 is used to store program code. The memory 102 can be a circuit with a storage function that does not have a physical form in an integrated circuit, such as a memory stick, a TF card (Trans-flash Card), a smart media card (smart media card), a secure digital card (secure digital card), a flash memory card (flash card) and other storage devices. The memory 102 can communicate data with the processor 106 via a communication bus 104. The memory 102 may include an operating system and a data read / write processing system 10. The operating system is a program that manages and controls the hardware and software resources of the data read / write processing device 100, and supports the operation of the data read / write processing system and other software and / or programs.

[0059] The processor 106 may include one or more microprocessors or digital processors. The processor 106 may call the program code stored in the memory 102 to execute related functions. For example, Figure 2 Each module described is a program code stored in the memory 102 and executed by the processor 106 to implement a data read / write processing method. The processor 106, also known as the central processing unit (CPU), is a large-scale integrated circuit that serves as both the computing core and the control unit.

[0060] In at least one embodiment of the present invention, the data read / write processing system 10 includes one or more modules, and the one or more modules are executed by at least one or more processors 106 to implement data read / write processing functions.

[0061] In at least one embodiment of the present invention, the data read / write processing system 10 includes:

[0062] The receiving module 12 is configured to receive a data read / write request.

[0063] In at least one embodiment of the present invention, the data read / write request may include a command type, data, address, resource identifier, and priority. In at least one embodiment of the present invention, the data read / write request may be generated by the processor 106 .

[0064] The judgment module 14 is configured to judge whether the data read / write request is a read request. If the data read / write request is a read request, the judgment module 14 further judges whether the data read / write request satisfies a first placement rule.

[0065] In at least one embodiment of the present invention, the first placement rule is that the address corresponding to the data read / write request does not conflict with the address corresponding to the write request in the write command queue.

[0066] The acquisition module 16 is configured to directly read data corresponding to the write request with the address conflict when the data read / write request does not satisfy the first placement rule.

[0067] When the data read / write request satisfies the first placement rule, it is determined whether the data read / write request satisfies a second placement rule.

[0068] In at least one embodiment of the present invention, the second placement rule is that the resource identifier corresponding to the data read / write request does not conflict with the resource identifier corresponding to the write request in the write command queue.

[0069] The insertion module 18 is configured to store the data read / write request in the read command queue according to a reception time when the data read / write request does not satisfy the second placement rule. If the data read / write request satisfies the second placement rule, the insertion module 18 further inserts the data read / write request into the read command queue according to a third placement rule.

[0070] In at least one embodiment of the present invention, the third placement rule is to insert the data read / write request into the read command queue according to the priority level corresponding to the data read / write request.

[0071] When the data read / write request is a write request, the determination module 14 further determines whether the data read / write request satisfies a fourth placement rule.

[0072] In at least one embodiment of the present invention, the fourth placement rule is that the address and resource identifier corresponding to the data read and write request do not conflict with the address or resource identifier corresponding to any read request in the read command queue.

[0073] When the data read / write request does not satisfy the fourth placement rule, the insertion module 18 further stores the data read / write request in the write command queue according to the reception time.

[0074] When the data read / write request satisfies the fourth placement rule, the insertion module 18 further inserts the data read / write request into the write command queue according to a fifth placement rule.

[0075] In at least one embodiment of the present invention, the fifth placement rule is to insert the data read / write request into the current write command queue according to the priority level corresponding to the data read / write request.

[0076] The above-mentioned data read / write processing device 100 compares the address corresponding to the read request with the address corresponding to the write request in the write command queue, and directly obtains the corresponding data from the write command queue when there is a conflict, thereby reducing the delay of the read operation and maintaining data consistency. At the same time, the processing efficiency of data read and write requests is optimized by detecting address conflicts, resource identification conflicts, data conflicts, etc. In addition, the enabling and disabling of multiple placement rules can be set according to needs to achieve flexible adjustment of placement rules. When the second placement rule is effective, when multiple read or write requests access the same address, they are sorted according to the reception time, and the order will not be adjusted due to priority, thereby ensuring data integrity.

[0077] The present invention also provides a storage medium. The storage medium is a computer-readable storage medium. The computer-readable storage medium stores computer instructions. The computer instructions can be stored in the memory 102, and when executed by one or more processors 106, the data reading / writing processing method based on the high-precision map as described in the above method embodiment is implemented, for example Figure 1 S10-S19 shown are not repeated here.

[0078] It should be noted that for the aforementioned method embodiments, for simplicity of description, they are all expressed as a series of action combinations. However, those skilled in the art should be aware that the present invention is not limited by the order of the actions described, because according to the present invention, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in this specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present invention.

[0079] In the several embodiments provided in this application, it should be understood that the disclosed devices can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the modules is merely a logical function division. In actual implementation, there may be other division methods, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, and the indirect coupling or communication connection of devices or modules can be electrical or other forms.

[0080] The modules described as separate components may or may not be physically separate, and the components shown as modules may or may not be physical modules, that is, they may be located in one place or distributed across multiple network modules. Some or all of the modules may be selected to achieve the purpose of the present embodiment according to actual needs.

[0081] In addition, the functional modules in the various embodiments of the present invention may be integrated into a single processor, or each module may exist physically separately, or two or more modules may be integrated into a single module. The aforementioned integrated modules may be implemented in the form of hardware or software functional modules.

[0082] If the integrated module is implemented as a software functional module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the portion that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes a number of instructions for causing a computer device (such as a personal computer, server, or network device) to execute all or part of the steps of the method described in various embodiments of the present invention.

[0083] It should also be noted that, in this document, the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or apparatus comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or apparatus comprising the element.

[0084] As described above, the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that the technical solutions described in the above embodiments can still be modified, or some of the technical features thereof can be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A data read / write processing method, characterized in that: The method includes: Receive a data read / write request; the data read / write request includes a request type, data, and address; Determining whether the data read / write request is a read request; When the data read / write request is a read request, determining whether the data read / write request satisfies a first placement rule; wherein the first placement rule is that an address corresponding to the data read / write request does not conflict with an address corresponding to any write request in the write command queue; When the data read / write request does not satisfy the first placement rule, directly reading the data corresponding to the write request with the address conflict; The data read / write request further includes a resource identifier; the data read / write processing method further includes: When the data read / write request satisfies the first placement rule, further determining whether the data read / write request satisfies a second placement rule; wherein the second placement rule is that the resource identifier corresponding to the data read / write request does not conflict with the resource identifier corresponding to any read request in the read command queue; When the data read / write request does not satisfy the second placement rule, the data read / write request is stored in the read command queue according to a reception time.

2. The data reading / writing processing method according to claim 1, wherein: The data read / write request further includes a priority identifier; the data read / write processing method further includes: When the data read / write request satisfies the second placement rule, inserting the data read / write request into the read command queue according to a third placement rule; The third placement rule is to insert the data read / write request into the read command queue according to the priority level corresponding to the data read / write request.

3. The data reading / writing processing method according to claim 1, wherein: The data read / write request further includes a resource identifier; the data read / write processing method further includes: When the data read / write request is a write request, determining whether the data read / write request satisfies a fourth placement rule; wherein the fourth placement rule is that an address and a resource identifier corresponding to the data read / write request do not conflict with an address or a resource identifier corresponding to any read request in the read command queue; When the data read / write request does not satisfy the fourth placement rule, the data read / write request is stored in the write command queue according to a reception time.

4. The data reading / writing processing method according to claim 3, wherein: The data read / write request further includes a priority identifier; the data read / write processing method further includes: When the data read / write request satisfies the fourth placement rule, inserting the data read / write request into the write command queue according to a fifth placement rule; The fifth placement rule is to insert the data read / write request into the current write command queue according to the priority level corresponding to the data read / write request.

5. The data reading / writing processing method according to claim 4, wherein: The first placement rule to the fifth placement rule each correspond to a status identification bar; the status identification bar can be set to an enabled state or a disabled state; in the enabled state, the corresponding placement rule is enabled; in the disabled state, the corresponding placement rule is disabled.

6. A data read / write processing device, comprising a memory and at least one processor, wherein the memory stores at least one instruction that implements a corresponding function when executed by the at least one processor, the memory comprising: A receiving module, configured to receive a data read / write request, wherein the data read / write request includes a request type, data, and address; A judging module, configured to judge whether the data read / write request is a read request; When the data read / write request is a read request, the judgment module further judges whether the data read / write request satisfies a first placement rule; wherein the first placement rule is to judge whether an address corresponding to the data read / write request and an address corresponding to any write request in the write command queue do not conflict with each other; an acquisition module, configured to directly read data corresponding to the write request with an address conflict when the data read or write request does not satisfy the first placement rule; The data read and write processing device also includes an insertion module; the data read and write request further includes a resource identifier; when the data read and write request satisfies the first placement rule, the judgment module further determines whether the data read and write request satisfies the second placement rule; wherein, the second placement rule is that the resource identifier corresponding to the data read and write request does not conflict with the resource identifier corresponding to any read request in the read command queue; when the data read and write request does not satisfy the second placement rule, the insertion module further stores the data read and write request in the read command queue according to the reception time.

7. The data read / write processing device according to claim 6, wherein: The first placement rule and the second placement rule each correspond to a status identification bar; the status identification bar can be set to an enabled state or a disabled state; in the enabled state, the corresponding placement rule is enabled; in the disabled state, the corresponding placement rule is disabled.

8. A computer-readable storage medium, characterized in that The computer-readable storage medium stores at least one instruction, and when the at least one instruction is executed by a processor, the data reading / writing processing method according to any one of claims 1 to 5 is implemented.

Citation Information

Patent Citations

  • Data storage management method and device

    CN103543954A