Channel allocation method for wavelength division multiplexed passive optical networks
By periodically sending announcement messages through the OLT and randomly selecting and evaluating the quality of the ONU, the problem of excessively long ONU registration time in WDM-PON is solved, enabling fast channel allocation and online access, and improving registration efficiency.
Patent Information
- Application Number
- CN202611697602.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-10-30
- Publication Date
- 2026-11-27
AI Technical Summary
In existing WDM-PON solutions, the wavelength switching process during ONU registration is cumbersome and the channel scanning efficiency is low, resulting in excessively long registration and online time, especially in scenarios with a large number of concurrent users.
The OLT periodically sends announcement messages carrying idle status information. The ONU selects a random channel and evaluates the channel quality through a random number generator, controls the optical module to switch to the target channel, and determines the total delay time based on the number of application failures and random delay time. It then sends a channel application request message to avoid retransmission conflicts.
It significantly shortens the ONU registration and online time, improves the registration efficiency of WDM PON in scenarios with massive concurrent user access, reduces the complexity of channel scanning and quality assessment, and reduces the number of wavelength switching and time overhead.
Smart Images

Figure CN123185478A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of passive optical network communication technology, and in particular to a channel allocation method for wavelength division multiplexing passive optical networks. Background Technology
[0002] Wavelength Division Multiplexing Passive Optical Network (WDM PON) is a passive optical network technology that differentiates users based on wavelength, fundamentally different from the time-sharing bandwidth architecture of traditional TDM PON such as EPON, GPON, and XGS-PON. The core design concept of WDM PON is to allocate an independent dedicated wavelength channel to each ONU, and the OLT side uses wavelength division multiplexing devices to perform multiplexing and demultiplexing of multiple wavelengths. The original passive optical splitter nodes are replaced with passive wavelength division multiplexers, achieving physical isolation of user bandwidth.
[0003] With the continuous advancement of broadband network construction, FTTH fiber-to-the-home access networks have achieved large-scale commercial deployment. In scenarios with massive concurrent user access, more stringent requirements are placed on the stability and latency of ONU registration. In existing WDM-PON solutions, ONUs need to switch laser operating wavelengths one by one during power-on registration, polling and searching for available wavelength resources across dozens of wavelength channels. This cumbersome wavelength switching process and low channel scanning efficiency directly result in excessively long ONU registration times. Summary of the Invention
[0004] This invention provides a channel allocation method for wavelength division multiplexing passive optical networks (WDM PONs) to solve the problems of cumbersome wavelength switching procedures and low channel scanning efficiency during ONU registration, which lead to excessively long ONU registration and online time. This method enables rapid allocation and online access of ONU channels, thereby improving the registration efficiency of WDM PONs in scenarios with massive concurrent user access.
[0005] This invention provides a channel allocation method for a wavelength division multiplexing (WDM) passive optical network (PON). The method is applied to an optical network unit (ONU) in the WDM PON, which further includes an optical line terminal (OLT). The method includes the following steps: Receive the notification message sent by the OLT; the notification message carries the idle status information of all channels; Obtain the current list of idle channels according to the notification message, access the random number generator to generate at least two random numbers, and select the idle channel at the corresponding position in the current list of idle channels as at least two random channels according to the at least two random numbers; The channel quality of each of the at least two random channels is determined, and the target channel is determined from the at least two random channels based on the channel quality. Control the optical module to switch to the operating wavelength corresponding to the target channel; The random number generator is accessed to generate a first random delay time. The total delay time is determined based on the number of application failures and the first random delay time. After waiting for the total delay time, a channel application request message is sent to the OLT. Receive the response message returned by the OLT; The response message can be an acknowledgment message or a rejection message. If the acknowledgment message is received, the ONU completes the channel application process. If the rejection message is received, the application failure count is updated, and the ONU re-receives the notification message sent by the OLT.
[0006] In one embodiment, the random number generator employs a digital physical noise source chip.
[0007] In one embodiment, the notification message includes real-time channel parameters, which include wavelength loss, uplink bandwidth capacity, and channel signal-to-noise ratio. The channel quality is determined based on wavelength loss, uplink bandwidth capacity, and channel signal-to-noise ratio.
[0008] In one embodiment, determining the total delay duration based on the number of application failures and the first random delay time includes: Obtain the channel signal-to-noise ratio from the real-time channel parameters of the notification message; The total delay duration is determined based on the number of application failures, the first random delay time, and the channel signal-to-noise ratio.
[0009] In one embodiment, the step of updating the application failure count and re-receiving the notification message sent by the OLT if the rejection message is received includes: If the rejection message is received, the application failure count is updated to obtain the updated application failure count; Access the random number generator to generate a second random delay time, determine the waiting time based on the updated number of application failures and the second random delay time, and re-receive the notification message sent by the OLT after the waiting time expires.
[0010] In one embodiment, the method further includes: If the number of application failures reaches a first predetermined threshold, the update of the number of application failures will stop. After waiting for a fixed first predetermined time, the notification message sent by the OLT will be received, and an idle channel will be reselected to initiate registration based on the re-received notification message. If the number of application failures reaches a second predetermined threshold, the update of the number of application failures will stop. After waiting for a fixed second predetermined time, the notification message sent by the OLT will be received, and an idle channel will be reselected to initiate registration based on the re-received notification message. Wherein, the second predetermined threshold is greater than the first predetermined threshold, and the second predetermined time is greater than the first predetermined time.
[0011] In one embodiment, the method further includes: After completing the channel application process, keep-alive messages are periodically sent to the OLT; if the OLT fails to receive keep-alive messages from the corresponding ONU multiple times in a row, the ONU is determined to be offline and the corresponding channel is reset to an idle state.
[0012] The present invention also provides a channel allocation device for a wavelength division multiplexing passive optical network (WDM Passive Optical Network), the device being applied to an optical network unit (ONU) in the WDM Passive Optical Network, the WDM Passive Optical Network further comprising an optical line terminal (OLT), the device comprising: The message receiving module is used to receive the announcement message sent by the OLT; the announcement message carries the idle status information of all channels; The channel selection module is used to obtain the current list of idle channels according to the announcement message, access the random number generator to generate at least two random numbers, and select the idle channel at the corresponding position in the current list of idle channels as at least two random channels according to the at least two random numbers. A target channel determination module is used to determine the channel quality of the at least two random channels respectively, and determine the target channel from the at least two random channels based on the channel quality; A wavelength switching module is used to control the optical module to switch to the operating wavelength corresponding to the target channel; The message sending module is used to access the random number generator to generate a first random delay time, determine the total delay time based on the number of application failures and the first random delay time, and after waiting for the total delay time, send a channel application request message to the OLT. The response receiving module is used to receive the response message returned by the OLT; wherein the response message is an acknowledgment message or a rejection message; if the acknowledgment message is received, the ONU completes the channel application process; if the rejection message is received, the application failure count is updated, and the ONU re-receives the announcement message sent by the OLT.
[0013] The present invention also provides an optical network unit, comprising: Optical modules are used for switching between different wavelength channels; A random number generator is used to generate random numbers. A processor that, when executing a computer program, implements the channel allocation method for wavelength division multiplexing passive optical networks as described above.
[0014] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the channel allocation method for wavelength division multiplexing passive optical networks as described above.
[0015] The channel allocation method for wavelength division multiplexing (WDM) passive optical networks provided by this invention involves the OLT periodically sending announcement messages carrying idle status information across all channels. The ONU, in an offline state, only needs to listen to and receive these announcement messages to obtain the idle status of all channels at once. This eliminates the need for polling and searching through dozens of wavelength channels by switching the laser's operating wavelength one by one, as is required in existing technologies. This improves channel scanning from a traversal, serial search to a list-based acquisition method that can be completed in a single reception, significantly reducing the time overhead required for channel scanning. Furthermore, the ONU accesses a random number generation module to generate at least two random numbers. Based on these random numbers, it selects an idle channel at the corresponding position in the current idle channel list as a random channel. This allows the ONU to focus only on a few randomly selected candidate channels, without needing to perform quality assessment and screening on all idle channels individually. This further reduces the scale of channel evaluation from the scanning range, effectively reducing the complexity of channel scanning and channel quality assessment. Subsequently, the ONU determines the channel quality of each of the aforementioned random channels, identifies the target channel from the random channels based on the channel quality, and switches to the corresponding operating wavelength. The entire wavelength switching process eliminates the need for polling across dozens of wavelength channels; a single switch to the operating wavelength corresponding to the determined target channel is sufficient to complete wavelength locking, significantly reducing the number of wavelength switches and time overhead. Finally, after switching to the target channel, the ONU determines the total delay time based on the number of failed requests and the first random delay time. It waits for this total delay time before sending a channel request message to the OLT, avoiding conflicting retransmissions caused by a large number of ONUs sending requests simultaneously, further improving registration efficiency. This invention significantly shortens the time required for ONU registration and effectively improves the registration efficiency of WDMPON in scenarios with massive concurrent user access. Attached Figure Description
[0016] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0017] Figure 1This is a system architecture diagram of WDM PON provided by the present invention.
[0018] Figure 2 This is one of the flowcharts illustrating the channel allocation method for wavelength division multiplexing passive optical networks provided by the present invention.
[0019] Figure 3 This is the second flowchart illustrating the channel allocation method for wavelength division multiplexing passive optical networks provided by this invention.
[0020] Figure 4 This is a schematic diagram of the structure of the ONU provided by the present invention.
[0021] Figure 5 This is a schematic diagram of the channel allocation device for wavelength division multiplexing passive optical networks provided by the present invention.
[0022] Figure 6 This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation
[0023] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.
[0024] This invention provides a channel allocation method for wavelength division multiplexing (WDM) passive optical networks (WONs), where the WDM PON serves as an optical fiber access network. (Refer to...) Figure 1 As shown, WDM PON includes an Optical Line Terminal (OLT), an Arrayed Waveguide Grating (AWG), an Optical Distribution Network (ODN), and multiple Optical Network Units (ONUs). The OLT has multiple service ports, each corresponding to a wavelength channel (e.g., ...). Figure 1 Channels 1 to 8 (a total of 8 wavelength channels) are shown. Each wavelength channel is independent of the others and is used to carry uplink and downlink data from different ONUs.
[0025] The downlink data streams of each service port of the OLT are carried by independent wavelengths. The downlink optical signals output from each port are multiplexed by an AWG and then transmitted to each ONU through the ODN. Each ONU selects and locks a dedicated wavelength through its own optical module to complete the downlink data reception.
[0026] The uplink transmission link employs a wavelength isolation mechanism, with each port of the OLT using a different wavelength for its uplink signals. After multiple uplink optical signals arrive at the ODN side, the AWG performs wavelength division processing, separating each wavelength channel and sending them to the corresponding optical module receiver at the OLT port. In WDM PON, each channel corresponds to a unique wavelength.
[0027] In this invention, ONU refers to a device located on the user side, used to receive downlink optical signals from the OLT and convert them into electrical signals for output to the user terminal equipment, while simultaneously converting uplink user data into optical signals and sending them to the OLT. OLT refers to a central office device located in the operator's equipment room, used to aggregate uplink data, distribute downlink data, and perform system management and channel allocation. AWG refers to an arrayed waveguide grating, a passive wavelength multiplexing / demultiplexing device based on planar waveguide technology, capable of combining multiple optical signals of different wavelengths into a single optical fiber for transmission, or demultiplexing multiple optical signals of different wavelengths transmitted in a single optical fiber to different ports for output. ODN refers to an intermediate link composed of optical fiber and passive devices, responsible for the transmission and distribution of optical signals.
[0028] Figure 2 This is one of the flowcharts illustrating a channel allocation method for wavelength division multiplexing (WDM) passive optical networks provided by this invention. This method is executed by the Optical Network Unit (ONU) in a multi-wavelength WDM PON, and is used to randomly select channels and set random delays via a random number generator when an ONU comes online, quickly allocating different wavelength channel resources to each ONU. The WDM passive optical network also includes an Optical Line Terminal (OLT). Figure 2 As shown, the method includes the following: S110. Receive the notification message sent by the OLT; the notification message carries the idle status information of all channels.
[0029] In this embodiment, the OLT periodically sends notification messages across all channels, carrying the idle status information of all channels. The sending period of the notification messages can be set according to actual system needs, such as once every 100 milliseconds or once every second; this invention does not impose a specific limitation. The notification messages can be sent via broadcast to ensure that all ONUs in an offline state can receive the message.
[0030] After an offline ONU that has not completed registration is powered on and initialized, it initiates a listening process, continuously listening for announcement messages sent by the OLT. When the ONU successfully receives the announcement message from the OLT, it extracts the idle status information of all channels from the message. This idle status information indicates whether each wavelength channel in the WDM PON is currently occupied by another ONU. Based on the extracted idle status information, the ONU obtains a list of currently idle channels. This list of currently idle channels refers to the set of all unoccupied wavelength channels in the system at the current moment.
[0031] In one optional implementation, the notification message also carries ONU information about channel occupancy; that is, when a channel is occupied, the notification message also carries the identification information of the ONU occupying that channel. This information is used by other ONUs to understand the current channel occupancy distribution in the network.
[0032] S120. Obtain the current idle channel list according to the announcement message, access the random number generator to generate at least two random numbers, and select the idle channel at the corresponding position in the current idle channel list as at least two random channels according to the at least two random numbers.
[0033] After obtaining the current list of idle channels, the ONU accesses the random number generator to generate at least two random numbers. Based on these two random numbers, the ONU selects idle channels at corresponding positions in the current list of idle channels as at least two random channels. Specifically, the value of each random number serves as an index value to locate the corresponding channel in the current list of idle channels. For example, if the current list of idle channels is {channel 1, channel 2, channel 3, ..., channel N}, and the random number generator generates three random numbers with values a, b, and c, then the a-th, b-th, and c-th idle channels in the list are selected as random channels, respectively. In a preferred embodiment, the ONU generates three random numbers and selects three random channels accordingly to control the processing complexity of subsequent quality assessment while ensuring the coverage of candidate channels.
[0034] S130. Determine the channel quality of the at least two random channels respectively, and determine the target channel from the at least two random channels based on the channel quality.
[0035] After the ONU selects at least two random channels, it determines the channel quality of each random channel and selects the channel with the highest channel quality from the at least two random channels as the target channel, that is, it selects the channel with the best current transmission quality as the target channel.
[0036] S140, Control the optical module to switch to the operating wavelength corresponding to the target channel.
[0037] The optical module is a physical layer device in the ONU responsible for photoelectric / electro-optical conversion. It can switch the operating wavelength of the laser between different wavelength channels according to control commands. Specifically, the ONU sends a wavelength switching command to the optical module, instructing the optical module to adjust its laser to the center wavelength corresponding to the target channel, thereby completing wavelength locking.
[0038] S150: Access the random number generator to generate a first random delay time, determine the total delay time based on the number of application failures and the first random delay time, and after waiting for the total delay time, send a channel application request message to the OLT.
[0039] After wavelength switching is completed, the ONU accesses the random number generator to generate a random number as the first random delay time. This first random delay time determines the duration the ONU needs to wait before sending a channel request message. In one specific implementation, the first random delay time ranges from 10 milliseconds to 1000 milliseconds. After generating the first random delay time, the ONU determines the total delay time based on the number of failed requests and the first random delay time. The number of failed requests refers to the number of times the ONU has been rejected by the OLT during the current channel request process, with an initial value of 0.
[0040] In one specific implementation, the formula for calculating the total delay duration is: ; in, Indicates the total delay time. Indicates the number of times the application failed. This represents the first random delay time.
[0041] After waiting for the total delay duration, the ONU sends a channel request message to the OLT, requesting the OLT to allocate the target channel to the ONU. It should be noted that the above calculation method for the total delay duration is merely illustrative; other calculation methods that can result in differentiated delay distributions for different ONUs also fall within the scope of this invention.
[0042] S160. Receive the response message returned by the OLT; The response message can be an acknowledgment message or a rejection message. If the acknowledgment message is received, the ONU completes the channel application process. If the rejection message is received, the application failure count is updated, and the ONU re-receives the notification message sent by the OLT.
[0043] After sending a channel request message, the ONU waits for and receives a response message from the OLT. The response message is either an acknowledgment message (Ack message) or a rejection message (Deny message).
[0044] If the OLT receives a channel request message from an ONU, and determines that the requested target channel is currently idle, the OLT marks the channel as occupied, allocates the channel to the ONU that initiated the request, and sends a confirmation message to the ONU. Upon receiving the confirmation message, the ONU completes the channel request process and successfully registers and goes online. After registering and going online, the ONU periodically sends keepalive messages to the OLT to maintain its online status, allowing the OLT to know the ONU's online status in real time.
[0045] If the OLT receives a channel request message from the ONU and determines that the requested target channel is already occupied by another ONU, the OLT replies with a rejection message to that ONU. Upon receiving the rejection message, the ONU indicates that the request has failed. The ONU increments the failure count by 1 and then re-receives the next announcement message from the OLT. Based on the re-received announcement message, it re-obtains the current list of available channels and re-executes the entire process of selecting a random channel from the list of available channels, determining the target channel, switching wavelengths, generating random delays, sending the request, and receiving the response.
[0046] It should be noted that, in this invention, "re-receiving the announcement message sent by the OLT" means that after receiving the rejection message, the ONU waits for the next announcement message sent by the OLT according to its inherent cycle and completes the reception. This announcement message carries updated channel idle status information, which can reflect the actual occupancy status of each channel at the current moment. After receiving the next announcement message, the ONU repeats the above channel selection and application process until it successfully registers and goes online.
[0047] In this implementation, the request failure count is used to record the cumulative number of times the ONU is rejected by the OLT during the channel request process. Each time the ONU receives a rejection message, the request failure count is incremented by 1. As the number of request failures increases, the total delay time also increases, thus causing ONUs that have failed multiple times to wait longer during retries, avoiding increased channel conflicts caused by frequent retries.
[0048] The channel allocation method for wavelength division multiplexing (WDM) passive optical networks provided by this invention involves the OLT periodically sending announcement messages carrying idle status information across all channels. The ONU, in an offline state, only needs to listen to and receive these announcement messages to obtain the idle status of all channels at once. This eliminates the need for polling and searching through dozens of wavelength channels by switching the laser's operating wavelength one by one, as is required in existing technologies. This improves channel scanning from a traversal, serial search to a list-based acquisition method that can be completed in a single reception, significantly reducing the time overhead required for channel scanning. Furthermore, the ONU accesses a random number generation module to generate at least two random numbers. Based on these random numbers, it selects an idle channel at the corresponding position in the current idle channel list as a random channel. This allows the ONU to focus only on a few randomly selected candidate channels, without needing to perform quality assessment and screening on all idle channels individually. This further reduces the scale of channel evaluation from the scanning range, effectively reducing the complexity of channel scanning and channel quality assessment. Subsequently, the ONU determines the channel quality of each of the aforementioned random channels, identifies the target channel from the random channels based on the channel quality, and switches to the corresponding operating wavelength. The entire wavelength switching process eliminates the need for polling across dozens of wavelength channels; a single switch to the operating wavelength corresponding to the determined target channel is sufficient to complete wavelength locking, significantly reducing the number of wavelength switches and time overhead. Finally, after switching to the target channel, the ONU determines the total delay time based on the number of failed requests and the first random delay time. It waits for this total delay time before sending a channel request message to the OLT, avoiding conflicting retransmissions caused by a large number of ONUs sending requests simultaneously, further improving registration efficiency. This invention significantly shortens the time required for ONU registration and effectively improves the registration efficiency of WDMPON in scenarios with massive concurrent user access.
[0049] In one embodiment, the random number generator employs a digital physical noise source chip.
[0050] Digital physical noise source chips utilize random noise in physical processes (such as thermal noise, quantum noise, phase jitter, etc.) as entropy sources to generate truly random numbers. Unlike pseudo-random number generators based on software algorithms, the random numbers generated by digital physical noise source chips are unpredictable and unreproducible.
[0051] Specifically, when an ONU needs to generate random numbers to select candidate channels, the ONU accesses the digital physical noise source chip, which generates a true random number based on the physical noise source and outputs it to the ONU. Each time the ONU accesses the chip, the chip generates a new, unrelated true random number. Since the digital physical noise source chips configured in each ONU operate independently, and the physical noise sources within each chip are uncorrelated, the random number sequences generated by each ONU are independent of each other and follow a uniform distribution.
[0052] When the ONU generates the first random delay time, it also accesses the digital physical noise source chip, which generates a truly random number based on the physical noise source and outputs it to the ONU as the first random delay time. When the ONU receives a rejection message and needs to generate a random delay time again, it accesses the digital physical noise source chip again, which generates a new truly random number based on the physical noise source and outputs it to the ONU as the random delay time.
[0053] Since the digital physical noise source chips configured in each ONU work independently, the random number sequences generated by each chip are independent of each other and follow a uniform distribution. Therefore, the candidate channel sets selected by each ONU in the idle channel list according to its own random number are not related to each other, and the total delay time determined by each ONU according to its own random number is also not related to each other. This ensures that each ONU selects different channels as much as possible to reduce channel conflicts.
[0054] This invention employs a digital physical noise source chip as a random number generator. Each ONU's configured digital physical noise source chip operates independently, generating random numbers based on uncorrelated physical noise sources. The random number sequences generated by each ONU are independent and follow a uniform distribution. During the channel selection phase, each ONU selects an idle channel from the current idle channel list based on its independent random numbers. The candidate channel sets selected by each ONU are unrelated, ensuring that the candidate channels of each ONU are distributed across different channel ranges, preventing a large number of ONUs from selecting the same channel based on the same or similar random numbers. During the delay generation phase, each ONU generates uncorrelated random delay times based on its own independent physical noise sources, resulting in a sufficiently differentiated distribution of the total delay time for each ONU. The combined effect of the differentiated channel selection and delay time significantly reduces the probability of multiple ONUs requesting the same channel at the same time, thereby effectively reducing channel conflicts and data errors.
[0055] In one embodiment, the notification message includes real-time channel parameters, including wavelength loss, uplink bandwidth capacity, and channel signal-to-noise ratio (SNR). Wavelength loss characterizes the degree of power attenuation of the optical signal during transmission in the channel, measured in dB; uplink bandwidth capacity characterizes the maximum uplink transmission rate that the channel can provide, measured in Mbps; and channel SNR characterizes the ratio of signal power to noise power in the channel, measured in dB.
[0056] The channel quality is determined based on wavelength loss, uplink bandwidth capacity, and channel signal-to-noise ratio.
[0057] Specifically, after receiving the notification message, the ONU extracts the idle status information and real-time channel parameters for all channels from the message. The ONU then obtains the current list of idle channels based on the idle status information. The ONU accesses a random number generator to generate three random numbers, denoted as RandomNumber-a, RandomNumber-b, and RandomNumber-c. Based on RandomNumber-a, RandomNumber-b, and RandomNumber-c, the ONU selects the corresponding idle channels from the current list of idle channels as RandomChannel-a, RandomChannel-b, and RandomChannel-c. The ONU then determines the channel quality for RandomChannel-a, RandomChannel-b, and RandomChannel-c. .
[0058] ; in, Indicates uplink bandwidth capacity. Indicates the channel signal-to-noise ratio. This indicates wavelength loss.
[0059] The ONU calculates the channel quality of each idle channel. Then, select from them. The largest channel is used as the target channel. A larger value indicates better overall transmission conditions for the channel. The largest channel ensures that the ONU accesses the channel with the best transmission quality among the current candidate channels.
[0060] This invention uses an OLT to send an announcement message carrying the wavelength loss, uplink bandwidth capacity, and channel signal-to-noise ratio (SNR) for each channel. The ONU (Optical Network Unit) does not need to measure the real-time parameters of each channel individually by switching wavelengths one by one; it can simultaneously obtain the wavelength loss, uplink bandwidth capacity, and channel SNR of all channels by receiving only one announcement message. The ONU determines the channel quality based on the wavelength loss, uplink bandwidth capacity, and channel SNR. And select from random channels The channel with the largest value is selected as the target channel, thus selecting the channel with the optimal overall transmission conditions from a randomly selected few candidate channels without having to traverse all channels. This is because lower wavelength loss, higher uplink bandwidth capacity, and higher channel signal-to-noise ratio result in better overall transmission performance. The larger the value, the better the formula can comprehensively reflect the transmission quality of the channel, enabling the ONU to select the target channel with optimal performance in terms of wavelength loss, uplink bandwidth capacity, and channel signal-to-noise ratio. The ONU only needs to evaluate a few randomly selected candidate channels to determine the target channel, without having to evaluate and screen all idle channels one by one. This further reduces the scale of channel evaluation, lowers the complexity of channel scanning and channel quality evaluation, and thus significantly shortens the time required for ONU registration and online.
[0061] In one embodiment, determining the total delay duration based on the number of application failures and the first random delay time includes: Obtain the channel signal-to-noise ratio from the real-time channel parameters of the notification message; The total delay duration is determined based on the number of application failures, the first random delay time, and the channel signal-to-noise ratio.
[0062] Specifically, after the ONU controls the optical module to switch to the operating wavelength corresponding to the target channel, it accesses the random number generator to generate a first random delay time. The value of the first random delay time ranges from 10 milliseconds to 1000 milliseconds. The ONU obtains the channel signal-to-noise ratio (SNR) of the target channel from the real-time channel parameters of the announcement message. The ONU determines the total delay time based on the number of failed requests, the first random delay time, and the channel SNR. Specifically, the formula for calculating the total delay time is: ; in, Indicates the total delay time. Indicates the number of times the application failed. Indicates the first random delay time. This indicates the channel signal-to-noise ratio.
[0063] After calculating the total delay time according to the above formula, the ONU waits for this total delay time. Upon completion of the wait, it sends a channel request message to the OLT. Since a lower channel signal-to-noise ratio indicates poorer transmission quality, the above formula... The value of this term increases as the channel signal-to-noise ratio (SNR) decreases, resulting in a longer total delay time. This means that when the target channel selected by the ONU has poor quality, the ONU waits longer before making a request to avoid retransmission due to poor signal quality on a poor channel. Conversely, when the target channel has a high SNR, the total delay time is relatively shorter, allowing ONUs with better channel quality to initiate requests more quickly.
[0064] This invention determines the total delay time based on the number of failed requests, the first random delay time, and the channel signal-to-noise ratio (SNR). The total delay time increases with the number of failed requests, causing ONUs that have failed multiple times to wait longer during retries. The total delay time also varies with the first random delay time. Since the first random delay times generated by each ONU are independent, the total delay time of each ONU exhibits a differentiated distribution. Simultaneously, the total delay time is inversely proportional to the channel SNR; channels with lower SNR correspond to longer total delay times. This causes ONUs that have selected poor channels to wait longer before sending channel request messages, avoiding repeated retransmissions due to transmission failures on channels with poor signal quality and reducing the waste of channel resources caused by invalid retransmissions. The combined effect of the number of failed requests, the first random delay time, and the channel SNR in determining the total delay time results in significant differences in the total delay time of different ONUs across multiple dimensions. This significantly reduces the probability of multiple ONUs sending channel request messages at the same time, thereby effectively reducing channel conflicts and data errors.
[0065] In one embodiment, the step of updating the application failure count and re-receiving the notification message sent by the OLT if the rejection message is received includes: If the rejection message is received, the application failure count is updated to obtain the updated application failure count; Access the random number generator to generate a second random delay time, determine the waiting time based on the updated number of application failures and the second random delay time, and re-receive the notification message sent by the OLT after the waiting time expires.
[0066] Specifically, if the ONU receives a rejection message, it means that the target channel has already been occupied by another ONU, and the channel request has failed. The ONU increments the request failure count by 1 to obtain the updated request failure count.
[0067] The ONU accesses the random number generator to generate a random number as the second random delay time. The value of the second random delay time ranges from 10 milliseconds to 1000 milliseconds. It should be noted that the second random delay time is independent of the aforementioned first random delay time; both are regenerated by the random number generator, rather than reusing the initially generated first random delay time. Each time the ONU accesses the random number generator, the random number generator generates a new random number, and the generated random numbers are independent of each other.
[0068] ONU determines the waiting time based on the updated number of failed requests and a second random delay. Specifically, the formula for calculating the waiting time is: ; in, This indicates the waiting time, in milliseconds. This indicates the number of failed applications after the update. This indicates the second random delay time, in milliseconds.
[0069] After calculating the waiting time according to the above formula, the ONU waits for that time and then re-receives the next announcement message sent by the OLT after the waiting period ends. Since the OLT periodically sends announcement messages across all channels, the next announcement message received by the ONU after the waiting period carries updated channel idle status information, reflecting the actual occupancy status of each channel at the current moment. Based on the re-received announcement message, the ONU re-obtains the current list of idle channels and re-executes the operations of selecting a random channel from the list, determining the target channel, switching wavelengths, generating the first random delay time, determining the total delay time, sending a channel request message, and receiving a response message.
[0070] This invention increments the request failure count by 1 upon receiving a rejection message and determines the waiting time based on the updated request failure count and a second random delay time. The system waits for this waiting time before re-receiving the announcement message sent by the OLT. Since the second random delay time is regenerated by a random number generator and is independent of the initially generated first random delay time, the second random delay times generated by each ONU during the retry phase are uncorrelated. This results in a sufficiently differentiated distribution of waiting times for each ONU during the retry phase, preventing multiple ONUs from re-initiating requests at the same time due to using the same delay time, thereby effectively reducing the probability of channel collisions during the retry phase. The request failure count is included in the calculation of the waiting time; as the number of request failures increases, the waiting time increases accordingly, causing ONUs with multiple failures to wait longer during retryes, further dispersing the retry times of each ONU. After the waiting period ends, the notification message received again carries the updated channel idle status information. The ONU reselects a channel based on the latest list of idle channels, which can avoid channels that have been occupied by other ONUs in a timely manner and avoid repeatedly sending application requests to channels that have been occupied. This reduces the number of invalid application attempts and improves the success rate of channel application and registration efficiency.
[0071] In one embodiment, to prevent the number of application failures from increasing indefinitely and causing excessively long waiting times, the present invention controls the upper limit of the number of application failures, providing a tiered backoff strategy. The method further includes: If the number of application failures reaches a first predetermined threshold, the update of the number of application failures will stop. After waiting for a fixed first predetermined time, the notification message sent by the OLT will be received, and an idle channel will be reselected to initiate registration based on the re-received notification message. If the number of application failures reaches a second predetermined threshold, the update of the number of application failures will stop. After waiting for a fixed second predetermined time, the notification message sent by the OLT will be received, and an idle channel will be reselected to initiate registration based on the re-received notification message. Wherein, the second predetermined threshold is greater than the first predetermined threshold, and the second predetermined time is greater than the first predetermined time.
[0072] Specifically, the application failure count is used to record the cumulative number of times the ONU is rejected by the OLT during the channel application process. When the ONU receives a rejection message, it increments the application failure count by 1. After each update of the application failure count, the ONU determines whether the current value of the application failure count has reached a first predetermined threshold or a second predetermined threshold. In this embodiment, the first predetermined threshold is 32 times, and the second predetermined threshold is 64 times.
[0073] When the number of failed applications reaches 32, the ONU stops incrementing the count. Thereafter, regardless of whether another rejection message is received, the number of failed applications remains at 32 and does not increase further. The ONU waits a fixed 60 seconds. After this 60-second wait, it receives an announcement message from the OLT, re-acquires the current list of available channels based on the newly received announcement message, and re-selects an available channel to initiate registration.
[0074] When the number of failed applications reaches 64, the ONU stops incrementing the count. Thereafter, regardless of whether another rejection message is received, the number of failed applications remains at 64 and does not increase further. The ONU waits a fixed 180 seconds. After this fixed wait period, it receives an announcement message from the OLT, re-acquires the current list of available channels based on the newly received announcement message, and re-selects an available channel to initiate registration.
[0075] 64 failures are greater than 32 failures, and 180 seconds are greater than 60 seconds. The first predetermined threshold and the first predetermined time constitute the first-level retry control strategy, while the second predetermined threshold and the second predetermined time constitute the second-level retry control strategy. The triggering conditions for the second-level retry control strategy are stricter than the first level (requiring more failures), and the corresponding waiting time is also longer. When the ONU's application failure count reaches 32 but has not yet reached 64, the first-level retry control strategy applies, i.e., the number of application failures stops increasing and a 60-second retry is initiated. When the ONU's application failure count reaches 64, the second-level retry control strategy applies, i.e., the number of application failures continues to stop increasing and a 180-second retry is initiated.
[0076] This invention stops updating the application failure count when the number of application failures reaches a first predetermined threshold, waits a fixed first predetermined time, then re-receives the notification message and re-selects an idle channel to initiate registration. This avoids the ONU from infinitely increasing the number of application failures due to continuous failures, leading to an indefinite increase in waiting time and an inability to effectively retry. When the number of application failures reaches a second predetermined threshold, the invention stops updating the application failure count, waits a fixed second predetermined time, then re-receives the notification message and re-selects an idle channel to initiate registration. The second predetermined threshold is greater than the first predetermined threshold, and the second predetermined time is greater than the first predetermined time. The two predetermined threshold and time settings distinguish different levels of failure scenarios: a shorter waiting time after reaching the first predetermined threshold is suitable for temporary channel congestion scenarios; a longer waiting time after reaching the second predetermined threshold is suitable for persistent network congestion or scenarios where the ONU's own signal quality is poor. The shorter waiting time allows for timely resumption of retrying after temporary congestion is alleviated, while the longer waiting time prevents the ONU from frequently and ineffectively retrying and consuming system resources in persistent congestion scenarios. The two strategies achieve a balance between ensuring timely retries and avoiding invalid retries by varying the waiting time, thereby further improving the stability and success rate of ONU registration and deployment.
[0077] In one embodiment, the method further includes: After completing the channel application process, keep-alive messages are periodically sent to the OLT; if the OLT fails to receive keep-alive messages from the corresponding ONU multiple times in a row, the ONU is determined to be offline and the corresponding channel is reset to an idle state.
[0078] Specifically, after completing the channel application process and successfully registering online, the ONU enters the online state. The ONU periodically sends keep-alive messages to the OLT. The keep-alive message is used to notify the OLT that the ONU is still online. The sending frequency of the keep-alive message can be set according to system requirements, for example, once every 5 seconds or once every 10 seconds; this invention does not impose a specific limitation on this.
[0079] The OLT continuously monitors the keep-alive messages sent by each ONU. The OLT maintains a keep-alive counter for each registered ONU to record the number of consecutive times a keep-alive message is not received from that ONU. Whenever the OLT successfully receives a keep-alive message from an ONU, it resets the keep-alive counter for that ONU to 0. Whenever the OLT fails to receive a keep-alive message from an ONU within a keep-alive cycle, it increments the keep-alive counter for that ONU by 1.
[0080] When the OLT fails to receive a keep-alive message from a certain ONU for three consecutive times, the OLT determines that the ONU is offline. In this embodiment, "three consecutive times" means three consecutive times. The reasons for an ONU going offline may include power failure, device malfunction, or network interruption.
[0081] When the OLT determines that an ONU is offline, it resets the channel occupied by that ONU to an idle state. The OLT releases the channel resource and marks the channel as not occupied by any ONU. After the channel is reset to an idle state, the OLT marks the channel as idle in its subsequent periodic announcement messages, so that the channel can be requested and used by other offline ONUs.
[0082] This invention periodically sends keep-alive messages to the OLT after an ONU registers and goes online. The OLT continuously monitors the online status of each ONU through these keep-alive messages. When the OLT fails to receive keep-alive messages multiple times consecutively, it determines that the ONU is offline and resets the corresponding channel to an idle state. This ensures that channels occupied by ONUs that are abnormally offline due to power outages, faults, or network interruptions can be released in a timely manner, preventing channel resources from being ineffectively occupied by abnormally offline ONUs for extended periods and thus unallocated to other ONUs that need to register. The released channel is marked as idle in subsequent announcement messages sent by the OLT, allowing other offline ONUs to know that the channel is available for use by receiving these announcement messages. This improves the utilization rate of channel resources in WDMPON and the success rate of ONU registration and going online.
[0083] The following describes the overall process of the channel allocation method for wavelength division multiplexing passive optical networks provided by this invention. In this embodiment, the first predetermined threshold is 32 times, the second predetermined threshold is 64 times, the first predetermined time is 60 seconds, and the second predetermined time is 180 seconds. It should be noted that the above values are merely illustrative examples, and this invention does not impose specific limitations on them. In practical applications, they can be adaptively adjusted according to system performance requirements and network environment. (Refer to...) Figure 3 As shown, the overall process includes: After the ONU powers on and initializes, it sets the failure count to 0. The failure count records the cumulative number of times the ONU has been rejected by the OLT during the current channel application process.
[0084] The ONU initiates a listening process, continuously listening for notice messages sent by the OLT. The OLT periodically sends notice messages across all channels, carrying idle status information and real-time channel parameters, including wavelength loss, uplink bandwidth capacity, and channel signal-to-noise ratio.
[0085] After successfully receiving the notification message, the ONU extracts the idle status information and real-time channel parameters of all channels from the message. The ONU obtains the current list of idle channels based on the idle status information. The ONU accesses the random number generator to generate at least two random numbers and selects at least two idle channels from the current list based on these numbers. The ONU calculates the channel quality of each random channel based on the wavelength loss, uplink bandwidth capacity, and channel signal-to-noise ratio carried in the notification message, and determines a target channel from the random channels according to the channel quality. The ONU controls the optical module to switch to the operating wavelength corresponding to the target channel.
[0086] The ONU uses a random number generator to generate a random number as the first random delay time (RandomTime). The ONU obtains the channel signal-to-noise ratio (SNR) of the target channel from the real-time channel parameters in the advertisement message. The ONU determines the total delay time based on the number of failed requests (failCount), the first random delay time (RandomTime), and the channel SNR.
[0087] Enable a random timer on ONU and set the timer duration to the total delay duration.
[0088] After the timer expires, the ONU sends a channel request message to the OLT, requesting the OLT to allocate the target channel to the ONU. The ONU waits for and receives a response message from the OLT. The response message is either an acknowledgment message (Ack message) or a denial message (Deny message).
[0089] If the ONU receives an Ack message, it means that the OLT has allocated the target channel to the ONU, the ONU has completed the channel application process, and the registration is successful.
[0090] If the ONU receives a Deny message, it means the target channel is already occupied by another ONU, and the request fails. The ONU increments the failure count by 1. The ONU then checks whether the updated failure count has reached 32 or 64.
[0091] If the number of failed requests does not reach 32, the ONU access random number generator will generate a random number as a second random delay time. Based on the updated number of failed applications Second random delay time Determine the waiting time; the waiting time is... Milliseconds. The ONU starts a random timer, and the timer duration is set to this waiting time. After the timer expires, the ONU re-receives the next announcement message sent by the OLT, retrieves the current list of idle channels based on the re-received announcement message, and re-executes the operations of selecting a random channel from the list of idle channels, determining the target channel, switching wavelengths, generating the first random delay time, determining the total delay duration, sending a channel request message, and receiving a response message.
[0092] If the number of failed applications reaches 32, the ONU stops incrementing the number of failed applications by 1, delays for 60 seconds, and then receives the next notification message (Notice message) sent by the OLT again, and re-executes the above channel selection and application process.
[0093] If the number of failed applications reaches 64, the ONU stops incrementing the number of failed applications by 1, delays for 180 seconds, and then receives the next notification message sent by the OLT again, and re-executes the above channel selection and application process.
[0094] After successful ONU registration, it periodically sends a keepalive message to the OLT to maintain its online status. The OLT continuously listens for keepalive messages sent by each ONU. If the OLT does not receive a keepalive message from the corresponding ONU three times in a row, it determines that the ONU is offline, resets the channel occupied by the ONU to an idle state, and releases the channel resource for other ONUs to register and use.
[0095] In another aspect, the present invention provides an optical network unit, referring to... Figure 4 As shown, it includes: Optical modules are used for switching between different wavelength channels; A random number generator is used to generate random numbers. processor (i.e.) Figure 4 The CPU in the process implements the channel allocation method for wavelength division multiplexing passive optical networks as described above when executing a computer program.
[0096] Specifically, the optical module is a physical layer device in the optical network unit responsible for photoelectric / electro-optical conversion. It adjusts the laser to the center wavelength corresponding to the target channel according to wavelength switching commands issued by the processor, thereby completing the switching between different wavelength channels. The optical module is also used to receive downlink optical signals sent by the OLT and convert them into electrical signals for the processor, as well as to convert uplink electrical signals output by the processor into optical signals and send them to the OLT.
[0097] A random number generator is used to generate random numbers. The random number generator generates random numbers and outputs them to the processor when accessed by the processor. The processor accesses the random number generator when it needs to generate random numbers to select candidate channels and obtains the random numbers output by the generator. The processor accesses the random number generator when it needs to generate a first random delay time and obtains the random numbers output by the generator as the first random delay time. The processor accesses the random number generator when it needs to generate a second random delay time and obtains the random numbers output by the generator as the second random delay time. In this embodiment, the random number generator uses a digital physical noise source chip.
[0098] The processor is connected to both the optical module and the random number generator. When executing computer programs, the processor implements the aforementioned channel allocation method for wavelength division multiplexing passive optical networks.
[0099] In one optional implementation, the optical network unit further includes a switching chip. The switching chip is connected to both the processor and the user-side equipment, for example, via a network port to a user's computer or router. The switching chip is used to forward data packets between the processor and the user-side equipment. After the ONU registers and goes online, it forwards uplink data packets sent by the user-side equipment to the processor, which then sends them to the OLT via an optical module. It also forwards downlink data packets received by the processor from the OLT to the user-side equipment.
[0100] In one alternative implementation, the optical network unit further includes an optical fiber interface, through which the optical module is connected to the optical fiber of the optical distribution network to receive and transmit optical signals.
[0101] The channel allocation device for wavelength division multiplexing passive optical networks provided by the present invention will be described below. The channel allocation device for wavelength division multiplexing passive optical networks described below can be referred to in correspondence with the channel allocation method for wavelength division multiplexing passive optical networks described above.
[0102] The present invention provides a channel allocation device for a wavelength division multiplexing (WDM) passive optical network (PON). The device is applied to the optical network unit (ONU) of the WDM PON, which further includes an optical line terminal (OLT). (Refer to...) Figure 5 As shown, the device includes: The message receiving module 210 is used to receive the announcement message sent by the OLT; the announcement message carries the idle status information of all channels; The channel selection module 220 is used to obtain the current list of idle channels according to the announcement message, access the random number generator to generate at least two random numbers, and select the idle channel at the corresponding position in the current list of idle channels as at least two random channels according to the at least two random numbers. The target channel determination module 230 is used to determine the channel quality of the at least two random channels respectively, and determine the target channel from the at least two random channels based on the channel quality; Wavelength switching module 240 is used to control the optical module to switch to the operating wavelength corresponding to the target channel; The message sending module 250 is used to access the random number generator to generate a first random delay time, determine the total delay time based on the number of application failures and the first random delay time, and after waiting for the total delay time, send a channel application request message to the OLT. The response receiving module 260 is used to receive the response message returned by the OLT; wherein the response message is an acknowledgment message or a rejection message; if the acknowledgment message is received, the ONU completes the channel application process; if the rejection message is received, the application failure count is updated, and the notification message sent by the OLT is received again.
[0103] Figure 6 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 6 As shown, the electronic device may include: a processor 310, a communications interface 320, a memory 330, and a communication bus 340, wherein the processor 310, the communications interface 320, and the memory 330 communicate with each other via the communication bus 340. The processor 310 can call logical instructions in the memory 330 to execute a channel allocation method for a wavelength division multiplexing passive optical network, the method including: Receive the notification message sent by the OLT; the notification message carries the idle status information of all channels; Obtain the current list of idle channels according to the notification message, access the random number generator to generate at least two random numbers, and select the idle channel at the corresponding position in the current list of idle channels as at least two random channels according to the at least two random numbers; The channel quality of each of the at least two random channels is determined, and the target channel is determined from the at least two random channels based on the channel quality. Control the optical module to switch to the operating wavelength corresponding to the target channel; The random number generator is accessed to generate a first random delay time. The total delay time is determined based on the number of application failures and the first random delay time. After waiting for the total delay time, a channel application request message is sent to the OLT. Receive the response message returned by the OLT; The response message can be an acknowledgment message or a rejection message. If the acknowledgment message is received, the ONU completes the channel application process. If the rejection message is received, the application failure count is updated, and the ONU re-receives the notification message sent by the OLT.
[0104] Furthermore, the logical instructions in the aforementioned memory 330 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, essentially, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0105] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0106] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0107] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A channel allocation method for wavelength division multiplexing passive optical networks, characterized in that, The method is applied to the optical network unit (ONU) of the wavelength division multiplexing passive optical network, which further includes an optical line terminal (OLT). The method includes: Receive the notification message sent by the OLT; the notification message carries the idle status information of all channels; Obtain the current list of idle channels according to the notification message, access the random number generator to generate at least two random numbers, and select the idle channel at the corresponding position in the current list of idle channels as at least two random channels according to the at least two random numbers; The channel quality of each of the at least two random channels is determined, and the target channel is determined from the at least two random channels based on the channel quality. Control the optical module to switch to the operating wavelength corresponding to the target channel; The random number generator is accessed to generate a first random delay time. The total delay time is determined based on the number of application failures and the first random delay time. After waiting for the total delay time, a channel application request message is sent to the OLT. Receive the response message returned by the OLT; The response message can be an acknowledgment message or a rejection message. If the acknowledgment message is received, the ONU completes the channel application process. If the rejection message is received, the application failure count is updated, and the ONU re-receives the notification message sent by the OLT.
2. The channel allocation method for wavelength division multiplexing passive optical networks according to claim 1, characterized in that, The random number generator uses a digital physical noise source chip.
3. The channel allocation method for wavelength division multiplexing passive optical networks according to claim 1, characterized in that, The notification message contains real-time channel parameters, including wavelength loss, uplink bandwidth capacity, and channel signal-to-noise ratio. The channel quality is determined based on wavelength loss, uplink bandwidth capacity, and channel signal-to-noise ratio.
4. The channel allocation method for wavelength division multiplexing passive optical networks according to claim 1, characterized in that, The step of determining the total delay time based on the number of application failures and the first random delay time includes: Obtain the channel signal-to-noise ratio from the real-time channel parameters of the notification message; The total delay duration is determined based on the number of application failures, the first random delay time, and the channel signal-to-noise ratio.
5. The channel allocation method for wavelength division multiplexing passive optical networks according to claim 1, characterized in that, If the rejection message is received, the number of failed applications is updated, and the notification message sent by the OLT is received again, including: If the rejection message is received, the application failure count is updated to obtain the updated application failure count; Access the random number generator to generate a second random delay time, determine the waiting time based on the updated number of application failures and the second random delay time, and re-receive the notification message sent by the OLT after the waiting time expires.
6. The channel allocation method for wavelength division multiplexing passive optical networks according to claim 1, characterized in that, The method further includes: If the number of application failures reaches a first predetermined threshold, the update of the number of application failures will stop. After waiting for a fixed first predetermined time, the notification message sent by the OLT will be received, and an idle channel will be reselected to initiate registration based on the re-received notification message. If the number of application failures reaches a second predetermined threshold, the update of the number of application failures will stop. After waiting for a fixed second predetermined time, the notification message sent by the OLT will be received, and an idle channel will be reselected to initiate registration based on the re-received notification message. Wherein, the second predetermined threshold is greater than the first predetermined threshold, and the second predetermined time is greater than the first predetermined time.
7. The channel allocation method for wavelength division multiplexing passive optical networks according to claim 1, characterized in that, The method further includes: After completing the channel application process, keep-alive messages are periodically sent to the OLT; if the OLT fails to receive keep-alive messages from the corresponding ONU multiple times in a row, the ONU is determined to be offline and the corresponding channel is reset to an idle state.
8. A channel allocation device for wavelength division multiplexing passive optical networks, characterized in that, The device is applied to the optical network unit (ONU) of the wavelength division multiplexing passive optical network, which further includes an optical line terminal (OLT). The device comprises: The message receiving module is used to receive the announcement message sent by the OLT; the announcement message carries the idle status information of all channels; The channel selection module is used to obtain the current list of idle channels according to the announcement message, access the random number generator to generate at least two random numbers, and select the idle channel at the corresponding position in the current list of idle channels as at least two random channels according to the at least two random numbers. A target channel determination module is used to determine the channel quality of the at least two random channels respectively, and determine the target channel from the at least two random channels based on the channel quality; A wavelength switching module is used to control the optical module to switch to the operating wavelength corresponding to the target channel; The message sending module is used to access the random number generator to generate a first random delay time, determine the total delay time based on the number of application failures and the first random delay time, and after waiting for the total delay time, send a channel application request message to the OLT. The response receiving module is used to receive the response message returned by the OLT; wherein the response message is an acknowledgment message or a rejection message; if the acknowledgment message is received, the ONU completes the channel application process; if the rejection message is received, the application failure count is updated, and the ONU re-receives the announcement message sent by the OLT.
9. An optical network unit, characterized in that, include: Optical modules are used for switching between different wavelength channels; A random number generator is used to generate random numbers. A processor that, when executing a computer program, implements the channel allocation method for wavelength division multiplexing passive optical networks as described in any one of claims 1 to 7.
10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that, When the processor executes the computer program, it implements the channel allocation method for wavelength division multiplexing passive optical networks as described in any one of claims 1 to 7.
