Data scheduling method and apparatus applied in FTTR network, device, and medium
Patent Information
- Application Number
- CN202610970455.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-30
- Publication Date
- 2026-09-22
AI Technical Summary
然而,该方式在实际应用中存在缓存资源利用率低、易发生丢包的问题
[0010]由以上技术方案可以看出,在本实施例中,首先,为与OLT连接的N个ONU配置一个共享的缓存空间,替代传统为每个ONU分配独立缓存区的静态划分方式。之后,在接收来自任一ONU发送的数据包(完整数据包或完整数据包的一部分)时,通过判断本地是否已存储与该ONU绑定的、不满足完整要求的数据包的地址链表,来确定该数据包是续接上一个未完成的数据包还是开启一个新数据包,若已存储,则将该数据包的存储地址记录至该已有的地址链表中,若未存储,则创建包含该数据包存储地址的新地址链表。进而,在确定任一数据包满足完整要求时,根据该数据包对应的地址链表调度转发。
Smart Images

Figure CN122802820A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of communication technology, and in particular to data scheduling methods, apparatus, devices and media applied in FTTR networks. Background Technology
[0002] In a Fiber to the Room (FTTR) system, the Optical Line Terminal (OLT) allocates time slots to each Optical Network Unit (ONU) using a time-division multiplexing mechanism. Each ONU then sequentially sends data packets to the OLT within its allocated time slot. Since the length of the allocated time slot is not necessarily equal to the length of the data packets sent by the ONU, an ONU may split a data packet into multiple packets for transmission across different periods. Therefore, the OLT needs to buffer and reassemble the data from each ONU.
[0003] In related technologies, OLTs typically allocate an independent buffer for each ONU and use multi-level round-robin scheduling to merge and output the data from each ONU. However, this approach suffers from low buffer resource utilization and is prone to packet loss in practical applications.
[0004] Therefore, there is an urgent need for a data scheduling method that can be applied to FTTR networks to improve the utilization of cache resources and reduce the risk of packet loss. Summary of the Invention
[0005] In view of this, embodiments of this application provide a data scheduling method, apparatus, device, and medium applied in an FTTR network to improve cache resource utilization and reduce the risk of packet loss.
[0006] This application provides a data scheduling method applied in an FTTR network. The method is applied to an optical line terminal (OLT), which connects N optical network units (ONUs), and the N ONUs share the same buffer space; N is greater than 1; the method includes: Receive a data packet sent from any ONU, determine the storage address of the data packet to be cached from the cache space, and if there is no address list of data packets that do not meet the integrity requirements bound to the ONU stored locally, create an address list containing the storage address of the data packet; if there is already an address list of data packets that do not meet the integrity requirements bound to the ONU stored locally, record the storage address of the data packet into the existing address list. The data packets are cached in the storage address according to the order of data units; When any data packet is determined to meet the integrity requirements, the packet is scheduled for forwarding based on its storage address in the address list.
[0007] This application embodiment also provides a data scheduling device applied in an FTTR network. The device is applied to an optical line terminal (OLT), which connects N optical network units (ONUs), and the N ONUs share the same buffer space; N is greater than 1; the device includes: The linked list management module is used to receive data packets sent from any ONU, determine the storage address of the data packet to be cached from the cache space, and create an address linked list containing the storage address of the data packet if there is no address linked list of data packets bound to the ONU that do not meet the integrity requirements stored locally; if there is already an address linked list of data packets bound to the ONU that do not meet the integrity requirements stored locally, the storage address of the data packet is recorded in the existing address linked list. The scheduling module is used to cache the data packets to the storage address in order of data units; When any data packet is determined to meet the integrity requirements, the packet is scheduled for forwarding based on its storage address in the address list.
[0008] This application also provides an electronic device, including: a processing circuit, the processing circuit including at least a field-programmable gate array (FPGA) processing chip and a machine-readable storage medium for storing machine-executable instructions, wherein the machine-executable instructions, when run by the machine-readable storage medium, cause the processing circuit to perform the steps of the above method.
[0009] This application also provides a machine-readable storage medium storing machine-executable instructions that, when executed, enable the implementation of the steps described above.
[0010] As can be seen from the above technical solution, in this embodiment, firstly, a shared buffer space is configured for the N ONUs connected to the OLT, replacing the traditional static partitioning method of allocating an independent buffer area for each ONU. Then, when receiving a data packet (a complete data packet or a part of a complete data packet) from any ONU, the system determines whether to continue an incomplete data packet or start a new data packet by checking if a list of addresses of data packets bound to that ONU that do not meet the integrity requirement is already stored locally. If the data packet is already stored, its storage address is recorded in the existing address list; otherwise, a new address list containing the storage address of the data packet is created. Finally, when it is determined that any data packet meets the integrity requirement, it is scheduled and forwarded according to the address list corresponding to that data packet.
[0011] This scheduling method based on shared cache and address linked list, compared with the traditional method of allocating an independent cache for each ONU and adopting multi-level round-robin scheduling, not only enables multiple ONUs to dynamically reuse the limited cache space, significantly improving the utilization of cache resources, but also avoids packet loss due to cache overflow of a single ONU caused by independent cache space.
[0012] Furthermore, since multi-level polling scheduling is not required, data packets can be forwarded directly once they are complete, eliminating the risk of scheduling blockage. This further reduces the probability of data packet loss in the FTTR system, simplifies the scheduling process, and reduces hardware overhead. Attached Figure Description
[0013] Figure 1 A network architecture diagram of the FTTR network provided in the embodiments of this application; Figure 2a This is a schematic diagram illustrating how an ONU is divided into a first-level scheduling group, as provided in related technologies. Figure 2b Another schematic diagram showing the ONU being divided into first-level scheduling groups as provided in related technologies; Figure 3 A flowchart illustrating the method provided in the embodiments of this application; Figure 4 A schematic diagram of the address chain list and ONU binding record provided in the embodiments of this application; Figure 5 This is a schematic diagram of the device provided in the embodiments of this application; Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0014] To make the methods provided in this application easier to understand, the methods provided in this application will be described in detail below with reference to the accompanying drawings and embodiments.
[0015] Before introducing the method provided in the embodiments of this application, let's first combine... Figure 1 , Figure 2a and Figure 2b The existing technical problems are explained: As a next-generation smart network promoted by operators, FTTR networks are characterized by huge demand and extremely low cost requirements. Therefore, OLTs need to achieve the function of supporting N ONUs on a very small number of devices, which places extremely high demands on the utilization of resources such as cache.
[0016] Please see Figure 1 , Figure 1 This is a network architecture diagram of the FTTR network provided in an embodiment of this application. Figure 1As shown, in this FTTR network, one OLT connects ONU0-ONU15 (referred to as 1-to-16). The OLT allocates bandwidth (i.e., time slots) to these 16 ONUs according to a time-division multiplexing mechanism. If the time slots are exhausted in the current cycle, time slots are allocated to the remaining ONUs in the next cycle. Each ONU sequentially sends data packets to the OLT within its allocated time slot. For each ONU, since the allocated time slot length is not necessarily equal to the length of the data packet to be sent by the ONU, the ONU may divide a data packet into multiple fragments and send them in different cycles (in this case, each sent data packet is a fragment of the complete data packet). Therefore, the OLT needs to buffer and reassemble the data from each ONU.
[0017] Currently, one data scheduling method in related technologies is as follows: Figure 2a As shown, the OLT allocates an independent First-In-First-Out (FIFO) buffer for each ONU to temporarily store the data reported by that ONU. Simultaneously, the 16 ONUs are divided into four first-level scheduling groups, each containing four ONUs with consecutive IDs (e.g., ONU0-ONU3 in one group, ONU4-ONU7 in another, and so on). The four ONUs within each group are merged into a single data stream through first-level round-robin scheduling. Then, the four data streams from the first-level output are merged into a final single output stream through second-level round-robin scheduling.
[0018] In this scheme, the scheduler can only read the FIFO buffer of each ONU after a complete data packet has been sent out. During the first-level polling scheduling, the scheduler sequentially checks the FIFO buffer of each ONU for a complete data packet. If a complete data packet is found, it is retrieved, and the scheduler moves on to the next ONU; otherwise, it skips the current ONU. During the second-level polling, the scheduler sequentially checks one output channel of each group for a data packet. If a data packet is found, it is retrieved, and the scheduler moves on to the next output channel of the next group; otherwise, it skips the current channel.
[0019] However, this scheduling method suffers from low cache resource utilization and is prone to packet loss. Since the scheduler can only serve one ONU at a time, when multiple ONUs in a group are sending consecutive data packets, the scheduler must read one packet from each ONU sequentially. During this process, other ONUs' time slots continue to advance in sequence, potentially uploading multiple new data packets and causing a continuous accumulation of packets in their own FIFO buffers. If the FIFO depth is insufficient to accommodate these accumulated packets, overflow packet loss will occur.
[0020] For example, while the scheduler is reading data packets from ONU0 (time T), ONU1, ONU2, and ONU3 send data packets according to their respective time slots. When the scheduler finishes reading ONU0 and starts reading data packets from ONU1, ONU1's FIFO has already been updated with the data packets received within time T. Multiple data packets may arrive within ONU1's time slot, but only one can be transferred. Before the next polling cycle arrives, this will cause data packet accumulation. If the depth of ONU1's FIFO is insufficient to accommodate these accumulated data packets, overflow and packet loss will occur.
[0021] More seriously, many data packets are fragmented and sent in different cycles. This incomplete data packet occupies the FIFO buffer while waiting to be polled by the scheduler. During this time, the ONU may receive new complete or incomplete data packets, compressing the available buffer space and making it more prone to overflow.
[0022] For example, suppose that each of ONU0, ONU1, ONU2, and ONU3 has an incomplete data packet in its FIFO buffer (e.g., an incomplete data packet missing only the last 1 byte). These incomplete data packets cannot be read by the scheduler due to the lack of a packet tail identifier, and thus occupy buffer space for a long time. At the start of the next polling cycle, ONU0's time slot arrives first, and it uploads the last 1 byte of data, turning the incomplete data packet into a complete packet. The scheduler then begins reading this complete packet (time T). During this period, ONU1's time slot arrives. Due to the time slot length, after uploading the last 1 byte of data, ONU1 may upload multiple complete packets consecutively, or upload multiple complete packets consecutively followed by one incomplete data packet. However, ONU1's FIFO buffer already has most of its space occupied by the previous incomplete data packets, leaving limited free space. The newly uploaded data packets quickly fill the remaining space, resulting in no place to store subsequent data packets, leading to packet loss. Similarly, ONU2 and ONU3 will also upload new data packets in their respective time slots, further exacerbating the risk of packet loss in the buffer.
[0023] Based on the data scheduling methods described above, another data scheduling method in related technologies is as follows: Figure 2bAs shown, the first-level scheduling group is adjusted to include a specified number of ONUs at equal intervals, so that consecutively transmitting ONUs no longer belong to the same scheduling group. For example, ONU0, ONU4, ONU8, and ONU12 are grouped into one group, ONU1, ONU5, ONU9, and ONU13 into another group, and so on. This avoids consecutively transmitting ONU0-ONU3 being in the same first-level scheduling group. Consequently, the data packets consecutively transmitted by ONU0-ONU3 no longer all flood into the first-level scheduling group, but are distributed across different first-level scheduling groups. Utilizing the input buffer of the second-level scheduling group as an extension of the first-level scheduling group's packet buffer reduces the risk of first-level FIFO overflow to some extent.
[0024] However, this adjustment method is only effective when the identifiers (IDs) of online ONUs are strictly consecutive (i.e., all ONUs 0-15 are online). Once some ONUs go offline, causing IDs to become discontinuous, the transmission time interval between ONUs in the same group that were originally separated will shorten, thus degenerating into continuous grouping (i.e., the first scenario mentioned above), and the risk of packet loss still exists. Furthermore, this method still requires additional configuration of a first-level FIFO buffer and a second-level FIFO buffer, resulting in significant hardware overhead.
[0025] Based on this, embodiments of this application provide a data scheduling method, apparatus, device, and medium applied in FTTR networks to improve cache resource utilization and reduce packet loss risk.
[0026] The method provided in the embodiments of this application is described in detail below: The method provided in this application is executed by an OLT, which connects N Optical Network Units (ONUs) (N is greater than 1). These N ONUs share the same buffer space. The buffer space is divided into multiple storage units, each of which caches a block of data, such as 1 byte. For ease of explanation, the following will refer to... Figure 1 The following explanation will be based on the example of a 1-to-16 configuration.
[0027] Optionally, as an example, the total capacity of the buffer space is at least equal to the sum of the preset capacity of the data packets corresponding to the N ONUs. This ensures that even when all ONUs are simultaneously in the worst-case scenario (i.e., each ONU has an incomplete data packet), there is still sufficient buffer space to accommodate newly arriving data packets, fundamentally eliminating the risk of packet loss due to insufficient buffering. Simultaneously, this capacity configuration satisfies the reliability requirements of extreme scenarios while avoiding the resource waste caused by independently reserving a large buffer for each ONU, achieving an optimal balance between reliability and resource efficiency.
[0028] See Figure 3 , Figure 3 This is a flowchart illustrating the method provided in an embodiment of this application.
[0029] S301: Receive a data packet sent from any ONU, determine the storage address of the data packet to be cached from the buffer space, and if there is no address list of data packets bound to an ONU that do not meet the integrity requirements stored locally, create an address list containing the storage address of the data packet; if there is already an address list of data packets bound to an ONU that do not meet the integrity requirements stored locally, record the storage address of the data packet into the existing address list.
[0030] Specifically, the OLT allocates time slots to each ONU sequentially according to the time-division multiplexing mechanism. Within a given ONU's time slot, the OLT receives data packets sent by that ONU. A data packet can be a complete data packet (i.e., not a fragment of a complete data packet and therefore not concatenated with other data fragments) or a portion of a complete data packet (i.e., a fragment of a complete data packet). After receiving a data packet, the OLT dynamically allocates one or more free storage units from the shared buffer space based on the data length of the data packet. These storage units may be physically contiguous or non-contiguous, but the OLT records the addresses of all allocated storage units (i.e., the storage address of the data packet to be cached) for subsequent storage and linked list management.
[0031] The OLT determines whether the current data packet needs to be reassembled with previous data packets by checking if a list of addresses of data packets bound to the ONU that do not meet the integrity requirements is already stored locally. The binding relationship between the ONU and the data packet's address list is described later.
[0032] The local system maintains binding records using the ONU ID as an index. Each binding record includes: the starting storage address, the last storage address, and a forwarding flag in the address chain of the data packet corresponding to the binding record. If the forwarding flag of any data packet recorded in the ONU binding record is the first value (e.g., 1), it indicates that the data packet recorded in the binding record does not meet the integrity requirements (it is a data fragment of a complete data packet that needs to be reassembled with subsequently received data packets). If the forwarding flag of any data packet is the second value (e.g., 0), it indicates that the data packet meets the integrity requirements.
[0033] Thus, by determining whether a binding record with the forwarding flag set to the first value exists locally, it is possible to determine whether the local address list of data packets bound to the ONU that do not meet the integrity requirements has been stored, and thus determine whether the current data packet needs to be reassembled with the previous data packets.
[0034] Specifically, if the binding record of the ONU ID contains a binding record with the forwarding flag set to the first value, it indicates that the local storage already contains an address list of data packets bound to the ONU that do not meet the integrity requirements. This means that the ONU currently has an incomplete data packet being assembled, and the address list for that data packet already exists. In this case, the current data packet should be considered as a subsequent data fragment of the incomplete data packet, and the storage addresses of each storage unit allocated this time should be written into the existing address list in the order of the data units (i.e., appended to the end of the existing address list based on the last storage address in the binding record).
[0035] Next, the last storage address in the binding record is updated based on the last storage address allocated in this instance, as well as the forwarding flag in the binding record. Specifically, if a list of addresses of packets that do not meet the completeness requirements and are bound to this ONU was previously stored locally (i.e., the starting and last storage addresses of the corresponding address list bound to the ONU ID in the cache space, and the forwarding flag assigned to the packet), then the existing binding relationship is retained (no need for repeated binding). Only the last storage address in the binding record needs to be updated to the last storage address allocated in this instance.
[0036] If the binding record for this ONU ID does not contain a binding record with the forwarding flag set to the first value, it indicates that the local storage does not contain an address list of incomplete data packets bound to this ONU that do not meet the integrity requirements. This means that before the current data packet, the ONU did not have any incomplete data packets being assembled. In this case, the current data packet should be processed as a new data packet, and a new address list should be created. When creating a new address list, the storage addresses of each storage unit allocated in this instance are written in the order of the data units to obtain the address list for this data packet. For example, the storage address of the storage unit allocated for the first data unit is used as the head node of the address list, and the storage addresses of the storage units allocated for subsequent data units are linked sequentially to the storage address of the storage unit allocated for the previous data unit to form a chain structure, thus obtaining the newly created address list.
[0037] Next, the newly established address list is bound to the ONU. Establishing a binding relationship means binding the starting and last storage addresses of the address list for this data packet, as well as the assigned forwarding flag, to the ONU's ONU ID. Specifically, if the address list corresponding to the current data packet is newly created (i.e., an address list of data packets that do not meet the completeness requirements and are not previously stored locally with this ONU), a binding record bound to the ONU ID is generated based on the first and last storage addresses of that address list and the set forwarding flag, thus establishing the binding relationship. This allows the system to locate the end of the existing address list for this data packet when other data packets that can form a complete data packet are subsequently received.
[0038] Since the received current data packet carries a packet tag, the method used to determine whether to update an existing forwarding flag or allocate a new one is based on the packet tag carried by the current data packet. This provides a basis for subsequently determining whether any data packet can be forwarded.
[0039] Optionally, in one implementation, the packet flag is a packet tail identifier. If the last data unit of the packet carries a packet tail identifier with a second value of 0, it indicates that the packet is a new complete packet, or that the packet, together with other previously stored packets, constitutes a complete packet (i.e., it is the last continuation fragment of an existing packet), and the forwarding flag is set to the second value of 0. If a forwarding flag already exists for the packet, it is updated to the second value of 0; if it does not exist, a new forwarding flag is created with the second value of 0.
[0040] If the last data unit of the data packet carries a packet tail identifier with the first value 1, it indicates that the data packet itself is not a complete data packet and has not been able to form a complete data packet with the previous data packets. In this case, the forwarding flag is set to the first value 1.
[0041] S302 caches data packets to the storage address in the order of data units.
[0042] In this embodiment, the OLT writes the data of the current data packet into the allocated storage units in S301 sequentially according to the order of data units. It should be noted that writing data and building the address linked list can be performed simultaneously. After each storage unit is written, the address of that storage unit can be linked to the pointer field of the previous storage unit (if it is the first storage unit, it becomes the head node of the linked list), thereby realizing "storing and building the linked list at the same time", without waiting for the entire data packet to be written before building the linked list.
[0043] S303, when it is determined that any data packet meets the integrity requirement, the forwarding of the data packet is scheduled based on the storage address in the address chain of the data packet.
[0044] In this embodiment, it is determined whether any data packet meets the integrity requirement by judging the value of the forwarding flag of the data packet recorded in the binding record under the ONU ID. If the forwarding flag of the data packet recorded in the binding record is the first value (e.g., 1), it is determined that the data packet meets the integrity requirement and the forwarding requirement, and forwarding can be performed. If the forwarding flag of the data packet recorded in the binding record is the second value (e.g., 0), it is determined that the data packet does not meet the integrity requirement and the forwarding requirement, and forwarding is not performed. Instead, it waits for subsequent data fragmentation.
[0045] When any data packet is determined to meet the integrity requirement, the OLT, based on the address list corresponding to the data packet (a new complete data packet corresponds to a newly created address list, and a continuation fragment corresponds to an existing address list), sequentially traverses each storage address in the list starting from the head node, reads the data cached in the storage unit indicated by each storage address, assembles it into a complete data packet according to the list order, and schedules and forwards the complete data packet to the upper-layer network.
[0046] After forwarding, release the storage address in the address list of the scheduled forwarded data packet. Optionally, after releasing the storage address in the address list of the scheduled forwarded data packet, delete the binding record in the address list of the scheduled forwarded data packet bound to the ONU ID.
[0047] Through the above steps, the OLT can forward and release resources in a timely manner when the data packet is complete.
[0048] This concludes the process. Figure 3 The process is shown below.
[0049] pass Figure 3 As shown in the flowchart, in this embodiment, firstly, a shared buffer space is configured for the N ONUs connected to the OLT, replacing the traditional method of allocating an independent FIFO buffer for each ONU. Then, when receiving a data packet (a complete data packet or a part of a complete data packet) from any ONU, the system determines whether to continue an incomplete data packet or start a new data packet by checking if a list of addresses of data packets bound to that ONU that do not meet the integrity requirement is already stored locally. If the list is already stored, the storage address of the data packet is recorded in the existing address list; otherwise, a new address list containing the storage address of the data packet is created. Finally, when any data packet is determined to meet the integrity requirement, it is scheduled and forwarded according to the address list corresponding to that data packet.
[0050] This scheduling method based on shared cache and address linked list, compared with the traditional method of allocating an independent cache for each ONU and adopting multi-level round-robin scheduling, not only enables multiple ONUs to dynamically reuse the limited cache space, significantly improving the utilization of cache resources, but also avoids packet loss due to cache overflow of a single ONU caused by independent cache space.
[0051] Furthermore, since multi-level polling scheduling is not required, data packets can be forwarded directly once they are complete, eliminating the risk of scheduling blockage. This further reduces the probability of data packet loss in the FTTR system, simplifies the scheduling process, and reduces hardware overhead.
[0052] To illustrate the method provided in this application in more detail, the solution provided in this application will be described in more detail below with reference to specific embodiments.
[0053] This process may include the following steps: 1. Receive data packets sent from any ONU and determine the storage address of the data packet to be cached from the cache space.
[0054] The OLT allocates time slots to each ONU sequentially according to the time-division multiplexing mechanism. Within a given ONU's time slot, the OLT receives data packets sent by that ONU. This data packet can be a complete data packet or a part of a complete data packet (i.e., a data fragment of a complete data packet). Based on the data length of the data packet, the OLT dynamically allocates one or more free storage units from the buffer space and records the addresses of these storage units (i.e., the storage address of the data packet).
[0055] 2. Check if there is a binding record on the local machine that is bound to this ONU and has the forwarding flag set to the first value.
[0056] Specifically, the OLT locally maintains binding records using the ONU ID as an index; see details for the specific structure. Figure 4 As shown, each binding record includes the starting storage address, the last storage address, and a forwarding flag in the address chain of the data packet. If the forwarding flag of any data packet recorded in the binding record of this ONU ID is a first value (e.g., 1), it indicates that the data packet does not meet the integrity requirements. If the forwarding flag of any data packet recorded in the binding record of this ONU ID is a second value (e.g., 0), it indicates that the data packet meets the integrity requirements. Based on this, the binding record of this ONU ID is searched to see if a binding record with a forwarding flag of the first value exists.
[0057] If the result of step 2 is yes (there is a binding record with the forwarding mark set to the first value), then proceed to step 3 below. If the result is no (there is no binding record with the forwarding mark set to the first value), then proceed to step 4 below.
[0058] 3. If a binding record with the forwarding flag set to the first value exists, it indicates that the ONU has an incomplete data packet being assembled, and the address list for this data packet already exists. In this case, the data packet should be considered a subsequent fragment of the incomplete data packet. The OLT locates the end of the existing address list based on the last storage address in the binding record, links the addresses of each allocated storage unit to the end of the address list in data order, updates the last storage address in the binding record to the address of the last allocated storage unit, and caches the data packet in data unit order at the allocated storage addresses.
[0059] The OLT writes the data packet into the allocated storage units in step 1 sequentially, according to the data unit order. The writing of data and the establishment of the address linked list can be performed simultaneously: after writing to each storage unit, its address is linked to the pointer field of the previous storage unit (the first storage unit is the head node), realizing "storing and linking at the same time".
[0060] Next, proceed to step 4.
[0061] 4. Update or maintain the forwarding flag based on the end-of-packet identifier of the current data packet: If the value of the end-of-packet identifier is the second value (e.g., 0), then update the forwarding flag to the second value (0); if the value of the end-of-packet identifier is the first value (e.g., 1), then maintain the forwarding flag to the first value (1).
[0062] Next, proceed to step 7.
[0063] 5. If there is no binding record with the forwarding flag set to the first value, it means that the ONU does not have any incomplete data packets being assembled.
[0064] At this point, the data packet should be treated as a new data packet. OLT creates a new address linked list, with the address of the first memory unit allocated this time as the head node of the linked list, and the addresses of subsequently allocated memory units are linked to the previous node in sequence, forming a linked structure.
[0065] Next, proceed to step 6.
[0066] 6. Determine the forwarding flag based on the end-of-packet identifier of the current data packet. If the end-of-packet identifier is a second value (e.g., 0), set the forwarding flag to the second value (0); if the end-of-packet identifier is a first value (e.g., 1), set the forwarding flag to the first value (1). Based on the starting and last storage addresses of the address chain and the forwarding flag assigned to the data packet, create a binding record corresponding to the ONU ID, and cache the data packet in the above-assigned storage addresses according to the data unit order.
[0067] 7. For each data packet under this ONU, if the forwarding flag is the second value (e.g., 0), it indicates that the data packet is a new complete data packet, or that the data packet, together with other previously stored data packets, constitutes a complete data packet (i.e., it is the last continuation fragment of an existing data packet). Determine that the data packet meets the integrity requirement.
[0068] At this point, the OLT, based on the address list corresponding to the data packet, sequentially traverses each storage address in the list starting from the head node, reads the cached data in the storage unit indicated by each storage address, assembles it into a complete data packet according to the list order, and schedules and forwards the complete data packet to the upper-layer network.
[0069] 8. If the forwarding flag is the first value (e.g., 1), it indicates that the data packet itself is incomplete or is still incomplete after being concatenated with the previous data packet. The OLT will not trigger a forwarding operation for the time being.
[0070] At this point, the binding record corresponding to the ONU ID already contains a record with the forwarding flag set to the first value. This record is used to indicate the presence of incomplete data packets that need to be continued when subsequent data fragments of the same ONU are received.
[0071] 9. After the complete data packet is forwarded, release the storage addresses in the address list of the complete data packet and return these storage addresses to the idle storage unit pool.
[0072] The OLT continues to process the next received data packet, repeating steps 1 to 9 above, until all ONU data has been processed.
[0073] Through the above steps, this embodiment realizes FTTR data scheduling based on shared cache space and tail address binding. It can accurately distinguish between new data packets and continuation fragments of existing data packets, forward complete packets in a timely manner and release resources, effectively avoid packet loss, and significantly improve cache resource utilization.
[0074] The methods provided in the embodiments of this application have been described above. The apparatus provided in the embodiments of this application is described below: See Figure 5 , Figure 5 This is a structural diagram of the device provided in an embodiment of this application. The device is applied to an optical line terminal (OLT), which connects N ONUs. The N ONUs share the same buffer space; N is greater than 1. Figure 5 As shown, the device is applied to a network access device, and the device includes: a linked list management module 501 and a scheduling module 502.
[0075] The linked list management module 501 is used to receive data packets sent from any ONU, determine the storage address of the data packets to be cached from the cache space, and create an address linked list containing the storage address of the data packets if there is no address linked list of data packets bound to the ONU that do not meet the completeness requirements stored locally; if there is already an address linked list of data packets bound to the ONU that do not meet the completeness requirements stored locally, the storage address of the data packets is recorded in the existing address linked list. The scheduling module 502 is used to cache data packets to the storage address in order of data units; When any data packet is determined to meet the integrity requirements, the packet is scheduled for forwarding based on its storage address in the address list.
[0076] As an example, the linked list management module 501 determines whether it stores a linked list of addresses of data packets that do not meet the integrity requirements bound to the ONU locally through the following steps; Determine if a binding record exists locally that is bound to the ONU and has a forwarding flag of the first value; if the forwarding flag of any data packet's address list has the first value, it indicates that the data packet does not meet the integrity requirements; if the forwarding flag of any data packet's address list has the second value, it indicates that the data packet meets the integrity requirements. If it exists, determine the address list of data packets that do not meet the integrity requirements and are bound to the ONU that are already stored locally; If it does not exist, it is determined that the local address list of data packets that do not meet the integrity requirements and are bound to the ONU is not stored.
[0077] As one embodiment, after creating an address linked list containing the storage addresses of data packets, the linked list management module 501 is further configured to: Bind the starting and last storage addresses of the address chain, the forwarding tag assigned to the packet, to the ONU.
[0078] As one embodiment, after recording the storage address of the data packet into an existing address linked list, the linked list management module 501 includes the following method: Update the last storage address bound to the ONU based on the last storage address allocated this time, and update the forwarding flag of the data packet under the ONU.
[0079] As an example, if the packet flag carried in the last data unit of the packet is a first value, then the forwarding flag is set to the first value; If the packet flag carried in the last data unit of the packet is the second value, then the forwarding flag is set to the second value; Among them, the data packet flag is a first value, indicating that the data packet itself is not a complete data packet, and it has not been able to form a complete data packet with the previous data packets; the data packet flag is a second value, indicating that the data packet is a complete data packet or it can form a complete data packet with the previous data packets.
[0080] As one embodiment, the device further includes: The release module is used to release the storage address in the address list of the scheduled forwarded data packet after forwarding.
[0081] As an example, the total capacity of the buffer space is at least equal to the sum of the preset capacities of the data packets corresponding to N ONUs.
[0082] This concludes the process. Figure 5 Structural description of the device shown.
[0083] See Figure 6 , Figure 6 This is a structural diagram of an electronic device provided in an embodiment of this application. Figure 6 As shown, the hardware structure may include: a processor and a machine-readable storage medium, the machine-readable storage medium storing machine-executable instructions that can be executed by the processor; the processor is used to execute the machine-executable instructions to implement the method disclosed in the above example of this application.
[0084] Based on the same application concept as the above method, this application embodiment also provides a machine-readable storage medium storing a plurality of computer instructions, which, when executed by a processor, can implement the method disclosed in the above examples of this application.
[0085] For example, the aforementioned machine-readable storage medium can be any electronic, magnetic, optical, or other physical storage device that can contain or store information such as executable instructions, data, etc. For instance, machine-readable storage media can be: RAM (Random Access Memory), volatile memory, non-volatile memory, flash memory, storage drives (such as hard disk drives), solid-state drives, any type of storage disk (such as optical discs, DVDs, etc.), or similar storage media, or combinations thereof.
[0086] The above description is merely an embodiment of this application and is not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.
[0087] This application can be implemented by executing several computer program code flows using an electronic device. The electronic device loads machine-executable instructions into a machine-readable storage medium and then uses its processor to read these machine-executable instructions into memory for execution. A hardware structure diagram of the electronic device, besides... Figure 6 In addition to the processor, memory, network interface, and non-volatile memory shown, electronic devices may also include other hardware depending on their actual functions, which will not be elaborated further.
Claims
1. A data scheduling method applied in an FTTR network, characterized in that, This method is applied to an optical line terminal (OLT), which connects to N optical network units (ONUs), and the N ONUs share the same buffer space. N is greater than 1; the method includes: Receive a data packet sent from any ONU, determine the storage address of the data packet to be cached from the cache space, and if there is no address list of data packets that do not meet the integrity requirements bound to the ONU stored locally, create an address list containing the storage address of the data packet; if there is already an address list of data packets that do not meet the integrity requirements bound to the ONU stored locally, record the storage address of the data packet into the existing address list. The data packets are cached in the storage address according to the order of data units; When any data packet is determined to meet the integrity requirements, the packet is scheduled for forwarding based on its storage address in the address list.
2. The method according to claim 1, characterized in that, The method for determining whether a linked list of addresses containing data packets that do not meet the integrity requirements and are bound to the ONU is stored locally includes: Determine if a binding record with a forwarding flag of the first value exists locally and is bound to the ONU; if the forwarding flag of any data packet's address list has a first value, it indicates that the data packet does not meet the integrity requirements; if the forwarding flag of any data packet's address list has a second value, it indicates that the data packet meets the integrity requirements. If it exists, then determine that a list of addresses of data packets that do not meet the integrity requirements and are bound to the ONU has been stored locally. If it does not exist, it is determined that the local storage does not contain a linked list of addresses of data packets that do not meet the integrity requirements and are bound to the ONU.
3. The method according to claim 1, characterized in that, After creating the address linked list containing the storage addresses of the data packets, the method further includes: The starting and last storage addresses of the address chain, and the forwarding tag assigned to the data packet, are bound to the ONU.
4. The method according to claim 1, characterized in that, After recording the storage address of the data packet into an existing address list, the method includes: The last storage address bound to the ONU is updated based on the last storage address allocated in this transaction, and the forwarding flag of the data packet under the ONU is also updated.
5. The method according to claim 1, characterized in that, If the packet flag carried in the last data unit of the packet is a first value, then the forwarding flag is set to the first value; If the packet flag carried in the last data unit of the packet is the second value, then the forwarding flag is set to the second value; Wherein, the data packet flag is a first value, indicating that the data packet itself is not a complete data packet, and it has not been able to form a complete data packet with the previous data packets; the data packet flag is a second value, indicating that the data packet is a complete data packet or it forms a complete data packet with the previous data packets.
6. The method according to claim 1, characterized in that, The method further includes: After forwarding, release the storage address in the address chain of the data packet that was scheduled to be forwarded.
7. The method according to claim 1, characterized in that, The total capacity of the cache space is at least equal to the sum of the preset capacities of the data packets corresponding to N ONUs.
8. A data scheduling device applied in an FTTR network, characterized in that, This device is applied to an optical line terminal (OLT), which connects N optical network units (ONUs), and the N ONUs share the same buffer space. N is greater than 1; the device includes: The linked list management module is used to receive data packets sent from any ONU, determine the storage address of the data packet to be cached from the cache space, and create an address linked list containing the storage address of the data packet if there is no address linked list of data packets bound to the ONU that do not meet the integrity requirements stored locally; if there is already an address linked list of data packets bound to the ONU that do not meet the integrity requirements stored locally, the storage address of the data packet is recorded in the existing address linked list. The scheduling module is used to cache the data packets to the storage address in order of data units; When any data packet is determined to meet the integrity requirements, the packet is scheduled for forwarding based on its storage address in the address list.
9. The apparatus according to claim 8, characterized in that, The linked list management module determines whether it stores a linked list of addresses of data packets that do not meet the integrity requirements bound to the ONU locally through the following steps; Determine if a binding record with a forwarding flag of the first value exists locally and is bound to the ONU; if the forwarding flag of any data packet's address list has a first value, it indicates that the data packet does not meet the integrity requirements; if the forwarding flag of any data packet's address list has a second value, it indicates that the data packet meets the integrity requirements. If it exists, then determine that a list of addresses of data packets that do not meet the integrity requirements and are bound to the ONU has been stored locally. If it does not exist, it is determined that the local storage does not contain an address list of data packets that do not meet the integrity requirements and are bound to the ONU; And / or, The linked list management module, after creating the address linked list containing the storage addresses of the data packets, is further configured to: Bind the starting and last storage addresses of the address chain, and the forwarding tag assigned to the data packet, to the ONU; And / or, The linked list management module, after recording the storage address of the data packet into the existing address linked list, the method includes: The last storage address bound to the ONU is updated based on the last storage address allocated in this transaction, and the forwarding flag of the data packet under the ONU is also updated. And / or, If the packet flag carried in the last data unit of the packet is a first value, then the forwarding flag is set to the first value; If the packet flag carried in the last data unit of the packet is the second value, then the forwarding flag is set to the second value; Wherein, the data packet flag is a first value, indicating that the data packet itself is not a complete data packet, and it has not been able to form a complete data packet with the previous data packets; the data packet flag is a second value, indicating that the data packet is a complete data packet or it can form a complete data packet with the previous data packets; And / or, The device also includes: A release module is used to release the storage address in the address list of the data packet that was scheduled to be forwarded after forwarding. The total capacity of the cache space is at least equal to the sum of the preset capacities of the data packets corresponding to N ONUs.
10. An electronic device, characterized in that, The electronic device includes: The processing circuit, comprising at least a field-programmable gate array (FPGA) processing chip; and A machine-readable storage medium storing machine-executable instructions, which, when executed by the processing circuitry, cause the processing circuitry to perform the steps of the method as described in any one of claims 1 to 7.
11. A machine-readable storage medium, characterized in that, The machine-readable storage medium stores machine-executable instructions that, when executed by a processor, cause the processor to perform the steps of the method as described in any one of claims 1 to 7.