WO2025007523A1 - 一种数据处理方法、装置、电子设备及存储介质 - Google Patents

一种数据处理方法、装置、电子设备及存储介质 Download PDF

Info

Publication number
WO2025007523A1
WO2025007523A1 PCT/CN2023/139897 CN2023139897W WO2025007523A1 WO 2025007523 A1 WO2025007523 A1 WO 2025007523A1 CN 2023139897 W CN2023139897 W CN 2023139897W WO 2025007523 A1 WO2025007523 A1 WO 2025007523A1
Authority
WO
WIPO (PCT)
Prior art keywords
sent
data packet
data
data packets
grant size
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.)
Ceased
Application number
PCT/CN2023/139897
Other languages
English (en)
French (fr)
Inventor
翁颐
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Telecom Corp Ltd Technology Innovation Center
China Telecom Corp Ltd
Original Assignee
China Telecom Corp Ltd Technology Innovation Center
China Telecom Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Telecom Corp Ltd Technology Innovation Center, China Telecom Corp Ltd filed Critical China Telecom Corp Ltd Technology Innovation Center
Publication of WO2025007523A1 publication Critical patent/WO2025007523A1/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/50Queue scheduling
    • H04L47/62Queue scheduling characterised by scheduling criteria
    • H04L47/625Queue scheduling characterised by scheduling criteria for service slots or service orders
    • H04L47/628Queue scheduling characterised by scheduling criteria for service slots or service orders based on packet size, e.g. shortest packet first
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04QSELECTING
    • H04Q11/00Selecting arrangements for multiplex systems
    • H04Q11/0001Selecting arrangements for multiplex systems using optical switching
    • H04Q11/0062Network aspects
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04QSELECTING
    • H04Q11/00Selecting arrangements for multiplex systems
    • H04Q11/0001Selecting arrangements for multiplex systems using optical switching
    • H04Q11/0062Network aspects
    • H04Q2011/0086Network resource allocation, dimensioning or optimisation

Definitions

  • the present application relates to the field of communication technology, and in particular to a data processing method, device, electronic device and storage medium.
  • PON Passive Optical Network
  • OLT Optical Line Terminal
  • ONU Optical Network Unit
  • ODN Optical Distribution Network
  • OLT Optical Line Terminal
  • ONU Optical Network Unit
  • ODN Optical Distribution Network
  • OLT is used to complete the uplink access of PON and send the acquired data to ONU user terminal equipment through ODN.
  • ONU belongs to the user side equipment, which is used to receive the data sent by OLT and can directly provide services to users.
  • TDM-PON Time Division Multiplexing-PON
  • ONU cannot send data at any time in the upstream direction, but needs to wait for OLT to allocate upstream time slot resources for it in each cycle, and send data packets to OLT in the obtained upstream time slot. If the current time slot is missed, it usually needs to wait for another cycle (usually 125 ⁇ s) to send data packets again.
  • the ONU cannot send the large data packet completely. For example, if the packet length is 1.5K bytes and the remaining sendable data size at the end of the time slot is 400 bytes, the ONU needs to The large data packet is fragmented into two fragments of 400 bytes and 1.1K bytes. The 400-byte fragment is sent in the current time slot, and the 1.1K-byte fragment is cached with an additional header overhead and is left for the next cycle to send, or the large data packet is not fragmented but sent in the next cycle. Among them, the first fragmented sending method will increase the additional packetization overhead and packet assembly delay, and the second non-fragmented sending method will cause a waste of time slot resources.
  • the embodiments of the present application provide a data processing method, device, electronic device and storage medium.
  • an embodiment of the present application provides a data processing method, including:
  • At least one second data packet to be sent whose length is less than or equal to the difference and located after the first data packet to be sent is arranged before the first data packet to be sent, so as to send all data packets to be sent before the reordered first data packet to be sent at the start time corresponding to the current sending cycle.
  • arranging at least one second data packet to be sent that is located after the first data packet to be sent and has a length less than or equal to the difference before the first data packet to be sent specifically includes:
  • the n consecutive data packets to be sent are determined as n consecutive second data packets to be sent, and the n consecutive second data packets are arranged before the first data packet to be sent;
  • the n consecutive data packets to be sent are determined to be n second data packets to be sent, the n consecutive second data packets to be sent are arranged before the first data packet to be sent, and zeros are padded after the nth second data packet to be sent, so that the sum of the lengths of all data packets to be sent before the reordered first data packet to be sent is equal to the grant size.
  • the method further includes:
  • the method before sending data in each sending cycle based on the time slot resource information allocated by the OLT, the method further includes:
  • an embodiment of the present application provides a data processing device, including:
  • a first receiving unit configured to receive each data packet to be sent, and sequentially store each data packet to be sent in a cache queue in a receiving order for caching
  • the first determining unit is configured to determine, based on each of the time slot resource information allocated by the optical line terminal OLT, Before sending data in a sending cycle, determining the cumulative length of each data packet to be sent in the cache queue and the data packets to be sent arranged before it;
  • a comparing unit configured to compare in sequence the cumulative length of each data packet to be sent and the data packets to be sent arranged before it with the grant size of the time slot resource information
  • a second determining unit configured to determine a difference between the grant size and the second cumulative length when it is determined that a first cumulative length of a first data packet to be sent and a data packet to be sent arranged before the first data packet to be sent is greater than the grant size, and a second cumulative length of a data packet to be sent before the first data packet to be sent and a data packet to be sent arranged before the first data packet to be sent is less than the grant size;
  • a reordering unit is used to arrange at least one second data packet to be sent whose length is less than or equal to the difference and is located after the first data packet to be sent before the first data packet to be sent, so as to send all the data packets to be sent before the reordered first data packet to be sent at the start time corresponding to the current sending cycle.
  • the reordering unit is specifically used to, if it is determined that the sum of the lengths of n consecutive data packets to be sent after the first data packet to be sent is equal to the difference, determine the n consecutive data packets to be sent as n consecutive second data packets to be sent, and arrange the n consecutive second data packets before the first data packet to be sent; if it is determined that the sum of the lengths of n consecutive data packets to be sent after the first data packet to be sent is less than the difference, and the sum of the lengths of n+1 consecutive data packets to be sent after the first data packet to be sent is greater than the difference, determine the n consecutive data packets to be sent as n second data packets to be sent, arrange the n consecutive second data packets to be sent before the first data packet to be sent, and fill zeros after the nth second data packet to be sent, so that the sum of the lengths of all data packets to be sent before the reordered first data packet to be sent is equal to the grant
  • the device further includes:
  • a processing unit configured to fill zeros before the first data packet to be sent if it is determined that the lengths of a preset number of data packets to be sent after the first data packet to be sent are all greater than the difference, so that the lengths of all data packets to be sent before the first data packet to be sent are equal to the grant size.
  • the device further includes:
  • a second receiving unit configured to receive a bandwidth mapping BWmap message sent by the OLT before sending data in each sending cycle based on the time slot resource information allocated by the OLT;
  • An extraction unit is used to extract the time slot resource information allocated by the OLT in the BWmap message, and the time slot resource information includes the start time corresponding to the current sending cycle and the grant size.
  • an embodiment of the present application provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the data processing method described in the present application when executing the program.
  • an embodiment of the present application provides a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, the steps in the data processing method described in the present application are implemented.
  • the ONU receives each data packet to be sent, stores each received data packet to be sent in a cache queue in a receiving order for caching, and performs the following processing before sending data in each sending cycle based on the timing resource information allocated by the OLT: determining the cumulative length of each data packet to be sent in the cache queue and the data packet to be sent arranged before it, and comparing the cumulative length of each data packet to be sent and the data packet to be sent arranged before it with the grant size (grant size) of the timing resource information in turn; when it is determined that the first cumulative length of the first data packet to be sent and the data packet to be sent arranged before it is greater than the grant size, and the second cumulative length of the data packet to be sent before the first data packet to be sent and the data packet to be sent arranged before it is less than the grant size, determining the difference between the grant size and the second cumulative length, arranging at least one second data packet to be sent that is less than or equal
  • the first cumulative length of the first data packet to be sent and the data packets to be sent arranged before it is greater than the grant size
  • the second cumulative length of the previous data packet to be sent of the first data packet to be sent and the data packet to be sent arranged before it is less than the grant size
  • the position of the smaller second data packet to be sent arranged after the first data packet to be sent is moved to the front of the first data packet to be sent so that it can be sent when the start time of the current sending cycle arrives, and the first data packet to be sent is completely sent in the next sending cycle. Since there is no need to fragment the first data packet to be sent, and the second data packet to be sent that should be sent in the next sending cycle is sent in the current sending cycle, thereby avoiding wasting time slot resources and reducing the delay of the second data packet to be sent (the length of a sending cycle is 125 ⁇ s). Therefore, the time slot resources in the entire uplink data sending process can be fully utilized, thereby improving the overall delay.
  • FIG1 is an example diagram of uplink time slot resources sent by an OLT to an ONU according to an embodiment of the present application
  • FIG. 2( a ) is an example diagram of a cache queue provided in an embodiment of the present application.
  • FIG. 2( b ) is an example diagram of fragmentation processing of a data packet in the prior art
  • FIG3 is a schematic diagram of an application scenario of a data processing method provided in an embodiment of the present application.
  • FIG4 is a schematic diagram of an implementation flow of a data processing method provided in an embodiment of the present application.
  • FIG5( a ) is a schematic diagram of a cache queue after reordering the cache queue of FIG2( a ) provided in an embodiment of the present application;
  • FIG5( b ) is a schematic diagram of sending a reordered data packet according to an embodiment of the present application
  • FIG6 is a schematic diagram of a processing flow of a cache reordering module provided in an embodiment of the present application.
  • FIG7 is a schematic diagram of the structure of a data processing device provided in an embodiment of the present application.
  • FIG8 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application.
  • TDM-PON is based on time division multiplexing technology when transmitting data in the upstream direction.
  • ONU cannot send data at any time in the upstream direction, but needs to wait for OLT to allocate upstream time slot resources for it in each cycle, and assign a start time and a grant size time slot size to each ONU, where start time identifies the start time of sending data packets in a sending cycle, that is: the starting position (start time) where data packets can be sent in a sending cycle, and grant size (that is, the authorization size) defines the byte size of the data packet that can be sent in a sending cycle (that is, the length of the data packet that can be sent), and it is agreed that the duration of a sending cycle can be 125 ⁇ s.
  • FIG. 1 An example diagram of the upstream time slot resources sent by OLT to ONU is shown in Figure 1.
  • ONU waits to receive the upstream time slot resources allocated by OLT for it, and sends data packets to OLT in their respective upstream time slots. If the current time slot is missed, it usually needs to wait for another cycle (125 ⁇ s) before sending data packets again.
  • the ONU cannot completely transmit the large data packet.
  • the data packets currently cached in the cache queue are arranged in chronological order as follows: the size of the first data packet is 300 bytes, the size of the second data packet is 1K bytes, the size of the third data packet is 300 bytes, the size of the fourth data packet is 1.5K bytes, and the sizes of the fifth to seventh data packets are all 128 bytes.
  • the grant size of the time slot resources allocated by the OLT to the ONU is 2K bytes
  • the total length of the first three data packets is 1.6K bytes
  • the length of the fourth data packet is 1.5K bytes
  • the size of the remaining transmittable data at the end of the time slot is 400 bytes.
  • the fourth large data packet cannot be completely transmitted.
  • the ONU needs to perform a The large data packet is fragmented, as shown in Figure 2(b), into two fragments of 400 bytes and 1.1K bytes, corresponding to fragment 1 and fragment 2 shown in Figure 2(b), respectively.
  • the 400-byte fragment (i.e., fragment 1) is sent in the current time slot, and the 1.1K-byte fragment (i.e., fragment 2) is additionally added with a header overhead and cached for the next cycle to be sent, or the large data packet is not fragmented, but is sent in the next cycle.
  • the first fragmented sending method will increase the additional packetization overhead and packet assembly delay, and the second non-fragmented sending method will cause a waste of time slot resources.
  • an embodiment of the present application provides a data processing method, device, electronic device and storage medium, wherein the ONU receives each data packet to be sent, stores each received data packet to be sent in a receiving order in a cache queue for caching, and performs the following processing before sending data in each sending cycle based on the timing resource information allocated by the OLT: determining the cumulative length of each data packet to be sent in the cache queue and the data packet to be sent arranged before it, and comparing the cumulative length of each data packet to be sent and the data packet to be sent arranged before it with the grant size of the timing resource information in turn; when it is determined that the first cumulative length of the first data packet to be sent and the data packet to be sent arranged before it is greater than the grant size, and the second cumulative length of the previous data packet to be sent of the first data packet to be sent and the data packet to be sent arranged before it is less than the grant size, determining the difference between the grant size and the second cumulative length, and arranging at least one second data packet to be sent whose length is
  • the first cumulative length of a first data packet to be sent and the data packets to be sent arranged before it is greater than the grant size
  • the second cumulative length of the data packet to be sent before the first data packet to be sent and the data packet to be sent arranged before it is less than the grant size
  • the position of the smaller second data packet to be sent arranged after the first data packet to be sent is moved to the front of the first data packet to be sent so that it is sent when the start time of the current sending cycle arrives, and the first data packet to be sent is completely sent in the next sending cycle. Since there is no need to fragment the first data packet to be sent, and the second data packet to be sent, which should have been sent in the next sending cycle, is sent in the current sending cycle, the delay of the second data packet to be sent is reduced (the length of a sending cycle is 125 ⁇ s) while avoiding wasting time slot resources. Therefore, the time slot resources in the entire uplink data sending process can be fully utilized, thereby improving the overall delay.
  • FIG. 3 is a schematic diagram of an application scenario of the data processing method provided in an embodiment of the present application, which may include an optical line terminal (OLT) 100 and an optical network unit (ONU) 101.
  • the OLT 100 and the ONU 101 perform network transmission through the ODN.
  • OUN 101 includes an uplink inbound direction data packet processing module 1011, an uplink outbound direction data sending module 1012, a BWmap (Bandwidth map) parsing module 1013 and a cache reordering module 1014.
  • OLT 100 allocates upstream time slot resource information to ONU 101, and sends the upstream time slot resource information to ONU 101 by sending a BWmap message.
  • the upstream resource information includes: start time and grant size specified by OLT 100 for ONU 101, where start time identifies the start time of sending data packets in a sending cycle, that is, the starting position (that is, the start time) at which data packets can be sent in a sending cycle, and grant size defines the byte size of data packets that can be sent in a sending cycle (that is, the length of the data packets that can be sent), and it is agreed that the duration of a sending cycle can be 125 ⁇ s.
  • the uplink inbound direction data packet processing module 1011 is used to receive each data packet to be sent, and store each data packet to be sent in a cache queue in sequence according to the order in which they are received for caching.
  • the uplink outbound data transmission module 1012 is used to extract data packets from the buffer queue in sequence, and send the extracted data packets to the OLT 100 in the specified time slot according to the uplink time slot resources allocated by the OLT 100 to the ONU 101.
  • the BWmap parsing module is used to receive the BWmap message sent by the OLT 100, extract the uplink time slot resource information allocated by the OLT in the BWmap message, the uplink time slot resource information includes the start time and grant size, and pass the start time and grant size to the cache reordering module 1014.
  • the buffer reordering module 1014 is used to send each uplink time slot resource information allocated by the OLT. Before periodically sending data, determine the cumulative length of each data packet to be sent in the cache queue and the data packet to be sent arranged before it; compare the cumulative length of each data packet to be sent and the data packet to be sent arranged before it with the grant size of the time slot resource information in turn; when it is determined that the first cumulative length of the first data packet to be sent and the data packet to be sent arranged before it is greater than the grant size, and the second cumulative length of the previous data packet to be sent and the data packet to be sent arranged before it is less than the grant size, determine the difference between the grant size and the second cumulative length; arrange at least one second data packet to be sent that is located after the first data packet to be sent and has a length less than or equal to the difference between the grant size and the second cumulative length before the first data packet to be sent, so as to reorder the data packets in the cache queue.
  • FIG. 4 it is a schematic diagram of an implementation flow of a data processing method provided in an embodiment of the present application.
  • the data processing method can be applied to the above-mentioned ONU 101, and specifically may include the following steps:
  • the uplink inbound data packet processing module in the ONU receives each data packet to be sent from the terminal, and stores each received data packet to be sent in the cache queue in the order of the time of reception for caching, and can record the arrangement number i of each data packet to be sent in the cache queue and the corresponding data packet size (that is, the length of the data packet) Si.
  • the method before sending data in each sending cycle based on the time slot resources allocated by the OLT, the method further includes:
  • the time slot resource information includes the start time and grant size corresponding to the current sending cycle.
  • the BWAMP parsing module in the ONU when the BWAMP parsing module in the ONU receives the BWmap message sent by the OLT, it extracts the uplink time slot resource information allocated by the OLT to the ONU in the BWmap message, obtains the start time and grant size contained therein, and sends the start time and grant size to the cache reordering module in the ONU.
  • the cache reordering module calculates the cumulative length of each to-be-sent data packet in the cache queue and the to-be-sent data packets arranged before it, that is, the cache queue length accumulated from each to-be-sent data packet to the current position.
  • the cumulative length of the i-th data packet to be sent in the cache queue and the data packets to be sent arranged before it is calculated by the following formula:
  • Ci represents the cumulative length of the i-th data packet to be sent in the cache queue and the data packets to be sent arranged before it;
  • S k represents the length of the kth data packet to be sent.
  • the cache reordering module compares Ci with the value of grant size in sequence from the head of the cache queue.
  • the data packet i to be sent (which can be recorded as the first data packet to be sent) is the tail data packet of the time slot of the current sending cycle, Ci can be recorded as the first cumulative length, and Ci -1 can be recorded as the second cumulative length. If the condition is met, it continues to wait for receiving new data packets until the condition is met or the start time of the current sending cycle arrives.
  • Ci ⁇ grant size and Ci -1 ⁇ grant size calculate the difference between grant size and Ci -1 .
  • This difference is the remaining amount at the end of the time slot when the current sending cycle cannot completely send the data packet i to be sent.
  • grant size 2K bytes
  • C 7 300 bytes + 1K bytes + 300 by
  • C i grant size
  • S25 Arrange at least one second data packet to be sent whose length is less than or equal to the difference and is located after the first data packet to be sent before the first data packet to be sent, so as to send all data packets to be sent before the reordered first data packet to be sent at the start time corresponding to the current sending cycle.
  • the n consecutive data packets to be sent are determined as n consecutive second data packets to be sent, and the n consecutive second data packets are arranged before the first data packet to be sent.
  • the n consecutive data packets to be sent are determined as n second data packets to be sent, and the n consecutive second data packets to be sent are The sending data packet is arranged before the first data packet to be sent, and zeros are added after the nth second data packet to be sent, so that the sum of the lengths of all data packets to be sent before the reordered first data packet to be sent is equal to the grant size.
  • Ci+1 -Si ⁇ grant size it means that the next data packet to be sent i+1 and the first data packet to be sent i can be sent in the time slot of the current sending cycle after exchanging their positions.
  • Ci +n+1 null is a null value, it continues to wait for the arrival of new data packets to be sent until the condition is met or the start time is reached.
  • Ci +n - Si ⁇ grant size ⁇ Ci +n+1 - Si it indicates that the cumulative length Ci -1 of the i-1 data packets to be sent before the first data packet to be sent i and the n consecutive second data packets to be sent (i+1 ⁇ i+n) after the first data packet to be sent i can be sent together in the upcoming current sending cycle, and these n consecutive second data packets to be sent are arranged before the first data packet to be sent, and the arrangement sequence numbers of the first data packet to be sent i and the second data packets to be sent i+1 ⁇ i+n are updated, that is, the sequence numbers of the second data packets to be sent i+1 ⁇ i+n are all reduced by 1, and the sequence number of the first data packet to be sent i is updated to: i+n.
  • Ci +n - Si grant size and grant size ⁇ Ci +n+1 - Si
  • n consecutive second data packets to be sent are arranged before the first data packet to be sent;
  • Ci +n - Si grant size ⁇ Ci +n+1 - Si
  • after arranging n consecutive second data packets to be sent before the first data packet to be sent zeros need to be padded after the nth second data packet to be sent so that the bit
  • the sum of the lengths of all the data packets to be sent before the first data packet to be sent i after reordering is equal to the grant size.
  • the grant size is not full, and we continue to determine whether Ci +2 - Si is less than grant size, and add Si +2 .
  • 400 bytes-128 bytes ⁇ 2 144 bytes>0, and the grant size is still not full, so we continue to determine whether Ci +3 - Si is less than grant size, and add Si+2. i+3 is also added.
  • T1 is the length of the sending cycle: 125 ⁇ s, that is, the time interval between the time slot of the current sending cycle and the time slot of the next sending cycle.
  • the uplink outbound data sending module of the ONU obtains the reordered data packets 1 to 4 and the 16 bytes of 0 added at the tail from the cache sequence for sending.
  • Tsmall T'0 + T1 + Trslice1 + Trslice2 + Trsmallpacket .
  • T0 is the waiting time of the large packet in the cache queue
  • T′0 is the waiting time of the small packet in the cache queue
  • T1 is the length of the sending cycle: 125 ⁇ s, that is, the time interval between the time slot of the current sending cycle and the time slot of the next sending cycle
  • Tr fragment 1 is the transmission time of fragment 1 of the large packet
  • Tr fragment 2 is the transmission time of fragment 1 of the large packet
  • Tr is the transmission time of fragment 2 of the packet
  • Tr is the transmission time of the packet .
  • the transmission delay of each data packet is less than 0.1 ⁇ s.
  • the first cumulative length of the first data packet to be sent and the data packet to be sent arranged before it is equal to the grant size indicates that there is no remainder at the end of the time slot of the current sending cycle, and there is no need to reorder, and it can be sent directly when the start time arrives.
  • the lengths of a preset number of data packets to be sent that follow the first data packet to be sent are all greater than the difference between the grant size and the second cumulative length, zeros are padded before the first data packet to be sent so that the lengths of all data packets to be sent that follow the first data packet to be sent are equal to the grant size.
  • Ci ⁇ grant size and Ci -1 ⁇ grant size if Ci +1 -Si>grant size, that is, the length of the i+1th data packet is greater than grant size - the second cumulative length of the previous data packet i-1 to be sent and the data packets to be sent before it. length, then, even if the first data packet i to be sent is swapped with the subsequent packet i+1, it still exceeds the range of grant size. For example, the i+1th data packet is also a large packet or there is little left at the end of the time slot, and no adjustment is required.
  • the first data packet i+1 after the first data packet i to be sent does not meet the condition, it is possible to continue to determine whether the second data packet i+2 after the first data packet i to be sent satisfies C i+2 -S i -S i+1 ⁇ grant size. If the preset number of data packets to be sent after the first data packet i to be sent cannot meet the above condition, no reordering is performed, and zeros are added before the first data packet i to be sent, so that the length of all data packets to be sent before the first data packet i to be sent is equal to grant size, and the first data packet i to be sent is sent in the next sending cycle.
  • the preset number can be set according to the needs, for example, it can be set to 1, 2 or 3, etc., but the larger the preset number is, the more data packets are detected, the longer the waiting time is, and the more damage is caused to the original data packet order. In implementation, the latter data packet or a smaller number of data packets can be considered. Once it is not satisfied, no adjustment is performed.
  • the embodiment of the present application provides a data processing method, in which an ONU receives each data packet to be sent, stores each received data packet to be sent in a receiving order in a cache queue for caching, and performs the following processing before sending data in each sending cycle based on the timing resource information allocated by the OLT: determining the cumulative length of each data packet to be sent in the cache queue and the data packet to be sent arranged before it, and sequentially comparing the cumulative length of each data packet to be sent and the data packet to be sent arranged before it with the grant size of the timing resource information, and when it is determined that the first cumulative length of the first data packet to be sent and the data packet to be sent arranged before it is greater than the grant size, and the second cumulative length of the data packet to be sent before the first data packet to be sent and the data packet to be sent arranged before it is less than the grant size, determining the difference between the grant size and the second cumulative length, and arranging at least one second data packet to be sent whose length after the first data packet to be sent is less than or
  • the difference between the grant size and the second cumulative length is determined, and the second data packet to be sent after the first data packet to be sent and the length of the data packet to be sent before it is less than the grant size.
  • the first cumulative length of the data packet is greater than the grant size, and the second cumulative length of the previous data packet to be sent and the data packet to be sent arranged before the first data packet to be sent is less than the grant size, it indicates that the first data packet to be sent is located at the tail of the timing resources of the current sending cycle, and the timing resources of the current sending cycle cannot completely send the first data packet to be sent.
  • the position of the smaller second data packet to be sent arranged after the first data packet to be sent is moved to the front of the first data packet to be sent so that it can be sent when the start time of the current sending cycle arrives, and the first data packet to be sent is completely sent in the next sending cycle.
  • the delay of the second data packet to be sent is reduced (the length of a sending cycle is 125 ⁇ s), so that the time slot resources in the entire uplink data sending process can be fully utilized, thereby improving the overall delay.
  • an embodiment of the present application also provides a data processing device. Since the principle of solving the problem by the above-mentioned data processing device is similar to that of the above-mentioned data processing method, the implementation of the above-mentioned device can refer to the implementation of the method, and the repeated parts will not be repeated.
  • FIG. 7 is a schematic diagram of the structure of a data processing device provided in an embodiment of the present application, it may include:
  • the first receiving unit 31 is used to receive each data packet to be sent, and store each data packet to be sent in a cache queue in sequence according to the order of receiving for caching;
  • a first determining unit 32 is used to determine the cumulative length of each data packet to be sent in the buffer queue and the data packets to be sent arranged before it before sending data in each sending cycle based on the time slot resource information allocated by the optical line terminal OLT;
  • a comparing unit 33 is used to compare the cumulative length of each data packet to be sent and the data packets to be sent arranged before it with the grant size grant size of the time slot resource information in sequence;
  • a second determining unit 34 is configured to determine a difference between the grant size and the second cumulative length when it is determined that a first cumulative length of a first data packet to be sent and a data packet to be sent arranged before the first data packet to be sent is greater than the grant size, and a second cumulative length of a data packet to be sent before the first data packet to be sent and a data packet to be sent arranged before the first data packet to be sent is less than the grant size;
  • the reordering unit 35 is used to arrange at least one second data packet to be sent whose length is less than or equal to the difference and is located after the first data packet to be sent before the first data packet to be sent, so as to send all the data packets to be sent before the reordered first data packet to be sent at the start time corresponding to the current sending cycle.
  • the reordering unit 35 is specifically used to, if it is determined that the sum of the lengths of n consecutive data packets to be sent after the first data packet to be sent is equal to the difference, determine the n consecutive data packets to be sent as n consecutive second data packets to be sent, and arrange the n consecutive second data packets before the first data packet to be sent; if it is determined that the sum of the lengths of n consecutive data packets to be sent after the first data packet to be sent is less than the difference, and the sum of the lengths of n+1 consecutive data packets to be sent after the first data packet to be sent is greater than the difference, determine the n consecutive data packets to be sent as n second data packets to be sent, arrange the n consecutive second data packets to be sent before the first data packet to be sent, and fill zeros after the nth second data packet to be sent, so that the sum of the lengths of all data packets to be sent before the reordered first data packet to be sent is equal
  • the device further includes:
  • a processing unit configured to pad zeros before the first data packet to be sent if it is determined that the lengths of a preset number of data packets to be sent after the first data packet to be sent are all greater than the difference, so that the lengths of all data packets to be sent before the first data packet to be sent are equal to the grant size.
  • the device further includes:
  • a second receiving unit configured to receive a bandwidth mapping BWmap message sent by the OLT before sending data in each sending cycle based on the time slot resource information allocated by the OLT;
  • An extraction unit is used to extract the time slot resource information allocated by the OLT in the BWmap message, and the time slot resource information includes the start time corresponding to the current sending cycle and the grant size.
  • the embodiment of the present application further provides an electronic device 400, as shown in FIG. 8, the electronic device 400 is used to implement the data processing method described in the above method embodiment.
  • the electronic device 400 of the embodiment may include: a memory 401, a processor 402, and a computer program stored in the memory and executable on the processor, such as a data processing program.
  • the processor executes the computer program, the steps in the above-mentioned data processing method embodiments are implemented.
  • connection medium between the memory 401 and the processor 402 is not limited in the embodiment of the present application.
  • the memory 401 and the processor 402 are connected via a bus 403, and the bus 403 is represented by a bold line in FIG8 .
  • the connection mode between other components is only for schematic illustration and is not limited thereto.
  • the bus 403 can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one bold line is used in FIG8 , but it does not mean that there is only one bus or one type of bus.
  • the memory 401 may be a volatile memory, such as a random-access memory (RAM); the memory 401 may also be a non-volatile memory, such as a read-only memory, a flash memory, a hard disk drive (HDD) or a solid-state drive (SSD), or the memory 401 may be any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto.
  • the memory 401 may be a combination of the above memories.
  • the processor 402 is used to implement the data processing method provided in the embodiment of the present application.
  • An embodiment of the present application also provides a computer-readable storage medium that stores computer-executable instructions required to execute the above-mentioned processor, which includes a program required to execute the above-mentioned processor.
  • various aspects of the data processing method provided by the present application may also be implemented in the form of a program product, which includes a program code.
  • the program product When the program product is run on an electronic device, the program code is used to enable the electronic device to execute the steps of the data processing method according to various exemplary implementations of the present application described above in this specification.
  • the embodiments of the present application may be provided as methods, apparatuses, or computer program products. Therefore, the present application may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present application may take the form of one or more The form of a computer program product implemented on a computer-usable storage medium (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
  • a computer-usable storage medium including but not limited to disk storage, CD-ROM, optical storage, etc.
  • each flow and/or box in the flow chart and/or block diagram, and the combination of the flow chart and/or box in the flow chart and/or block diagram can be realized by computer program instructions.
  • These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device produce a device for realizing the function specified in one flow chart or multiple flows and/or one box or multiple boxes of the block chart.
  • These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device that implements the functions specified in one or more processes in the flowchart and/or one or more boxes in the block diagram.
  • These computer program instructions may also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, whereby the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one or more processes in the flowchart and/or one or more boxes in the block diagram.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

本申请公开了一种数据处理方法、装置、电子设备及存储介质,包括:将接收的各待发送数据包按照接收顺序依次存储至缓存队列中进行缓存;确定缓存队列中的每一待发送数据包与排列在其之前的待发送数据包的累计长度;依次将每一待发送数据包与排列在其之前的待发送数据包的累计长度与时隙资源信息的授权大小进行比较;当确定第一待发送数据包与排列在其之前的待发送数据包的第一累计长度大于授权大小,且第一待发送数据包的前一待发送数据包与排列在其之前的待发送数据包的第二累计长度小于授权大小时,确定授权大小与第二累计长度的差值;将位于第一待发送数据包之后的长度小于或者等于差值的至少一个第二待发送数据包排列在第一待发送数据包之前。

Description

一种数据处理方法、装置、电子设备及存储介质
相关申请的交叉引用
本申请要求在2023年07月05日提交中国专利局、申请号为202310822965.8、申请名称为“一种数据处理方法、装置、电子设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及通信技术领域,尤其涉及一种数据处理方法、装置、电子设备及存储介质。
背景技术
PON(Passive Optical Network,无源光纤网络)包括安装于中心控制站的OLT(Optical Line Terminal,光线路终端)、安装于用户侧的ONU(Optical Network Unit,光网络单元)和ODN(Optical Distribution Network,光分配网络),ODN是OLT与ONU之间的网络传输通道,OLT用于完成PON的上行接入以及将获取的数据通过ODN发送分配到ONU用户终端设备,ONU属于用户侧设备,用于接收OLT发送的数据,并可直接为用户提供服务。
TDM-PON(Time Division Multiplexing-PON,时分复用PON)在上行方向传输数据时基于时分复用技术。ONU在上行方向无法随时发送数据,而是需要在每个周期内等待OLT为其分配上行时隙资源,在所获得的上行时隙内向OLT发送数据包,如果错过当前时隙,通常需要再等待一个周期(通常为125μs)才能再次发送数据包。
在需要发送的数据中包含大数据包和小数据包的混合包场景下,如果在所分配的时隙尾部恰好是一个大数据包而时隙尾部剩余可发送数据大小小于该大数据包的包长时,ONU则无法完整发送该大数据包,例如,包长度为1.5K字节,而时隙尾部剩余可发送数据大小为400字节,此时,ONU则需要对该 大数据包进行分片处理,将该大数据包分为400字节和1.1K字节的两个分片,将400字节的分片在当前时隙发送,将1.1K字节的分片额外附加包头开销并进行缓存,留待下一周期发送,或者不对该大数据包做分片处理,而是等待下一周期再进行发送。其中,第一种分片发送的方式会增加额外的分包开销和组包时延,第二种不进行分片的发送方式会造成时隙资源的浪费。
发明内容
为了解决现有PON中在上行传输数据过程中浪费时隙资源和增加传输时延的问题,本申请实施例提供了一种数据处理方法、装置、电子设备及存储介质。
第一方面,本申请实施例提供了一种数据处理方法,包括:
接收各个待发送数据包,将所述各个待发送数据包按照接收顺序依次存储至缓存队列中进行缓存;
在基于光线路终端OLT分配的时隙资源信息的每一发送周期发送数据之前,确定所述缓存队列中的每一待发送数据包与排列在其之前的待发送数据包的累计长度;
依次将所述每一待发送数据包与排列在其之前的待发送数据包的累计长度与所述时隙资源信息的授权大小grant size进行比较;
当确定第一待发送数据包与排列在其之前的待发送数据包的第一累计长度大于所述grant size,且所述第一待发送数据包的前一待发送数据包与排列在其之前的待发送数据包的第二累计长度小于所述grant size时,确定所述grant size与所述第二累计长度的差值;
将位于所述第一待发送数据包之后的长度小于或者等于所述差值的至少一个第二待发送数据包排列在所述第一待发送数据包之前,以在当前发送周期对应的开始时间发送重排序后的所述第一待发送数据包之前的所有待发送数据包。
在一种可能的实施方式中,将位于所述第一待发送数据包之后的长度小于或者等于所述差值的至少一个第二待发送数据包排列在所述第一待发送数据包之前,具体包括:
若确定位于所述第一待发送数据包之后的n个连续的待发送数据包的长度之和等于所述差值,则将所述n个连续的待发送数据包确定为n个连续的第二待发送数据包,将所述n个连续的第二发送数据包排列在所述第一待发送数据包之前;
若确定位于所述第一待发送数据包之后的n个连续的待发送数据包的长度之和小于所述差值,且所述第一待发送数据包之后的n+1个连续的待发送数据包的长度之和大于所述差值,则将所述n个连续的待发送数据包确定为n个第二待发送数据包,将所述n个连续的第二待发送数据包排列在所述第一待发送数据包之前,并在第n个第二待发送数据包之后补零,以使位于重排序后的所述第一待发送数据包之前的所有待发送数据包的长度之和等于所述grant size。
在一种可能的实施方式中,所述方法,还包括:
若确定位于所述第一待发送数据包之后的预设数量的待发送数据包的长度均大于所述差值,则在所述第一待发送数据包之前补零,以使位于所述第一待发送数据包之前的所有待发送数据包的长度等于所述grant size。
在一种可能的实施方式中,在基于OLT分配的时隙资源信息的每一发送周期发送数据之前,还包括:
接收所述OLT发送的带宽映射BWmap消息;
提取所述BWmap消息中所述OLT分配的所述时隙资源信息,所述时隙资源信息包括所述当前发送周期对应的开始时间和所述grant size。
第二方面,本申请实施例提供了一种数据处理装置,包括:
第一接收单元,用于接收各个待发送数据包,将所述各个待发送数据包按照接收顺序依次存储至缓存队列中进行缓存;
第一确定单元,用于在基于光线路终端OLT分配的时隙资源信息的每一 发送周期发送数据之前,确定所述缓存队列中的每一待发送数据包与排列在其之前的待发送数据包的累计长度;
比较单元,用于依次将所述每一待发送数据包与排列在其之前的待发送数据包的累计长度与所述时隙资源信息的授权大小grant size进行比较;
第二确定单元,用于当确定第一待发送数据包与排列在其之前的待发送数据包的第一累计长度大于所述grant size,且所述第一待发送数据包的前一待发送数据包与排列在其之前的待发送数据包的第二累计长度小于所述grant size时,确定所述grant size与所述第二累计长度的差值;
重排单元,用于将位于所述第一待发送数据包之后的长度小于或者等于所述差值的至少一个第二待发送数据包排列在所述第一待发送数据包之前,以在当前发送周期对应的开始时间发送重排序后的所述第一待发送数据包之前的所有待发送数据包。
在一种可能的实施方式中,所述重排单元,具体用于若确定位于所述第一待发送数据包之后的n个连续的待发送数据包的长度之和等于所述差值,则将所述n个连续的待发送数据包确定为n个连续的第二待发送数据包,将所述n个连续的第二发送数据包排列在所述第一待发送数据包之前;若确定位于所述第一待发送数据包之后的n个连续的待发送数据包的长度之和小于所述差值,且所述第一待发送数据包之后的n+1个连续的待发送数据包的长度之和大于所述差值,则将所述n个连续的待发送数据包确定为n个第二待发送数据包,将所述n个连续的第二待发送数据包排列在所述第一待发送数据包之前,并在第n个第二待发送数据包之后补零,以使位于重排序后的所述第一待发送数据包之前的所有待发送数据包的长度之和等于所述grant size。
在一种可能的实施方式中,所述装置,还包括:
处理单元,用于若确定位于所述第一待发送数据包之后的预设数量的待发送数据包的长度均大于所述差值,则在所述第一待发送数据包之前补零,以使位于所述第一待发送数据包之前的所有待发送数据包的长度等于所述grant size。
在一种可能的实施方式中,所述装置,还包括:
第二接收单元,用于在基于OLT分配的时隙资源信息的每一发送周期发送数据之前,接收所述OLT发送的带宽映射BWmap消息;
提取单元,用于提取所述BWmap消息中所述OLT分配的所述时隙资源信息,所述时隙资源信息包括所述当前发送周期对应的开始时间和所述grant size。
第三方面,本申请实施例提供了一种电子设备,包括存储器、处理器及存储在所述存储器上并可在所述处理器上运行的计算机程序,所述处理器执行所述程序时实现本申请所述的数据处理方法。
第四方面,本申请实施例提供了一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现本申请所述的数据处理方法中的步骤。
本申请的有益效果如下:
本申请实施例提供的数据处理方法、装置、电子设备及存储介质,ONU接收各个待发送数据包,将接收的各个待发送数据包安装接收顺序依次存储至缓存队列中进行缓存,在基于OLT分配的时序资源信息的每一发送周期发送数据之前,执行如下处理:确定缓存队列中的每一待发送数据包与排列在其之前的待发送数据包的累计长度,依次将每一待发送数据包与排列在其之前的待发送数据包的累计长度与时序资源信息的grant size(授权大小)进行比较,当确定第一待发送数据包与排列在其之前的待发送数据包的第一累计长度大于grant size,且第一待发送数据包的前一待发送数据包与排列在其之前的待发送数据包的第二累计长度小于grant size时,确定grant size与第二累计长度的差值,将位于第一待发送数据包之后的长度小于或者等于该差值的至少一个第二待发送数据包排列在第一待发送数据包之前,以对当前缓存队列中的数据包进行重排序,以在当前发送周期对应的开始时间发送重排序后的第一待发送数据包之前的所有待发送数据包。本申请实施例中,当第一待发送数据包与排列在其之前的待发送数据包的第一累计长度大于grant size, 且第一待发送数据包的前一待发送数据包与排列在其之前的待发送数据包的第二累计长度小于grant size时,则表明该第一待发送数据包位于当前发送周期的时序资源尾部,且当前发送周期的时序资源无法完整发送该第一待发送数据包,在这种情况下,通过将排列在第一待发送数据包之后的较小的第二待发送数据包的位置移动到该第一待发送数据包之前以在当前发送周期的开始时间到来时进行发送,将第一待发送数据包在下一发送周期进行完整发送,由于无需对该第一待发送数据包进行分片,并将本应在下一发送周期进行发送的第二待发送数据包在当前发送周期进行发送,从而,在避免浪费时隙资源的同时,降低了第二待发送数据包的时延(一个发送周期的长度即125μs),从而,可以充分利用整个上行数据发送过程中的时隙资源,提升了整体时延。
本申请的其它特征和优点将在随后的说明书中阐述,并且,部分地从说明书中变得显而易见,或者通过实施本申请而了解。本申请的目的和其他优点可通过在所写的说明书、权利要求书、以及附图中所特别指出的结构来实现和获得。
附图说明
此处所说明的附图用来提供对本申请的进一步理解,构成本申请的一部分,本申请的示意性实施例及其说明用于解释本申请,并不构成对本申请的不当限定。在附图中:
图1为本申请实施例提供的OLT为ONU发送的上行时隙资源示例图;
图2(a)为本申请实施例提供的一个缓存队列示例图;
图2(b)为现有技术中对数据包进行分片处理的示例图;
图3为本申请实施例提供数据处理方法的应用场景示意图;
图4为本申请实施例提供的数据处理方法的实施流程示意图;
图5(a)为本申请实施例提供的针对图2(a)的缓存队列重排序后的缓存队列示意图;
图5(b)为本申请实施例提供的重排序后的数据包的发送示意图;
图6为本申请实施例提供的缓存重排序模块的处理流程示意图;
图7为本申请实施例提供的数据处理装置的结构示意图;
图8为本申请实施例提供的电子设备的结构示意图。
具体实施方式
TDM-PON在上行方向传输数据时基于时分复用技术。ONU在上行方向无法随时发送数据,而是需要在每个周期内等待OLT为其分配上行时隙资源,给每个ONU指定一个start time(开始时间)和一个grant size的时隙大小,其中,start time标识在一个发送周期中发送数据包的开始时间,也即:在一个发送周期中可以开始发送数据包的起始位置(起始时间),grant size(也即授权大小)定义了在一个发送周期中可发送数据包的字节大小(也即可发送数据包的长度),并约定一个发送周期的时长可以为125μs。OLT为ONU发送的上行时隙资源示例图如图1所示。ONU等待接收OLT为其分配的上行时隙资源,在各自的上行时隙内向OLT发送数据包,如果错过当前时隙,通常需要再等待一个周期(125μs)才能再次发送数据包。
在需要发送的数据中包含大数据包和小数据包的混合包场景下,如果在所分配的时隙尾部恰好是一个大数据包而时隙尾部剩余可发送数据大小小于该大数据包的包长时,ONU则无法完整发送该大数据包。例如,在如图2(a)所示的一个缓存队列示例,缓存队列中当前缓存的各数据包按照时间先后顺序排列依次为:第1个数据包大小为300字节,第2个数据包大小为1K字节,第3个数据包大小为300字节,第4个数据包大小为1.5K字节,第5~7个数据包大小均为128字节。假设OLT为ONU分配的时隙资源的grant size为2K字节,前三个数据包的总长度为1.6K字节,第4个数据包的长度为1.5K字节,而时隙尾部剩余可发送数据大小为400字节,在当前发送周期则无法完整发送第4个大数据包。此时,现有技术中,ONU则需要对第4个数据包进 行分片处理,如图2(b)所示,将该大数据包分为400字节和1.1K字节的两个分片,分别对应如图2(b)中的所示的分片1和分片2,将400字节的分片(即:分片1)在当前时隙发送,将1.1K字节的分片(即:分片2)额外附加包头开销并进行缓存,留待下一周期发送,或者不对该大数据包做分片处理,而是等待下一周期再进行发送。其中,第一种分片发送的方式会增加额外的分包开销和组包时延,第二种不进行分片的发送方式会造成时隙资源的浪费。
基于此,本申请实施例提供了一种数据处理方法、装置、电子设备及存储介质,ONU接收各个待发送数据包,将接收的各个待发送数据包安装接收顺序依次存储至缓存队列中进行缓存,在基于OLT分配的时序资源信息的每一发送周期发送数据之前,执行如下处理:确定缓存队列中的每一待发送数据包与排列在其之前的待发送数据包的累计长度,依次将每一待发送数据包与排列在其之前的待发送数据包的累计长度与时序资源信息的grant size进行比较,当确定第一待发送数据包与排列在其之前的待发送数据包的第一累计长度大于grant size,且第一待发送数据包的前一待发送数据包与排列在其之前的待发送数据包的第二累计长度小于grant size时,确定grant size与第二累计长度的差值,将位于第一待发送数据包之后的长度小于或者等于该差值的至少一个第二待发送数据包排列在第一待发送数据包之前,以对当前缓存队列中的数据包进行重排序,以在当前发送周期对应的开始时间发送重排序后的第一待发送数据包之前的所有待发送数据包。本申请实施例中,当第一待发送数据包与排列在其之前的待发送数据包的第一累计长度大于grant size,且第一待发送数据包的前一待发送数据包与排列在其之前的待发送数据包的第二累计长度小于grant size时,则表明该第一待发送数据包位于当前发送周期的时序资源尾部,且当前发送周期的时序资源无法完整发送该第一待发送数据包,在这种情况下,通过将排列在第一待发送数据包之后的较小的第二待发送数据包的位置移动到该第一待发送数据包之前以在当前发送周期的开始时间到来时进行发送,将第一待发送数据包在下一发送周期进行完整发送, 由于无需对该第一待发送数据包进行分片,并将本应在下一发送周期进行发送的第二待发送数据包在当前发送周期进行发送,从而,在避免浪费时隙资源的同时,降低了第二待发送数据包的时延(一个发送周期的长度即125μs),从而,可以充分利用整个上行数据发送过程中的时隙资源,提升了整体时延。
以下结合说明书附图对本申请的优选实施例进行说明,应当理解,此处所描述的优选实施例仅用于说明和解释本申请,并不用于限定本申请,并且在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互组合。
首先参考图3,其为本申请实施例提供的数据处理方法的一个应用场景示意图,可以包括光线路终端(OLT)100和光网络单元(ONU)101,OLT 100和ONU 101之间通过ODN进行网络传输OUN101包括上行入方向数据包处理模块1011、上行出方向数据发送模块1012、BWmap(Bandwidth map,带宽映射)解析模块1013和缓存重排序模块1014。OLT 100为ONU 101分配上行时隙资源信息,并通过向ONU 101发送BWmap消息进行下发上行时隙资源信息,上行资源信息包括:OLT 100为ONU 101指定的start time和grant size,其中,start time标识在一个发送周期中发送数据包的开始时间,也即:在一个发送周期中可以开始发送数据包的起始位置(也即起始时间),grant size定义了在一个发送周期中可发送数据包的字节大小(也即可发送数据包的长度),并约定一个发送周期的时长可以为125μs。其中:
上行入方向数据包处理模块1011,用于接收各个待发送数据包,将各个待发送数据包按照接收顺序依次存储至缓存队列中进行缓存。
上行出方向数据发送模块1012,用于从缓存队列中按顺序提取数据包,根据OLT 100为ONU 101分配的上行时隙资源在指定时隙内向OLT 100发送提取的数据包.
BWmap解析模块,用于接收OLT 100发送的BWmap消息,提取BWmap消息中OLT分配的上行时隙资源信息,上行时隙资源信息包括start time和grant size,并将start time和grant size传递给缓存重排序模块1014。
缓存重排序模块1014,用于在OLT分配的上行时隙资源信息的每一发送 周期发送数据之前,确定缓存队列中的每一待发送数据包与排列在其之前的待发送数据包的累计长度;依次将每一待发送数据包与排列在其之前的待发送数据包的累计长度与时隙资源信息的grant size进行比较;当确定第一待发送数据包与排列在其之前的待发送数据包的第一累计长度大于grant size,且第一待发送数据包的前一待发送数据包与排列在其之前的待发送数据包的第二累计长度小于grant size时,确定grant size与第二累计长度的差值;将位于第一待发送数据包之后的长度小于或者等于grant size与第二累计长度的差值的至少一个第二待发送数据包排列在第一待发送数据包之前,以对缓存队列中的数据包进行重排序。
基于上述应用场景,下面将参照附图4、图5(a)~图5(b)、图6更详细地描述本申请的示例性实施例,需要注意的是,上述应用场景仅是为了便于理解本申请的精神和原理而示出,本申请的实施方式在此不受任何限制。相反,本申请的实施方式可以应用于适用的任何场景。
如图4所示,其为本申请实施例提供的数据处理方法的实施流程示意图,该数据处理方法可以应用于上述的ONU 101中,具体可以包括以下步骤:
S21、接收各个待发送数据包,将各个待发送数据包按照接收顺序依次存储至缓存队列中进行缓存。
具体实施时,ONU中的上行入方向数据包处理模块接收终端发送的各个待发送数据包,并将接收的各待发送数据包按照接收的时间先后顺序依次存储至缓存队列中进行缓存,并可记录各个待发送数据包在缓存队列中的排列序号i和对应的数据包大小(也即数据包的长度)Si。
S22、在基于光线路终端分配的时隙资源信息的每一发送周期发送数据之前,确定缓存队列中的每一待发送数据包与排列在其之前的待发送数据包的累计长度。
具体实施时,在基于OLT分配的时隙资源的每一发送周期发送数据之前,还包括:
接收OLT发送的BWmap消息,提取BWmap消息中OLT分配的时隙资 源信息,时隙资源信息中包括当前发送周期对应的开始时间start time和授权大小grant size。
具体实施时,当ONU中的BWAMP解析模块接收到OLT发送的BWmap消息时,提取BWmap消息中OLT为ONU分配的上行时隙资源信息,获取其中包含的start time和grant size,并将start time和grant size发送给ONU中的缓存重排序模块。
缓存重排序模块在基于OLT分配的时隙资源信息的每一发送周期发送数据之前,计算缓存队列中的每一待发送数据包与排列在其之前的待发送数据包的累计长度,也即:每一待发送数据包累计到当前位置的缓存队列长度。
具体地,通过以下公式计算缓存队列中第i个待发送数据包与排列在其之前的待发送数据包的累计长度:
其中,Ci表示缓存队列中第i待发送数据包与排列在其之前的待发送数据包的累计长度;
Sk表示第k个待发送数据包的长度。
S23、依次将每一待发送数据包与排列在其之前的待发送数据包的累计长度与时隙资源信息的授权大小进行比较。
具体实施时,缓存重排序模块从缓存队列首部依次将Ci与grant size的值进行比较。
S24、当确定第一待发送数据包与排列在其之前的待发送数据包的第一累计长度大于授权大小,且第一待发送数据包的前一待发送数据包与排列在其之前的待发送数据包的第二累计长度小于授权大小时,确定授权大小与第二累计长度的差值。
具体实施时,当Ci≥grant size且Ci-1<grant size时,待发送数据包i(可记为第一待发送数据包)则为当前发送周期的时隙的尾部数据包,Ci可记为第一累计长度,Ci-1可记为第二累计长度。如果到达缓存队列尾部时仍未满足该 条件,则继续等待接收新的数据包直至满足条件,或者当前发送周期的start time到达。
当Ci≥grant size且Ci-1<grant size时,计算grant size与Ci-1的差值,此差值是当前发送周期不能完整发送待发送数据包i时的时隙尾部的剩余量。仍以图2(a)中的实例为例进行说明,假设grant size=2K字节,当前缓存队列中存储有7个待发送数据包,C1=300字节,C2=300字节+1K字节=1.3K字节,C3=300字节+1K字节+300字节=1.6K字节,C4=300字节+1K字节+300字节+1.5K字节=3.1K字节,C5=300字节+1K字节+300字节+1.5K字节+128字节=3228字节,C6=300字节+1K字节+300字节+1.5K字节+128字节+128字节=3356字节,C7=300字节+1K字节+300字节+1.5K字节+128字节+128字节+128字节=3484字节,由此可见,C4>2K字节且C3<2K字节,满足重排序条件,grant size-C3=2K字节-1.6K字节=400字节,即为时隙尾部剩余量。
在实施时,当Ci=grant size时,则表明待发送数据包i能够在当前发送周期被完整发送,则无需进行重排序。
S25、将位于第一待发送数据包之后的长度小于或者等于差值的至少一个第二待发送数据包排列在第一待发送数据包之前,以在当前发送周期对应的开始时间发送重排序后的第一待发送数据包之前的所有待发送数据包。
具体实施时,若确定位于第一待发送数据包之后的n个连续的待发送数据包的长度之和等于grant size与第二累计长度的差值,则将n个连续的待发送数据包确定为n个连续的第二待发送数据包,将n个连续的第二发送数据包排列在第一待发送数据包之前。
若确定位于第一待发送数据包之后的n个连续的待发送数据包的长度之和小于grant size与第二累计长度的差值,且第一待发送数据包之后的n+1个连续的待发送数据包的长度之和大于grant size与第二累计长度的差值,则将n个连续的待发送数据包确定为n个第二待发送数据包,将n个连续的第二待 发送数据包排列在第一待发送数据包之前,并在第n个第二待发送数据包之后补零,以使位于重排序后的第一待发送数据包之前的所有待发送数据包的长度之和等于grant size。
具体地,当Ci≥grant size且Ci-1<grant size时,判断Ci+1-Si是否小于grant size,Ci+1-Si=S1+S2+…+Si-1+Si+1=Ci-1+Si+1,也就是第一待发送数据包i的前一待发送数据包i-1与排列在其之前的待发送数据包的第二累计长度与第一待发送数据包i的下一个待发送数据包i+1的长度之和。如果Ci+1-Si<grant size,表示将后一个待发送数据包i+1和第一待发送数据包i换一下位置后可以在当前发送周期的时隙中发送,当Ci+1-Si<grant size时,则继续判断Ci+2-Si是否小于grant size,Ci+2-Si=Ci-1+Si+1+Si+2,也就是第一待发送数据包i的前一待发送数据包i-1与排列在其之前的待发送数据包的第二累计长度与第一待发送数据包i的下一个待发送数据包i+1的长度、以及第一待发送数据包i后的第2个待发送数据包i+2的长度之和。依次类推,直到找到第一待发送数据包i之后的第n个待发送数据包,满足Ci+n-Si≤grant size<Ci+n+1-Si,如果到达缓存队列尾部,即Ci+n+1=null为空值,则继续等待新的待发送数据包到达直到满足条件,或者start time到达。如果满足Ci+n-Si≤grant size<Ci+n+1-Si,则表明第一待发送数据包i之前的i-1个待发送数据包的累计长度Ci-1与第一待发送数据包i之后的n个连续的第二待发送数据包(i+1~i+n)可以在即将到来的当前发送周期内一起进行发送,将这n个连续的第二发送数据包排列在第一待发送数据包之前,并对第一待发送数据包i和第二待发送数据包i+1~i+n的排列序号进行更新,即:将第二待发送数据包i+1~i+n的序号均减1,将第一待发送数据包i的序号更新为:i+n。
在实施时,当Ci+n-Si=grant size且grant size<Ci+n+1-Si时,则将n个连续的第二发送数据包排列在第一待发送数据包之前即可;当Ci+n-Si<grant size<Ci+n+1-Si时,则在将n个连续的第二待发送数据包排列在第一待发送数据包之前之后,需在第n个第二待发送数据包之后补零,以使位 于重排序后的第一待发送数据包i之前的所有待发送数据包的长度之和等于grant size。
仍以图2(a)的实例为例进行说明,剩余grant size还有400字节,Si=1.5K字节,Si+1=128字节,Si+2=128字节,Si+3=128字节,满足Ci+1-Si<grant size,表示把Si剔除,把Si+1加进去,此时grant size还没填满,继续判断Ci+2-Si是否<grant size,把Si+2也加进去,此时400字节-128字节×2=144字节>0,grant size仍然没填满,则继续判断Ci+3-Si是否<grant size,把Si+3也加进去,此时400字节-128字节×3=16字节>0,此时由于后面已没有新的待发送数据包,即达到了缓存队列尾部,这种情况下n=3,如果后续收到其他的待发送数据包,则继续比较,n的值有可能发生变化,如果没有,则n的值就确定为3,将后面的三个128字节的数据包排列在1.5K字节的数据包之前,重排序后的缓存队列如图5(a)所示,进而,在第三个128字节的数据包后补充16字节的0,图5(b)中示出了重排序后的数据包的发送示意图,T1为发送周期的长度:125μs,也即当前发送周期的时隙和下一发送周期的时隙之间的时间间隔,ONU的上行出方向数据发送模块在当前发送周期的start time达到时,从缓存序列中获取重排序后的数据包1~4以及尾部补充的16字节的0进行发送。
假设其他待发送数据包的长度保持不变,Si+3=256字节,则400字节-128字节×2-256字节<0,Ci+2-Si<grant size<Ci+3-Si,这种情况下n=2。
下面针对图2(b)中的现有技术中的分片处理方式和5(b)中本申请的重排序方式发送数据的时延进行分析:
图2(b)中,大包(1.5K字节的数据包)时延为:T=T0+T1+Tr分片1+Tr分片2,小包(128字节的数据包)时延为:T=T′0+T1+Tr分片1+Tr分片2+Tr小包
其中,T0为大包在缓存队列中已等待时间,T′0为小包在缓存队列中已等待时间,T1为发送周期的长度:125μs,也即当前发送周期的时隙和下一发送周期的时隙之间的时间间隔,Tr分片1为大包的分片1的传输时间,Tr分片2为大 包的分片2的传输时间,Tr小包为小包的传输时间,以XGS-PON 10G线路速率为例,各个数据包传输时延小于0.1μs级别。
本申请实施例提供的处理方法中,如图5(b)中,大包(1.5K字节的数据包)时延为:T=T0+T1+Tr400+Tr大包,其中,Tr400对应的即为grant size尾部的400字节(3个128字节的数据包+16字节的0)的传输时间,其相当于现有技术中大包的分片1的传输时间Tr分片1。小包(128字节的数据包)时延为:T=T′0+Tr小包
与现有技术相比,大包时延增加了:(T)0+T1+Tr400+Tr大包-(T0+T1+Tr分片1+Tr分片2)=Tr大包-Tr分片2,以XGS-PON 10G线路速率为例,传输时延之差小于0.1μs,可忽略不计,也就是说,本申请中的处理方法,大包的时延与现有技术中相当。
与现有技术相比,小包时延减少了:(T′0+T1+Tr分片1+Tr分片2+Tr小包)-(T′0+Tr小包)=T1+Tr分片1+Tr分片2,其中Tr分片1和Tr分片2的传输时延为0.1μs,可忽略不计,那么小包时延则减少了约一个发送周期的长度:125μs,由此可见,本申请实施例中,小包时延显著由于现有技术。
在一种实施方式中,当确定第一待发送数据包与排列在其之前的待发送数据包的第一累计长度等于grant size,则表明当前发送周期的时隙尾部无剩余,则无需进行重排序,当start time到达时直接发送即可。
在一种实施方式中,若确定位于第一待发送数据包之后的预设数量的待发送数据包的长度均大于grant size与第二累计长度的差值,则在第一待发送数据包之前补零,以使位于第一待发送数据包之前的所有待发送数据包的长度等于grant size。
具体地,当Ci≥grant size且Ci-1<grant size时,如果Ci+1-Si>grant size,也即第i+1个数据包的长度大于grant size-第一待发送数据包i的前一待发送数据包i-1与排列在其之前的待发送数据包的第二累计 长度,那么,即使将第一待发送数据包i与其后的一个包i+1换一下位置,也超过grant size的范围,例如第i+1个数据包也是个大包或者时隙尾部剩余很少,则可不进行调整。或者,如果第一待发送数据包i后的第一个数据包i+1不符合条件,则可以继续判断第一待发送数据包i后第二个数据包i+2是否满足Ci+2-Si-Si+1<grant size,如果第一待发送数据包i后的预设数量个待发送数据包均无法满足上述条件,则不进行重排序,在第一待发送数据包i之前补零,以使位于第一待发送数据包i之前的所有待发送数据包的长度等于grant size,将第一待发送数据包i在下一发送周期进行发送。其中,预设数量可根据需求自行进行设置,例如可以设置为1,2或3等,但是预设数量设置的越大,检测的数据包越多,等待的时间则越长,且对原始数据包顺序的破坏越多,在实施时可以考虑后面的一个数据包或较少数量的数据包,一旦不满足,则不进行调整。
本申请实施例中,缓存重排序模块的完整处理流程可参见图6,此处不作赘述。
本申请实施例提供的一种数据处理方法,ONU接收各个待发送数据包,将接收的各个待发送数据包安装接收顺序依次存储至缓存队列中进行缓存,在基于OLT分配的时序资源信息的每一发送周期发送数据之前,执行如下处理:确定缓存队列中的每一待发送数据包与排列在其之前的待发送数据包的累计长度,依次将每一待发送数据包与排列在其之前的待发送数据包的累计长度与时序资源信息的grant size进行比较,当确定第一待发送数据包与排列在其之前的待发送数据包的第一累计长度大于grant size,且第一待发送数据包的前一待发送数据包与排列在其之前的待发送数据包的第二累计长度小于grant size时,确定grant size与第二累计长度的差值,将位于第一待发送数据包之后的长度小于或者等于该差值的至少一个第二待发送数据包排列在第一待发送数据包之前,以对当前缓存队列中的数据包进行重排序,以在当前发送周期对应的开始时间发送重排序后的第一待发送数据包之前的所有待发送数据包。本申请实施例中,当第一待发送数据包与排列在其之前的待发送数 据包的第一累计长度大于grant size,且第一待发送数据包的前一待发送数据包与排列在其之前的待发送数据包的第二累计长度小于grant size时,则表明该第一待发送数据包位于当前发送周期的时序资源尾部,且当前发送周期的时序资源无法完整发送该第一待发送数据包,在这种情况下,通过将排列在第一待发送数据包之后的较小的第二待发送数据包的位置移动到该第一待发送数据包之前以在当前发送周期的开始时间到来时进行发送,将第一待发送数据包在下一发送周期进行完整发送,由于无需对该第一待发送数据包进行分片,并将本应在下一发送周期进行发送的第二待发送数据包在当前发送周期进行发送,从而,在避免浪费时隙资源的同时,降低了第二待发送数据包的时延(一个发送周期的长度即125μs),从而,可以充分利用整个上行数据发送过程中的时隙资源,提升了整体时延。
基于同一发明构思,本申请实施例还提供了一种数据处理装置,由于上述数据处理装置解决问题的原理与上述数据处理方法相似,因此上述装置的实施可以参见方法的实施,重复之处不再赘述。
如图7所示,其为本申请实施例提供的数据处理装置的结构示意图,可以包括:
第一接收单元31,用于接收各个待发送数据包,将所述各个待发送数据包按照接收顺序依次存储至缓存队列中进行缓存;
第一确定单元32,用于在基于光线路终端OLT分配的时隙资源信息的每一发送周期发送数据之前,确定所述缓存队列中的每一待发送数据包与排列在其之前的待发送数据包的累计长度;
比较单元33,用于依次将所述每一待发送数据包与排列在其之前的待发送数据包的累计长度与所述时隙资源信息的授权大小grant size进行比较;
第二确定单元34,用于当确定第一待发送数据包与排列在其之前的待发送数据包的第一累计长度大于所述grant size,且所述第一待发送数据包的前一待发送数据包与排列在其之前的待发送数据包的第二累计长度小于所述grant size时,确定所述grant size与所述第二累计长度的差值;
重排单元35,用于将位于所述第一待发送数据包之后的长度小于或者等于所述差值的至少一个第二待发送数据包排列在所述第一待发送数据包之前,以在当前发送周期对应的开始时间发送重排序后的所述第一待发送数据包之前的所有待发送数据包。
在一种可能的实施方式中,所述重排单元35,具体用于若确定位于所述第一待发送数据包之后的n个连续的待发送数据包的长度之和等于所述差值,则将所述n个连续的待发送数据包确定为n个连续的第二待发送数据包,将所述n个连续的第二发送数据包排列在所述第一待发送数据包之前;若确定位于所述第一待发送数据包之后的n个连续的待发送数据包的长度之和小于所述差值,且所述第一待发送数据包之后的n+1个连续的待发送数据包的长度之和大于所述差值,则将所述n个连续的待发送数据包确定为n个第二待发送数据包,将所述n个连续的第二待发送数据包排列在所述第一待发送数据包之前,并在第n个第二待发送数据包之后补零,以使位于重排序后的所述第一待发送数据包之前的所有待发送数据包的长度之和等于所述grant size。
在一种可能的实施方式中,所述装置,还包括:
处理单元,用于若确定位于所述第一待发送数据包之后的预设数量的待发送数据包的长度均大于所述差值,则在所述第一待发送数据包之前补零,以使位于所述第一待发送数据包之前的所有待发送数据包的长度等于所述grant size。
在一种可能的实施方式中,所述装置,还包括:
第二接收单元,用于在基于OLT分配的时隙资源信息的每一发送周期发送数据之前,接收所述OLT发送的带宽映射BWmap消息;
提取单元,用于提取所述BWmap消息中所述OLT分配的所述时隙资源信息,所述时隙资源信息包括所述当前发送周期对应的开始时间和所述grant size。
基于同一技术构思,本申请实施例还提供了一种电子设备400,参照图8所示,电子设备400用于实施上述方法实施例记载的数据处理方法,该实施 例的电子设备400可以包括:存储器401、处理器402以及存储在所述存储器中并可在所述处理器上运行的计算机程序,例如数据处理程序。所述处理器执行所述计算机程序时实现上述各个数据处理方法实施例中的步骤。
本申请实施例中不限定上述存储器401、处理器402之间的具体连接介质。本申请实施例在图8中以存储器401、处理器402之间通过总线403连接,总线403在图8中以粗线表示,其它部件之间的连接方式,仅是进行示意性说明,并不引以为限。所述总线403可以分为地址总线、数据总线、控制总线等。为便于表示,图8中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。
存储器401可以是易失性存储器(volatile memory),例如随机存取存储器(random-access memory,RAM);存储器401也可以是非易失性存储器(non-volatile memory),例如只读存储器,快闪存储器(flash memory),硬盘(hard disk drive,HDD)或固态硬盘(solid-state drive,SSD)、或者存储器401是能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其他介质,但不限于此。存储器401可以是上述存储器的组合。
处理器402,用于实现本申请实施例提供的数据处理方法。
本申请实施例还提供了一种计算机可读存储介质,存储为执行上述处理器所需执行的计算机可执行指令,其包含用于执行上述处理器所需执行的程序。
在一些可能的实施方式中,本申请提供的数据处理方法的各个方面还可以实现为一种程序产品的形式,其包括程序代码,当所述程序产品在电子设备上运行时,所述程序代码用于使所述电子设备执行本说明书上述描述的根据本申请各种示例性实施方式的数据处理方法中的步骤。
本领域内的技术人员应明白,本申请的实施例可提供为方法、装置、或计算机程序产品。因此,本申请可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本申请可采用在一个或多个 其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。
本申请是参照根据本申请实施例的方法、设备(装置)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。
尽管已描述了本申请的优选实施例,但本领域内的技术人员一旦得知了基本创造性概念,则可对这些实施例做出另外的变更和修改。所以,所附权利要求意欲解释为包括优选实施例以及落入本申请范围的所有变更和修改。
显然,本领域的技术人员可以对本申请进行各种改动和变型而不脱离本申请的精神和范围。这样,倘若本申请的这些修改和变型属于本申请权利要求及其等同技术的范围之内,则本申请也意图包含这些改动和变型在内。

Claims (10)

  1. 一种数据处理方法,其特征在于,包括:
    接收各个待发送数据包,将所述各个待发送数据包按照接收顺序依次存储至缓存队列中进行缓存;
    在基于光线路终端OLT分配的时隙资源信息的每一发送周期发送数据之前,确定所述缓存队列中的每一待发送数据包与排列在其之前的待发送数据包的累计长度;
    依次将所述每一待发送数据包与排列在其之前的待发送数据包的累计长度与所述时隙资源信息的授权大小grant size进行比较;
    当确定第一待发送数据包与排列在其之前的待发送数据包的第一累计长度大于所述grant size,且所述第一待发送数据包的前一待发送数据包与排列在其之前的待发送数据包的第二累计长度小于所述grant size时,确定所述grant size与所述第二累计长度的差值;
    将位于所述第一待发送数据包之后的长度小于或者等于所述差值的至少一个第二待发送数据包排列在所述第一待发送数据包之前,以在当前发送周期对应的开始时间发送重排序后的所述第一待发送数据包之前的所有待发送数据包。
  2. 如权利要求1所述的方法,其特征在于,将位于所述第一待发送数据包之后的长度小于或者等于所述差值的至少一个第二待发送数据包排列在所述第一待发送数据包之前,具体包括:
    若确定位于所述第一待发送数据包之后的n个连续的待发送数据包的长度之和等于所述差值,则将所述n个连续的待发送数据包确定为n个连续的第二待发送数据包,将所述n个连续的第二发送数据包排列在所述第一待发送数据包之前;
    若确定位于所述第一待发送数据包之后的n个连续的待发送数据包的长度之和小于所述差值,且所述第一待发送数据包之后的n+1个连续的待发送 数据包的长度之和大于所述差值,则将所述n个连续的待发送数据包确定为n个第二待发送数据包,将所述n个连续的第二待发送数据包排列在所述第一待发送数据包之前,并在第n个第二待发送数据包之后补零,以使位于重排序后的所述第一待发送数据包之前的所有待发送数据包的长度之和等于所述grant size。
  3. 如权利要求1所述的方法,其特征在于,还包括:
    若确定位于所述第一待发送数据包之后的预设数量的待发送数据包的长度均大于所述差值,则在所述第一待发送数据包之前补零,以使位于所述第一待发送数据包之前的所有待发送数据包的长度等于所述grant size。
  4. 如权利要求1所述的方法,其特征在于,在基于OLT分配的时隙资源信息的每一发送周期发送数据之前,还包括:
    接收所述OLT发送的带宽映射BWmap消息;
    提取所述BWmap消息中所述OLT分配的所述时隙资源信息,所述时隙资源信息包括所述当前发送周期对应的开始时间和所述grant size。
  5. 一种数据处理装置,其特征在于,包括:
    第一接收单元,用于接收各个待发送数据包,将所述各个待发送数据包按照接收顺序依次存储至缓存队列中进行缓存;
    第一确定单元,用于在基于光线路终端OLT分配的时隙资源信息的每一发送周期发送数据之前,确定所述缓存队列中的每一待发送数据包与排列在其之前的待发送数据包的累计长度;
    比较单元,用于依次将所述每一待发送数据包与排列在其之前的待发送数据包的累计长度与所述时隙资源信息的授权大小grant size进行比较;
    第二确定单元,用于当确定第一待发送数据包与排列在其之前的待发送数据包的第一累计长度大于所述grant size,且所述第一待发送数据包的前一待发送数据包与排列在其之前的待发送数据包的第二累计长度小于所述grant size时,确定所述grant size与所述第二累计长度的差值;
    重排单元,用于将位于所述第一待发送数据包之后的长度小于或者等于 所述差值的至少一个第二待发送数据包排列在所述第一待发送数据包之前,以在当前发送周期对应的开始时间发送重排序后的所述第一待发送数据包之前的所有待发送数据包。
  6. 如权利要求5所述的装置,其特征在于,
    所述重排单元,具体用于若确定位于所述第一待发送数据包之后的n个连续的待发送数据包的长度之和等于所述差值,则将所述n个连续的待发送数据包确定为n个连续的第二待发送数据包,将所述n个连续的第二发送数据包排列在所述第一待发送数据包之前;若确定位于所述第一待发送数据包之后的n个连续的待发送数据包的长度之和小于所述差值,且所述第一待发送数据包之后的n+1个连续的待发送数据包的长度之和大于所述差值,则将所述n个连续的待发送数据包确定为n个第二待发送数据包,将所述n个连续的第二待发送数据包排列在所述第一待发送数据包之前,并在第n个第二待发送数据包之后补零,以使位于重排序后的所述第一待发送数据包之前的所有待发送数据包的长度之和等于所述grant size。
  7. 如权利要求5所述的装置,其特征在于,还包括:
    处理单元,用于若确定位于所述第一待发送数据包之后的预设数量的待发送数据包的长度均大于所述差值,则在所述第一待发送数据包之前补零,以使位于所述第一待发送数据包之前的所有待发送数据包的长度等于所述grant size。
  8. 如权利要求5所述的装置,其特征在于,还包括:
    第二接收单元,用于在基于OLT分配的时隙资源信息的每一发送周期发送数据之前,接收所述OLT发送的带宽映射BWmap消息;
    提取单元,用于提取所述BWmap消息中所述OLT分配的所述时隙资源信息,所述时隙资源信息包括所述当前发送周期对应的开始时间和所述grant size。
  9. 一种电子设备,包括存储器、处理器及存储在所述存储器上并可在所述处理器上运行的计算机程序,其特征在于,所述处理器执行所述程序时实 现如权利要求1~4任一项所述的数据处理方法。
  10. 一种计算机可读存储介质,其上存储有计算机程序,其特征在于,该程序被处理器执行时实现如权利要求1~4任一项所述的数据处理方法中的步骤。
PCT/CN2023/139897 2023-07-05 2023-12-19 一种数据处理方法、装置、电子设备及存储介质 Ceased WO2025007523A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202310822965.8A CN116938833A (zh) 2023-07-05 2023-07-05 一种数据处理方法、装置、电子设备及存储介质
CN202310822965.8 2023-07-05

Publications (1)

Publication Number Publication Date
WO2025007523A1 true WO2025007523A1 (zh) 2025-01-09

Family

ID=88376701

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/139897 Ceased WO2025007523A1 (zh) 2023-07-05 2023-12-19 一种数据处理方法、装置、电子设备及存储介质

Country Status (2)

Country Link
CN (1) CN116938833A (zh)
WO (1) WO2025007523A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116938833A (zh) * 2023-07-05 2023-10-24 中国电信股份有限公司技术创新中心 一种数据处理方法、装置、电子设备及存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1614944A (zh) * 2003-11-06 2005-05-11 北京邮电大学 无源光网络上行带宽的动态分配控制方法
EP2015522A1 (en) * 2007-07-12 2009-01-14 Nokia Siemens Networks Oy A method of preventing light load penalty in an ethernet passive optical network and an optical network unit using the same
CN101668234A (zh) * 2009-10-19 2010-03-10 国网信息通信有限公司 一种数据包发送方法及模块
CN114302268A (zh) * 2021-12-20 2022-04-08 杭州电子科技大学 基于多轮询窗口epon系统中的多业务共存调度方法及系统
CN116938833A (zh) * 2023-07-05 2023-10-24 中国电信股份有限公司技术创新中心 一种数据处理方法、装置、电子设备及存储介质

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1614944A (zh) * 2003-11-06 2005-05-11 北京邮电大学 无源光网络上行带宽的动态分配控制方法
EP2015522A1 (en) * 2007-07-12 2009-01-14 Nokia Siemens Networks Oy A method of preventing light load penalty in an ethernet passive optical network and an optical network unit using the same
CN101668234A (zh) * 2009-10-19 2010-03-10 国网信息通信有限公司 一种数据包发送方法及模块
CN114302268A (zh) * 2021-12-20 2022-04-08 杭州电子科技大学 基于多轮询窗口epon系统中的多业务共存调度方法及系统
CN116938833A (zh) * 2023-07-05 2023-10-24 中国电信股份有限公司技术创新中心 一种数据处理方法、装置、电子设备及存储介质

Also Published As

Publication number Publication date
CN116938833A (zh) 2023-10-24

Similar Documents

Publication Publication Date Title
US8031734B2 (en) System, method and computer program for in-place, lightweight ack promotion in network environment
CN101447928B (zh) 分片信息处理的方法和装置
US7957392B2 (en) Method and apparatus for high-performance bonding resequencing
CN101945427B (zh) 一种高效的流媒体传输方法
CN116634313B (zh) 光前传网络中单帧多突发的分配方法、突发帧上行方法、分配装置及计算机可读存储介质
WO2012129922A1 (zh) 一种报文处理方法、转发设备及系统
CN109120544A (zh) 一种数据中心网络中基于主机端流量调度的传输控制方法
CN104753813B (zh) Dma传送报文的方法
CN114365459B (zh) 网络控制装置、通信资源分配方法以及通信系统
US10725948B2 (en) RoCE over wireless
CN113225196B (zh) 服务等级配置方法以及装置
WO2017193861A1 (zh) 一种业务数据的传输方法、终端及网络侧设备
CN111224903B (zh) 一种数据传输方法、设备及计算机可读存储介质
CN114390054A (zh) 一种核心网网络加速方法、电子设备及计算机存储介质
WO2025007523A1 (zh) 一种数据处理方法、装置、电子设备及存储介质
JP5473406B2 (ja) ネットワーク処理装置及びその処理方法
JP3779860B2 (ja) コネクション受付制御方法
US20120063463A1 (en) Packet aligning apparatus and packet aligning method
CN113316036B (zh) 动态波长带宽分配方法
CN106413095A (zh) 数据传输方法
CN105307207B (zh) 无线联网装置中的数据传输的方法和无线联网装置
US20130136137A1 (en) Apparatus and method for data transmission
CN104852864A (zh) 一种报文转发方法、装置及网络转发设备
JP3792494B2 (ja) 無線ネットワークにおけるデータ転送方法
US20130346601A1 (en) Network device, method of controlling the network device, and network system

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 23944244

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE