A method and device for transmitting optical fiber data with interruption source in a multi-level mapping table
By analyzing the data address in the optical data transmission and traversing in the multi -level mapping table to find the matching item, the corresponding level of interrupt sources are generated, and the corresponding interrupt processing instructions are performed according to the level and type of the interrupt source. The low efficiency and poor real -time problems in technology have achieved efficient and real -time data processing.
Patent Information
- Application Number
- CN202311045398.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-18
- Publication Date
- 2025-01-24
- Estimated Expiration
- 2043-08-18
AI Technical Summary
The prior art has problems of inefficiency and poor real-time performance in fiber data transmission, especially when analyzing data, finding matches, and generating interrupt sources in multi-level mapping tables.
By obtaining the data transmitted through the optical fiber, parsing the data address, traversing the multi-level mapping table level by level to find the matching item, generating the corresponding level of interrupt source, and executing the corresponding interrupt processing instructions according to the level and type of the interrupt source.
It improves the efficiency and real-time performance of data processing, ensures that matching items are quickly found in multi-level mapping tables and interrupt sources are generated in a timely manner, thus optimizing the data processing process.
Smart Images

Figure CN117081673B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data processing, and in particular to a method and device for transmitting data from an interruption source optical fiber of a multi-level mapping table. Background Art
[0002] 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 facing current technology.
[0003] In particular, when data transmission arrives at this node, it is necessary to parse the data to obtain the address corresponding to the data, and then find the matching item in the multi-level mapping table according to the address to generate the corresponding level of interrupt source, and execute the corresponding interrupt processing instruction according to the level and type of the interrupt source. However, the existing data processing methods often have problems such as low efficiency and poor real-time performance. Summary of the invention
[0004] The technical problem to be solved by the present invention is to provide a method and device for optical fiber data transmission with a multi-level mapping table interrupt source, which can effectively parse data, quickly find matching items in the multi-level mapping table, promptly generate interrupt sources of corresponding levels, 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.
[0005] In order to solve the above technical problems, the technical solution of the present invention is as follows:
[0006] In a first aspect, a method for transmitting data from a multi-level mapping table interruption source optical fiber is provided, the method comprising:
[0007] Obtain data transmitted to this node via optical fiber;
[0008] Parsing the data to obtain the address corresponding to the data;
[0009] According to the address, items in a first-level mapping table in a 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 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 a 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, and each group of data areas includes at least one address and length;
[0010] According to the interrupt source, the level and type of the interrupt source are acquired, and corresponding interrupt processing instructions are executed according to the level and type of the interrupt source.
[0011] Furthermore, the data transmitted to the node through the optical fiber is obtained, including:
[0012] Get the number M of data areas and the number N of addresses contained in each data area;
[0013] Allocate required storage space for each data area, for storing at least one address and length information corresponding to each address;
[0014] A fixed storage location is allocated in each data area for each address and the length corresponding to each address according to the numerical value of the storage address, so as to form a multi-level mapping table with a length of N.
[0015] Furthermore, the length information includes a start position and an end position of the address and a length of a continuous address region from the start position to the end position.
[0016] Furthermore, required storage space is allocated to each data area for storing at least one address and length information corresponding to each address, including:
[0017] Get the storage space required for each address information and length information;
[0018] Allocate corresponding storage space to each data area according to the required storage space;
[0019] In the allocated storage space, the corresponding length information is stored for each address.
[0020] Further, according to the address, items in a first-level mapping table in the multi-level mapping table are traversed in order one by one 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 all mapping tables are traversed, including:
[0021] Traverse the entire metadata table or status table in sequence to obtain the status of each data area;
[0022] 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;
[0023] If the status of the first data area is displayed as occupied, the first data area is skipped and the traversal continues to the next data area.
[0024] Further, 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, including:
[0025] Traverse the mapping table again, find the storage area corresponding to the data, and obtain the physical address of the storage area;
[0026] Access the physical address and read the required data or write the data to the target address according to the length and format of the storage area;
[0027] The read data is returned to the requester, or the mapping table is updated after the data is written to the target address.
[0028] Further, according to the interrupt source, the level and type of the interrupt source are obtained, and after the corresponding interrupt processing instruction is executed according to the level and type of the interrupt source, the method further includes:
[0029] Set priority for each interrupt source and mapping entry;
[0030] Sorting the interrupt sources and mapping items according to their priorities to obtain a list of interrupt sources and mapping items in descending order of priority;
[0031] Select interrupt sources or mapping items one by one from the sorted list for processing.
[0032] In a second aspect, a multi-level mapping table interruption source optical fiber data transmission device comprises:
[0033] The acquisition module is used to acquire data transmitted to the node through the optical fiber; parse the data to obtain the address corresponding to the data;
[0034] A processing module is used to traverse the items in the first-level mapping table of 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, 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, generate an interrupt source of a corresponding level 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 areas includes at least one address and length; according to the interrupt source, obtain the level and type of the interrupt source, and execute the corresponding interrupt processing instruction according to the level and type of the interrupt source.
[0035] According to a third aspect, a computing device includes:
[0036] one or more processors;
[0037] The 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.
[0038] In a fourth aspect, a computer-readable storage medium stores a program, and the program implements the above method when executed by a processor.
[0039] The above solution of the present invention includes at least the following beneficial effects:
[0040] The above scheme of the present invention can effectively parse data, quickly find matching items in the multi-level mapping table, timely generate interrupt sources of corresponding levels, 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 addition, the method should also be able to effectively construct and use the multi-level mapping table to improve the storage efficiency of data addresses and lengths. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] Figure 1 It is a flow chart of a multi-level mapping table interruption source optical fiber data transmission method provided by an embodiment of the present invention.
[0042] Figure 2 It is a schematic diagram of a multi-level mapping table interruption source optical fiber data transmission device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0043] The exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.
[0044] like Figure 1 As shown, an embodiment of the present invention provides a multi-level mapping table interruption source optical fiber data transmission method, the method comprising:
[0045] Step 11, obtaining data transmitted to the node via the optical fiber;
[0046] Step 12, parsing the data to obtain the address corresponding to the data;
[0047] 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 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, generate an interrupt source of a corresponding level 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 areas includes at least one address and length;
[0048] Step 14: 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.
[0049] In an embodiment of the present invention, data transmitted to the node through an optical fiber is obtained. Optical fiber is a channel for transmitting data, which has the characteristics of fast transmission speed and less data loss, and can transmit a large amount of data to the node in real time. The data is parsed to obtain the address corresponding to the data. The purpose of parsing the data is to find out the address information contained in the data, so as to facilitate the subsequent data processing. This operation can better understand the meaning and purpose of 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 matching items, and an interrupt source of the corresponding level is generated. This process is to quickly find the required data in the case of complex data and improve the processing efficiency. At the same time, the generated interrupt source can focus on the important data and optimize the use of resources. According to the interrupt source, the level and type of the interrupt source are obtained, and the corresponding interrupt processing instruction is executed. This operation can perform different operations according to different interrupt sources, so that the data processing is more targeted. In addition, this can also classify and manage various types and levels of interrupt sources, and improve the efficiency and accuracy of data processing.
[0050] In a preferred embodiment of the present invention, the above step 11 may include:
[0051] Step 111, obtaining the number M of data regions and the number N of addresses contained in each data region;
[0052] Step 112, allocating required storage space to each data area for storing at least one address and length information corresponding to each address, wherein the length information includes a start position and an end position of the address and a length of a continuous address area from the start position to the end position;
[0053] Step 113, allocating a fixed storage location in each data area for each address and the length corresponding to each address according to the numerical value of the storage address, so as to form a multi-level mapping table with a length of N.
[0054] In an embodiment of the present invention, obtaining the number M of data regions and the number N of addresses contained in each data region helps to understand the overall structure and scale of the mapping table and create conditions for subsequent data storage and retrieval. Allocating the required storage space to each data region for storing at least one address and the length information corresponding to each address can ensure that each data region has enough space to store the address and length information, thereby avoiding data loss or confusion. Allocating a fixed storage location in each data region for each address and the length corresponding to each address according to the numerical value of the storage address to form a multi-level mapping table with a length of N can ensure that each address and length information has a fixed position in the mapping table, which is convenient for subsequent data retrieval and use. At the same time, the design of the multi-level mapping table can further improve the efficiency of data retrieval.
[0055] In a preferred embodiment of the present invention, the above step 112 may include:
[0056] Step 1121, obtaining the storage space required for each address information and length information;
[0057] Step 1122, allocating corresponding storage space to each data area according to the required storage space;
[0058] Step 1123, store corresponding length information for each address in the allocated storage space.
[0059] In an embodiment of the present invention, the storage space required for each address information and length information is obtained. This step will determine the required storage space according to the size and type of the data, which is helpful for the reasonable allocation and utilization of storage resources. According to the required storage space, the corresponding storage space is allocated to each data area. This step is based on the storage space requirements required for each address information and length information obtained in step 1121, and appropriate storage space is allocated to each data area to 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 in each data area, thereby providing complete data information and facilitating the subsequent retrieval and use of data.
[0060] In a preferred embodiment of the present invention, the above step 13 may include:
[0061] Step 131, traverse the entire metadata table or status table in sequence to obtain the status of each data area;
[0062] Step 132, if the state 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;
[0063] Step 133: If the status of the first data area is displayed as occupied, skip the first data area and continue to traverse the next data area.
[0064] In the embodiment of the present invention, by traversing the metadata table or the status table to obtain the status of each data area, the usage of each data area can be understood, so as to make better data management decisions; if the status of the first data area is idle or partially occupied, the new data will be written into this area, and then the program will jump to the next data area, so that efficient use of storage space can be achieved and space waste can be avoided; if the status of the first data area is occupied, the program will skip this area and continue to traverse the next data area. In this way, unnecessary operations on the occupied data area can be avoided, and the efficiency of data management can be improved.
[0065] In a preferred embodiment of the present invention, the above step 14 may include:
[0066] Step 141, traverse the mapping table again, find the storage area corresponding to the data, and obtain the physical address of the storage area;
[0067] 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;
[0068] Step 143, returning the read data to the requester, or writing the data to the target address, and then updating the mapping table.
[0069] In an 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, so that the actual storage location of the data can be determined, providing a basis for the subsequent data read and write 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 can ensure the correct reading or writing of the data. 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, can ensure the accuracy and consistency of the data, and also make data access more efficient.
[0070] In a preferred embodiment of the present invention, after the above step 14, the following steps may be included:
[0071] Step 15, setting a priority for each interrupt source and mapping item;
[0072] Step 16, sorting the interrupt sources and mapping items according to their priorities to obtain a list of interrupt sources and mapping items in descending order of priority;
[0073] Step 17, selecting interrupt sources or mapping items one by one from the sorted list for processing.
[0074] In an embodiment of the present invention, a priority is set for each interrupt source and mapping item, so that the interrupt sources and mapping items can be managed with priority. This allows the system to process multiple interrupt sources and mapping items according to the priority, ensuring that high-priority interrupt sources and mapping items are processed first. According to the priority of the interrupt source and mapping item, the system sorts them to obtain a list of interrupt sources and mapping items in order from high to low priority, in order to effectively manage and schedule these resources when multiple interrupt sources and mapping items exist, ensuring the stable operation of the system. The interrupt sources or mapping items are selected one by one from the sorted list for processing, which has the advantage of ensuring that the interrupt sources and mapping items are processed in order according to the priority, ensuring that high-priority tasks can be processed first, and improving the response speed and processing efficiency of the system.
[0075] like Figure 2 As shown, an embodiment of the present invention further provides a multi-level mapping table interruption source optical fiber data transmission device 20, comprising:
[0076] The acquisition module 21 is used to acquire data transmitted to the node through the optical fiber; parse the data to obtain the address corresponding to the data;
[0077] The processing module 22 is used to traverse the items in the first-level mapping table of 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, the next-level mapping table is traversed 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 a 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 areas includes at least one address and length; according to the interrupt source, the level and type of the interrupt source are obtained, and the corresponding interrupt processing instruction is executed according to the level and type of the interrupt source.
[0078] Optionally, obtain data transmitted to the node through the optical fiber, including:
[0079] Get the number M of data areas and the number N of addresses contained in each data area;
[0080] Allocate required storage space for each data area, for storing at least one address and length information corresponding to each address;
[0081] A fixed storage location is allocated in each data area for each address and the length corresponding to each address according to the numerical value of the storage address, so as to form a multi-level mapping table with a length of N.
[0082] Optionally, the length information includes a start position and an end position of the address and a length of a continuous address region from the start position to the end position.
[0083] Optionally, allocating required storage space to each data area for storing at least one address and length information corresponding to each address includes:
[0084] Get the storage space required for each address information and length information;
[0085] Allocate corresponding storage space to each data area according to the required storage space;
[0086] In the allocated storage space, the corresponding length information is stored for each address.
[0087] Optionally, according to the address, items in a first-level mapping table in the multi-level mapping table are traversed one by one in order to obtain a matching item, and if the matching item is not obtained, the next-level mapping table is traversed one by one in order until a matching item is obtained or all mapping tables are traversed, including:
[0088] Traverse the entire metadata table or status table in sequence to obtain the status of each data area;
[0089] 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;
[0090] If the status of the first data area is displayed as occupied, the first data area is skipped and the traversal continues to the next data area.
[0091] Optionally, according to the interrupt source, acquiring the level and type of the interrupt source, and executing a corresponding interrupt processing instruction according to the level and type of the interrupt source, including:
[0092] Traverse the mapping table again, find the storage area corresponding to the data, and obtain the physical address of the storage area;
[0093] Access the physical address and read the required data or write the data to the target address according to the length and format of the storage area;
[0094] The read data is returned to the requester, or the mapping table is updated after the data is written to the target address.
[0095] Optionally, after obtaining the level and type of the interrupt source according to the interrupt source and executing a corresponding interrupt processing instruction according to the level and type of the interrupt source, the method further includes:
[0096] Set priority for each interrupt source and mapping entry;
[0097] Sorting the interrupt sources and mapping items according to their priorities to obtain a list of interrupt sources and mapping items in descending order of priority;
[0098] Select interrupt sources or mapping items one by one from the sorted list for processing.
[0099] It should be noted that the device is a device corresponding to the above method, and all implementation methods in the above method embodiment are applicable to this embodiment and can achieve the same technical effect.
[0100] The embodiment of the present invention further provides a computing device, comprising: a processor, a memory storing a computer program, wherein when the computer program is executed by the processor, the method described above is executed. All implementations in the above method embodiment are applicable to this embodiment and can achieve the same technical effect.
[0101] The embodiment of the present invention also provides a computer-readable storage medium storing instructions, which, when executed on a computer, enable the computer to execute the method described above. All implementations in the above method embodiment are applicable to this embodiment and can achieve the same technical effect.
[0102] Those skilled 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 in 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. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0103] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0104] 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 schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0105] 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 distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0106] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0107] 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, or the part that contributes to the prior art, 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 for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard disks, ROM, RAM, magnetic disks, or optical disks.
[0108] In addition, it should be noted that in the apparatus and method of the present invention, it is obvious that each component or each step can be decomposed and / or recombined. These decompositions and / or recombinations should be regarded as equivalent schemes of the present invention. Moreover, the steps of performing the above-mentioned series of processing can naturally be performed in chronological order according to the order of description, but it is not necessary to perform them in chronological order, and some steps can be performed in parallel or independently of each other. For those of ordinary skill in the art, it is understood that all or any steps or components of the method and apparatus of the present invention can be implemented in any computing device (including processors, storage media, etc.) or a network of computing devices in hardware, firmware, software or a combination thereof, which can be achieved by those of ordinary skill in the art using their basic programming skills after reading the description of the present invention.
[0109] Therefore, the purpose of the present invention can also be achieved by running a program or a group of programs on any computing device. The computing device can be a well-known general device. Therefore, the purpose of the present invention can also be achieved by simply providing a program product containing a program code that implements the method or device. That is to say, such a program product also constitutes the present invention, and the storage medium storing such a program product also constitutes the present invention. Obviously, the storage medium can be any well-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, it is obvious that each component or each step can be decomposed and / or recombined. These decompositions and / or recombinations should be regarded as equivalent schemes of the present invention. In addition, the steps of performing the above-mentioned series of processing can naturally be performed in chronological order according to the order of description, but it is not necessary to perform them in chronological order. Some steps can be performed in parallel or independently of each other.
[0110] The above is a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A method for transmitting data from a multi-level mapping table interruption source optical fiber, characterized in that: The method comprises: Acquire the data transmitted to the node through the optical fiber and form a multi-level mapping table; Parsing the data to obtain the address corresponding to the data; According to the address, items in a first-level mapping table in a 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 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 a 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, and each group of data areas includes at least one address and length; According to the interrupt source, obtaining the level and type of the interrupt source, and executing corresponding interrupt processing instructions according to the level and type of the interrupt source; Obtain the data transmitted to this node through the optical fiber and form a multi-level mapping table, including: Get the number M of data areas and the number N of addresses contained in each data area; Allocate required storage space for each data area, for storing at least one address and length information corresponding to each address; A fixed storage location is allocated in each data area for each address and the length corresponding to each address according to the numerical value of the storage address, so as to form a multi-level mapping table with a length of N.
2. The multi-level mapping table interruption source optical fiber data transmission method according to claim 1, characterized in that: The length information includes a start position and an end position of the address and a length of a continuous address region from the start position to the end position.
3. The multi-level mapping table interruption source optical fiber data transmission method according to claim 2, characterized in that: Allocate required storage space for each data area to store at least one address and length information corresponding to each address, including: Get the storage space required for each address information and length information; Allocate corresponding storage space to each data area according to the required storage space; In the allocated storage space, the corresponding length information is stored for each address.
4. The multi-level mapping table interruption source optical fiber data transmission method according to claim 3, characterized in that: According to the address, items in a 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 one by one in order until a matching item 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, write new data into the first data area and jump 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 traversal continues to the next data area.
5. The method for transmitting data from a multi-level mapping table interruption source optical fiber according to claim 4, characterized in that: 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, including: Traverse the mapping table again, find the storage area corresponding to the data, and obtain the physical address of the storage area; Access the physical address and read the required data or write the data to the target address according to the length and format of the storage area; The read data is returned to the requester, or the mapping table is updated after the data is written to the target address.
6. The method for transmitting data from a multi-level mapping table interruption source optical fiber according to claim 5, characterized in that: According to the interrupt source, the level and type of the interrupt source are obtained, and after the corresponding interrupt processing instruction is executed according to the level and type of the interrupt source, the method further includes: Set priority for each interrupt source and mapping entry; Sorting the interrupt sources and mapping items according to their priorities to obtain a list of interrupt sources and mapping items in descending order of priority; Select interrupt sources or mapping items one by one from the sorted list for processing.
7. A multi-level mapping table interruption source optical fiber data transmission device, characterized in that: include: An acquisition module, used for acquiring data transmitted to the node via optical fiber; Parsing the data to obtain the address corresponding to the data; A processing module, configured to sequentially traverse the items in a first-level mapping table in a multi-level mapping table one by one 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 according to the sequence until a matching item is obtained or all mapping tables are traversed; if the matching item is obtained, generate an interrupt source of a corresponding level 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 areas includes at least one address and length; According to the interrupt source, obtaining the level and type of the interrupt source, and executing corresponding interrupt processing instructions according to the level and type of the interrupt source; The multi-level mapping table is formed by acquiring data transmitted to the node through the optical fiber, and the forming steps include: Get the number M of data areas and the number N of addresses contained in each data area; Allocate required storage space for each data area, for storing at least one address and length information corresponding to each address; A fixed storage location is allocated in each data area for each address and the length corresponding to each address according to the numerical value of the storage address, so as to form a multi-level mapping table with a length of N.
8. A computing device, characterized in that include: one or more processors; A storage device, used for storing 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 method according to any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a program, which, when executed by a processor, implements the method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Interrupt processing method, root complex device and electronic device
CN116450554A
Apparatus for dynamic resource mapping for isolating interrupt sources and method therefor
US6219743B1