Terminal message sending time slot allocation method of PON (Passive Optical Network) structured optical bus system
By normalizing and sorting the sending cycle of terminal messages, the time slot allocation matrix is constructed, which solves the problem of low data transmission efficiency between ONUs in the PON structured optical bus system, and realizes efficient message transmission and timely service of priority messages.
Patent Information
- Application Number
- CN202411332745.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-24
- Publication Date
- 2025-01-17
- Estimated Expiration
- 2044-09-24
AI Technical Summary
In PON structured optical bus system, data cannot be transmitted directly between ONUs, resulting in low message transmission efficiency, and high-priority and medium-priority messages may not be able to be served in time.
By summarizing terminal messages, normalizing the message sending cycles with priority to P2 and P1, sorting the terminals and building a time slot allocation matrix, ensuring that each message is allocated in time according to its sending cycle, reducing the total time slots of high-priority messages , to increase the priority message service of P0.
The timely transmission of each P2 and P1 message is realized, reducing the number of time slots of high-priority messages, improving the system message transmission efficiency, and ensuring that P0 priority messages receive more services.
Smart Images

Figure CN119325048A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of optical data bus, and more specifically, relates to a method for allocating terminal message sending time slots in a PON structured optical bus system. Background Art
[0002] The 1553 bus is a common bus form in airborne avionics systems. The 1553B bus is the abbreviation of the MIL-STD-1553 bus, which is the second version of the bus and a centralized time-division serial bus. The 1553B bus has the characteristics of centralized control, distributed processing and real-time response, and provides reliable data transmission services through a multi-redundancy bus topology. The 1553B bus adopts a command / response communication protocol and provides three types of terminals: BC (Bus Controller), RT (Remote Terminal), and BM / MT (Bus Monitoring). It supports up to 31 terminals, of which BC is responsible for the time-division multiplexing scheduling and management of data transmission in the bus. It only supports one terminal to send data at each time, and other terminals can receive data.
[0003] With the rapid development of airborne avionics systems, the low rate of the 1553B bus has become a bottleneck restricting the further improvement of the bandwidth of devices in the shared bus. In order to improve the link rate of the shared airborne bus, the industry has proposed the PON (Passive Optical Network) structured optical bus. The PON system has the advantages of low cost, high reliability, and easy maintenance. It has been widely used in telecommunications access networks and can provide link rates of 10G and above, which is much higher than the traditional 1553B bus.
[0004] The traditional PON system consists of three parts: Optical Line Terminal (OLT), Optical Network Unit (ONU) and Optical Distribution Network (ODN). The OLT is responsible for the scheduling and management of data transmission in the PON system. In the downlink from OLT to ONU, data stream transmission is carried out in a time-division multiplexing broadcast mode. All ONUs can receive the data broadcasted by the OLT, and the ONUs themselves decide whether to further receive and process the corresponding data. The uplink from ONU to OLT uses a time-division multiplexing shared transmission mode. First, the OLT notifies a certain ONU to send data, and then the corresponding ONU uses the uplink to send data to the OLT. It can be seen that in the PON system, only the OLT can receive the data sent by an ONU, and it cannot be directly sent to other ONUs in the system.
[0005] In order to solve the problem that ONUs cannot transmit data in traditional PON systems, researchers proposed a PON structured optical bus system. Figure 1 This is a schematic diagram of the structure of the PON structured optical bus system. Figure 1 As shown, after the uplink data of each terminal reaches the BC (Bus Controller) through the optical splitter, the BC will promptly complete the data forwarding and broadcast the data from the optical splitter to each terminal for reception, thereby realizing real-time communication between the terminals similar to that in the 1553B bus.
[0006] The terminal message sending scheduling algorithm is one of the key technologies of the PON structured optical bus system, which determines how BC will control each RT (Remote Terminal) to send data in the allocated time slot. In the PON structured optical bus system, the messages transmitted by each terminal are divided into three priorities: P2, P1, and P0. Among them, P2 and P1 priority messages are periodic and delay-sensitive and require timely transmission services. The P0 priority message is suitable for larger data that is not sensitive to delay but has bursts. In order to effectively transmit data of various priorities, the PON structured optical bus system adopts a small-cycle polling scheduling method for scheduling. Figure 2 This is a schematic diagram of small-cycle polling message scheduling. Figure 2As shown in the figure, in each scheduling cycle, BC will first poll each terminal to transmit P2 priority messages, and then BC will poll each terminal to transmit P1 priority messages. After the P2 and P1 priority messages are transmitted, the remaining time slots are used to poll each terminal in turn to transmit P0 priority messages. If too many P2 and P1 priority messages are sent in a scheduling cycle, the P0 priority message will not be served. However, if only a small number of P2 and P1 priority messages are allowed to be sent in a scheduling cycle, high priority and medium priority messages may not be served in time.
[0007] When scheduling each message priority, the terminal polling scheduling method is adopted. First, BC sends a maximum of N0 data frames continuously. The time each data frame occupies the link is defined as a time slot. The maximum frame length of each data frame is L0. Each data frame can contain one or more messages, but the length of multiple messages in a data frame cannot exceed L0. At the same time, it is not allowed to split a message into multiple data frames or time slots for sending. After the BC is sent, other RT terminals are polled in turn to complete the sending of the corresponding priority messages. Each terminal sends a maximum of a certain number of data frames at a time, and the length of each data frame does not exceed L0.
[0008] In the PON structured optical bus, the maximum frame length of each data frame can be determined by referring to the message length in the system. For P0 priority data such as videos and large files, it needs to be cut into multiple message frames for transmission. cycle The choice should ensure that the most frequent P2 high-priority messages are sent, corresponding to the minimum message sending period T k,m , can get timely scheduling service in each scheduling small cycle. The selection of the parameter N0 for the number of data frames continuously sent by the terminal generally requires that the P2 and P1 priority messages of all terminals can get timely scheduling service according to the sending cycle.
[0009] In the specific implementation of the PON structured optical bus, messages waiting to be sent are usually cached at the transmitting end of each terminal according to priority. Then, during polling scheduling, if the cache of the corresponding priority is not empty, the message is taken out in the order of the cache, and a maximum of N0 data frames are formed according to the conditions, and the transmission is completed in N0 time slots. However, since the arrival of messages has a certain randomness, some messages may arrive and wait to be sent in a concentrated manner. When N0 data frames are not enough, the message may need to wait for the next small-cycle polling to be scheduled before it can be sent. At this time, for messages with a short message sending cycle, it may cause a serious problem that the waiting time exceeds the message sending cycle. However, if the number of data frames sent continuously by the terminal is increased to N0, it may cause too many time slots to be occupied, affecting the message scheduling of other terminals or the service of low-priority messages. Summary of the invention
[0010] The purpose of the present invention is to overcome the shortcomings of the prior art and provide a method for allocating terminal message sending time slots in a PON structured optical bus system, which can allocate corresponding transmission time slots for each message of the system terminal according to the requirements of message polling scheduling in the system scheduling cycle, thereby effectively improving the efficiency of system message transmission.
[0011] In order to achieve the above-mentioned object of the invention, the terminal message sending time slot allocation method of the PON structured optical bus system of the present invention comprises the following steps:
[0012] S1: Summarize the messages currently received from each terminal. For each terminal, determine whether there is a P2 or P1 message in the message. If so, add the terminal to the terminal set A to be assigned. Otherwise, do nothing. The number of terminals in the terminal set A to be assigned is K, and the terminal RT is k Each message is X k,m , k=1,2,…,K, m=1,2,…,M k , M k Indicates terminal RT k Number of messages sent; extract each message X separately k,m The attribute characteristics of k,m , source terminal SOU k,m , Destination terminal DES k,m , message ID k,m , sending cycle T k,m and length L k,m ;
[0013] S2: Send all messages with priority levels P2 and P1 at a period of T k,m According to the scheduling small cycle length T cycle Normalize it and record the normalized sending period as t k,m , satisfying t k,m =2 e ,in Indicates rounding down;
[0014] After completing the normalization of the sending period of all P2 and P1 priority messages, the message scheduling period is defined as the maximum value of the sending period of P2 and P1 priority messages of all terminals, which is recorded as
[0015] S3: Search and obtain the minimum normalized sending period for each terminal to send messages Then according to the minimum normalized sending period t of K terminals k,min Sort the terminals from small to large to obtain a terminal list G;
[0016] S4: Construct the matrix of the number of messages allocated to each time slot in the message scheduling cycle The rows represent the 2 in the scheduling big cycle E A scheduling mini-cycle, each element MSN t,j represents the number of transmission messages allocated for transmission in time slot j of the tth scheduling minicycle, t = 1, 2, ..., 2 E , j = 1, 2, ..., N0, N0 represents the number of data frames sent continuously by the terminal; initialize the allocated message number matrix MSN to a full 0 matrix;
[0017] Construct the message ID matrix assigned to each time slot in the message scheduling cycle The rows represent the 2 in the scheduling big cycle E A scheduling mini-cycle, each element MSM t,j , represents the MSNs allocated in time slot j of the tth scheduling mini-cycle t,j Initialize the assigned message ID matrix MSM to be empty;
[0018] Construct the data length matrix allocated to each time slot in the message scheduling cycle The rows represent the 2 in the scheduling big cycle E A scheduling mini-cycle, each element MSL t,j Represents the MSN allocated in time slot j of the tth scheduling mini-cycle t,j The total length of the message; initialize the allocated data length matrix MSL to be empty;
[0019] S5: Set terminal number i=1;
[0020] S6: for the i-th terminal in the terminal list G The message is used to allocate time slots, k i represents the original serial number of the i-th terminal in the terminal list G. The specific steps of time slot allocation include:
[0021] S6.1: For terminals All its P2 and P1 priority messages are sent according to the normalized message sending cycle Sort from small to large, when the message is normalized and sent at a fixed period If the same, according to the message length Sort from large to small to get the terminal List of messages to be assigned List of messages to be assigned The number of messages is
[0022] S6.2: Initialize terminal The number of allocated time slots NS i =0;
[0023] S6.3: Note the terminal The first message is m1 represents the list of messages to be assigned H ki The original sequence number of the first message in the message The attribute characteristics of the following assignment results are updated:
[0024] Command Terminal Number of allocated time slots NS i =1;
[0025] According to the news Normalized sending cycle Construct a small period set to be used For the small period set For each scheduling mini-cycle t′ in the time slot, let the matrix element MSN of the number of messages allocated to the time slot be t′,1 =1, time slot has been assigned message matrix element Time slot allocated data length matrix element
[0026] S6.4: Set message sequence number d=2;
[0027] S6.5: Determine whether the message sequence number If yes, go to step S6.6, otherwise the current terminal time slot allocation ends;
[0028] S6.6: For terminal The dth message in Search for available allocated time slots, m d Indicates the list of messages to be assigned The original sequence number of the dth message in is as follows:
[0029] S6.6.1: According to the news Normalized sending cycle Constructing a set of candidate starting small cycles
[0030]
[0031] S6.6.2: Set the candidate starting small cycle number τ = 1;
[0032] S6.6.3: Construct a set of small cycles to be checked Construct a set of allocated time slots to be checked
[0033] S6.6.4: Set the allocated time slot number to be checked v = 1;
[0034] S6.6.5: Determine whether the conditions are met L0 represents the maximum frame length of each data frame, that is, the small cycle set S to be checked i,d,τ Is the length of idle data in the vth allocated time slot of each scheduling mini-cycle q greater than or equal to the message If the length is satisfied, go to step S6.6.6, otherwise go to step S6.6.7;
[0035] S6.6.6: Let τ * =τ,v * = v, the small cycle set to be checked The vth * Allocated time slots as messages Available allocated time slots, go to step S6.7;
[0036] S6.6.7: Determine whether v < NS i , if yes, go to step S6.6.8, otherwise go to step S6.6.9;
[0037] S6.6.8: Set v=v+1, and return to step S6.6.5;
[0038] S6.6.9: Determine whether If yes, go to step S6.6.10, otherwise no available allocated time slot is found, go to step S6.8;
[0039] S6.6.10: Set τ = τ + 1, and return to step S6.6.3;
[0040] S6.7: Determine whether an available allocated time slot is found in step S6.5, if yes, proceed to step S6.7, otherwise proceed to step S6.8;
[0041] S6.8: According to the news The attribute characteristics and the determined available allocated time slots complete the update of the following allocation results:
[0042] For the small cycle set to be checked All scheduled small periods t′ in the Distributed to the vth * time slots, so let the matrix element of the number of messages allocated to the time slot be Slot Allocated Message Matrix Elements Time slot allocated data length matrix element
[0043] After the update is completed, go to step S6.10;
[0044] S6.9: For messages Allocate a new unallocated time slot and update the time slot allocation result. The specific method is as follows:
[0045] Command Terminal Number of allocated time slots NS i =NS i +1;
[0046] According to the news Normalized sending cycle Construct a small period set to be used For all the scheduling mini-cycles t′ in the mini-cycle set S1 to be used, the message Assigned to the first time slot of all small cycles, so let the matrix element MSN of the number of messages assigned to the time slot be t′,1 =1, time slot has been assigned message matrix element Time slot allocated data length matrix element
[0047] After the update is completed, go to step S6.10;
[0048] S6.10: Set d=d+1, and return to step S6.5;
[0049] S7: Determine whether the terminal number i is less than K. If so, proceed to step S8, otherwise the time slot allocation ends;
[0050] S8: Let i=i+1 and return to step S6.
[0051] The terminal message sending time slot allocation method of the PON structured optical bus system of the present invention first normalizes the sending cycles of all messages with priorities P2 and P1, and then sorts the terminals from small to large according to the minimum normalized sending cycle to obtain a terminal list, and then sequentially allocates time slots to each terminal in the terminal list, and when allocating time slots to each terminal, allocates time slots to messages from small to large according to the normalized sending cycle.
[0052] In the time slot allocation for sending terminal messages, the present invention ensures that the scheduling period of each P2 and P1 message is not greater than the message sending period of the message, so that the message can be sent in time. At the same time, the total time slot number of P2 and P1 priority messages is reduced as much as possible through the effective combination of messages of different lengths, so that P0 priority messages can get more services. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] Figure 1 It is a schematic diagram of the structure of the PON structured optical bus system;
[0054] Figure 2 This is a schematic diagram of small-cycle polling message scheduling;
[0055] Figure 3 It is a flowchart of a specific implementation method of a method for allocating time slots for sending a terminal message in a PON structured optical bus system of the present invention;
[0056] Figure 4 It is a flow chart of time slot allocation for terminal messages;
[0057] Figure 5 is a flow chart of searching for available allocated time slots for a message in the present invention;
[0058] Figure 6 This is a comparison diagram of allocation results of different message quantities before and after using the scheduling method when the maximum number parameter of data frames continuously sent by the terminal at one time is 9 in this embodiment;
[0059] Figure 7 This is a comparison diagram of allocation results of different message quantities before and after using the scheduling method when the maximum number parameter of data frames continuously sent by the terminal at one time is 6 in this embodiment;
[0060] Figure 8 This is a comparison diagram of allocation results of different numbers of messages before and after using the scheduling method when the maximum number parameter of data frames continuously sent by the terminal at one time is 3 in this embodiment;
[0061] Fig. 9 is a comparison curve diagram of allocation failure probabilities before and after using the allocation method obtained by setting different maximum number of data frames to be continuously sent at one time when the terminal message sending load is low in this embodiment;
[0062] Fig.10 This is a comparison curve of the probability of allocation failure before and after using the allocation method obtained by setting different maximum number of data frames to be continuously sent at one time when the terminal sends a message under load in this embodiment;
[0063] Fig.11 This is a comparison curve diagram of allocation failure probabilities before and after using the allocation method obtained by setting different maximum number of data frames to be continuously sent at one time when the terminal message sending load is high in this embodiment. DETAILED DESCRIPTION
[0064] The specific implementation of the present invention is described below in conjunction with the accompanying drawings so that those skilled in the art can better understand the present invention. It should be noted that in the following description, when the detailed description of known functions and designs may dilute the main content of the present invention, these descriptions will be omitted here.
[0065] Example
[0066] Figure 3 This is a flowchart of a specific implementation method of the method for allocating time slots for sending a terminal message in a PON structured optical bus system of the present invention. Figure 3As shown, the terminal message sending time slot allocation method of the PON structured optical bus system of the present invention comprises the following steps:
[0067] S301: Get message attribute characteristics:
[0068] Summarize the messages currently received from each terminal. For each terminal, determine whether there is a P2 or P1 message in the message. If so, add the terminal to the terminal set A to be assigned. Otherwise, do nothing. The number of terminals in the terminal set A to be assigned is K, and the terminal RT is k Each message is X k,m , k=1,2,…,K, m=1,2,…,M k , M k Indicates terminal RT k Number of messages sent. Extract each message X separately k,m The attribute characteristics of k,m (P2, P1 or P0), source terminal SOU k,m , Destination terminal DES k,m , message ID k,m , sending cycle T k,m and length L k,m .
[0069] S302: Sending cycle processing:
[0070] Set the sending period of all messages with priority levels P2 and P1 to T k,m According to the scheduling small cycle length T cycle Normalize it and record the normalized sending period as t k,m , satisfying t k,m =2 e ,in Indicates rounding down. For example, when T k,m =4T cycle When t k,m =4; when T k,m =2.5T cycle When t k,m =2. After normalizing the sending periods of all P2 and P1 priority messages, define the message scheduling period as the maximum value of the sending periods of P2 and P1 priority messages of all terminals, recorded as
[0071] Assume that there are 4 messages with priority levels of P2 and P1 in the system, and the normalized sending period of each message is 2, 4, 1, and 16 respectively, so the message scheduling period is 16. In a scheduling period, there are 16 small periods, and a message with a normalized sending period of 1 needs to be sent once in each small period of a scheduling period, or a time slot is allocated; and a message with a normalized sending period of 2 needs to be sent 8 times at equal intervals in a scheduling period, and the small periods can be {1, 3, 5, 7, 9, 11, 13, 15} or {2, 4, 6, 8, 10, 12, 14, 16}. However, there will be many time slots in each small period, for example, if the small period is 1ms and the time slot length is 1μs, there will be 1000 available time slots in a small period, which are used to transmit different messages. Based on the above situation, the present invention will first sort the terminals according to the minimum normalized sending period of each terminal in the subsequent process, and then sort the messages in each terminal according to the normalized sending period, so as to make the time slot allocation more reasonable and save the time slots occupied by the P2 and P1 messages as much as possible.
[0072] S303: Terminal sorting:
[0073] The time slot allocation for sending messages of the terminal of the PON structured optical bus needs to be completed in sequence after sorting the terminals. In order to obtain a better time slot allocation effect, it is first necessary to search for the minimum normalized sending period for each terminal to send messages. Then according to the minimum normalized sending period t of K terminals k,min Sort the terminals from small to large to obtain a terminal list G.
[0074] S304: Initialize time slot allocation data:
[0075] Construct the matrix of the number of messages allocated to each time slot in the message scheduling cycle The rows represent the 2 in the scheduling big cycle E A scheduling mini-cycle, each element MSN t,j represents the number of transmission messages allocated for transmission in time slot j of the tth scheduling minicycle, t = 1, 2, ..., 2 E , j = 1, 2, ..., N0, N0 represents the number of data frames sent continuously by the terminal. Initialize the allocated message number matrix MSN to a full 0 matrix, which means that there is no allocation result yet. Considering the different lengths of messages, for messages with small lengths, multiple messages can be allocated in one time slot at the same time, as long as the sum of the lengths of these messages does not exceed L0. At this time, MSN t,j The value may be greater than 1.
[0076] Construct the message ID matrix assigned to each time slot in the message scheduling cycle The rows represent the 2 in the scheduling big cycle E A scheduling mini-cycle, each element MSM t,j , represents the MSNs allocated in time slot j of the tth scheduling mini-cycle t,j Initialize the assigned message ID matrix MSM to be empty.
[0077] Construct the data length matrix allocated to each time slot in the message scheduling cycle The rows represent the 2 in the scheduling big cycle E A scheduling mini-cycle, each element MSL t,j Represents the MSN allocated in time slot j of the tth scheduling mini-cycle t,j The total length of the message; initialize the allocated data length matrix MSL to empty.
[0078] S305: Set terminal number i=1.
[0079] S306: Time slot allocation:
[0080] is the i-th terminal in the terminal list G The message is used to allocate time slots, k i Represents the original serial number of the i-th terminal in the terminal list G. Figure 4 This is a flowchart of time slot allocation for terminal messages. Figure 4 As shown, the specific steps of allocating time slots for terminal messages in the present invention include:
[0081] S401: Message sorting:
[0082] For Terminal All its P2 and P1 priority messages are sent according to the normalized message sending cycle Sort from small to large, when the message is normalized and sent at a fixed period If the same, according to the message length Sort from large to small to get the terminal List of messages to be assigned List of messages to be assigned The number of messages is
[0083] S402: Time slot allocation initialization:
[0084] Initialize the terminal The number of allocated time slots NS i = 0. The number of allocated time slots indicates the number of time slots that the ith terminal has used in the time slot allocation. Each time a new time slot is added, NS i Plus one, but NS iThe maximum value cannot exceed the maximum number N0 of data frames that the terminal can send continuously at one time.
[0085] S403: Allocate a time slot for the first message:
[0086] Note Terminal The first message is m1 represents the list of messages to be assigned The original sequence number of the first message in the message The attribute characteristics of the following assignment results are updated:
[0087] Command Terminal Number of allocated time slots NS i =1.
[0088] According to the news Normalized sending cycle Construct a small period set to be used This set includes the message normalization period from the first scheduling small cycle to the message normalization period. All the scheduling mini-cycles added. For each scheduling mini-cycle in the mini-cycle set S1 to be used, this message needs to be sent once. For each scheduling mini-cycle t′ in the mini-cycle set S1 to be used, the message Assigned to the first time slot of all small cycles, so let the matrix element MSN of the number of messages assigned to the time slot be t′,1 =1, time slot has been assigned message matrix element Time slot allocated data length matrix element
[0089] If the scheduling period of a terminal is 16, and the normalized sending period of the first message is 2, then for the first message of the terminal, the proposed small period set is S1 = {1, 3, 5, 7, 9, 11, 13, 15}, and these eight small periods will allocate the first time slot for the periodic sending of the first message. The other eight small periods have not yet allocated time slots for message sending, and will be allocated to other messages later.
[0090] S404: Set message sequence number d=2.
[0091] S405: Determine whether the message sequence number If yes, go to step S406, otherwise the current terminal time slot allocation ends.
[0092] S406: Searching for available allocated time slots for the message:
[0093] For Terminal The dth message in Search for available allocated time slots, m d Indicates the list of messages to be assigned The original sequence number of the dth message in . Figure 5 1 is a flow chart of searching for available allocated time slots for messages in the present invention. Figure 5 As shown, the specific steps of searching for available allocated time slots for messages in the present invention include:
[0094] S501: Initialize the candidate starting mini-cycle set:
[0095] According to the news Normalized sending cycle Constructing a set of candidate starting small cycles Since the normalized message sending cycle is This message needs to be sent every Sent once, so S d Corresponding to the first time a message needs to be sent in a scheduling cycle, The scheduling small cycle is the starting small cycle.
[0096] Assuming that the current message is the second message, the first message occupies the first time slot of the {1,3,5,7,9,11,13,15} small cycle after allocation. The sending period of the second message is 4. The following check will first check whether there is enough remaining length in the allocated time slot for the second message. Assuming that the sending period of the second message is 4, it is necessary to check {1,5,9,13}, {2,6,10,14}, {3,7,11,15}, and {4,8,12,16}. Therefore, the candidate starting small cycle set actually records the starting small cycles of the four small cycle sets that need to be checked, that is, {1,2,3,4}.
[0097] S502: Set the candidate starting small cycle number τ = 1. Next, check the candidate small cycle τ to determine whether the message can be implemented in the small cycle set with the candidate small cycle τ as the starting small cycle. time slot allocation.
[0098] S503: Construct a set of small cycles to be checked and a set of allocated time slots to be checked:
[0099] Construct a set of small cycles to be checked This collection contains all messages sent from the first time in a scheduling cycle. The scheduling period τ starts with the message normalization period All small cycles added. At the same time, the set of allocated time slots to be checked is constructed Among them NS i It is a terminal Number of allocated time slots.
[0100] As described in the second message above, assuming that the candidate starting small cycle τ = 1, then the small cycle set to be checked is {1, 5, 9, 13}. Since each small cycle may have been assigned NS i time slots, so it is also necessary to construct a set of allocated time slots to be checked for inspection.
[0101] S504: Set the allocated time slot number to be checked v=1.
[0102] S505: Determine whether the conditions are met L0 represents the maximum frame length of each data frame, that is, the small cycle set S to be checked i,d,τ Is the length of idle data in the vth allocated time slot of each scheduling mini-cycle q greater than or equal to the message If the length is satisfied, go to step S506, otherwise go to step S507.
[0103] S506: Determine available allocated time slots:
[0104] Let τ * =τ,v * = v, the small cycle set to be checked The vth * Allocated time slots as messages of available allocated time slots.
[0105] S507: Determine whether v < NS i If yes, go to step S508, otherwise go to step S509.
[0106] S508: Let v=v+1, and return to step S505.
[0107] S509: Determine whether If yes, go to step S510, otherwise no available allocated time slot is found and the search ends.
[0108] S510: Let τ=τ+1, and return to step S503.
[0109] As in the previous example, when allocating the second message, assuming τ=1, v=1, then it is necessary to check whether the first allocated time slot of each scheduling small cycle in {1,5,9,13} has sufficient remaining length available; if there is sufficient remaining length, the second message can be allocated to the first allocated time slot of each scheduling small cycle in {1,5,9,13}, and this time slot is used to allocate the second message. If the remaining length of the first allocated time slot of any small cycle in {1,5,9,13} is insufficient, it means that the search for τ=1, v=1 fails, and it is necessary to continue to check the situation of τ=1, v=2, that is, continue to check the next allocated time slot. If each allocated time slot in {1,5,9,13} is not available, then set τ=2 and continue to check all allocated time slots in the next small cycle set to be checked {2,6,10,14}. If each allocated time slot in each small cycle to be checked is not available, then a new time slot can only be allocated for the second message.
[0110] S409: Determine whether an available allocated time slot is searched in step S406, if yes, proceed to step S407, otherwise proceed to step S408.
[0111] S408: Allocate available allocated time slots:
[0112] According to the news The attribute characteristics and the determined available allocated time slots complete the update of the following allocation results:
[0113] For the small cycle set to be checked All scheduled small periods t′ in the Distributed to the vth * time slots, so let the matrix element of the number of messages allocated to the time slot be Slot Allocated Message Matrix Elements Time slot allocated data length matrix element
[0114] After the update is completed, go to step S410.
[0115] That is, assuming that the first allocated time slot in each scheduling mini-cycle in {2, 6, 10, 14} is selected for the second message, then the first allocated time slot in the scheduling mini-cycles 2, 6, 10, 14 must update the allocation result data.
[0116] S409: Allocate new time slot:
[0117] When no available time slot is found for the message The transmission time slot needs to be Allocate a new unallocated time slot and update the time slot allocation result. The specific method is as follows:
[0118] Command Terminal Number of allocated time slots NS i =NS i +1.
[0119] According to the news Normalized sending cycle Construct a small period set to be used Similarly, the set includes the messages sent in a scheduling cycle, starting from the first scheduling cycle, and ending with the message normalization cycle. All the scheduling mini-cycles added. For each scheduling mini-cycle in the mini-cycle set S1 to be used, this message needs to be sent once. For all scheduling mini-cycles t′ in the mini-cycle set S1 to be used, the message Assigned to the first time slot of all small cycles, so let the matrix element MSN of the number of messages assigned to the time slot be t′,1 =1, time slot has been assigned message matrix element Time slot allocated data length matrix element
[0120]
[0121] After the update is completed, go to step S410.
[0122] S410: Let d=d+1, and return to step S405.
[0123] S307: Determine whether the terminal number i is less than K. If so, proceed to step S308, otherwise the time slot allocation ends.
[0124] S308: Let i=i+1, and return to step S306.
[0125] After completing the message sending time slot allocation, when the system is running, BC sends the message sending time slot allocation result to RT, and then BC and each RT can schedule and transmit the message in turn according to the obtained message sending time slot allocation result.
[0126] In order to better illustrate the technical effect of the present invention, a specific example is used to simulate and verify the present invention. In this simulation verification, numerical simulation is used to compare the method of the present invention with the random time slot allocation method, and the number of message sending time slots that need to be allocated in the system when there are different numbers of messages in the system, as well as the influence of the maximum number of data frames that the terminal can continuously send at one time on the system performance.
[0127] In this embodiment, each terminal RT is set to have a certain number of messages to be transmitted and message sending time slots to be allocated, the sending period of each message is randomly generated between the minimum and maximum values using uniform distribution, and the length of the message is randomly generated between 100 and 2000 bytes using uniform distribution. Considering the randomness of the simulation, the simulation results of each set of parameters are obtained by statistically averaging multiple random simulation results.
[0128] First of all, the maximum number of data frames that a terminal can send continuously at one time is one of the key parameters in the design of the PON structured optical bus system. When a larger maximum number of data frames that a terminal can send continuously at one time is used, it is beneficial for the terminal to transmit more messages, but it will occupy more time slots for transmitting P2 and P1 priority messages, resulting in a decrease in the transmission performance of P0 priority messages. However, if the maximum number of data frames that a terminal can send continuously at one time is reduced, it may cause P2 and P1 priority messages to fail to receive the required services. To this end, a simulation comparison was conducted on the maximum number of data frames that different terminals can send continuously at one time.
[0129] Figure 6 This is a comparison diagram of the allocation results of different message quantities before and after using the scheduling method when the maximum number parameter of data frames continuously sent by the terminal at one time is 9 in this embodiment. Figure 6 In the simulation, a larger parameter value of the maximum number of data frames that a terminal can send continuously at one time is selected. It can be seen that as the number of messages changes from small to large, the number of sending time slots that need to be allocated for the messages increases accordingly. At the same time, when the number of messages is large, the message sending time slot allocation fails, that is, under the current parameter setting of the maximum number of data frames that a terminal can send continuously at one time, it is impossible to find a suitable message sending time slot allocation result for all messages. At the same time, by comparing the two allocation algorithms, it can be seen that the proposed time slot allocation algorithm can effectively reduce the total number of time slots that need to be allocated for messages, and the probability of allocation failure is also much lower than the random time slot allocation method that does not use the proposed algorithm.
[0130] Figure 7 This is a comparison diagram of allocation results of different numbers of messages before and after using the scheduling method when the maximum number parameter of data frames continuously sent by the terminal at one time is 6 in this embodiment. Figure 7 In the simulation, the maximum number of data frames that the terminal can send continuously at one time is reduced from 9 to 6. It can be seen that the probability of failure in message sending time slot allocation will be higher due to the reduction in the number of time slots that the terminal can choose for message sending time slot allocation. However, the proposed time slot allocation algorithm still gives better performance than the random time slot allocation method.
[0131] Figure 8 This is a comparison chart of the allocation results of different numbers of messages before and after using the scheduling method when the maximum number parameter of data frames continuously sent by the terminal at one time is 3 in this embodiment. Figure 8 In the simulation, the maximum number of data frames that the terminal can send continuously at one time is further reduced to 3. Due to the further reduction of available time slot resources for the terminal message sending time slot allocation, a large probability of message sending time slot allocation failure begins to appear even at a very low number of messages. However, the proposed message sending time slot allocation algorithm still gives better performance than the random time slot allocation method.
[0132] Depend on Figure 6 , Figure 7 , Figure 8 The simulation results show that the maximum number of data frames sent continuously at a time by the terminal has a significant impact on the PON structured light bus system. Therefore, the selection of the maximum number of data frames sent continuously at a time by the terminal is also one of the keys to the reasonable design of the PON structured light bus system. To this end, the simulation compares the impact of different maximum number of data frames sent continuously at a time on the performance under different load intensities of terminal message sending.
[0133] Fig. 9 This is a comparison curve of allocation failure probabilities before and after using the allocation method obtained by setting different maximum number of data frames to be continuously sent at one time when the terminal message sending load is low in this embodiment. Fig. 9 The simulation corresponds to a lower terminal message sending load intensity, and the number of terminal messages is set to 10. It can be seen that when the maximum number of data frames sent continuously at a time by the terminal is small, the system is more likely to fail to allocate message sending time slots. As the maximum number of data frames sent continuously at a time by the terminal increases, the probability of failure to allocate message sending time slots will drop to zero. By comparing the simulation results, it is found that the proposed time slot allocation algorithm can give better performance than the random time slot allocation method for different maximum number of data frames sent continuously at a time, and better guarantee the success of message sending time slot allocation.
[0134] Fig.10 This is a comparison curve of allocation failure probabilities before and after using the allocation method obtained by setting different maximum number of data frames to be continuously sent at one time parameter values when the terminal sends messages under load in this embodiment. Fig.10 The simulation corresponds to a medium terminal message sending load intensity, and the number of terminal messages is set to 20. It can be seen that a larger maximum number of data frames sent continuously by the terminal at one time is required to ensure a low probability of failure in allocating message sending time slots.
[0135] Fig.11 This is a comparison curve diagram of allocation failure probabilities before and after using the allocation method obtained by setting different maximum number of data frames to be continuously sent at one time when the terminal message sending load is high in this embodiment. Fig.11The simulation corresponds to a higher terminal message sending load intensity. The number of terminal messages is set to 30, and similar comparison results can be seen. Fig. 9 ,still Fig.10 The simulation results show that the proposed time slot allocation algorithm also performs better than the random time slot allocation method.
[0136] It can be seen from the previous simulation results that if different RT terminals in the system have different numbers of messages to send, then these terminals require different minimum maximum number of data frames to be sent continuously at one time parameter values. To this end, this embodiment also compares the time slot allocation algorithm of the present invention and the random time slot allocation method. When the terminal message sending load is different, in order to meet the condition that the probability of failure in allocating time slots for message sending is lower than 0.5%, the minimum maximum number of data frames to be sent continuously at one time parameter value that needs to be used. Table 1 shows the minimum maximum number of data frames to be sent continuously at one time parameter value required to meet the condition that the probability of failure in allocating time slots for message sending is lower than 0.5% when the number of terminal messages is different.
[0137] Number of messages 6 7 8 9 10 11 12 13 14 15 The present invention 4 4 4 4 5 5 5 5 6 6 Random time slot allocation algorithm 4 5 5 5 6 6 6 6 7 7 Number of messages 16 17 18 19 20 21 22 23 24 25 The present invention 6 6 6 6 7 7 7 7 7 7 Random time slot allocation algorithm 7 7 8 8 8 8 9 9 9 9 Number of messages 26 27 28 29 30 31 32 33 34 35 The present invention 8 8 8 8 8 9 9 9 9 9 Random time slot allocation algorithm 10 10 10 10 11 11 11 11 11 12
[0138] Table 1
[0139] As shown in Table 1, the time slot allocation algorithm proposed in the present invention can always provide performance superior to the random time slot allocation method.
[0140] Although the above describes the illustrative specific embodiments of the present invention to facilitate those skilled in the art to understand the present invention, it should be clear that the present invention is not limited to the scope of the specific embodiments. For those of ordinary skill in the art, as long as various changes are within the spirit and scope of the present invention as defined and determined by the attached claims, these changes are obvious, and all inventions and creations using the concept of the present invention are protected.
Claims
1. A method for allocating time slots for sending terminal messages in a PON structured optical bus system, characterized in that: The following steps are involved: S1: Summarize the messages currently received from each terminal. For each terminal, determine whether there is a P2 or P1 message in the message. If so, add the terminal to the terminal set A to be assigned. Otherwise, do nothing. The number of terminals in the terminal set A to be assigned is K, and the terminal RT is k Each message is X k,m , k=1,2,…,K, m=1,2,…,M k , M k Indicates terminal RT k Number of messages sent; extract each message X separately k,m The attribute characteristics of k,m , source terminal SOU k,m , Destination terminal DES k,m , message ID k,m , sending cycle T k,m and length L k,m ; S2: Send all messages with priority levels P2 and P1 at a period of T k,m According to the scheduling small cycle length T cycle Normalize it and record the normalized sending period as t k,m , satisfying t k,m =2 e ,in Indicates rounding down; After completing the normalization of the sending period of all P2 and P1 priority messages, the message scheduling period is defined as the maximum value of the sending period of P2 and P1 priority messages of all terminals, which is recorded as S3: Search and obtain the minimum normalized sending period for each terminal to send messages Then according to the minimum normalized sending period t of K terminals k,min Sort the terminals from small to large to obtain a terminal list G; S4: Construct the matrix of the number of messages allocated to each time slot in the message scheduling cycle The rows represent the 2 in the scheduling big cycle E A scheduling mini-cycle, each element MSN t,j represents the number of transmission messages allocated for transmission in time slot j of the tth scheduling minicycle, t = 1, 2, ..., 2 E , j = 1, 2, ..., N0, N0 represents the number of data frames sent continuously by the terminal; initialize the allocated message number matrix MSN to a full 0 matrix; Construct the message ID matrix assigned to each time slot in the message scheduling cycle The rows represent the 2 in the scheduling big cycle E A scheduling mini-cycle, each element MSM t,j , represents the MSNs allocated in time slot j of the tth scheduling mini-cycle t,j Initialize the assigned message ID matrix MSM to be empty; Construct the data length matrix allocated to each time slot in the message scheduling cycle The rows represent the 2 in the scheduling big cycle E A scheduling mini-cycle, each element MSL t,j Represents the MSN allocated in time slot j of the tth scheduling mini-cycle t,j The total length of the message; initialize the allocated data length matrix MSL to be empty; S5: Set terminal number i=1; S6: for the i-th terminal in the terminal list G The message is used to allocate time slots, k i represents the original serial number of the i-th terminal in the terminal list G. The specific steps of time slot allocation include: S6.1: For terminals All its P2 and P1 priority messages are sent according to the normalized message sending cycle Sort from small to large, when the message is normalized and sent at a fixed period If the same, according to the message length Sort from large to small to get the terminal List of messages to be assigned List of messages to be assigned The number of messages is S6.2: Initialize terminal The number of allocated time slots NS i =0; S6.3: Note the terminal The first message is m1 represents the list of messages to be assigned H ki The original sequence number of the first message in the message The attribute characteristics of the following assignment results are updated: Command Terminal Number of allocated time slots NS i =1; According to the news Normalized sending cycle Construct a small period set to be used For the small period set For each scheduling mini-cycle t′ in the time slot, let the matrix element MSN of the number of messages allocated to the time slot be t′,1 =1, time slot has been assigned message matrix element Time slot allocated data length matrix element S6.4: Set message sequence number d=2; S6.5: Determine whether the message sequence number If yes, go to step S6.6, otherwise the current terminal time slot allocation ends; S6.6: For terminal The dth message in Search for available allocated time slots, m d Indicates the list of messages to be assigned The original sequence number of the dth message in is as follows: S6.6.1: According to the news Normalized sending cycle Constructing a set of candidate starting small cycles S6.6.2: Set the candidate starting small cycle number τ = 1; S6.6.3: Construct a set of small cycles to be checked Construct a set of allocated time slots to be checked S6.6.4: Set the allocated time slot number to be checked v = 1; S6.6.5: Determine whether the conditions are met L0 represents the maximum frame length of each data frame, that is, the small cycle set S to be checked i,d,τ Is the length of idle data in the vth allocated time slot of each scheduling mini-cycle q greater than or equal to the message If the length is satisfied, go to step S6.6.6, otherwise go to step S6.6.7; S6.6.6: Let τ * =τ,v * = v, the small cycle set to be checked The vth * Allocated time slots as messages Available allocated time slots, go to step S6.7; S6.6.7: Determine whether v < NS i , if yes, go to step S6.6.8, otherwise go to step S6.6.9; S6.6.8: Set v=v+1, and return to step S6.6.5; S6.6.9: Determine whether If yes, go to step S6.6.10, otherwise no available allocated time slot is found, go to step S6.8; S6.6.10: Set τ = τ + 1, and return to step S6.6.3; S6.7: Determine whether an available allocated time slot is found in step S6.5, if yes, proceed to step S6.7, otherwise proceed to step S6.8; S6.8: According to the news The attribute characteristics and the determined available allocated time slots complete the update of the following allocation results: For the small cycle set to be checked All scheduled small periods t′ in the Distributed to the vth * time slots, so let the matrix element of the number of messages allocated to the time slot be Slot Allocated Message Matrix Elements Time slot allocated data length matrix element After the update is completed, go to step S6.10; S6.9: For messages Allocate a new unallocated time slot and update the time slot allocation result. The specific method is as follows: Command Terminal Number of allocated time slots NS i =NS i +1; According to the news Normalized sending cycle Construct a small period set to be used For all the scheduling mini-cycles t′ in the mini-cycle set S1 to be used, the message Assigned to the first time slot of all small cycles, so let the matrix element MSN of the number of messages assigned to the time slot be t′,1 =1, time slot has been assigned message matrix element Time slot allocated data length matrix element After the update is completed, go to step S6.10; S6.10: Set d=d+1, and return to step S6.5; S7: Determine whether the terminal number i is less than K. If so, proceed to step S8, otherwise the time slot allocation ends; S8: Let i=i+1 and return to step S6.
Citation Information
Patent Citations
Single-frame multi-burst distribution method and burst frame uplink method in optical fronthaul network
CN116634313A
PON structured optical bus dynamic bandwidth allocation method based on terminal state
CN118301509A
Optimized dynamic bandwidth scheduler
US20130315596A1
Data transmission method and related device
WO2022105724A1