TWI758778B - Data read-write processing method, apparatus, and computer readable storage medium thereof - Google Patents

Data read-write processing method, apparatus, and computer readable storage medium thereof Download PDF

Info

Publication number
TWI758778B
TWI758778B TW109123484A TW109123484A TWI758778B TW I758778 B TWI758778 B TW I758778B TW 109123484 A TW109123484 A TW 109123484A TW 109123484 A TW109123484 A TW 109123484A TW I758778 B TWI758778 B TW I758778B
Authority
TW
Taiwan
Prior art keywords
data read
write
read
write request
placement rule
Prior art date
Application number
TW109123484A
Other languages
Chinese (zh)
Other versions
TW202203043A (en
Inventor
高一郎
Original Assignee
鴻海精密工業股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 鴻海精密工業股份有限公司 filed Critical 鴻海精密工業股份有限公司
Priority to TW109123484A priority Critical patent/TWI758778B/en
Publication of TW202203043A publication Critical patent/TW202203043A/en
Application granted granted Critical
Publication of TWI758778B publication Critical patent/TWI758778B/en

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The present disclosure relates to a data write or read processing method, an apparatus, and a computer readable storage medium thereof. The method includes: receiving a data read-write command; the data read-write command includes a request type, data, and address; determining whether the read-write command is a read command; determining the read command matches with a first placing rule when the read-write command is the read command; the first placing rule is that there is no address conflict between the address corresponding to the read command and the address corresponding to a write command in a write sequence; acquiring the data corresponding to the write command, the address of which is conflicted with the address of the read command, when the read command does not match with the first placing rule thus a reading/writing speed is improved.

Description

資料讀/寫處理方法、裝置及電腦可讀存儲介質 Data read/write processing method, device and computer-readable storage medium

本發明涉及一種資料讀/寫處理方法、裝置及電腦可讀存儲介質。 The present invention relates to a data read/write processing method, device and computer-readable storage medium.

記憶體用於接收處理器等外部元件傳送的讀/寫命令請求,根據讀/寫請求獲取相關聯的資料並返回給處理器等外部元件。記憶體記憶體在讀取命令隊列和寫入命令隊列。讀取命令隊列和寫入命令隊列中的命令請求根據接收時間順序或優先權等規則進行排列。當讀取命令請求與寫入命令請求對應相同的位址時,存在讀取命令請求在寫入命令請求後執行,進而造成資料讀取的延遲。 The memory is used to receive read/write command requests sent by external components such as processors, obtain related data according to the read/write requests, and return them to external components such as processors. Memory memory is in the read command queue and write command queue. Command requests in the read command queue and write command queue are arranged according to rules such as order of receipt or priority. When the read command request and the write command request correspond to the same address, the read command request is executed after the write command request, thereby causing a delay in data reading.

本發明的主要目的是提供一種資料讀/寫處理方法、裝置及電腦可讀存儲介質,旨在解決現有技術中資料讀取/寫入延遲的問題。 The main purpose of the present invention is to provide a data read/write processing method, device and computer-readable storage medium, aiming at solving the problem of data read/write delay in the prior art.

一種資料讀/寫處理方法,該方法包括:接收資料讀寫請求;所述資料讀寫請求包括請求類型、資料以及位址;判斷所述資料讀寫請求是否為讀請求;在所述資料讀寫請求為讀請求時,判斷所述資料讀寫請求是否滿足第一放置規則;其中,所述第一放置規則為所述資料讀寫請求對應的位址與寫入命令隊列中任意一個寫請求對應的位址互不衝突; 在所述資料讀寫請求不滿足所述第一放置規則時,直接讀取位址衝突的所述寫請求對應的資料。 A data read/write processing method, the method comprising: receiving a data read/write request; the data read/write request includes a request type, data and an address; judging whether the data read/write request is a read request; When the write request is a read request, determine whether the data read/write request satisfies the first placement rule; wherein, the first placement rule is the address corresponding to the data read/write request and any one write request in the write command queue The corresponding addresses do not conflict with each other; When the data read/write request does not satisfy the first placement rule, the data corresponding to the write request with the conflicting address is directly read.

此外,為了實現上述目的,本發明還提出一種資料讀/寫處理裝置,所述資料讀/寫處理裝置包括記憶體和至少一個處理器,所述記憶體中存儲有至少一個指令,所述至少一個指令被所述至少一個處理器執行時實現對應功能,所述記憶體包括:接收模組,用於接收資料讀寫請求;所述資料讀寫請求包括請求類型、資料以及位址;判斷模組,用於判斷所述資料讀寫請求是否為讀請求;在所述資料讀寫請求為讀請求時,所述判斷模組進一步地判斷所述資料讀寫請求是否滿足第一放置規則;其中,所述第一放置規則為判斷所述資料讀寫請求對應的位址與寫入命令隊列中任意一個寫請求對應的位址互不衝突;獲取模組,用於在所述資料讀寫請求不滿足所述第一放置規則時,直接讀取位址衝突的所述寫請求對應的資料。 In addition, in order to achieve the above object, the present invention also provides a data read/write processing device, the data read/write processing device includes a memory and at least one processor, the memory stores at least one instruction, and the at least one instruction is stored in the memory. When an instruction is executed by the at least one processor, a corresponding function is realized, and the memory includes: a receiving module for receiving a data read/write request; the data read/write request includes a request type, data, and an address; the judgment module group, for judging 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 the first placement rule; wherein , the first placement rule is to judge that the address corresponding to the data read/write request does not conflict with the address corresponding to any one write request in the write command queue; the acquisition module is used for the data read/write request When the first placement rule is not satisfied, the data corresponding to the write request with the conflicting address is directly read.

此外,為了實現上述目的,本發明還提出一種電腦可讀存儲介質,所述電腦可讀存儲介質存儲有至少一個指令,所述至少一個指令被處理器執行時實現如下步驟:接收資料讀寫請求;所述資料讀寫請求包括請求類型、資料以及位址;判斷所述資料讀寫請求是否為讀請求;在所述資料讀寫請求為讀請求時,判斷所述資料讀寫請求是否滿足第一放置規則;其中,所述第一放置規則為所述資料讀寫請求對應的位址與寫入命令隊列中任意一個寫請求對應的位址互不衝突;在所述資料讀寫請求不滿足所述第一放置規則時,直接讀取位址衝突的所述寫請求對應的資料。 In addition, in order to achieve the above purpose, the present invention also proposes 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 the processor, the following steps are implemented: receiving a data read/write request The data read and write request includes request type, data and address; judge whether the data read and write request is a read request; when the data read and write request is a read request, judge whether the data read and write request satisfies the first A placement rule; wherein, the first placement rule is that the address corresponding to the data read/write request does not conflict with the address corresponding to any write request in the write command queue; if the data read/write request is not satisfied In the first placement rule, the data corresponding to the write request with the conflicting address is directly read.

上述資料讀/寫處理方法、裝置及存儲介質,將讀請求對應的位址與寫入命令隊列中寫入命令請求對應的位址進行比較,在衝突時直接從寫入命令隊列中獲取對應的資料,降低了讀取操作的延遲。 The above 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 address from the write command queue in the event of a conflict. data, reducing the latency of read operations.

100:資料讀/寫處理裝置 100: Data read/write processing device

106:處理器 106: Processor

102:記憶體 102: Memory

104:通訊匯流排 104: Communication bus

10:資料讀/寫處理系統 10: Data read/write processing system

12:接收模組 12: Receive module

14:判斷模組 14: Judgment Module

16:獲取模組 16: Get Mods

18:***模組 18: Insert the module

S10-S19:步驟 S10-S19: Steps

圖1為本發明較佳實施例的資料讀/寫處理方法的示意圖。 FIG. 1 is a schematic diagram of a data read/write processing method according to a preferred embodiment of the present invention.

圖2為本發明較佳實施例的資料讀/寫處理裝置的架構圖。 FIG. 2 is a structural diagram of a data read/write processing apparatus according to a preferred embodiment of the present invention.

圖3為圖2中資料讀/寫處理系統的功能模組圖。 FIG. 3 is a functional module diagram of the data read/write processing system in FIG. 2 .

為了使本技術領域的人員更好地理解本發明方案,下面將結合本發明實施例中的附圖,對本發明實施例中的技術方案進行清楚、完整地描述,顯然,所描述的實施例僅僅是本發明一部分的實施例,而不是全部的實施例。基於本發明中的實施例,本領域普通技術人員在沒有做出創造性勞動前提下所獲得的所有其他實施例,都應當屬於本發明保護的範圍。 In order to make those skilled in the art 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 with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only Embodiments are part of the present invention, but not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

本發明的說明書及上述附圖中的術語「第一」、「第二」和「第三」等是用於區別不同物件,而非用於描述特定順序。此外,術語「包括」以及它們任何變形,意圖在於覆蓋不排他的包含。例如包含了一系列步驟或模組的過程、方法、系統、產品或設備沒有限定於已列出的步驟或模組,而是可選地還包括沒有列出的步驟或模組,或可選地還包括對於這些過程、方法、產品或設備固有的其它步驟或模組。 The terms "first", "second" and "third" in the description of the present invention and the above-mentioned drawings are used to distinguish different items, rather than to describe a specific order. Furthermore, the term "comprising" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device comprising a series of steps or modules is not limited to the listed steps or modules, but may optionally also include unlisted steps or modules, or alternatively It also includes other steps or modules inherent to these processes, methods, products or devices.

下面結合附圖對本發明資料讀/寫處理方法的具體實施方式進行說明。 The specific embodiments of the data read/write processing method of the present invention will be described below with reference to the accompanying drawings.

本發明的至少一個實施例中,所述資料讀/寫處理方法應用於資料讀/寫處理裝置100(如圖2所示)。所述資料讀/寫處理方法具體包括以下步驟,根據不同的需求,該流程圖中步驟的順序可以改變,某些步驟可以省略。 In at least one embodiment of the present invention, the data read/write processing method is applied to the data read/write processing apparatus 100 (as shown in FIG. 2 ). The data read/write processing method specifically includes the following steps. According to different requirements, the sequence of the steps in the flowchart can be changed, and some steps can be omitted.

步驟S10,接收資料讀寫請求。 Step S10, receiving a data read/write request.

在本發明的至少一個實施例中,所述資料讀寫請求可包括命令類型、資料、位址、資源標識以及優先順序。在本發明的至少一個實施例中,所述資料讀寫請求可以由處理器106(如圖2所示)產生。 In at least one embodiment of the present invention, the data read/write request may include command type, data, address, resource identifier, and priority. In at least one embodiment of the present invention, the data read and write requests may be generated by processor 106 (shown in FIG. 2 ).

步驟S11,判斷所述資料讀寫請求是否為讀請求。 Step S11, judging whether the data read/write request is a read request.

步驟S12,在所述資料讀寫請求為讀請求時,判斷所述資料讀寫請求是否滿足第一放置規則。 Step S12, when the data read/write request is a read request, determine whether the data read/write request satisfies the first placement rule.

在本發明的至少一個實施例中,所述第一放置規則為所述資料讀寫請求對應的位址與寫入命令隊列中寫請求對應的位址互不衝突。 In at least one embodiment of the present invention, the first placement rule is that the address corresponding to the data read/write request and the address corresponding to the write request in the write command queue do not conflict with each other.

步驟S13,在所述資料讀寫請求不滿足所述第一放置規則時,直接讀取位址衝突的所述寫請求對應的資料。 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 conflicting addresses.

步驟S14,在所述資料讀寫請求滿足所述第一放置規則時,判斷所述資料讀寫請求是否滿足第二放置規則。 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.

在本發明的至少一個實施例中,所述第二放置規則為所述資料讀寫請求對應的資源標識與寫入命令隊列中寫請求對應的資源標識互不衝突。 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 and the resource identifier corresponding to the write request in the write command queue do not conflict with each other.

步驟S15,在所述資料讀寫請求不滿足所述第二放置規則時,根據接收時間將所述資料讀寫請求存儲至所述讀取命令隊列。 Step S15, when the data read/write request does not meet the second placement rule, store the data read/write request in the read command queue according to the receiving time.

步驟S16,在所述資料讀寫請求滿足所述第二放置規則時,根據第三放置規則將所述資料讀寫請求***至所述讀取命令隊列。 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 the third placement rule.

在本發明的至少一個實施例中,所述第三放置規則為根據所述資料讀寫請求對應的優先等級將所述資料讀寫請求***至所述讀取命令隊列中。 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.

步驟S17,在所述資料讀寫請求為寫請求時,判斷所述資料讀寫請求是否滿足第四放置規則。 Step S17, when the data read/write request is a write request, determine whether the data read/write request satisfies the fourth placement rule.

在本發明的至少一個實施例中,所述第四放置規則為所述資料讀寫請求對應的位址和資源標識與所述讀取命令隊列中任意一個讀請求對應的位址或資源標識互不衝突。 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/write request and the address or resource identifier corresponding to any read request in the read command queue are mutually exclusive. Do not conflict.

步驟S18,在所述資料讀寫請求不滿足所述第四放置規則時,根據接收時間將所述資料讀寫請求存儲至所述寫入命令隊列。 Step S18, when the data read/write request does not satisfy the fourth placement rule, store the data read/write request in the write command queue according to the receiving time.

步驟S19,在所述資料讀寫請求滿足所述第四放置規則時,根據第五放置規則將所述資料讀寫請求***至所述寫入命令隊列。 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.

在本發明的至少一個實施例中,所述第五放置規則為根據所述資料讀寫請求對應的優先等級將所述資料讀寫請求***至當前所述寫入命令隊列中。 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.

上述資料讀/寫處理方法,將讀請求對應的位址與寫入命令隊列中寫入請求對應的位址進行比較,在衝突時直接從寫入命令隊列中獲取對應的資料,降低了讀取操作的延遲,並保持資料的一致性。同時,藉由檢測位址衝突、資源標識衝突、資料衝突等優化了資料讀寫請求的處理效率。另外,可根據需求設置多個放置規則的啟用和禁用,實現放置規則的靈活調整。在第二放置規則有效時,多個讀取或寫入請求訪問相同的位址時,按照接收時間進行排序,並不會因為優先權調整順序,可保證資料完整性。 The above 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, reducing read operational delays and maintain data consistency. At the same time, the processing efficiency of data read and write requests is optimized by detecting address conflicts, resource identifier conflicts, and data conflicts. In addition, the enabling and disabling of multiple placement rules can be set as required to achieve flexible adjustment of placement rules. When the second placement rule is valid, when multiple read or write requests access the same address, they are sorted according to the receiving time, and the order will not be adjusted due to priority, which can ensure data integrity.

請一併參閱圖2及圖3,圖2為本發明提供一種資料讀/寫處理裝置100的架構圖,圖3為本發明提供的一種資料讀/寫處理系統10的模組圖。所 述資料讀/寫處理裝置100可以是任意具有網路連接功能的終端,例如,所述資料讀/寫處理裝置100可以為個人電腦、平板電腦、智慧手機、個人數位助理(Personal Digital Assistant,PDA)、遊戲機、互動式網路電視(Internet Protocol Television,IPTV)、智慧式穿戴式設備、導航裝置等等的可移動設備,或者臺式電腦、數位TV等等固定設備。所述資料讀/寫處理裝置100包括記憶體102、通信匯流排104以及處理器106。 Please refer to FIG. 2 and FIG. 3 together. FIG. 2 is a structural diagram of a data read/write processing device 100 provided by the present invention, and FIG. 3 is a module diagram of a data read/write processing system 10 provided by the present invention. Place The data read/write processing device 100 can be any terminal with a network connection function, for example, the data read/write processing device 100 can be a personal computer, a tablet computer, a smart phone, a Personal Digital Assistant (PDA) ), game consoles, Internet Protocol Television (IPTV), mobile devices such as smart wearable devices, navigation devices, etc., or fixed devices such as desktop computers and digital TVs. The data read/write processing device 100 includes a memory 102 , a communication bus 104 and a processor 106 .

所述記憶體102用於存儲程式。所述記憶體102可以是積體電路中沒有實物形式的具有存儲功能的電路,如記憶體條、TF卡(Trans-flash Card)、智慧媒體卡(smart media card)、安全數位卡(secure digital card)、快閃記憶體卡(flash card)等儲存設備。所述記憶體102可藉由通信匯流排104與處理器106進行資料通信。所述記憶體102中可以包括作業系統以及資料讀/寫處理系統10。作業系統是管理和控制資料讀/寫處理裝置100的硬體和軟體資源的程式,支援資料讀/寫處理系統以及其它軟體和/或程式的運行。 The memory 102 is used to store programs. The memory 102 may be a circuit with a storage function that has no 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). card), flash memory card (flash card) and other storage devices. The memory 102 is in data communication with the processor 106 via the 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.

所述處理器106可以包括一個或者多個微處理器、數字處理器。所述處理器106可調用所述記憶體102中存儲的程式碼以執行相關的功能。例如,圖2中所述的各個模組是存儲在所述記憶體102中的程式碼,並由所述處理器106所執行,以實現一種資料讀/寫處理方法。所述處理器106又稱中央處理器(CPU,Central Processing Unit),是一塊超大規模的積體電路,是運算核心(Core)和控制核心(Control Unit)。 The processor 106 may include one or more microprocessors, digital processors. The processor 106 can invoke the program codes stored in the memory 102 to perform the relevant functions. For example, each module described in FIG. 2 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 a central processing unit (CPU, Central Processing Unit), is an ultra-large-scale integrated circuit, and is a computing core (Core) and a control core (Control Unit).

在本發明的至少一個實施例中,所述資料讀/寫處理系統10包括一個或多個模組,所述一個或多個模組由至少一個或多個處理器106執行,以實現資料讀/寫處理功能。 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 realize data read /Write processing function.

在本發明的至少一個實施例中,所述資料讀/寫處理系統10包括: 接收模組12,用於接收資料讀寫請求。 In at least one embodiment of the present invention, the data read/write processing system 10 includes: The receiving module 12 is used for receiving data read and write requests.

在本發明的至少一個實施例中,所述資料讀寫請求可包括命令類型、資料、位址、資源標識以及優先順序。在本發明的至少一個實施例中,所述資料讀寫請求可以由所述處理器106產生。 In at least one embodiment of the present invention, the data read/write request may include command type, data, address, resource identifier, and priority. In at least one embodiment of the present invention, the data read and write requests may be generated by the processor 106 .

判斷模組14,用於判斷所述資料讀寫請求是否為讀請求。在所述資料讀寫請求為讀請求時,所述判斷模組14進一步地判斷所述資料讀寫請求是否滿足第一放置規則。 The judgment module 14 is used for judging whether the data read/write request is a read request. When the data read/write request is a read request, the judgment module 14 further judges whether the data read/write request satisfies the first placement rule.

在本發明的至少一個實施例中,所述第一放置規則為所述資料讀寫請求對應的位址與寫入命令隊列中寫請求對應的位址互不衝突。 In at least one embodiment of the present invention, the first placement rule is that the address corresponding to the data read/write request and the address corresponding to the write request in the write command queue do not conflict with each other.

獲取模組16,用於在所述資料讀寫請求不滿足所述第一放置規則時直接讀取位址衝突的所述寫請求對應的資料。 The obtaining module 16 is configured to directly read the data corresponding to the write request with conflicting addresses when the data read/write request does not satisfy the first placement rule.

在所述資料讀寫請求滿足所述第一放置規則時,判斷所述資料讀寫請求是否滿足第二放置規則。 When the data read/write request satisfies the first placement rule, it is determined whether the data read/write request satisfies the second placement rule.

在本發明的至少一個實施例中,所述第二放置規則為所述資料讀寫請求對應的資源標識與寫入命令隊列中寫請求對應的資源標識互不衝突。 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 and the resource identifier corresponding to the write request in the write command queue do not conflict with each other.

***模組18,用於在所述資料讀寫請求不滿足所述第二放置規則時根據接收時間將所述資料讀寫請求存儲至所述讀取命令隊列。在所述資料讀寫請求滿足所述第二放置規則時,所述***模組18進一步地根據第三放置規則將所述資料讀寫請求***至所述讀取命令隊列。 The insertion module 18 is configured to store the data read/write request in the read command queue according to the receiving time when the data read/write request does not satisfy the second placement rule. When the data read/write request satisfies the second placement rule, the inserting module 18 further inserts the data read/write request into the read command queue according to the third placement rule.

在本發明的至少一個實施例中,所述第三放置規則為根據所述資料讀寫請求對應的優先等級將所述資料讀寫請求***至所述讀取命令隊列中。 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.

在所述資料讀寫請求為寫請求時,所述判斷模組14進一步地判斷所述資料讀寫請求是否滿足第四放置規則。 When the data read/write request is a write request, the judgment module 14 further judges whether the data read/write request satisfies the fourth placement rule.

在本發明的至少一個實施例中,所述第四放置規則為所述資料讀寫請求對應的位址和資源標識與所述讀取命令隊列中任意一個讀請求對應的位址或資源標識互不衝突。 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/write request and the address or resource identifier corresponding to any read request in the read command queue are mutually exclusive. Do not conflict.

在所述資料讀寫請求不滿足所述第四放置規則時,所述***模組18進一步地根據接收時間將所述資料讀寫請求存儲至所述寫入命令隊列。 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 receiving time.

在所述資料讀寫請求滿足所述第四放置規則時,所述***模組18進一步地根據第五放置規則將所述資料讀寫請求***至所述寫入命令隊列。 When the data read/write request satisfies the fourth placement rule, the inserting module 18 further inserts the data read/write request into the write command queue according to the fifth placement rule.

在本發明的至少一個實施例中,所述第五放置規則為根據所述資料讀寫請求對應的優先等級將所述資料讀寫請求***至當前所述寫入命令隊列中。 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.

上述資料讀/寫處理裝置100,將讀請求對應的位址與寫入命令隊列中寫入請求對應的位址進行比較,在衝突時直接從寫入命令隊列中獲取對應的資料,降低了讀取操作的延遲,並保持資料的一致性。同時,藉由檢測位址衝突、資源標識衝突、資料衝突等優化了資料讀寫請求的處理效率。另外,可根據需求設置多個放置規則的啟用和禁用,實現放置規則的靈活調整。在第二放置規則有效時,多個讀取或寫入請求訪問相同的位址時,按照接收時間進行排序,並不會因為優先權調整順序,可保證資料完整性。 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 in the event of a conflict, reducing the number of read requests. Take the latency of the operation and maintain the consistency of the data. At the same time, the processing efficiency of data read and write requests is optimized by detecting address conflicts, resource identifier conflicts, and data conflicts. In addition, the enabling and disabling of multiple placement rules can be set as required to achieve flexible adjustment of placement rules. When the second placement rule is valid, when multiple read or write requests access the same address, they are sorted according to the receiving time, and the order will not be adjusted due to priority, which can ensure data integrity.

本發明還提供一種存儲介質。所述存儲介質為電腦可讀存儲介質。所述電腦可讀存儲介質上存儲有電腦指令。所述電腦指令可被存儲於記憶體102上,且當被一個或多個處理器106執行時,從而實現如上文方法實施 例所述的基於高精地圖的資料讀/寫處理方法,例如圖1所示的S10-S19,在此不再贅述。 The present invention also provides a storage medium. The storage medium is a computer-readable storage medium. Computer instructions are stored on the computer-readable storage medium. The computer instructions may be stored on memory 102 and, when executed by one or more processors 106, implement methods as described above For example, the data read/write processing method based on the high-precision map, such as S10-S19 shown in FIG. 1, will not be repeated here.

需要說明的是,對於前述的各方法實施例,為了簡單描述,故將其都表述為一系列的動作組合,但是本領域技術人員應該知悉,本發明並不受所描述的動作順序的限制,因為依據本發明,某些步驟可以採用其他順序或者同時進行。其次,本領域技術人員也應該知悉,說明書中所描述的實施例均屬於優選實施例,所涉及的動作和模組並不一定是本發明所必須的。 It should be noted that, for the sake of simple description, the foregoing method embodiments are all expressed as a series of action combinations, but those skilled in the art should know that the present invention is not limited by the described action sequence. As in accordance with the present invention, certain steps may be performed in other orders or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present invention.

在本申請所提供的幾個實施例中,應該理解到,所揭露的裝置,可藉由其它的方式實現。例如,以上所描述的裝置實施例僅僅是示意性的,例如所述模組的劃分,僅僅為一種邏輯功能劃分,實際實現時可以有另外的劃分方式,例如多個模組或元件可以結合或者可以集成到另一個系統,或一些特徵可以忽略,或不執行。另一點,所顯示或討論的相互之間的耦合或直接耦合或通信連接可以是藉由一些介面,裝置或模組的間接耦合或通信連接,可以是電性或其它的形式。 In the several embodiments provided in this application, it should be understood that the disclosed apparatus may be implemented in other manners. For example, the device embodiments described above are only illustrative. For example, the division of the modules is only a logical function division. In actual implementation, there may be other division methods. For example, multiple modules or components may be combined or Can be integrated into another system, or some features can be ignored, or not implemented. On the other hand, the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or modules, and may be electrical or other forms.

所述作為分離部件說明的模組可以是或者也可以不是物理上分開的,作為模組顯示的部件可以是或者也可以不是物理模組,即可以位於一個地方,或者也可以分佈到多個網路模組上。可以根據實際的需要選擇其中的部分或者全部模組來實現本實施例方案的目的。 The modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules, that is, they may be located in one place, or may be distributed to multiple networks. on the road module. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution in this embodiment.

另外,在本發明的各個實施例中的各功能模組可以集成在一個處理器中,也可以是各個模組單獨物理存在,也可以兩個或兩個以上模組集成在一個模組中。上述集成的模組既可以採用硬體的形式實現,也可以採用軟體功能模組的形式實現。 In addition, each functional module in each embodiment of the present invention may be integrated into one processor, or each module may exist physically alone, or two or more modules may be integrated into one module. The above-mentioned integrated modules can be implemented in the form of hardware, or can be implemented in the form of software function modules.

所述集成的模組如果以軟體功能模組的形式實現並作為獨立的產品銷售或使用時,可以存儲在一個電腦可讀取存儲介質中。基於這樣的理解,本發明的技術方案本質上或者說對現有技術做出貢獻的部分或者該技術方案的全部或部分可以以軟體產品的形式體現出來,該電腦軟體產品存儲在一個存儲介質中,包括若干指令用以使得一台電腦設備(可為個人電腦、伺服器或者網路設備等)執行本發明各個實施例所述方法的全部或部分步驟。 If the integrated module is implemented in the form of a software function 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 is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, Several instructions are included to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention.

還需要說明的是,在本文中,術語「包括」、「包含」或者其任何其他變體意在涵蓋非排他性的包含,從而使得包括一系列要素的過程、方法、物品或者裝置不僅包括那些要素,而且還包括沒有明確列出的其他要素,或者是還包括為這種過程、方法、物品或者裝置所固有的要素。在沒有更多限制的情況下,由語句「包括一個......」限定的要素,並不排除在包括該要素的過程、方法、物品或者裝置中還存在另外的相同要素。 It should also be noted that, herein, the terms "comprising", "comprising" or any other variation thereof are intended to encompass non-exclusive inclusion, such that a process, method, article or device comprising a series of elements includes not only those elements , but also other elements not expressly listed or inherent to such a process, method, article or apparatus. Without further limitation, an element qualified by the phrase "comprising a..." does not preclude the presence of additional identical elements in a process, method, article or apparatus that includes the element.

以上所述,以上實施例僅用以說明本發明的技術方案,而非對其限制;儘管參照前述實施例對本發明進行了詳細的說明,本領域的普通技術人員應當理解:其依然可以對前述各實施例所記載的技術方案進行修改,或者對其中部分技術特徵進行等同替換;而這些修改或者替換,並不使相應技術方案的本質脫離本發明各實施例技術方案的範圍。 As mentioned above, the above embodiments are only used to illustrate the technical solutions of the present invention, but not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand: The technical solutions described in the embodiments are modified, or some technical features thereof are equivalently replaced; and these modifications or replacements do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.

綜上所述,本發明符合發明專利要件,爰依法提出專利申請。惟,以上所述者僅為本發明之較佳實施方式,舉凡熟悉本案技藝之人士,在爰依本案創作精神所作之等效修飾或變化,皆應包含於以下之申請專利範圍內。 To sum up, the present invention complies with the requirements of an invention patent, and a patent application can be filed in accordance with the law. However, the above descriptions are only the preferred embodiments of the present invention, and for those who are familiar with the techniques of this case, equivalent modifications or changes made in accordance with the creative spirit of this case should be included within the scope of the following patent application.

S10-S19:步驟 S10-S19: Steps

Claims (8)

一種資料讀/寫處理方法,所述資料讀/寫處理方法包括:接收資料讀寫請求;所述資料讀寫請求包括請求類型、資料、位址以及資源標識;判斷所述資料讀寫請求是否為讀請求;在所述資料讀寫請求為讀請求時,判斷所述資料讀寫請求是否滿足第一放置規則;其中,所述第一放置規則為所述資料讀寫請求對應的位址與寫入命令隊列中任意一個寫請求對應的位址互不衝突;在所述資料讀寫請求不滿足所述第一放置規則時,直接讀取位址衝突的所述寫請求對應的資料;在所述資料讀寫請求滿足所述第一放置規則時,進一步判斷所述資料讀寫請求是否滿足第二放置規則;其中,所述第二放置規則為所述資料讀寫請求對應的資源標識與讀取命令隊列中的任意一個讀請求對應的資源標識互不衝突;在所述資料讀寫請求不滿足所述第二放置規則時,根據接收時間將所述資料讀寫請求存儲至所述讀取命令隊列。 A data read/write processing method, the data read/write processing method includes: receiving a data read/write request; the data read/write request includes a request type, data, address, and resource identifier; judging whether the data read/write request is is a read request; when the data read/write request is a read request, determine whether the data read/write request satisfies the first placement rule; wherein, the first placement rule is the address corresponding to the data read/write request and The addresses corresponding to any write requests in the write command queue do not conflict with each other; when the data read and write requests do not meet the first placement rule, the data corresponding to the write requests with conflicting addresses are directly read; When the data read/write request satisfies the first placement rule, it is further judged whether the data read/write request satisfies the second placement rule; wherein, the second placement rule is the resource identifier corresponding to the data read/write request and the The resource identifiers corresponding to any read request in the read command queue do not conflict with each other; when the data read/write request does not meet the second placement rule, the data read/write request is stored in the read/write request according to the reception time Fetch the command queue. 如請求項1所述的資料讀/寫處理方法,其中,所述資料讀寫請求還進一步包括優先順序標識;所述資料讀/寫處理方法還包括:在所述資料讀寫請求滿足所述第二放置規則時,根據第三放置規則將所述資料讀寫請求***至所述讀取命令隊列;其中,所述第三放置規則為根據所述資料讀寫請求對應的優先等級將所述資料讀寫請求***至所述讀取命令隊列中。 The data read/write processing method according to claim 1, wherein the data read/write request further includes a priority order identifier; the data read/write processing method further includes: when the data read/write request satisfies the In the second placement rule, insert the data read/write request into the read command queue according to the third placement rule; wherein, the third placement rule is to insert the data read/write request according to the priority level corresponding to the data read/write request Data read and write requests are inserted into the read command queue. 如請求項1所述的資料讀/寫處理方法,其中,所述資料讀寫請求還進一步包括資源標識;所述資料讀/寫處理方法還包括: 在所述資料讀寫請求為寫請求時,判斷所述資料讀寫請求是否滿足第四放置規則;其中,所述第四放置規則為所述資料讀寫請求對應的位址和資源標識與讀取命令隊列中任意一個讀請求對應的位址或資源標識互不衝突;在所述資料讀寫請求不滿足所述第四放置規則時,根據接收時間將所述資料讀寫請求存儲至所述寫入命令隊列。 The data read/write 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, determine whether the data read/write request satisfies the fourth placement rule; wherein, the fourth placement rule is the address and resource identifier corresponding to the data read/write request and the read/write request The addresses or resource identifiers corresponding to any read request in the command queue do not conflict with each other; when the data read/write request does not meet the fourth placement rule, the data read/write request is stored in the Write to the command queue. 如請求項3所述的資料讀/寫處理方法,其中,所述資料讀寫請求還進一步包括優先順序標識;所述資料讀/寫處理方法還包括:在所述資料讀寫請求滿足所述第四放置規則時,根據第五放置規則將所述資料讀寫請求***至所述寫入命令隊列;其中,所述第五放置規則為根據所述資料讀寫請求對應的優先等級將所述資料讀寫請求***至當前所述寫入命令隊列中。 The data read/write processing method according to claim 3, wherein the data read/write request further includes a priority order identifier; the data read/write processing method further includes: when the data read/write request satisfies the In the fourth placement rule, insert the data read/write request into the write command queue according to the fifth placement rule; wherein, the fifth placement rule is to place the data read/write request according to the priority level corresponding to the data read/write request. Data read and write requests are inserted into the current write command queue. 如請求項1至4中任意一項所述的資料讀/寫處理方法,其中,所述第一放置規則至所述第五放置規則分別對應一個狀態標識欄;所述狀態標識欄可設置為啟用狀態或禁用狀態;在所述啟用狀態,對應的所述放置規則被啟用;在所述禁用狀態,對應的所述放置規則被禁用。 The data read/write processing method according to any one of claim items 1 to 4, wherein the first placement rule to the fifth placement rule respectively correspond to a status identification column; the status identification column 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. 一種資料讀/寫處理裝置,所述資料讀/寫處理裝置包括記憶體和至少一個處理器,所述記憶體中存儲有至少一個指令,所述至少一個指令被所述至少一個處理器執行時實現對應功能,所述記憶體包括:接收模組,用於接收資料讀寫請求;所述資料讀寫請求包括請求類型、資料、位址以及資源標識;判斷模組,用於判斷所述資料讀寫請求是否為讀請求;在所述資料讀寫請求為讀請求時,所述判斷模組進一步地判斷所述資料讀寫請求是否滿足第一放置規則;在所述資料讀寫請求滿足所述第一放置規則時,所述判 斷模組進一步地判斷所述資料讀寫請求是否滿足第二放置規則;其中,所述第一放置規則為判斷所述資料讀寫請求對應的位址與寫入命令隊列中任意一個寫請求對應的位址互不衝突;所述第二放置規則為所述資料讀寫請求對應的資源標識與讀取命令隊列中的任意一個讀請求對應的資源標識互不衝突;獲取模組,用於在所述資料讀寫請求不滿足所述第一放置規則時,直接讀取位址衝突的所述寫請求對應的資料;***模組,用於在所述資料讀寫請求不滿足所述第二放置規則時,進一步地根據接收時間將所述資料讀寫請求存儲至所述讀取命令隊列。 A data read/write processing device, the data read/write processing device includes a memory and at least one processor, the memory stores at least one instruction, when the at least one instruction is executed by the at least one processor To achieve the corresponding function, the memory includes: a receiving module for receiving data read and write requests; the data read and write requests include request type, data, address and resource identifier; a judgment module for judging the data Whether the 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 the first placement rule; if the data read/write request satisfies all When the first placement rule is stated, the judgment The breaking module further judges whether the data read/write request satisfies the second placement rule; wherein, the first placement rule is to judge that the address corresponding to the data read/write request corresponds to any one of the write requests in the write command queue The addresses do not conflict with each other; the second placement rule is that the resource identifier corresponding to the data read and write request and the resource identifier corresponding to any one read request in the read command queue do not conflict with each other; the acquisition module is used in the When the data read/write request does not satisfy the first placement rule, directly read the data corresponding to the write request with the conflicting address; insert a module for when the data read/write request does not satisfy the second When placing rules, the data read and write requests are further stored in the read command queue according to the receiving time. 如請求項6所述的資料讀/寫處理裝置,其中,所述第一放置規則和所述第二放置規則分別對應一個狀態標識欄;所述狀態標識欄可設置為啟用狀態或禁用狀態;在所述啟用狀態,對應的所述放置規則被啟用;在所述禁用狀態,對應的所述放置規則被禁用。 The data read/write processing device according to claim 6, wherein the first placement rule and the second placement rule respectively correspond to a state identification column; the state identification column 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. 一種電腦可讀存儲介質,其中,所述電腦可讀存儲介質存儲有至少一個指令,所述至少一個指令被處理器執行時實現如請求項1至5中任意一項的所述資料讀/寫處理方法。 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, realizes the data read/write according to any one of claim items 1 to 5 Approach.
TW109123484A 2020-07-10 2020-07-10 Data read-write processing method, apparatus, and computer readable storage medium thereof TWI758778B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW109123484A TWI758778B (en) 2020-07-10 2020-07-10 Data read-write processing method, apparatus, and computer readable storage medium thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW109123484A TWI758778B (en) 2020-07-10 2020-07-10 Data read-write processing method, apparatus, and computer readable storage medium thereof

Publications (2)

Publication Number Publication Date
TW202203043A TW202203043A (en) 2022-01-16
TWI758778B true TWI758778B (en) 2022-03-21

Family

ID=80787628

Family Applications (1)

Application Number Title Priority Date Filing Date
TW109123484A TWI758778B (en) 2020-07-10 2020-07-10 Data read-write processing method, apparatus, and computer readable storage medium thereof

Country Status (1)

Country Link
TW (1) TWI758778B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1383511A (en) * 1998-11-16 2002-12-04 因芬尼昂技术股份公司 Memory controller which increases bus utilization by reordering memory requests
CN100392627C (en) * 2003-12-22 2008-06-04 威盛电子股份有限公司 Arbitrating device and method for memory access request priority sequence
TW200834321A (en) * 2006-09-27 2008-08-16 Intel Corp Mechanism to generate logically dedicated read and write channels in a memory controller
CN106610816A (en) * 2016-12-29 2017-05-03 山东师范大学 Avoidance method for conflict between instruction sets in RISC-CPU and avoidance system thereof
WO2020045269A1 (en) * 2018-08-28 2020-03-05 tonoi株式会社 System, information processing method, and program

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1383511A (en) * 1998-11-16 2002-12-04 因芬尼昂技术股份公司 Memory controller which increases bus utilization by reordering memory requests
CN100392627C (en) * 2003-12-22 2008-06-04 威盛电子股份有限公司 Arbitrating device and method for memory access request priority sequence
TW200834321A (en) * 2006-09-27 2008-08-16 Intel Corp Mechanism to generate logically dedicated read and write channels in a memory controller
CN106610816A (en) * 2016-12-29 2017-05-03 山东师范大学 Avoidance method for conflict between instruction sets in RISC-CPU and avoidance system thereof
WO2020045269A1 (en) * 2018-08-28 2020-03-05 tonoi株式会社 System, information processing method, and program

Also Published As

Publication number Publication date
TW202203043A (en) 2022-01-16

Similar Documents

Publication Publication Date Title
CN111221476B (en) Front-end command processing method and device for improving SSD performance, computer equipment and storage medium
CN108353038B (en) Mechanism to support multiple writer/multiple reader concurrency for software flow/packet classification on a generic multi-core system
EP4092540B1 (en) Method and apparatus for extending pcie domain
EP3057272B1 (en) Technologies for concurrency of cuckoo hashing flow lookup
US9817786B1 (en) Ingress data placement
US10834105B2 (en) Method and apparatus for identifying malicious website, and computer storage medium
US11568596B2 (en) Non-blocking token authentication cache
US10228869B1 (en) Controlling shared resources and context data
US10089247B2 (en) System and method for coupling a host device to secure and non-secure devices
KR20200017364A (en) MODIFYING NVMe PHYSICAL REGION PAGE LIST POINTERS AND DATA POINTERS TO FACILITATE ROUTING OF PCIe MEMORY REQUESTS
CN113918216A (en) Data read/write processing method, device and computer readable storage medium
JP2021022379A (en) Autonomous job queueing system for hardware accelerators
US20140379995A1 (en) Semiconductor device for controlling prefetch operation
TWI758778B (en) Data read-write processing method, apparatus, and computer readable storage medium thereof
EP4044058A1 (en) Capability management method and computer device
CN116670661A (en) Cache access method of graphics processor, graphics processor and electronic device
CN111026532B (en) Message queue management method for voice data
CN108540569B (en) Software installation package replacement method and device and computer storage medium
WO2014163660A1 (en) Removable storage device identity and configuration information
US10284501B2 (en) Technologies for multi-core wireless network data transmission
CN112667538B (en) Method, system, equipment and medium for obtaining network card identification number
WO2018226765A1 (en) System and method for changing a slave identification of integrated circuits over a shared bus
CN110245016B (en) Data processing method, system, device and terminal equipment
CN109088913B (en) Method for requesting data and load balancing server
TWI761846B (en) Data auto-transmitting method, apparatus, and storage medium thereof