CN117081673A - Multi-level mapping table interrupt source optical fiber data transmission method and device - Google Patents
Multi-level mapping table interrupt source optical fiber data transmission method and device Download PDFInfo
- Publication number
- CN117081673A CN117081673A CN202311045398.6A CN202311045398A CN117081673A CN 117081673 A CN117081673 A CN 117081673A CN 202311045398 A CN202311045398 A CN 202311045398A CN 117081673 A CN117081673 A CN 117081673A
- Authority
- CN
- China
- Prior art keywords
- data
- level
- mapping table
- address
- interrupt source
- Prior art date
- Legal status (The legal status 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 status listed.)
- Granted
Links
- 238000013507 mapping Methods 0.000 title claims abstract description 122
- 238000000034 method Methods 0.000 title claims abstract description 47
- 239000013307 optical fiber Substances 0.000 title claims abstract description 27
- 230000005540 biological transmission Effects 0.000 title claims description 18
- 238000012545 processing Methods 0.000 claims abstract description 36
- 239000000835 fiber Substances 0.000 claims 3
- 230000009191 jumping Effects 0.000 claims 1
- 238000012163 sequencing technique Methods 0.000 claims 1
- 230000008569 process Effects 0.000 description 7
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 238000013523 data management Methods 0.000 description 3
- 230000000694 effects Effects 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 3
- 230000006870 function Effects 0.000 description 3
- 238000004891 communication Methods 0.000 description 2
- 238000004590 computer program Methods 0.000 description 2
- 238000000354 decomposition reaction Methods 0.000 description 2
- 238000013461 design Methods 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000006798 recombination Effects 0.000 description 2
- 238000005215 recombination Methods 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000008901 benefit Effects 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 238000007726 management method Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000003672 processing method Methods 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- 239000002699 waste material Substances 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04B—TRANSMISSION
- H04B10/00—Transmission systems employing electromagnetic waves other than radio-waves, e.g. infrared, visible or ultraviolet light, or employing corpuscular radiation, e.g. quantum communication
- H04B10/25—Arrangements specific to fibre transmission
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L47/00—Traffic control in data switching networks
- H04L47/50—Queue scheduling
- H04L47/62—Queue scheduling characterised by scheduling criteria
- H04L47/625—Queue scheduling characterised by scheduling criteria for service slots or service orders
- H04L47/6275—Queue scheduling characterised by scheduling criteria for service slots or service orders based on priority
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Physics & Mathematics (AREA)
- Electromagnetism (AREA)
- Optical Communication System (AREA)
Abstract
Description
技术领域Technical field
本发明涉及数据处理技术领域,特别是指一种多级映射表中断源光纤数据传输方法及装置。The invention relates to the field of data processing technology, and in particular, to a multi-level mapping table interrupt source optical fiber data transmission method and device.
背景技术Background technique
在光纤数据传输中,由于数据量大且传输速度快,如何有效地对数据进行处理以满足实时性要求,是当前技术面临的一大挑战。In optical fiber data transmission, due to the large amount of data and fast transmission speed, how to effectively process the data to meet real-time requirements is a major challenge faced by current technology.
特别是,当数据传输到达本节点时,需要对数据进行解析,得到数据对应的地址,然后根据地址在多级映射表中查找匹配项,以产生相应级别的中断源,并根据中断源的级别和类型执行相应的中断处理指令。然而,现有的数据处理方法往往存在效率低下、实时性差等问题。In particular, when the data transmission reaches this node, the data needs to be parsed to obtain the address corresponding to the data, and then the matching item is searched in the multi-level mapping table based on the address to generate an interrupt source of the corresponding level, and the interrupt source is generated according to the level of the interrupt source. and execute corresponding interrupt processing instructions. However, existing data processing methods often have problems such as low efficiency and poor real-time performance.
发明内容Contents of the invention
本发明要解决的技术问题是提供一种多级映射表中断源光纤数据传输方法及装置,能有效地解析数据,快速地在多级映射表中找到匹配项,及时地产生相应级别的中断源,并根据中断源的级别和类型执行相应的中断处理指令,从而提高数据处理的效率和实时性。The technical problem to be solved by the present invention is to provide a multi-level mapping table interrupt source optical fiber data transmission method and device, which can effectively analyze data, quickly find matching items in the multi-level mapping table, and generate corresponding level interrupt sources in a timely manner. , and execute corresponding interrupt processing instructions according to the level and type of the interrupt source, thereby improving the efficiency and real-time performance of data processing.
为解决上述技术问题,本发明的技术方案如下:In order to solve the above technical problems, the technical solutions of the present invention are as follows:
第一方面,一种多级映射表中断源光纤数据传输方法,所述方法包括:In the first aspect, a multi-level mapping table interrupt source optical fiber data transmission method, the method includes:
获取通过光纤传输至本节点的数据;Obtain data transmitted to this node through optical fiber;
对所述数据进行解析,得到数据对应的地址;Parse the data and obtain the address corresponding to the data;
根据所述地址,逐个按照顺序遍历多级映射表中的一级映射表中的项以获得匹配项,若未获得所述匹配项,则逐个按照顺序遍历下一级映射表,直至获得匹配项或者遍历所有映射表;若获得所述匹配项,则根据遍历历史以及匹配项在映射表中的级别,产生相应级别的中断源;所述多级映射表包括至少一组数据区域,每组数据区域包括至少一条地址和长度;According to the address, the items in the first-level mapping table in the multi-level mapping table are traversed one by one in order to obtain a matching item. If the matching item is not obtained, the next-level mapping table is traversed in order one by one until a matching item is obtained. Or traverse all mapping tables; if the matching item is obtained, an interrupt source of the corresponding level is generated according to the traversal history and the level of the matching item in the mapping table; the multi-level mapping table includes at least one group of data areas, each group of data The area includes at least one address and length;
根据所述中断源,获取所述中断源的级别和类型,并根据所述中断源的级别和类型执行相应的中断处理指令。According to the interrupt source, the level and type of the interrupt source are obtained, and corresponding interrupt processing instructions are executed according to the level and type of the interrupt source.
进一步的,获取通过光纤传输至本节点的数据,包括:Further, obtain the data transmitted to this node through optical fiber, including:
获取数据区域的数量M和每个数据区域包含的地址数N;Get the number M of data areas and the number of addresses N contained in each data area;
为每个数据区域分配所需的存储空间,用于存储至少一条地址和与每条地址对应的长度信息;Allocate required storage space to each data area to store at least one address and length information corresponding to each address;
根据存储地址的数值大小为每一条地址和每一条地址对应的长度在每个数据区域中分配固定的存储位置,以形成一张长度为N的多级映射表。According to the numerical size of the storage address, a fixed storage location is allocated in each data area for each address and the corresponding length of each address to form a multi-level mapping table with a length of N.
进一步的,所述长度信息包括地址的开始位置、结束位置以及从开始位置至结束位置连续地址区域的长度。Further, the length information includes the start position, the end position of the address, and the length of the continuous address area from the start position to the end position.
进一步的,为每个数据区域分配所需的存储空间,用于存储至少一条地址和与每条地址对应的长度信息,包括:Further, allocate required storage space for each data area to store at least one address and length information corresponding to each address, including:
获取每条地址信息和长度信息所需的存储空间;Obtain the storage space required for each piece of address information and length information;
根据所需的存储空间,为每个数据区域分配相应的存储空间;According to the required storage space, allocate corresponding storage space to each data area;
在分配的存储空间中,为每条地址存储相应的长度信息。In the allocated storage space, the corresponding length information is stored for each address.
进一步的,根据所述地址,逐个按照顺序遍历多级映射表中的一级映射表中的项以获得匹配项,若未获得所述匹配项,则逐个按照顺序遍历下一级映射表,直至获得匹配项或者遍历所有映射表,包括:Further, according to the address, the items in the first-level mapping table in the multi-level mapping table are traversed one by one in order to obtain a matching item. If the matching item is not obtained, the next-level mapping table is traversed in order one by one until Get a match or iterate through all mapping tables, including:
依次遍历整个元数据表或状态表,以获取每个数据区域的状态;Traverse the entire metadata table or status table in sequence to obtain the status of each data area;
若第一数据区域的状态为空闲或者部分占用,则将新数据写入至所述第一数据区域内,并跳转到下一个数据区域;If the status of the first data area is idle or partially occupied, new data is written into the first data area and jumps to the next data area;
若第一数据区域的状态显示为占用,则跳过所述第一数据区域,继续遍历下一个数据区域。If the status of the first data area is displayed as occupied, the first data area is skipped and the next data area is continued to be traversed.
进一步的,根据所述中断源,获取所述中断源的级别和类型,并根据所述中断源的级别和类型执行相应的中断处理指令,包括:Further, according to the interrupt source, obtain the level and type of the interrupt source, and execute corresponding interrupt processing instructions according to the level and type of the interrupt source, including:
再次遍历映射表,找到数据对应的存储区域,并获取存储区域的物理地址;Traverse the mapping table again to find the storage area corresponding to the data and obtain the physical address of the storage area;
访问物理地址,按照存储区域的长度和格式,读取所需的数据或者将数据写入到目标地址;Access the physical address, read the required data or write the data to the target address according to the length and format of the storage area;
将读取到的数据返回至请求者,或者将数据写入到目标地址后,更新映射表。Return the read data to the requester, or update the mapping table after writing the data to the target address.
进一步的,根据所述中断源,获取所述中断源的级别和类型,并根据所述中断源的级别和类型执行相应的中断处理指令之后,还包括:Further, after obtaining the level and type of the interrupt source according to the interrupt source, and executing the corresponding interrupt processing instructions according to the level and type of the interrupt source, it also includes:
为每个中断源和映射项设置优先级;Set priority for each interrupt source and mapping item;
根据中断源和映射项的优先级,进行排序,以得到一个按照优先级从高到低的顺序的中断源和映射项列表;Sort according to the priority of interrupt sources and mapping items to obtain a list of interrupt sources and mapping items in order from high to low priority;
从排序后的列表中逐个选取中断源或映射项进行处理。Select interrupt sources or mapping items one by one from the sorted list for processing.
第二方面,一种多级映射表中断源光纤数据传输装置,包括:In the second aspect, a multi-level mapping table interrupt source optical fiber data transmission device includes:
获取模块,用于获取通过光纤传输至本节点的数据;对所述数据进行解析,得到数据对应的地址;The acquisition module is used to acquire the data transmitted to the node through optical fiber; parse the data to obtain the address corresponding to the data;
处理模块,用于根据所述地址,逐个按照顺序遍历多级映射表中的一级映射表中的项以获得匹配项,若未获得所述匹配项,则逐个按照顺序遍历下一级映射表,直至获得匹配项或者遍历所有映射表;若获得所述匹配项,则根据遍历历史以及匹配项在映射表中的级别,产生相应级别的中断源;所述多级映射表包括至少一组数据区域,每组数据区域包括至少一条地址和长度;根据所述中断源,获取所述中断源的级别和类型,并根据所述中断源的级别和类型执行相应的中断处理指令。A processing module configured to traverse the items in the first-level mapping table in the multi-level mapping table one by one in sequence according to the address to obtain a matching item; if the matching item is not obtained, traverse the next-level mapping table one by one in order. , until a matching item is obtained or all mapping tables are traversed; if the matching item is obtained, an interrupt source of the corresponding level is generated according to the traversal history and the level of the matching item in the mapping table; the multi-level mapping table includes at least one set of data area, each group of data areas includes at least one address and length; according to the interrupt source, the level and type of the interrupt source are obtained, and corresponding interrupt processing instructions are executed according to the level and type of the interrupt source.
第三方面,一种计算设备,包括:In a third aspect, a computing device includes:
一个或多个处理器;one or more processors;
存储装置,用于存储一个或多个程序,当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现上述方法。A storage device is used to store one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors implement the above method.
第四方面,一种计算机可读存储介质,所述计算机可读存储介质中存储有程序,该程序被处理器执行时实现上述方法。A fourth aspect is a computer-readable storage medium. The computer-readable storage medium stores a program. When the program is executed by a processor, the above method is implemented.
本发明的上述方案至少包括以下有益效果:The above solution of the present invention at least includes the following beneficial effects:
本发明的上述方案,能有效地解析数据,快速地在多级映射表中找到匹配项,及时地产生相应级别的中断源,并根据中断源的级别和类型执行相应的中断处理指令,从而提高数据处理的效率和实时性。此外,该方法还应能有效地构建和使用多级映射表,提高数据地址和长度的存储效率。The above solution of the present invention can effectively parse data, quickly find matching items in multi-level mapping tables, promptly generate interrupt sources of corresponding levels, and execute corresponding interrupt processing instructions according to the level and type of interrupt sources, thereby improving Efficiency and real-time performance of data processing. In addition, this method should also be able to effectively construct and use multi-level mapping tables to improve the storage efficiency of data addresses and lengths.
附图说明Description of the drawings
图1是本发明的实施例提供的多级映射表中断源光纤数据传输方法的流程示意图。Figure 1 is a schematic flowchart of a multi-level mapping table interrupt source optical fiber data transmission method provided by an embodiment of the present invention.
图2是本发明的实施例提供的多级映射表中断源光纤数据传输装置示意图。Figure 2 is a schematic diagram of a multi-level mapping table interrupt source optical fiber data transmission device provided by an embodiment of the present invention.
具体实施方式Detailed ways
下面将参照附图更详细地描述本公开的示例性实施例。虽然附图中显示了本公开的示例性实施例,然而应当理解,可以以各种形式实现本公开而不应被这里阐述的实施例所限制。相反,提供这些实施例是为了能够更透彻地理解本公开,并且能够将本公开的范围完整的传达给本领域的技术人员。Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a thorough understanding of the disclosure, and to fully convey the scope of the disclosure to those skilled in the art.
如图1所示,本发明的实施例提出一种多级映射表中断源光纤数据传输方法,所述方法包括:As shown in Figure 1, an embodiment of the present invention proposes a multi-level mapping table interrupt source optical fiber data transmission method. The method includes:
步骤11,获取通过光纤传输至本节点的数据;Step 11, obtain the data transmitted to this node through optical fiber;
步骤12,对所述数据进行解析,得到数据对应的地址;Step 12: Analyze the data and obtain the address corresponding to the data;
步骤13,根据所述地址,逐个按照顺序遍历多级映射表中的一级映射表中的项以获得匹配项,若未获得所述匹配项,则逐个按照顺序遍历下一级映射表,直至获得匹配项或者遍历所有映射表;若获得所述匹配项,则根据遍历历史以及匹配项在映射表中的级别,产生相应级别的中断源;所述多级映射表包括至少一组数据区域,每组数据区域包括至少一条地址和长度;Step 13: According to the address, traverse the items in the first-level mapping table in the multi-level mapping table one by one in order to obtain the matching item. If the matching item is not obtained, traverse the next-level mapping table one by one in order until Obtain matching items or traverse all mapping tables; if the matching items are obtained, interrupt sources of corresponding levels are generated according to the traversal history and the level of the matching items in the mapping table; the multi-level mapping table includes at least one group of data areas, Each group of data areas includes at least one address and length;
步骤14,根据所述中断源,获取所述中断源的级别和类型,并根据所述中断源的级别和类型执行相应的中断处理指令。Step 14: Obtain the level and type of the interrupt source according to the interrupt source, and execute corresponding interrupt processing instructions according to the level and type of the interrupt source.
在本发明实施例中,获取通过光纤传输至本节点的数据。光纤是一种传输数据的通道,其具有传输速度快、数据损失少等特点,能够实时地将大量数据传输至本节点。对数据进行解析,得到数据对应的地址,解析数据的目的是为了找出数据中包含的地址信息,以便于之后的数据处理,此操作可以更好地理解数据的含义和用途。根据地址,逐个按照顺序遍历多级映射表中的一级映射表中的项以获得匹配项,并产生相应级别的中断源,这个过程是为了在数据复杂的情况下,能够快速找到需要的数据,提高处理效率,同时,产生的中断源可以把处理的重点放在重要的数据上,优化资源的使用。根据所述中断源,获取所述中断源的级别和类型,并执行相应的中断处理指令,这个操作可以根据不同的中断源,执行不同的操作,使得数据处理更加有针对性,此外,这也能够对各种不同类型和级别的中断源进行分类和管理,提高数据处理的效率和准确性。In this embodiment of the present invention, data transmitted to the node through optical fiber is acquired. Optical fiber is a channel for transmitting data. It has the characteristics of fast transmission speed and low data loss, and can transmit large amounts of data to this node in real time. Parse the data to get the address corresponding to the data. The purpose of parsing the data is to find out the address information contained in the data to facilitate subsequent data processing. This operation can better understand the meaning and purpose of the data. According to the address, items in the first-level mapping table in the multi-level mapping table are traversed one by one in order to obtain matching items, and an interrupt source of the corresponding level is generated. This process is to quickly find the required data when the data is complex. , improve processing efficiency, and at the same time, the generated interrupt source can focus the processing on important data and optimize the use of resources. According to the interrupt source, obtain the level and type of the interrupt source, and execute the corresponding interrupt processing instructions. This operation can perform different operations according to different interrupt sources, making data processing more targeted. In addition, this also It can classify and manage various types and levels of interruption sources to improve the efficiency and accuracy of data processing.
在本发明一优选的实施例中,上述步骤11,可以包括:In a preferred embodiment of the present invention, the above step 11 may include:
步骤111,获取数据区域的数量M和每个数据区域包含的地址数N;Step 111, obtain the number M of data areas and the number of addresses N contained in each data area;
步骤112,为每个数据区域分配所需的存储空间,用于存储至少一条地址和与每条地址对应的长度信息,所述长度信息包括地址的开始位置、结束位置以及从开始位置至结束位置连续地址区域的长度;Step 112: Allocate required storage space to each data area for storing at least one address and length information corresponding to each address. The length information includes the start position, end position and from the start position to the end position of the address. The length of the continuous address area;
步骤113,根据存储地址的数值大小为每一条地址和每一条地址对应的长度在每个数据区域中分配固定的存储位置,以形成一张长度为N的多级映射表。Step 113: Allocate a fixed storage location in each data area for each address and the corresponding length of each address according to the numerical size of the storage address to form a multi-level mapping table with a length of N.
在本发明实施例中,获取数据区域的数量M和每个数据区域包含的地址数N,有助于理解映射表的总体结构和规模,创造条件为后续的数据存储和检索。为每个数据区域分配所需的存储空间,用于存储至少一条地址和与每条地址对应的长度信息,可以保证每个数据区域都有足够的空间来存储地址和长度信息,避免了数据的丢失或者混淆。根据存储地址的数值大小为每一条地址和每一条地址对应的长度在每个数据区域中分配固定的存储位置,以形成一张长度为N的多级映射表,可以使得每个地址和长度信息都在映射表中有一个固定的位置,便于后续的数据检索和使用,同时,多级映射表的设计可以进一步提高数据检索的效率。In the embodiment of the present invention, obtaining the number M of data areas and the number of addresses N contained in each data area helps to understand the overall structure and scale of the mapping table and create conditions for subsequent data storage and retrieval. Allocate the required storage space to each data area to store at least one address and the length information corresponding to each address. This can ensure that each data area has enough space to store the address and length information, avoiding data corruption. Lost or confused. According to the numerical size of the storage address, a fixed storage location is allocated in each data area for each address and the length corresponding to each address, so as to form a multi-level mapping table with a length of N, which can make each address and length information All have a fixed position in the mapping table to facilitate subsequent data retrieval and use. At the same time, the design of multi-level mapping tables can further improve the efficiency of data retrieval.
在本发明一优选的实施例中,上述步骤112,可以包括:In a preferred embodiment of the present invention, the above step 112 may include:
步骤1121,获取每条地址信息和长度信息所需的存储空间;Step 1121, obtain the storage space required for each piece of address information and length information;
步骤1122,根据所需的存储空间,为每个数据区域分配相应的存储空间;Step 1122: Allocate corresponding storage space to each data area according to the required storage space;
步骤1123,在分配的存储空间中,为每条地址存储相应的长度信息。Step 1123: Store corresponding length information for each address in the allocated storage space.
在本发明实施例中,通过获取每条地址信息和长度信息所需的存储空间。这个步骤会根据数据的规模和类型确定所需的存储空间,有助于合理分配和利用存储资源。根据所需的存储空间,为每个数据区域分配相应的存储空间,这个步骤是基于步骤1121得到的每条地址信息和长度信息所需的存储空间需求,为每个数据区域分配合适的存储空间,确保数据的安全存储。在分配的存储空间中,为每条地址存储相应的长度信息,这个步骤会在每个数据区域确定的存储空间中,为每条地址信息存储相应的长度信息,从而提供完整的数据信息,方便后续数据的检索和使用。In the embodiment of the present invention, the storage space required for each piece of address information and length information is obtained. This step will determine the required storage space based on the size and type of data, helping to rationally allocate and utilize storage resources. According to the required storage space, allocate corresponding storage space to each data area. This step is to allocate appropriate storage space to each data area based on the storage space requirements required for each piece of address information and length information obtained in step 1121. , ensure the safe storage of data. In the allocated storage space, the corresponding length information is stored for each address. This step will store the corresponding length information for each address information in the storage space determined by each data area, thereby providing complete data information and convenient Subsequent retrieval and use of data.
在本发明一优选的实施例中,上述步骤13,可以包括:In a preferred embodiment of the present invention, the above step 13 may include:
步骤131,依次遍历整个元数据表或状态表,以获取每个数据区域的状态;Step 131: Traverse the entire metadata table or status table in sequence to obtain the status of each data area;
步骤132,若第一数据区域的状态为空闲或者部分占用,则将新数据写入至所述第一数据区域内,并跳转到下一个数据区域;Step 132, if the status of the first data area is idle or partially occupied, write new data into the first data area and jump to the next data area;
步骤133,若第一数据区域的状态显示为占用,则跳过所述第一数据区域,继续遍历下一个数据区域。Step 133: If the status of the first data area is displayed as occupied, skip the first data area and continue traversing the next data area.
在本发明实施例中,遍历元数据表或者状态表,以获取每个数据区域的状态,可以了解每个数据区域的使用情况,从而做出更优的数据管理决策;如果第一数据区域的状态为空闲或部分占用,那么新数据就会被写入到这个区域内,然后,程序会跳转到下一个数据区域,这样可以实现存储空间的高效利用,避免空间的浪费;如果第一数据区域的状态为占用,程序就会跳过这个区域,继续遍历下一个数据区域。这样可以避免对已经被占用的数据区域进行不必要的操作,提高了数据管理的效率。In the embodiment of the present invention, the metadata table or status table is traversed to obtain the status of each data area, and the usage of each data area can be understood, thereby making better data management decisions; if the first data area If the status is idle or partially occupied, then new data will be written to this area, and then the program will jump to the next data area, which can achieve efficient use of storage space and avoid waste of space; if the first data If the status of the area is occupied, the program will skip this area and continue traversing the next data area. This can avoid unnecessary operations on already occupied data areas and improve the efficiency of data management.
在本发明一优选的实施例中,上述步骤14,可以包括:In a preferred embodiment of the present invention, the above step 14 may include:
步骤141,再次遍历映射表,找到数据对应的存储区域,并获取存储区域的物理地址;Step 141, traverse the mapping table again, find the storage area corresponding to the data, and obtain the physical address of the storage area;
步骤142,访问物理地址,按照存储区域的长度和格式,读取所需的数据或者将数据写入到目标地址;Step 142, access the physical address, read the required data or write the data to the target address according to the length and format of the storage area;
步骤143,将读取到的数据返回至请求者,或者将数据写入到目标地址后,更新映射表。Step 143: Return the read data to the requester, or update the mapping table after writing the data to the target address.
在本发明实施例中,再次遍历映射表,找到数据对应的存储区域,并获取该存储区域的物理地址,可以确定数据的实际存储位置,为接下来的数据读写操作提供依据。在获取到物理地址后,系统将根据存储区域的长度和格式访问物理地址,读取所需的数据或将数据写入到目标地址。这一步骤能确保数据的正确读取或写入。读取到的数据会返回给请求者,或者在数据写入目标地址后,系统会更新映射表,对于数据的管理和跟踪非常重要,能确保数据的准确性和一致性,同时也使数据的存取更加高效。In the embodiment of the present invention, the mapping table is traversed again to find the storage area corresponding to the data, and the physical address of the storage area is obtained. The actual storage location of the data can be determined, which provides a basis for subsequent data reading and writing operations. After obtaining the physical address, the system will access the physical address according to the length and format of the storage area, read the required data or write the data to the target address. This step ensures that data is read or written correctly. The read data will be returned to the requester, or after the data is written to the target address, the system will update the mapping table, which is very important for data management and tracking, ensuring the accuracy and consistency of the data, and also making the data more secure. Access is more efficient.
在本发明一优选的实施例中,在上述步骤14之后,可以包括:In a preferred embodiment of the present invention, after the above step 14, it may include:
步骤15,为每个中断源和映射项设置优先级;Step 15, set the priority for each interrupt source and mapping item;
步骤16,根据中断源和映射项的优先级,进行排序,以得到一个按照优先级从高到低的顺序的中断源和映射项列表;Step 16: Sort the interrupt sources and mapping items according to their priorities to obtain a list of interrupt sources and mapping items in order from high to low priority;
步骤17,从排序后的列表中逐个选取中断源或映射项进行处理。Step 17: Select interrupt sources or mapping items one by one from the sorted list for processing.
在本发明实施例中,为每个中断源和映射项设置优先级,这样可以对中断源和映射项进行优先级管理。这对于系统在处理多个中断源和映射项时,能够依据优先级进行处理,保证高优先级的中断源和映射项优先得到处理。根据中断源和映射项的优先级,系统进行排序,得到一个按照优先级从高到低的顺序的中断源和映射项列表,目的是为了在多个中断源和映射项存在时,能够有效地管理和调度这些资源,确保系统的稳定运行。从排序后的列表中逐个选取中断源或映射项进行处理,优点是能够确保按照优先级高低依次处理中断源和映射项,确保高优先级的任务能够优先得到处理,提高系统的响应速度和处理效率。In the embodiment of the present invention, a priority is set for each interrupt source and mapping item, so that priority management of the interrupt source and mapping item can be performed. This enables the system to process multiple interrupt sources and mapping items according to priority, ensuring that high-priority interrupt sources and mapping items are processed first. According to the priority of interrupt sources and mapping items, the system sorts and obtains a list of interrupt sources and mapping items in order from high priority to low. The purpose is to effectively interrupt sources and mapping items when multiple interrupt sources and mapping items exist. Manage and schedule these resources to ensure stable operation of the system. Select interrupt sources or mapping items one by one from the sorted list for processing. The advantage is that it can ensure that interrupt sources and mapping items are processed in order according to priority, ensure that high-priority tasks can be processed first, and improve the response speed and processing of the system. efficiency.
如图2所示,本发明的实施例还提供一种多级映射表中断源光纤数据传输装置20,包括:As shown in Figure 2, an embodiment of the present invention also provides a multi-level mapping table interrupt source optical fiber data transmission device 20, which includes:
获取模块21,用于获取通过光纤传输至本节点的数据;对所述数据进行解析,得到数据对应的地址;The acquisition module 21 is used to acquire the data transmitted to the node through the optical fiber; parse the data to obtain the address corresponding to the data;
处理模块22,用于根据所述地址,逐个按照顺序遍历多级映射表中的一级映射表中的项以获得匹配项,若未获得所述匹配项,则逐个按照顺序遍历下一级映射表,直至获得匹配项或者遍历所有映射表;若获得所述匹配项,则根据遍历历史以及匹配项在映射表中的级别,产生相应级别的中断源;所述多级映射表包括至少一组数据区域,每组数据区域包括至少一条地址和长度;根据所述中断源,获取所述中断源的级别和类型,并根据所述中断源的级别和类型执行相应的中断处理指令。The processing module 22 is configured to traverse the items in the first-level mapping table in the multi-level mapping table one by one in order according to the address to obtain a matching item. If the matching item is not obtained, then traverse the next-level mapping one by one in order. table until a matching item is obtained or all mapping tables are traversed; if the matching item is obtained, an interrupt source of the corresponding level is generated according to the traversal history and the level of the matching item in the mapping table; the multi-level mapping table includes at least one group Data area, each group of data areas includes at least one address and length; according to the interrupt source, the level and type of the interrupt source are obtained, and corresponding interrupt processing instructions are executed according to the level and type of the interrupt source.
可选的,获取通过光纤传输至本节点的数据,包括:Optionally, obtain the data transmitted to this node through optical fiber, including:
获取数据区域的数量M和每个数据区域包含的地址数N;Get the number M of data areas and the number of addresses N contained in each data area;
为每个数据区域分配所需的存储空间,用于存储至少一条地址和与每条地址对应的长度信息;Allocate required storage space to each data area to store at least one address and length information corresponding to each address;
根据存储地址的数值大小为每一条地址和每一条地址对应的长度在每个数据区域中分配固定的存储位置,以形成一张长度为N的多级映射表。According to the numerical size of the storage address, a fixed storage location is allocated in each data area for each address and the corresponding length of each address to form a multi-level mapping table with a length of N.
可选的,所述长度信息包括地址的开始位置、结束位置以及从开始位置至结束位置连续地址区域的长度。Optionally, the length information includes the start position, the end position of the address, and the length of the continuous address area from the start position to the end position.
可选的,为每个数据区域分配所需的存储空间,用于存储至少一条地址和与每条地址对应的长度信息,包括:Optionally, allocate the required storage space for each data area to store at least one address and the length information corresponding to each address, including:
获取每条地址信息和长度信息所需的存储空间;Obtain the storage space required for each piece of address information and length information;
根据所需的存储空间,为每个数据区域分配相应的存储空间;According to the required storage space, allocate corresponding storage space to each data area;
在分配的存储空间中,为每条地址存储相应的长度信息。In the allocated storage space, the corresponding length information is stored for each address.
可选的,根据所述地址,逐个按照顺序遍历多级映射表中的一级映射表中的项以获得匹配项,若未获得所述匹配项,则逐个按照顺序遍历下一级映射表,直至获得匹配项或者遍历所有映射表,包括:Optionally, according to the address, traverse the items in the first-level mapping table in the multi-level mapping table one by one in order to obtain a matching item. If the matching item is not obtained, then traverse the next-level mapping table one by one in order, Until a match is obtained or all mapping tables are traversed, including:
依次遍历整个元数据表或状态表,以获取每个数据区域的状态;Traverse the entire metadata table or status table in sequence to obtain the status of each data area;
若第一数据区域的状态为空闲或者部分占用,则将新数据写入至所述第一数据区域内,并跳转到下一个数据区域;If the status of the first data area is idle or partially occupied, new data is written into the first data area and jumps to the next data area;
若第一数据区域的状态显示为占用,则跳过所述第一数据区域,继续遍历下一个数据区域。If the status of the first data area is displayed as occupied, the first data area is skipped and the next data area is continued to be traversed.
可选的,根据所述中断源,获取所述中断源的级别和类型,并根据所述中断源的级别和类型执行相应的中断处理指令,包括:Optionally, obtain the level and type of the interrupt source according to the interrupt source, and execute corresponding interrupt processing instructions according to the level and type of the interrupt source, including:
再次遍历映射表,找到数据对应的存储区域,并获取存储区域的物理地址;Traverse the mapping table again to find the storage area corresponding to the data and obtain the physical address of the storage area;
访问物理地址,按照存储区域的长度和格式,读取所需的数据或者将数据写入到目标地址;Access the physical address, read the required data or write the data to the target address according to the length and format of the storage area;
将读取到的数据返回至请求者,或者将数据写入到目标地址后,更新映射表。Return the read data to the requester, or update the mapping table after writing the data to the target address.
可选的,根据所述中断源,获取所述中断源的级别和类型,并根据所述中断源的级别和类型执行相应的中断处理指令之后,还包括:Optionally, after obtaining the level and type of the interrupt source according to the interrupt source, and executing the corresponding interrupt processing instructions according to the level and type of the interrupt source, it also includes:
为每个中断源和映射项设置优先级;Set priority for each interrupt source and mapping item;
根据中断源和映射项的优先级,进行排序,以得到一个按照优先级从高到低的顺序的中断源和映射项列表;Sort according to the priority of interrupt sources and mapping items to obtain a list of interrupt sources and mapping items in order from high to low priority;
从排序后的列表中逐个选取中断源或映射项进行处理。Select interrupt sources or mapping items one by one from the sorted list for processing.
需要说明的是,该装置是与上述方法相对应的装置,上述方法实施例中的所有实现方式均适用于该实施例中,也能达到相同的技术效果。It should be noted that this device is a device corresponding to the above method. All implementation methods in the above method embodiment are applicable to this embodiment and can achieve the same technical effect.
本发明的实施例还提供一种计算设备,包括:处理器、存储有计算机程序的存储器,所述计算机程序被处理器运行时,执行如上所述的方法。上述方法实施例中的所有实现方式均适用于该实施例中,也能达到相同的技术效果。An embodiment of the present invention also provides a computing device, including: a processor and a memory storing a computer program. When the computer program is run by the processor, the method as described above is executed. All implementations in the above method embodiment are applicable to this embodiment and can achieve the same technical effect.
本发明的实施例还提供一种计算机可读存储介质,存储指令,当所述指令在计算机上运行时,使得计算机执行如上所述的方法。上述方法实施例中的所有实现方式均适用于该实施例中,也能达到相同的技术效果。Embodiments of the present invention also provide a computer-readable storage medium that stores instructions that, when executed on a computer, cause the computer to perform the method described above. All implementations in the above method embodiment are applicable to this embodiment and can achieve the same technical effect.
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本发明的范围。Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented with electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Skilled artisans may implement the described functionality using different methods for each specific application, but such implementations should not be considered to be beyond the scope of the present invention.
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working processes of the systems, devices and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be described again here.
在本发明所提供的实施例中,应该理解到,所揭露的装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the embodiments provided by the present invention, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units 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 coupling or direct coupling or communication connection between each other shown or discussed may be through some interfaces, and the indirect coupling or communication connection of the devices or units may be in electrical, mechanical or other forms.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place, or they may be distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
另外,在本发明各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。In addition, each functional unit in various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit.
所述功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、ROM、RAM、磁碟或者光盘等各种可以存储程序代码的介质。If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention essentially or the part that contributes to the existing technology or the part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including Several instructions are used 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 various embodiments of the present invention. The aforementioned storage media include: U disk, mobile hard disk, ROM, RAM, magnetic disk or optical disk and other media that can store program codes.
此外,需要指出的是,在本发明的装置和方法中,显然,各部件或各步骤是可以分解和/或重新组合的。这些分解和/或重新组合应视为本发明的等效方案。并且,执行上述系列处理的步骤可以自然地按照说明的顺序按时间顺序执行,但是并不需要一定按照时间顺序执行,某些步骤可以并行或彼此独立地执行。对本领域的普通技术人员而言,能够理解本发明的方法和装置的全部或者任何步骤或者部件,可以在任何计算装置(包括处理器、存储介质等)或者计算装置的网络中,以硬件、固件、软件或者它们的组合加以实现,这是本领域普通技术人员在阅读了本发明的说明的情况下运用他们的基本编程技能就能实现的。In addition, it should be pointed out that in the device and method of the present invention, obviously, each component or each step can be decomposed and/or recombined. These decompositions and/or recombinations should be regarded as equivalent solutions of the present invention. Furthermore, the steps for executing the above series of processes can naturally be executed in chronological order in the order described, but they do not necessarily need to be executed in chronological order, and some steps may be executed in parallel or independently of each other. For those of ordinary skill in the art, it can be understood that all or any steps or components of the method and device of the present invention can be implemented in any computing device (including processor, storage medium, etc.) or a network of computing devices in the form of hardware or firmware. , software or their combination, this can be achieved by those of ordinary skill in the art using their basic programming skills after reading the description of the present invention.
因此,本发明的目的还可以通过在任何计算装置上运行一个程序或者一组程序来实现。所述计算装置可以是公知的通用装置。因此,本发明的目的也可以仅仅通过提供包含实现所述方法或者装置的程序代码的程序产品来实现。也就是说,这样的程序产品也构成本发明,并且存储有这样的程序产品的存储介质也构成本发明。显然,所述存储介质可以是任何公知的存储介质或者将来所开发出来的任何存储介质。还需要指出的是,在本发明的装置和方法中,显然,各部件或各步骤是可以分解和/或重新组合的。这些分解和/或重新组合应视为本发明的等效方案。并且,执行上述系列处理的步骤可以自然地按照说明的顺序按时间顺序执行,但是并不需要一定按照时间顺序执行。某些步骤可以并行或彼此独立地执行。Therefore, the objects of the invention can also be achieved by running a program or a set of programs on any computing device. The computing device may be a well-known general-purpose device. Therefore, the object of the present invention can also be achieved only by providing a program product containing a program code for implementing the method or apparatus. That is, such a program product also constitutes the present invention, and a storage medium storing such a program product also constitutes the present invention. Obviously, the storage medium may be any known storage medium or any storage medium developed in the future. It should also be pointed out that in the device and method of the present invention, obviously, each component or each step can be decomposed and/or recombined. These decompositions and/or recombinations should be regarded as equivalent solutions of the present invention. Furthermore, the steps for executing the above series of processes can naturally be executed in chronological order in the order described, but do not necessarily need to be executed in chronological order. Certain steps can be performed in parallel or independently of each other.
以上所述是本发明的优选实施方式,应当指出,对于本技术领域的普通技术人员来说,在不脱离本发明所述原理的前提下,还可以作出若干改进和润饰,这些改进和润饰也应视为本发明的保护范围。The above is the preferred embodiment of the present invention. It should be pointed out that for those of ordinary skill in the art, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications can also be made. should be regarded as the protection scope of the present invention.
Claims (10)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311045398.6A CN117081673B (en) | 2023-08-18 | 2023-08-18 | A method and device for transmitting optical fiber data with interruption source in a multi-level mapping table |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311045398.6A CN117081673B (en) | 2023-08-18 | 2023-08-18 | A method and device for transmitting optical fiber data with interruption source in a multi-level mapping table |
Publications (2)
Publication Number | Publication Date |
---|---|
CN117081673A true CN117081673A (en) | 2023-11-17 |
CN117081673B CN117081673B (en) | 2025-01-24 |
Family
ID=88711040
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202311045398.6A Active CN117081673B (en) | 2023-08-18 | 2023-08-18 | A method and device for transmitting optical fiber data with interruption source in a multi-level mapping table |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN117081673B (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6219743B1 (en) * | 1998-09-30 | 2001-04-17 | International Business Machines Corporation | Apparatus for dynamic resource mapping for isolating interrupt sources and method therefor |
US10445184B1 (en) * | 2012-05-13 | 2019-10-15 | EMC IP Holding Company LLC | Snapshot mechanism |
US20200089617A1 (en) * | 2018-09-19 | 2020-03-19 | Toshiba Memory Corporation | Memory system, storage system and method of controlling the memory system |
CN116450554A (en) * | 2023-04-12 | 2023-07-18 | 深圳砺驰半导体科技有限公司 | Interrupt processing method, root complex device and electronic device |
-
2023
- 2023-08-18 CN CN202311045398.6A patent/CN117081673B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6219743B1 (en) * | 1998-09-30 | 2001-04-17 | International Business Machines Corporation | Apparatus for dynamic resource mapping for isolating interrupt sources and method therefor |
US10445184B1 (en) * | 2012-05-13 | 2019-10-15 | EMC IP Holding Company LLC | Snapshot mechanism |
US20200089617A1 (en) * | 2018-09-19 | 2020-03-19 | Toshiba Memory Corporation | Memory system, storage system and method of controlling the memory system |
CN116450554A (en) * | 2023-04-12 | 2023-07-18 | 深圳砺驰半导体科技有限公司 | Interrupt processing method, root complex device and electronic device |
Also Published As
Publication number | Publication date |
---|---|
CN117081673B (en) | 2025-01-24 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109144696B (en) | Task scheduling method and device, electronic equipment and storage medium | |
CN107247808B (en) | Distributed NewSQL database system and picture data query method | |
US8661023B1 (en) | Optimizing search query logic to speed retrieval | |
CN112800095B (en) | Data processing method, device, equipment and storage medium | |
US11681754B2 (en) | Technologies for managing connected data on persistent memory-based systems | |
US8789032B1 (en) | Feedback-directed inter-procedural optimization | |
CN103164490B (en) | A kind of efficient storage implementation method of not fixed-length data and device | |
US9547714B2 (en) | Multifaceted search | |
US20140046928A1 (en) | Query plans with parameter markers in place of object identifiers | |
CN109144697B (en) | Task scheduling method and device, electronic equipment and storage medium | |
CN113032105B (en) | Kubernetes cluster access control method, system and related equipment | |
US10747773B2 (en) | Database management system, computer, and database management method | |
CN103106261B (en) | Based on the distributed enquiring method of arrowband cloud data, services | |
CN108536759B (en) | Sample playback data access method and device | |
CN116893854A (en) | Method, device, equipment and storage medium for detecting conflict of instruction resources | |
US20110246582A1 (en) | Message Passing with Queues and Channels | |
CN108228432A (en) | A kind of distributed link tracking, analysis method and server, global scheduler | |
US9380126B2 (en) | Data collection and distribution management | |
CN110222046B (en) | List data processing method, device, server and storage medium | |
CN111813517A (en) | Task queue allocation method and device, computer equipment and medium | |
CN106484375B (en) | Instruction block loading method, soft switch equipment and system | |
JP2020537260A (en) | Memory allocation in data analysis system | |
US11157506B2 (en) | Multiform persistence abstraction | |
CN117081673A (en) | Multi-level mapping table interrupt source optical fiber data transmission method and device | |
CN112685417A (en) | Database operation method, system, device, server and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
TA01 | Transfer of patent application right |
Effective date of registration: 20240424 Address after: No. 1, Haixiang Middle Road, Fengcheng Street, Haiyang City, Yantai City, Shandong Province, 265100 Applicant after: Dongfang space technology (Shandong) Co.,Ltd. Country or region after: China Address before: 264000 No.1, Haixiang Middle Road, Fengcheng Street, Haiyang City, Yantai City, Shandong Province Applicant before: Dongfang space technology (Shandong) Co.,Ltd. Country or region before: China Applicant before: Oriental space technology (Beijing) Co.,Ltd. Applicant before: Oriental space (Xi'an) Aerospace Technology Co.,Ltd. Applicant before: Orient Space (Hainan) Technology Co.,Ltd. |
|
TA01 | Transfer of patent application right | ||
GR01 | Patent grant | ||
GR01 | Patent grant |