Method for allocating terminal message transmission time slots in a pon structure optical bus system

CN119325048BActive Publication Date: 2026-08-11UNIV OF ELECTRONICS SCI & TECH OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-24
Publication Date
2026-08-11

AI Technical Summary

Technical Problem

但是,由于消息到达具有一定的随机性,可能会有部分消息集中到达和等待发送,当个数据帧不够用时,就可能造成消息需要等待下次调度小周期轮询时才能发送,这时对于消息发送周期小的消息来说,可能造成等待时间超过消息发送周期的严重问题

Benefits of technology

[0050]本发明PON结构光总线系统的终端消息发送时隙分配方法,首先将所有优先级为P2和P1的消息的发送周期进行归一化,然后将终端按照最小归一化发送周期从小到大对终端进行排序,得到终端列表,然后依次对终端列表中每个终端进行时隙分配,在每个终端时隙分配时将消息按照归一化发送周期从小到大进行时隙分配。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119325048B_ABST
    Figure CN119325048B_ABST
Patent Text Reader

Abstract

This invention discloses a terminal message transmission time slot allocation method for a PON structured optical bus system. First, the transmission periods of all messages with priorities P2 and P1 are normalized. Then, the terminals are sorted in ascending order of their minimum normalized transmission periods to obtain a terminal list. Time slots are then allocated sequentially for each terminal in the list, with messages allocated according to their normalized transmission periods in ascending order. This invention can allocate corresponding transmission time slots for each message from the system terminals according to the message polling scheduling requirements of the system scheduling cycle, effectively improving the efficiency of system message transmission.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of optical data bus technology, and more specifically, relates to a terminal message transmission time slot allocation method for a PON structure optical bus system. Background Technology

[0002] The MIL-STD-1553 bus is a common bus type in airborne avionics systems. The MIL-STD-1553B bus, short for MIL-STD-1553 bus, is the second version of this bus and is a centralized time-division serial bus. The MIL-STD-1553B bus features centralized control, distributed processing, and real-time response, and provides reliable data transmission services through a multi-redundant bus topology. The MIL-STD-1553B bus uses a command / response communication protocol and provides three terminal types: BC (Bus Controller), RT (Remote Terminal), and BM / MT (Bus Monitoring), supporting up to 31 terminals. The BC is responsible for the time-division multiplexing scheduling and management of data transmission on the bus; only one terminal can send data at any given time, while other terminals can receive data.

[0003] With the rapid development of airborne avionics systems, the low speed of the 1553B bus has become a bottleneck restricting further bandwidth increases for devices in shared buses. To improve the link speed of shared airborne buses, the industry has proposed the PON (Passive Optical Network) structured optical bus. PON systems offer advantages such as low cost, high reliability, and ease of maintenance, and are currently widely used in telecommunications access networks, providing link speeds of 10G and above, far exceeding those of the traditional 1553B bus.

[0004] A traditional PON system consists of three parts: an Optical Line Terminal (OLT), an Optical Network Unit (ONU), and an Optical Distribution Network (ODN). The OLT is responsible for scheduling and managing data transmission within the PON system. In the downlink from the OLT to the ONU, data transmission uses time-division multiplexing broadcast, allowing all ONUs to receive the data broadcast by the OLT and decide whether to further process it. However, the uplink from the ONU to the OLT uses time-division multiplexing shared transmission. The OLT first notifies a specific ONU to send data, and then the corresponding ONU uses the uplink to send data back to the OLT. Therefore, in a PON system, data sent by an ONU can only be received by the OLT and cannot be directly sent to other ONUs in the system.

[0005] To address the problem of data transmission between ONUs in traditional PON systems, researchers proposed the PON structured optical bus system. Figure 1 This is a schematic diagram of a PON structured optical bus system. (Example:) Figure 1 As shown, after the uplink data from each terminal reaches the BC (Bus Controller) via the optical splitter, the BC will promptly forward the data and broadcast it to each terminal for reception, thereby achieving real-time communication between terminals similar to that in the 1553B bus.

[0006] The terminal message transmission scheduling algorithm is one of the key technologies of a PON structured optical bus system, determining how the BC (Branch Controller) controls each RT (Remote Terminal) to transmit data in its allocated time slots. In a PON structured optical bus system, messages transmitted by each terminal are divided into three priorities: P2, P1, and P0. P2 and P1 priority messages are periodic and latency-sensitive, requiring timely transmission. P0 priority messages, on the other hand, are suitable for larger, bursty data that is not latency-sensitive. To effectively transmit data of various priorities, the PON structured optical bus system employs a small-cycle polling scheduling method. Figure 2 This is a diagram illustrating short-cycle polling message scheduling. For example... Figure 2As shown, within each scheduling cycle, the BC (Browser Control Center) first polls each terminal to transmit P2 priority messages, then polls each terminal to transmit P1 priority messages. After the P2 and P1 priority messages have been transmitted, the remaining time slots are used to poll each terminal to transmit P0 priority messages. If too many P2 and P1 priority messages are sent within a scheduling cycle, P0 priority messages will not be served. However, if only a few P2 and P1 priority messages are allowed to be sent within a scheduling cycle, high-priority and medium-priority messages may not be served in a timely manner.

[0007] When scheduling messages based on their priority, a polling method is used to schedule them, prioritizing those that send the most messages consecutively (BC). There are 10 data frames, and the time occupied by each data frame on the link is defined as a time slot. The maximum frame length of each data frame is 1000. Each data frame can contain one or more messages, but the length of multiple messages in a data frame cannot exceed [a certain limit]. Furthermore, splitting a message into multiple data frames or time slots for transmission is not permitted. After the BC transmission is completed, other RT terminals are polled sequentially to complete the transmission of messages of the corresponding priority. Each terminal can continuously transmit a maximum of a certain number of data frames at a time, and the length of each data frame cannot exceed a certain limit. .

[0008] In a 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 video and large files, it needs to be segmented into multiple message frames for transmission. (Scheduling cycle duration) The choice of P2 priority should ensure that the most frequently sent high-priority messages are sent, corresponding to the shortest message sending cycle. This ensures timely scheduling services in each scheduling cycle. The number of data frames continuously sent by the terminal... The selection of parameters generally requires that the P2 and P1 priority messages of all terminals can receive timely scheduling services according to the sending cycle.

[0009] In the specific implementation of the PON structured optical bus, messages waiting to be sent are typically buffered at the transmitting end of each terminal according to priority. Then, during polling scheduling, if the buffer corresponding to the priority is not empty, messages are retrieved in the order they were buffered and combined according to conditions to form the maximum number of messages. One data frame, and in The transmission is completed within each time slot. However, due to the randomness of message arrival, some messages may arrive and wait to be sent at the same time. When there aren't enough data frames, messages may have to wait for the next scheduling cycle polling before they can be sent. For messages with short sending cycles, this could lead to a serious problem where the waiting time exceeds the message sending cycle. However, increasing the number of data frames continuously sent by the terminal can solve this issue. This could also cause excessive time slot occupation, affecting message scheduling of other terminals or service of low-priority messages. Summary of the Invention

[0010] The purpose of this invention is to overcome the shortcomings of the prior art and provide a terminal message transmission time slot allocation method for a PON structured optical bus system. This method can allocate a corresponding transmission time slot to each message of the system terminal according to the message polling scheduling requirements in the system scheduling cycle, thereby effectively improving the efficiency of system message transmission.

[0011] To achieve the above-mentioned objective, the terminal message transmission time slot allocation method of the PON structured optical bus system of the present invention includes the following steps:

[0012] S1: Summarize the messages received from each terminal. For each terminal, determine whether message P2 or P1 exists in the message list. If it exists, add the terminal to the set of terminals to be assigned. Otherwise, do nothing; record the set of terminals to be allocated. The number of terminals is Terminal Each message is , , , Indicates terminal Number of messages sent; extract each message separately. Attribute characteristics, including priority Source terminal destination terminal Message number Sending period and length ;

[0013] S2: The period for sending all messages with priorities P2 and P1. According to the duration of the scheduling cycle Perform normalization, and denote the normalized transmission period as... ,satisfy ,in , Indicates rounding down;

[0014] After normalizing the sending periods of all P2 and P1 priority messages, the message scheduling period is defined as the maximum value of the sending periods of P2 and P1 priority messages across all terminals, denoted as . ;

[0015] S3: Search to obtain the minimum normalized transmission period for messages sent by each terminal. Then according to Minimum normalized transmission period of each terminal Sort the terminals from smallest to largest to obtain the terminal list. ;

[0016] S4: Construct a matrix of the number of messages allocated to each time slot in the message scheduling cycle. The row represents the scheduling cycle. Each scheduling cycle, each element Indicates the first The time slot of a scheduling cycle The number of transmission messages already allocated for transmission. , , Indicates the number of data frames continuously sent by the terminal; initializes the allocated message count matrix. It is a matrix of all zeros;

[0017] Constructing a matrix of allocated message IDs for each time slot in a large message scheduling cycle. The row represents the scheduling cycle. Each scheduling cycle, each element , representing the first The time slot of a scheduling cycle Already allocated Record the IDs of each message; initialize the assigned message ID matrix. Empty;

[0018] Construct a matrix of allocated data lengths for each time slot in the message scheduling cycle. The row represents the scheduling cycle. Each scheduling cycle, each element Representative at the The time slot of a scheduling cycle Already allocated Total length of each message; Initialize the allocated data length matrix. Empty;

[0019] S5: Set the terminal serial number ;

[0020] S6: Terminal list The Middle individual terminals The message is allocated a time slot. Represents the terminal list The Middle The original sequence number of each terminal and the specific steps for time slot allocation include:

[0021] S6.1: For terminals Send all P2 and P1 priority messages according to the message normalization period. Sort the messages in ascending order of size, and normalize the sending cycle. When they are the same, prioritize based on message length. Sort from largest to smallest to obtain the terminal. List of messages to be assigned Record the list of messages to be assigned. The number of messages is ;

[0022] S6.2: Initialize the terminal Number of allocated time slots ;

[0023] S6.3: Terminal Record The first message is , Represents the list of messages to be assigned. The original sequence number of the first message in the message, based on the message The attribute characteristics complete the following assignment result updates:

[0024] Command terminal Number of allocated time slots ;

[0025] According to the news Normalized transmission period Construct a set to use a small periodicity For those intending to use small-period sets Each scheduling cycle in Let the number of allocated messages in the time slot be the matrix element. The time slot has been allocated message matrix elements The time slot has been allocated data length matrix elements ;

[0026] S6.4: Order message sequence number ;

[0027] S6.5: Determine if it is a message sequence number If yes, proceed to step S6.6; otherwise, the current terminal time slot allocation ends.

[0028] S6.6: For terminals The Middle One message Search for available allocated time slots. Represents the list of messages to be assigned. The Middle The original sequence number of each message is obtained by:

[0029] S6.6.1: According to the message Normalized transmission period Construct a set of alternative starting small cycles ;

[0030] S6.6.2: Let the candidate starting small cycle number be... ;

[0031] S6.6.3: Construct a set of small cycles to be inspected Construct a set of allocated time slots to be inspected. ;

[0032] S6.6.4: Set the sequence number of the allocated time slot to be checked. ;

[0033] S6.6.5: Determine if the condition is met. , This represents the maximum frame length of each data frame, i.e., the set of small periods to be inspected. Is each scheduling cycle... The Are the lengths of the idle data in each allocated time slot greater than or equal to the message length? If the length is satisfied, proceed to step S6.6.6; otherwise, proceed to step S6.6.7.

[0034] S6.6.6: Let , Set the small cycles to be inspected Each scheduling cycle The first in Each allocated time slot is used as a message. Once the available allocated time slots are determined, proceed to step S6.7;

[0035] S6.6.7: Determine if If yes, proceed to step S6.6.8; otherwise, proceed to step S6.6.9.

[0036] S6.6.8: Order Return to step S6.6.5;

[0037] S6.6.9: Determine if If yes, proceed to step S6.6.10; otherwise, if no available allocated time slot is found, proceed to step S6.8.

[0038] S6.6.10: Order Return to step S6.6.3;

[0039] S6.7: Determine whether an available allocated time slot was found in step S6.6. If yes, proceed to step S6.8; otherwise, proceed to step S6.9.

[0040] S6.8: According to the message Based on the attribute characteristics and the determined available allocated time slots, the following allocation results are updated:

[0041] For the small period set to be inspected All scheduling small cycles , will message Distributed to all smaller cycles The Within each time slot, therefore, the number of message elements allocated to each time slot is determined by the matrix. The time slot has been allocated message matrix elements The time slot has been allocated data length matrix elements ;

[0042] After the update is complete, proceed to step S6.10;

[0043] S6.9: For messages Allocate a new, unallocated time slot and update the time slot allocation result. The specific method is as follows:

[0044] Command terminal Number of allocated time slots ;

[0045] According to the news Normalized transmission period Construct a set to use a small periodicity For those who intend to use small periodic sets All scheduling cycles in , will message The first of all small cycles Within each time slot, therefore, the number of message elements allocated to each time slot is determined by the matrix. The time slot has been allocated message matrix elements The time slot has been allocated data length matrix elements ;

[0046] After the update is complete, proceed to step S6.10;

[0047] S6.10: Order Return to step S6.5;

[0048] S7: Determine if it is a terminal serial number If yes, proceed to step S8; otherwise, time slot allocation ends.

[0049] S8: Order Return to step S6.

[0050] The terminal message transmission time slot allocation method of the PON structured optical bus system of the present invention first normalizes the transmission period of all messages with priorities P2 and P1, then sorts the terminals according to the minimum normalized transmission period from small to large to obtain a terminal list, and then allocates time slots for each terminal in the terminal list in turn. When allocating time slots for each terminal, the messages are allocated according to the normalized transmission period from small to large.

[0051] In the allocation of time slots for terminal message transmission, this invention ensures that the scheduling period of each P2 and P1 message is no greater than the message transmission period of that message, thereby enabling timely transmission. Simultaneously, it strives to reduce the total number of time slots for P2 and P1 priority messages by effectively combining messages of different lengths, so that P0 priority messages can receive more service. Attached Figure Description

[0052] Figure 1 This is a schematic diagram of a PON structured optical bus system;

[0053] Figure 2 This is a schematic diagram of short-cycle polling message scheduling;

[0054] Figure 3 This is a flowchart illustrating a specific implementation method for the terminal message transmission time slot allocation method of the PON structured optical bus system of the present invention.

[0055] Figure 4 This is a flowchart of time slot allocation for terminal messages;

[0056] Figure 5 This is a flowchart of the available allocated time slots for message search in this invention;

[0057] Figure 6 This is a comparison chart of the allocation results of different message quantities before and after using the scheduling method when the maximum number of data frames that the terminal can send continuously at one time is 9 in this embodiment.

[0058] Figure 7 This is a comparison chart of the allocation results of different message quantities before and after using the scheduling method when the maximum number of data frames that the terminal can send continuously at one time is 6 in this embodiment.

[0059] Figure 8 This is a comparison chart of the allocation results of different message quantities before and after using the scheduling method when the maximum number of data frames that the terminal can send continuously at one time is 3 in this embodiment.

[0060] Figure 9This is a curve comparing the probability of allocation failure before and after using the allocation method, obtained by setting different parameter values ​​for the maximum number of data frames sent continuously in one go when the terminal message sending load is low in this embodiment.

[0061] Figure 10 This is a curve comparing the probability of allocation failure before and after using the allocation method, obtained by setting different parameter values ​​for the maximum number of consecutively sent data frames when the terminal message is loaded during the message transmission in this embodiment.

[0062] Figure 11 This is a curve comparing the probability of allocation failure before and after using the allocation method, obtained by setting different parameter values ​​for the maximum number of data frames sent continuously in a single operation when the terminal message sending load is high in this embodiment. Detailed Implementation

[0063] The specific embodiments of the present invention will now be described with reference to the accompanying drawings to enable those skilled in the art to better understand the invention. It should be particularly noted that in the following description, detailed descriptions of known functions and designs that might obscure the main content of the invention will be omitted here.

[0064] Example

[0065] Figure 3 This is a flowchart illustrating a specific implementation method for allocating time slots for terminal message transmission in the PON structured optical bus system of the present invention. Figure 3 As shown, the terminal message transmission time slot allocation method of the PON structured optical bus system of the present invention includes the following steps:

[0066] S301: Obtain message attribute characteristics:

[0067] Summarize the messages received from each terminal. For each terminal, determine whether message P2 or P1 exists in the message list. If it does, add the terminal to the set of terminals to be assigned. Otherwise, no operation is performed. Record the set of terminals to be assigned. The number of terminals is Terminal Each message is , , , Indicates terminal Number of messages sent. Extract each message individually. Attribute characteristics, including priority (P2, P1, or P0), source terminal destination terminal Message number Sending period and length .

[0068] S302: Transmission cycle processing:

[0069] The sending period for all messages with priorities P2 and P1 According to the duration of the scheduling cycle Perform normalization, and denote the normalized transmission period as... ,satisfy ,in , This indicates rounding down to the nearest integer. For example, when... Sometimes, ;when Sometimes, After normalizing the sending periods of all P2 and P1 priority messages, the message scheduling period is defined as the maximum value of the sending periods of P2 and P1 priority messages for all terminals, denoted as . .

[0070] Suppose there are four messages in the system with priorities P2 and P1, and normalized transmission periods of 2, 4, 1, and 16 respectively. The total message scheduling period is 16. Within a large scheduling period, there are 16 smaller periods. A message with a normalized transmission period of 1 needs to be sent once within each smaller period of the large scheduling period, or allocated a time slot for each. A message with a normalized transmission period of 2 needs to be sent 8 times at equal intervals within the large scheduling period, with possible smaller periods {1, 3, 5, 7, 9, 11, 13, 15} or {2, 4, 6, 8, 10, 12, 14, 16}. However, each smaller period contains many time slots. For example, if the smaller period is 1ms and the time slot length is 1µs, then there are 1000 available time slots within a smaller period, used to transmit different messages. Based on the above, in the subsequent process, the present invention will first sort the terminals according to the minimum normalized transmission period of each terminal, and then sort the messages in each terminal according to the normalized transmission period, so as to make the time slot allocation more reasonable and save the time slots occupied by the messages of P2 and P1 as much as possible.

[0071] S303: Terminal Sequencing:

[0072] The allocation of time slots for terminal message transmission on a PON structured optical bus requires sorting the terminals and completing the allocation sequentially. To achieve better time slot allocation, it is first necessary to search for the minimum normalized transmission period for each terminal to send messages. Then according to Minimum normalized transmission period of each terminal Sort the terminals from smallest to largest to obtain the terminal list. .

[0073] S304: Initialize time slot allocation data:

[0074] Construct a matrix of the number of messages allocated to each time slot in the long message scheduling cycle. The row represents the scheduling cycle. Each scheduling cycle, each element Indicates the first The time slot of a scheduling cycle The number of transmission messages already allocated for transmission. , , This indicates the number of data frames continuously sent by the terminal. Initialize the allocated message count matrix. A matrix of all zeros indicates that no allocation has been completed. Considering the varying message lengths, shorter messages can be allocated simultaneously within a single time slot, provided the sum of their lengths does not exceed a certain threshold. At this time The value of may be greater than 1.

[0075] Constructing a matrix of allocated message IDs for each time slot in a large message scheduling cycle. The row represents the scheduling cycle. Each scheduling cycle, each element , representing the first The time slot of a scheduling cycle Already allocated Record the IDs of each message. Initialize the assigned message ID matrix. Empty.

[0076] Construct a matrix of allocated data lengths for each time slot in the message scheduling cycle. The row represents the scheduling cycle. Each scheduling cycle, each element Representative at the The time slot of a scheduling cycle Already allocated Total length of each message; Initialize the allocated data length matrix. Empty.

[0077] S305: Set terminal serial number .

[0078] S306: Time Slot Allocation:

[0079] Terminal list The Middle individual terminals The message is allocated a time slot. Represents the terminal list The Middle The original serial number of each terminal. Figure 4 This is a flowchart of time slot allocation for terminal messages. For example... Figure 4 As shown, the specific steps for time slot allocation of terminal messages in this invention include:

[0080] S401: Message ordering:

[0081] For the terminal Send all P2 and P1 priority messages according to the message normalization period. Sort the messages in ascending order of size, and normalize the sending cycle. When they are the same, prioritize based on message length. Sort from largest to smallest to obtain the terminal. List of messages to be assigned Record the list of messages to be assigned. The number of messages is .

[0082] S402: Time slot allocation initialization:

[0083] Initialize terminal Number of allocated time slots The number of allocated time slots indicates the number of slots allocated in the time slot allocation process. The number of time slots already used by each terminal. Each subsequent addition of one time slot will use... Add one, but The maximum value cannot exceed the maximum number of data frames that the terminal can send consecutively at one time. .

[0084] S403: Allocate a time slot for the first message:

[0085] Terminal The first message is , Represents the list of messages to be assigned. The original sequence number of the first message in the message, based on the message The attribute characteristics complete the following assignment result updates:

[0086] Command terminal Number of allocated time slots .

[0087] According to the news Normalized transmission period Construct a set to use a small periodicity This set contains the messages sent within a large scheduling cycle, starting from the first small scheduling cycle, with the message normalization cycle as the starting point. All added scheduling mini-cycles. For the set of mini-cycles to be used. This message needs to be sent once for each scheduling mini-cycle in the process. For the set of mini-cycles to be used... Each scheduling cycle in , will message The first of all small cycles Within each time slot, therefore, the number of message elements allocated to each time slot is determined by the matrix. The time slot has been allocated message matrix elements The time slot has been allocated data length matrix elements .

[0088] If a terminal's scheduling period is 16 and the normalized sending period of the first message is 2, then for the first message of that terminal, the proposed set of smaller periods is: The eight sub-cycles {1, 3, 5, 7, 9, 11, 13, 15} will all be allocated the first time slot for the periodic transmission of the first message. The other eight sub-cycles have not yet been allocated time slots for message transmission and will be allocated to other messages later.

[0089] S404: Order message sequence number .

[0090] S405: Determine if it is a message sequence number If yes, proceed to step S406; otherwise, the current terminal time slot allocation ends.

[0091] S406: Available allocated time slots for message search:

[0092] For the terminal The Middle One message Search for available allocated time slots. Represents the list of messages to be assigned. The Middle The original sequence number of the message. Figure 5 This is a flowchart illustrating the availability of allocated time slots for message searching in this invention. For example... Figure 5 As shown, the specific steps for message search to utilize allocated time slots in this invention include:

[0093] S501: Initialize the set of alternative starting small cycles:

[0094] According to the news Normalized transmission period Construct a set of alternative starting small cycles Because the message normalization sending period is This message needs to be sent every Send once, therefore This corresponds to the first message that can be sent within a large scheduling cycle. The scheduling cycle, i.e. the initial cycle.

[0095] Assuming the current message is the second message, the first message, after being allocated, occupied the first time slot of the sub-cycle {1, 3, 5, 7, 9, 11, 13, 15}. The second message's transmission cycle is 4. The following checks will first examine whether there is sufficient remaining length in the allocated time slots for the second message. Assuming the second message's transmission cycle is 4, we need to check four cases: {1, 5, 9, 13}, {2, 6, 10, 14}, {3, 7, 11, 15}, and {4, 8, 12, 16}. Therefore, the candidate starting sub-cycle set actually records the starting sub-cycles of the four sub-cycle sets to be checked, i.e., {1, 2, 3, 4}.

[0096] S502: Let the alternative starting small cycle number be... Next, we will discuss alternative short-term cycles. Conduct an inspection to determine if it is possible to proceed in an alternative short cycle. Implement messages in the set of small cycles for the initial small cycle. Time slot allocation.

[0097] S503: Construct the set of small cycles to be inspected and the set of allocated time slots to be inspected.

[0098] Construct a set of small cycles to be inspected This set contains the data from the first message sent within a large scheduling cycle. scheduling small cycle Begin with message normalization cycle All added small cycles. Simultaneously, construct the set of allocated time slots to be inspected. ,in It is a terminal Number of time slots already allocated.

[0099] As explained in the second message above, let's assume that the alternative starting small cycle is at this point. Therefore, the set of small periods to be checked is {1, 5, 9, 13}. Since each small period may have already been assigned... Since there are multiple time slots, it is also necessary to construct a set of allocated time slots to be checked for inspection.

[0100] S504: Instruct the sequence number of the allocated time slot to be checked .

[0101] S505: Determine if the condition is met. , This represents the maximum frame length of each data frame, i.e., the set of small periods to be inspected. Is each scheduling cycle... The Are the lengths of the idle data in each allocated time slot greater than or equal to the message length? If the length is satisfied, proceed to step S506; otherwise, proceed to step S507.

[0102] S506: Determine available allocated time slots:

[0103] make , Set the small cycles to be inspected Each scheduling cycle The first in Each allocated time slot is used as a message. Available allocated time slots.

[0104] S507: Determine if If yes, proceed to step S508; otherwise, proceed to step S509.

[0105] S508: Order Return to step S505.

[0106] S509: Determine if If yes, proceed to step S510; otherwise, if no available allocated time slots are found, end the search.

[0107] S510: Order Return to step S503.

[0108] As in the previous example, when performing the second message allocation, assume , Then, it is necessary to check whether the first allocated time slot of each scheduling period in {1,5,9,13} has sufficient remaining length. If there is sufficient remaining length, the second message can be allocated to the first allocated time slot of each scheduling period in {1,5,9,13}, and that time slot will be used for the allocation of the second message. If the first allocated time slot of any period in {1,5,9,13} has insufficient remaining length, it indicates... , Search failed, please continue checking. , In this case, we continue checking the next allocated time slot. If every allocated time slot in {1,5,9,13} is unavailable, then let Continue checking all allocated time slots in the next set of to-be-checked periods {2,6,10,14}. If every allocated time slot in every to-be-checked period is unavailable, then a new time slot can only be allocated for the second message.

[0109] S407: Determine whether an available allocated time slot was found in step S406. If yes, proceed to step S408; otherwise, proceed to step S409.

[0110] S408: Allocate available allocated time slots:

[0111] According to the news Based on the attribute characteristics and the determined available allocated time slots, the following allocation results are updated:

[0112] For the small period set to be inspected All scheduling small cycles , will message Distributed to all smaller cycles The Within each time slot, therefore, the number of message elements allocated to each time slot is determined by the matrix. The time slot has been allocated message matrix elements The time slot has been allocated data length matrix elements .

[0113] After the update is complete, proceed to step S410.

[0114] In other words, assuming that the first allocated time slot in each scheduling cycle {2,6,10,14} is selected for the second message, then the allocation result data must be updated for the first allocated time slot in scheduling cycles 2, 6, 10, and 14.

[0115] S409: Allocate a new time slot:

[0116] When no available message slots are found in the allocated time slots The transmission time slots need to be allocated to the message. Allocate a new, unallocated time slot and update the time slot allocation result. The specific method is as follows:

[0117] Command terminal Number of allocated time slots .

[0118] According to the news Normalized transmission period Construct a set to use a small periodicity Similarly, this set contains messages sent within a large scheduling cycle, starting from the first small scheduling cycle, with the message normalization cycle as the starting point. All added scheduling mini-cycles. For the set of mini-cycles to be used. This message needs to be sent once for each scheduling mini-cycle in the process. For the set of mini-cycles to be used... All scheduling cycles in , will message The first of all small cycles Within each time slot, therefore, the number of message elements allocated to each time slot is determined by the matrix. The time slot has been allocated message matrix elements The time slot has been allocated data length matrix elements .

[0119] After the update is complete, proceed to step S410.

[0120] S410: Order Return to step S405.

[0121] S307: Determine if it is a terminal serial number If yes, proceed to step S308; otherwise, time slot allocation ends.

[0122] S308: Order Return to step S306.

[0123] After the message sending time slot allocation is completed, during system operation, the BC sends the message sending time slot allocation result to the RT. Then, the BC and each RT can schedule and transmit messages in sequence according to the obtained message sending time slot allocation result.

[0124] To better illustrate the technical effects of this invention, a specific example is used to simulate and verify the invention. This simulation compares the method of this invention with the random time slot allocation method using numerical simulation, examining the impact on system performance of the number of message transmission time slots that need to be allocated when there are different numbers of messages in the system, and the maximum number of data frames that a terminal can continuously send at one time.

[0125] In this embodiment, each terminal RT is configured to transmit a certain number of messages and allocate message sending time slots. The sending period of each message is randomly generated with a uniform distribution between the minimum and maximum values, and the message length is randomly generated with a uniform distribution between 100 and 2000 bytes. Considering the randomness of the simulation, the simulation results for each set of parameters are calculated by statistically averaging multiple random simulation results.

[0126] First, the maximum number of data frames that a terminal can continuously transmit in one go is one of the key parameters in the design of a PON structured optical bus system. Using a larger maximum number of data frames that a terminal can continuously transmit in one go allows the terminal to transmit more messages, but it also occupies more time slots for transmitting P2 and P1 priority messages, leading to a decrease in the transmission performance of P0 priority messages. However, reducing the maximum number of data frames that a terminal can continuously transmit in one go may result in P2 and P1 priority messages not receiving the necessary service. Therefore, simulations were conducted to compare the maximum number of data frames that different terminals can continuously transmit in one go.

[0127] Figure 6 This is a comparison chart showing the allocation results of different message quantities before and after using the scheduling method when the maximum number of data frames that the terminal can continuously send in one go is 9, in this embodiment. Figure 6 In the simulation, a relatively large parameter value for the maximum number of data frames that a terminal can continuously send at once was selected. It can be seen that as the number of messages increases, the number of sending time slots that need to be allocated to each message also increases. Furthermore, when the number of messages is large, message sending time slot allocation failures may occur; that is, under the current parameter setting for the maximum number of data frames that a terminal can continuously send at once, it is impossible to find a suitable message sending time slot allocation result for all messages. In addition, 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 to each message, and the probability of allocation failure is also much lower than that of the random time slot allocation method that does not use the proposed algorithm.

[0128] Figure 7 This is a comparison chart showing the allocation results of different message quantities before and after using the scheduling method when the maximum number of data frames that the terminal can continuously send in one go in this embodiment is 6. Figure 7 In the simulation, the parameter value for the maximum number of data frames that the terminal can continuously send at one time was reduced from 9 to 6. It can be seen that due to the reduction in the number of time slots that the terminal can choose for message sending time slot allocation, the probability of message sending time slot allocation failure is higher. However, the proposed time slot allocation algorithm still shows better performance than the random time slot allocation method.

[0129] Figure 8 This is a comparison chart showing the allocation results of different message quantities before and after using the scheduling method when the maximum number of data frames that the terminal can continuously send in one go is 3 in this embodiment. Figure 8 In the simulation, the maximum number of data frames that the terminal can continuously send at one time was further reduced to 3. Due to the further reduction in available time slot resources for message sending time slot allocation, a high probability of message sending time slot allocation failure even with a very low number of messages began to appear. However, the proposed message sending time slot allocation algorithm still showed better performance than the random time slot allocation method.

[0130] Depend on Figure 6 , Figure 7 , Figure 8 Simulation results show that the maximum number of data frames that a terminal can continuously transmit at one time has a significant impact on the PON structured optical bus system. Therefore, the selection of this maximum number of data frames is one of the key factors in the rational design of the PON structured optical bus system. To this end, simulations were conducted to compare the performance impact of different maximum number of data frames that can be continuously transmitted at one time under different load conditions of terminal message transmission.

[0131] Figure 9 This is a curve comparing the probability of allocation failure before and after using the allocation method, obtained by setting different parameter values ​​for the maximum number of data frames sent continuously in one go when the terminal message sending load is low in this embodiment. Figure 9 The simulation corresponds to a low terminal message sending load intensity, with the number of terminal messages set to 10. It can be seen that when the maximum number of data frames that the terminal can continuously send in one go is small, the system is more prone to message sending time slot allocation failures. As the maximum number of data frames that the terminal can continuously send in one go increases, the probability of message sending time slot allocation failure will decrease to zero. Comparison of simulation results shows that the proposed time slot allocation algorithm, for different maximum number of data frames that can be continuously sent in one go, can provide better performance than the random time slot allocation method, thus better ensuring the success of message sending time slot allocation.

[0132] Figure 10 This is a curve comparing the probability of allocation failure before and after using the allocation method, obtained by setting different parameter values ​​for the maximum number of consecutively sent data frames when the terminal message is loaded during the message sending process in this embodiment. Figure 10 The simulation corresponds to a moderate terminal message sending load, with the number of terminal messages set to 20. It can be seen that a larger parameter is needed for the maximum number of data frames that a terminal can continuously send at one time to ensure a low probability of message sending time slot allocation failure.

[0133] Figure 11 This is a curve comparing the probability of allocation failure before and after using the allocation method, obtained by setting different parameter values ​​for the maximum number of data frames sent continuously in a single operation when the terminal message sending load is high in this embodiment. Figure 11 The simulation corresponds to a high terminal message sending load intensity, with the number of terminal messages set to 30, and similar comparison results can be seen. Regardless of... Figure 9 ,still Figure 10 The simulation results and the proposed time slot allocation algorithm both show that they outperform the random time slot allocation method.

[0134] As can be seen from the preceding simulation results, if different RT terminals in the system send different numbers of messages, then these terminals require different minimum consecutive data frame maximum number parameter values. Therefore, this embodiment also compares the time slot allocation algorithm and the random time slot allocation method of this invention to determine the minimum consecutive data frame maximum number parameter values ​​required to satisfy the condition that the message sending time slot allocation failure probability is less than 0.5% under different terminal message sending loads. Table 1 shows the minimum consecutive data frame maximum number parameter values ​​required to satisfy the condition that the message sending time slot allocation failure probability is less than 0.5% for different terminal message counts.

[0135] Message count 6 7 8 9 10 11 12 13 14 15 This 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 Message count 16 17 18 19 20 21 22 23 24 25 This 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 Message count 26 27 28 29 30 31 32 33 34 35 This 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

[0136] Table 1

[0137] As shown in Table 1, the time slot allocation algorithm proposed in this invention has consistently provided performance superior to random time slot allocation methods.

[0138] Although the illustrative specific embodiments of the present invention have been described above to enable those skilled in the art to understand the invention, it should be understood that the invention is not limited to the scope of the specific embodiments. For those skilled in the art, various changes are obvious as long as they are within the spirit and scope of the invention as defined and determined by the appended claims, and all inventions utilizing the concept of the present invention are protected.

Claims

1. A method of allocating a message transmission time slot for a terminal in a PON structure optical bus system, characterized by, Includes the following steps: S1: Summarize the messages received from each terminal. For each terminal, determine whether message P2 or P1 exists in the message list. If it exists, add the terminal to the set of terminals to be assigned. Otherwise, do nothing; record the set of terminals to be allocated. The number of terminals is Terminal Each message is , , , Indicates terminal Count of messages sent; extract each message separately. Attribute characteristics, including priority Source terminal destination terminal Message number Sending period and length ; S2: the transmission period of all messages with priority P2 and P1 is set to according to the scheduling sub-period length normalization is performed, and the normalized transmission period is denoted as , satisfying wherein , denotes the floor function; After the transmission period normalization of all P2 and P1 priority messages is completed, the message scheduling large period is defined as the maximum value of the transmission periods of P2 and P1 priority messages of all terminals, denoted as ; S3: search for the minimum normalized transmission period of each terminal sending the message and then according to the minimum normalized transmission period of each terminal sort the terminals from small to large to obtain a terminal list ; S4: Constructing the matrix of the number of messages allocated in each time slot in the scheduling large period wherein the rows represent the scheduling large periods, and the columns represent the scheduling small periods, and each element represents the number of transmission messages allocated in the time slot of the scheduling small period , , represents the number of consecutive data frames transmitted by the terminal; initializing the matrix of the number of messages allocated as a matrix of all 0s ; constructing a message allocated ID matrix of each time slot in a scheduling super period wherein a row represents a scheduling super period in a scheduling super period , each element represents an ID record of messages allocated in a time slot of the th scheduling sub period ; initializing the message allocated ID matrix as null; Construct a matrix of allocated data lengths for each time slot in the message scheduling cycle. The row represents the scheduling cycle. Each scheduling cycle, each element Representative at the The time slot of a scheduling cycle Already allocated Total length of each message; Initialize the allocated data length matrix. Empty; S5: Let terminal number ; S6: allocating time slots for the message of the terminal list the terminal list the terminal list the terminal list the terminal list the terminal list the terminal list S6.1: For the terminal , send all its P2 and P1 priority messages according to the message normalization sending period , in ascending order, when the message normalization sending period is the same, according to the message length , in descending order, thereby obtaining a list of messages to be allocated for the terminal , denoted as a list of messages to be allocated , and the number of messages in the list of messages to be allocated is​ S6.2: Initialize the terminal Number of allocated time slots ; S6.3: Terminal Record The first message is , Represents the list of messages to be assigned. The original sequence number of the first message in the message, based on the message The attribute characteristics complete the following assignment result updates: Command terminal Number of allocated time slots ; According to the news Normalized transmission period Construct a set to use a small periodicity For those intending to use small-period sets Each scheduling cycle in Let the number of allocated messages in the time slot be the matrix element. The time slot has been allocated message matrix elements The time slot has been allocated data length matrix elements ; S6.4: Order message sequence number ; S6.5: Determine if it is a message sequence number If yes, proceed to step S6.6; otherwise, the current terminal time slot allocation ends. S6.6: For terminals The Middle One message Search for available allocated time slots. Represents the list of messages to be assigned. The Middle The original sequence number of each message is determined by the following method: S6.6.1: According to the message Normalized transmission period Construct a set of alternative starting small cycles ; S6.6.2: Let the candidate starting small cycle number be... ; S6.6.3: Construct a set of small cycles to be inspected Construct a set of allocated time slots to be inspected. ; S6.6.4: Set the sequence number of the allocated time slot to be checked. ; S6.6.5: Determine if the condition is met. , This represents the maximum frame length of each data frame, i.e., the set of small periods to be inspected. Is each scheduling cycle... The Are the lengths of the idle data in each allocated time slot greater than or equal to the message length? If the length is satisfied, proceed to step S6.6.6; otherwise, proceed to step S6.6.

7. S6.6.6: Let , Set of small cycles to be inspected Each scheduling cycle The first in Each allocated time slot is used as a message. Once the available allocated time slots are determined, proceed to step S6.7; S6.6.7: Determine if If yes, proceed to step S6.6.8; otherwise, proceed to step S6.6.

9. S6.6.8: Order Return to step S6.6.5; S6.6.9: Determine if If yes, proceed to step S6.6.10; otherwise, if no available allocated time slot is found, proceed to step S6.

8. S6.6.10: Order Return to step S6.6.3; S6.7: Determine whether an available allocated time slot was found in step S6.

6. If yes, proceed to step S6.8; otherwise, proceed to step S6.

9. S6.8: According to the message Based on the attribute characteristics and the determined available allocated time slots, the following allocation results are updated: For the small period set to be inspected All scheduling small cycles , will message Distributed to all smaller cycles The Within each time slot, therefore, the number of message elements allocated to each time slot is determined by the matrix. The time slot has been allocated message matrix elements The time slot has been allocated data length matrix elements ; After the update is complete, proceed 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 ; According to the news Normalized transmission period Construct a set to use a small periodicity For those who intend to use small periodic sets All scheduling cycles in , will message The first of all small cycles Within each time slot, therefore, the number of message elements allocated to each time slot is determined by the matrix. The time slot has been allocated message matrix elements The time slot has been allocated data length matrix elements ; After the update is complete, proceed to step S6.10; S6.10: Order Return to step S6.5; S7: Determine if it is a terminal serial number If yes, proceed to step S8; otherwise, time slot allocation ends. S8: Order Return to step S6.