Time-sensitive network message scheduling method, device, equipment and storage medium
By acquiring and comparing network parameters in a time-sensitive network, determining the target transmission time slot and scheduling time-sensitive periodicity and burst messages, the scheduling problem in the existing technology is solved, and an efficient common network for a variety of power service flows is achieved. transmission.
Patent Information
- Application Number
- CN202211221234.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-08
- Publication Date
- 2024-12-13
- Estimated Expiration
- 2042-10-08
AI Technical Summary
The prior art is difficult to effectively schedule time-sensitive periodic power service messages and time-sensitive burst power service messages, and cannot meet their needs for delay and jitter, especially in the common network transmission of multiple power services.
By obtaining network parameters, we determine the target transmission time slot of the time-sensitive periodic message in the switching node, and when there is a conflict, we use the comparison relationship between the next message sending time slot and the maximum transmission time slot to be used to determine the time-sensitive periodic message. Message and time-sensitive burst messages are scheduled, and time-sensitive burst messages are given priority to transmit time-sensitive burst messages to meet their real-time and ensure the delay and jitter requirements of time-sensitive periodic messages.
It realizes accurate traffic scheduling for time-sensitive periodic and burst messages, ensures the common network transmission quality of a variety of power service traffic, meets the transmission requirements of time-sensitive periodic messages, and reduces time-sensitive burst messages. The delay of the text.
Smart Images

Figure CN115604197B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of sensitive power business message transmission, and in particular to a message scheduling method, device, equipment and storage medium for a time-sensitive network. Background Art
[0002] With the explosive growth of distributed power sources, the underlying form of the power grid has changed profoundly, and multi-service sharing has become a development trend. Solving the transmission of multiple services with different communication requirements on the same network has become a technical problem that needs to be solved urgently. When multiple power services are shared on the same network, time-sensitive periodic power service messages (such as periodic sampling, etc.), time-sensitive burst power service messages (such as control, telesignaling, etc.) and ordinary power service messages are mixed and transmitted. Time-sensitive periodic power service messages are predictable, and their transmission has certain requirements for delay and jitter, while time-sensitive burst power service messages are unpredictable and have higher requirements for delay. The current message scheduling method still has certain defects in real-time and traffic scheduling accuracy. It is difficult to well implement the scheduling of time-sensitive periodic power service messages and time-sensitive burst power service messages to meet the requirements of time-sensitive periodic power service messages for delay and jitter, and ensure that the delay of time-sensitive burst power service messages is the shortest. Summary of the invention
[0003] In view of this, an embodiment of the present invention provides a message scheduling method, apparatus, device and storage medium for a time-sensitive network to solve the problem of difficulty in scheduling time-sensitive periodic power service messages and time-sensitive burst power service messages.
[0004] According to the first aspect, an embodiment of the present invention provides a message scheduling method for a time-sensitive network, including: obtaining network parameters of the time-sensitive network; determining a target transmission time slot of a time-sensitive periodic message at each switching node based on the network parameters, the target transmission time slot including a maximum transmission time slot of the time-sensitive periodic message; when there is a transmission conflict between the time-sensitive periodic message and the time-sensitive burst message at the switching node, obtaining a next message sending time slot; and scheduling the transmission of the time-sensitive periodic message and the time-sensitive burst message based on a comparison relationship between the next message sending time slot and the maximum transmission time slot.
[0005] The message scheduling method of the time-sensitive network provided by the embodiment of the present invention determines the target transmission time slot of the time-sensitive periodic message in the switching node through the network parameters, so that the switching nodes of each level can schedule the time-sensitive periodic message according to the target transmission time slot. The calculation process of the target transmission time slot has considered the conflict problem of the time-sensitive periodic message from the global perspective of the network, thereby ensuring that as long as each level of the switching node executes according to the target transmission time slot, the transmission delay and jitter of the time-sensitive periodic power service message must meet the transmission requirements. When there is a transmission conflict between the time-sensitive periodic message and the time-sensitive burst message, the next message sending time slot corresponding to the current switching node is obtained, and the transmission scheduling of the time-sensitive periodic message and the time-sensitive burst message is performed by comparing the next message sending time slot with the target transmission time slot. In this way, the time-sensitive burst message can be sent preferentially on the premise of satisfying the time-sensitive periodic message, so as to meet the real-time nature of the time-sensitive burst message and minimize its transmission delay. While meeting the transmission requirements of time-sensitive periodic messages, this method achieves the shortest transmission delay for time-sensitive burst messages, thereby realizing accurate traffic scheduling for time-sensitive periodic messages and time-sensitive burst messages, and ensuring the quality of shared network transmission of various power business flows.
[0006] In combination with the first aspect, in a first implementation of the first aspect, the transmission scheduling of the time-sensitive periodic message and the time-sensitive burst message is performed based on the comparison relationship between the next message sending time slot and the maximum transmission time slot, including: judging whether the next message sending time slot exceeds the maximum transmission time slot; when the next message sending time slot does not exceed the maximum transmission time slot, giving priority to transmitting the time-sensitive burst message; when the next message sending time slot exceeds the maximum transmission time slot, giving priority to transmitting the time-sensitive periodic message.
[0007] The message scheduling method for a time-sensitive network provided by an embodiment of the present invention can give priority to transmitting time-sensitive burst messages and postpone the transmission of time-sensitive periodic messages to the next time slot in order to ensure the real-time performance of time-sensitive burst messages when the next message transmission time slot does not reach the maximum transmission time slot, thereby meeting the transmission requirements of time-sensitive periodic messages and reducing the delay of time-sensitive burst messages. When the next message transmission time slot reaches the maximum transmission time slot, the time-sensitive periodic messages that cannot be postponed to the next time slot are preferentially transmitted to ensure the transmission requirements of time-sensitive periodic messages.
[0008] In combination with the first implementation manner of the first aspect, in the second implementation manner of the first aspect, the determination of whether the next message sending time slot reaches the maximum transmission time slot includes: obtaining the total frame length of the time-sensitive periodic message and the time-sensitive burst message; determining whether the total frame length exceeds the preset time slot total length; when the total frame length exceeds the preset time slot total length, determining whether the next message sending time slot exceeds the maximum transmission time slot.
[0009] In combination with the second implementation of the first aspect, in the third implementation of the first aspect, the method further includes: when the total frame length does not exceed the total length of the preset time slot, preferentially transmitting the time-sensitive burst message.
[0010] The message scheduling method for a time-sensitive network provided by an embodiment of the present invention obtains the total frame length of the time-sensitive periodic message and the time-sensitive burst message to compare the total frame length with the total length of the preset time slot when a transmission conflict occurs between the time-sensitive periodic message and the time-sensitive burst message. When the total frame length does not exceed the total length of the preset time slot, the time-sensitive burst message is arranged before the time-sensitive periodic message for transmission in the next message sending time slot; when the total frame length exceeds the total length of the preset time slot, it is further determined whether the maximum transmission time slot is reached in the next message sending time slot, so as to accurately schedule the time-sensitive periodic message and the time-sensitive burst message.
[0011] In combination with the first aspect, in a fourth implementation of the first aspect, the network parameters include multiple switching nodes corresponding to the network topology; determining the target transmission time slot of the time-sensitive periodic message at each switching node based on the network parameters includes: obtaining the head-end switching node, the end switching node, the initial minimum time slot value and the initial maximum time slot value corresponding to the time-sensitive periodic message; calculating the minimum transmission time slot of the time-sensitive periodic message at each switching node step by step from the head-end switching node to the end switching node based on the initial minimum time slot value; calculating the maximum transmission time slot of the time-sensitive periodic message at each switching node step by step from the end switching node to the head-end switching node based on the initial maximum time slot value; and determining the minimum transmission time slot and the maximum transmission time slot as the target transmission time slot.
[0012] The message scheduling method of the time-sensitive network provided by the embodiment of the present invention obtains the head-end switching node, the end switching node, the initial minimum time slot value and the initial maximum time slot value of the time-sensitive periodic message, and then calculates the minimum transmission time slot (i.e., the earliest transmittable time slot) of the time-sensitive periodic message in the port queue step by step from the head-end switching node direction, and calculates the maximum transmission time slot (i.e., the latest transmittable time slot) of the time-sensitive periodic message in the port queue step by step from the end node direction in the reverse direction. Thus, the switching nodes at all levels can accurately schedule the flow of the time-sensitive periodic message through the minimum transmission time slot and the maximum transmission time slot, and control the earliest transmission time slot of the time-sensitive periodic message to be not less than the minimum transmission time slot, and the latest transmission time slot is not greater than the maximum transmission time slot.
[0013] In combination with the fourth implementation manner of the first aspect, in the fifth implementation manner of the first aspect, the minimum transmission time slot of the time-sensitive periodic message at each switching node is calculated step by step based on the initial minimum time slot value in the direction from the head-end switching node to the end switching node, including: obtaining the mth switching node where the time-sensitive periodic message is located, wherein i is a positive integer greater than 0; determining whether the mth switching node is the head-end switching node for the time-sensitive periodic message to enter the time-sensitive network; when the mth switching node is not the head-end switching node for the time-sensitive periodic message to enter the time-sensitive network, obtaining the first time-sensitive periodic message to be allocated corresponding to the mth switching node; when the number of the first time-sensitive periodic messages to be allocated is greater than a first preset value, obtaining a first total frame length of multiple first time-sensitive periodic messages; when the first total frame length exceeds the preset total time slot length, obtaining a first transmission hop number corresponding to multiple first time-sensitive periodic messages; based on the sorting results of the multiple first transmission hop numbers, determining the minimum transmission time slot of each first time-sensitive periodic message at each switching node.
[0014] In combination with the fifth implementation of the first aspect, in the sixth implementation of the first aspect, the method also includes: when the mth switching node is the head-end switching node for the time-sensitive periodic message to enter the time-sensitive network, the initial minimum time slot value is determined as the minimum transmission time slot.
[0015] The message scheduling method for a time-sensitive network provided in an embodiment of the present invention determines the minimum transmission time slot by adopting different calculation methods according to the judgment result of whether the current switching node is a head-end switching node, so as to facilitate the accurate scheduling of time-sensitive periodic messages, and further facilitate the reasonable scheduling of the transmission order of the messages when a message transmission conflict occurs, thereby ensuring the transmission quality of multiple messages on the same network to the greatest extent.
[0016] In combination with the fifth implementation manner of the first aspect, in the seventh implementation manner of the first aspect, the maximum transmission time slot of the time-sensitive periodic message at each switching node is calculated based on the maximum time slot value of the latter switching node in the direction from the end switching node to the head-end switching node, including: determining whether the mth switching node is the end switching node for the time-sensitive periodic message to enter the time-sensitive network; when the mth switching node is not the end switching node for the time-sensitive periodic message to enter the time-sensitive network, obtaining the second time-sensitive periodic message to be allocated corresponding to the mth switching node; when the total frame length of the multiple second time-sensitive periodic messages to be allocated exceeds the total length of the preset time slot, obtaining the second transmission hop number corresponding to the multiple second time-sensitive periodic messages to be allocated; based on the sorting results of the multiple second transmission hop numbers, determining the maximum transmission time slot of the time-sensitive periodic message at each switching node.
[0017] In combination with the seventh implementation manner of the first aspect, in the eighth implementation manner of the first aspect, the method also includes: when the mth switching node is the end switching node for the time-sensitive periodic message to enter the time-sensitive network, obtaining the jitter value and minimum transmission time slot of the time-sensitive periodic message at the mth switching node; determining a smaller value from the sum of the initial maximum time slot value and the jitter value and the minimum transmission time slot; and determining the smaller value as the maximum transmission time slot.
[0018] The message scheduling method for a time-sensitive network provided in an embodiment of the present invention determines the maximum transmission time slot by adopting different calculation methods according to the judgment result of whether the current switching node is an end switching node, so as to facilitate the accurate scheduling of time-sensitive periodic messages, and further facilitate the reasonable scheduling of the transmission order of the messages when a message transmission conflict occurs, thereby ensuring the quality of the co-network transmission of multiple messages to the greatest extent.
[0019] According to the second aspect, an embodiment of the present invention provides a message scheduling device for a time-sensitive network, comprising: a first acquisition module, used to acquire network parameters of the time-sensitive network; a determination module, used to determine the target transmission time slot of the time-sensitive periodic message at each switching node based on the network parameters, the target transmission time slot including the maximum transmission time slot of the time-sensitive periodic message; a second acquisition module, used to acquire the next message sending time slot when there is a transmission conflict between the time-sensitive periodic message and the time-sensitive burst message at the switching node; a scheduling module, used to schedule the transmission of the time-sensitive periodic message and the time-sensitive burst message based on the comparison relationship between the next message sending time slot and the maximum transmission time slot.
[0020] According to the third aspect, an embodiment of the present invention provides an electronic device, comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the message scheduling method for a time-sensitive network described in the first aspect or any embodiment of the first aspect by executing the computer instructions.
[0021] According to a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the message scheduling method for a time-sensitive network described in the first aspect or any implementation scheme of the first aspect.
[0022] It should be noted that, for the corresponding beneficial effects of the message scheduling device, electronic device and computer-readable storage medium for a time-sensitive network provided by the embodiments of the present invention, please refer to the description of the corresponding contents in the message scheduling method for a time-sensitive network, which will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0024] Figure 1 is a flow chart of a method for scheduling messages in a time-sensitive network according to an embodiment of the present invention;
[0025] Figure 2 is another flow chart of a method for scheduling messages in a time-sensitive network according to an embodiment of the present invention;
[0026] Figure 3 is another flow chart of a method for scheduling messages in a time-sensitive network according to an embodiment of the present invention;
[0027] Figure 4 is a schematic diagram of message scheduling according to an embodiment of the present invention;
[0028] Figure 5 is a structural block diagram of a message scheduling device for a time-sensitive network according to an embodiment of the present invention;
[0029] Figure 6 It is a schematic diagram of the hardware structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0030] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0031] According to an embodiment of the present invention, an embodiment of a message scheduling method for a time-sensitive network is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0032] In this embodiment, a message scheduling method for a time-sensitive network is provided, which can be used for electronic devices at any switching node in a power grid topology, such as mobile phones, tablet computers, servers, etc. Figure 1 is a flow chart of a method for scheduling messages in a time-sensitive network according to an embodiment of the present invention. Figure 1 As shown, the process includes the following steps:
[0033] S11, obtaining network parameters of a time-sensitive network.
[0034] The network parameters are the parameters of the power field communication network. Specifically, the network parameters are the basic parameters set by the technicians when building a time-sensitive network for the power field. The network parameters may include the time slot Ts, the number of bytes that can be transmitted per time slot (i.e., the total length of the time slot), the delay requirement table of the time-sensitive periodic message (referred to as T D ), the jitter requirement table of time-sensitive periodic messages (denoted as T J ) and the number of transmission hops H, etc.
[0035] Among them, the delay requirement table is: in, T Dn is the nth time-sensitive periodicity (denoted as A N ) delay value; Ts is the time slot.
[0036] Among them, the jitter requirement table is: in, T Jn is the nth time-sensitive periodicity (denoted as A N ) jitter value; Ts is the time slot.
[0037] S12, determining a target transmission time slot of the time-sensitive periodic message at each switching node based on the network parameters, wherein the target transmission time slot includes a maximum transmission time slot of the time-sensitive periodic message.
[0038] The target transmission time slot is used to represent the minimum transmission time slot and maximum transmission time slot of the time-sensitive periodic message at the switching node. The minimum transmission time slot represents the earliest transmission time slot allowed for the time-sensitive periodic message at the current node, and the maximum transmission time slot represents the latest transmission time slot allowed for the time-sensitive periodic message at the current node.
[0039] According to the network parameters of the time-sensitive network, a message scheduling strategy can be constructed. The scheduling strategy consists of the target transmission time slots of each switching node, that is, (T nm-min , T nm-max ), where T nm-min and T nm-max They respectively represent the earliest transmittable time slot and the latest transmittable time slot of the time-sensitive periodic message An at the switching node m.
[0040] Specifically, according to the switching node at which the time-sensitive periodic message enters the time-sensitive network and its initial transmission time slot at the switching node, combined with the switching nodes at each level that the time-sensitive periodic message passes through during the transmission process from the first switching node to the last switching node, the earliest transmittable time slot and the latest transmittable time slot of the time-sensitive periodic message at each switching node are calculated step by step.
[0041] S13, when there is a transmission conflict between a time-sensitive periodic message and a time-sensitive burst message in the switching node, obtain a next message sending time slot.
[0042] Usually, the transmission of time-sensitive periodic messages is predictable, which is mainly generated by time-sensitive periodic power services (such as periodic sampling, etc.) and is transmitted periodically. Time-sensitive burst messages are unpredictable, which are mainly generated by time-sensitive burst power services (such as control, telesignaling, etc.), and have high requirements for delay, so it is necessary to ensure the shortest delay of time-sensitive burst messages to the greatest extent.
[0043] When multiple power services are on the same network, time-sensitive periodic messages and time-sensitive burst messages are mixed and transmitted. When there is a transmission conflict between time-sensitive periodic messages and time-sensitive burst messages, it is necessary to reasonably schedule time-sensitive periodic messages and time-sensitive burst messages to minimize the delay of time-sensitive burst messages while ensuring the delay and jitter requirements of time-sensitive periodic messages.
[0044] The next message sending time slot is the time slot when the current switching node accesses the next switching node. For example, the time slot value corresponding to the current switching node is 2. When the current switching node is connected to the port of the next switching node, its time slot value is 3, that is, the next message sending time slot corresponding to the current switching node is time slot 3. The current switching node transmits time-sensitive periodic messages and / or time-sensitive burst messages in time slot 3.
[0045] S14, based on the comparison relationship between the next message sending time slot and the maximum transmission time slot, the time-sensitive periodic message and the time-sensitive burst message are scheduled for transmission.
[0046] Since time-sensitive periodic messages are transmitted according to the target transmission time slot, when there is a message transmission conflict, the next message sending time slot can be compared with the maximum transmission time slot to determine whether the transmission of the time-sensitive periodic message in the next message sending time slot exceeds the maximum transmission time slot. If the next message sending time slot does not exceed the maximum transmission time slot, the time-sensitive burst message is transmitted first, and the time-sensitive periodic message is postponed to the next message sending time slot for transmission. In this way, the delay requirements of the time-sensitive periodic message can be guaranteed, and the delay of the time-sensitive burst message can be reduced. If the next message sending time slot exceeds the maximum transmission time slot, the time-sensitive periodic message cannot be postponed and is transmitted in the current time slot.
[0047] The message scheduling method for a time-sensitive network provided in this embodiment determines the target transmission time slot of the time-sensitive periodic message in the switching node through network parameters, so that the switching nodes at each level can schedule the time-sensitive periodic message according to the target transmission time slot. The calculation process of the target transmission time slot here has considered the conflict problem of the time-sensitive periodic message from the global perspective of the network, thereby ensuring that as long as each level of the switching node executes according to the target transmission time slot, the transmission delay and jitter of the time-sensitive periodic power service message will definitely meet the transmission requirements.
[0048] When there is a transmission conflict between time-sensitive periodic messages and time-sensitive burst messages, the next message sending time slot corresponding to the current switching node is obtained, and the transmission of time-sensitive periodic messages and time-sensitive burst messages is scheduled by comparing the next message sending time slot with the target transmission time slot. In this way, time-sensitive burst messages can be sent preferentially on the premise of satisfying the time-sensitive periodic messages, so as to meet the real-time nature of time-sensitive burst messages and minimize their transmission delay. This method achieves the shortest transmission delay of time-sensitive burst messages while meeting the transmission requirements of time-sensitive periodic messages, thereby realizing accurate traffic scheduling for time-sensitive periodic messages and time-sensitive burst messages, and ensuring the quality of shared network transmission of various power business flows.
[0049] In this embodiment, a message scheduling method for a time-sensitive network is provided, which can be used for electronic devices at any switching node in a power grid topology, such as mobile phones, tablet computers, servers, etc. Figure 2 is a flow chart of a method for scheduling messages in a time-sensitive network according to an embodiment of the present invention. Figure 2 As shown, the process includes the following steps:
[0050] S21, obtaining network parameters of a time-sensitive network. For detailed description, please refer to the relevant description of the above embodiment, which will not be repeated here.
[0051] S22, determining the target transmission time slot of the time-sensitive periodic message at each switching node based on the network parameters, wherein the target transmission time slot includes the maximum transmission time slot of the time-sensitive periodic message. For detailed description, please refer to the relevant description corresponding to the above embodiment, which will not be repeated here.
[0052] S23, when there is a transmission conflict between a time-sensitive periodic message and a time-sensitive burst message in the switching node, obtain the next message sending time slot. For detailed description, please refer to the relevant description of the above embodiment, which will not be repeated here.
[0053] S24, based on the comparison relationship between the next message sending time slot and the maximum transmission time slot, the time-sensitive periodic message and the time-sensitive burst message are scheduled for transmission.
[0054] Specifically, the maximum transmission time slot is the latest transmittable time slot allowed by the time-sensitive periodic message at the switching node.
[0055] Accordingly, the above step S24 may include:
[0056] S241, determine whether the next message sending time slot exceeds the maximum transmission time slot.
[0057] The transmission time slot of the time-sensitive periodic message cannot exceed the maximum transmission time slot. Here, the next message sending time slot is compared with the maximum transmission time slot to determine whether the next message sending time slot exceeds the maximum transmission time slot, so as to avoid abnormal transmission of the time-sensitive periodic message and affect the operation of the time-sensitive periodic power service. When the next message sending time slot does not exceed the maximum transmission time slot, step S242 is executed, otherwise step S243 is executed.
[0058] S242, prioritize transmission of time-sensitive burst messages.
[0059] When the next message sending time slot does not exceed the maximum transmission time slot, it means that the time-sensitive periodic message can be postponed to the next message sending time slot. At this time, in order to minimize the delay of the time-sensitive burst message, the time-sensitive burst message can be transmitted first in the current time slot, and the time-sensitive periodic message can be moved to the next message sending time slot.
[0060] S243, prioritize transmission of time-sensitive periodic messages.
[0061] When the next message sending time slot exceeds the maximum transmission time slot, it means that the current time slot has reached the maximum transmission time slot of the time-sensitive periodic message, that is, the time-sensitive periodic message cannot be postponed to the next message sending time slot. At this time, the time-sensitive periodic message can be controlled to take precedence over the time-sensitive burst message transmission, that is, the transmission order is: non-postponable time-sensitive periodic message 1, non-postponable time-sensitive periodic message 2, ..., time-sensitive burst message, postponeable time-sensitive periodic message 1, postponeable time-sensitive periodic message 2, ..., that is, under the guarantee of the delay and jitter requirements of the time-sensitive periodic message, the time-sensitive burst message is transmitted first.
[0062] Optionally, before executing step S241, the method further includes:
[0063] (1) Obtain the total frame length of the time-sensitive periodic message and the time-sensitive burst message.
[0064] The frame lengths of the time-sensitive periodic messages and time-sensitive burst messages entering the current switching node in each time slot are accumulated and calculated to obtain the total frame length, that is, the total number of transmitted bytes of each message.
[0065] (2) Determine whether the total frame length exceeds the preset total time slot length.
[0066] The preset total time slot length is determined according to the port of the pre-constructed communication network. For example, the total time slot length of each 100M port is set to 2500 bytes. The total frame length is compared with the preset total time slot length to determine whether the total frame length exceeds the preset total time slot length. When the total frame length exceeds the preset total time slot length, step (3) is further executed; when the total frame length does not exceed the preset total time slot length, step (4) is executed.
[0067] (3) Determine whether the next message sending slot exceeds the maximum transmission time slot.
[0068] The next message sending time slot is compared with the maximum transmission time slot to determine whether the next message sending time slot exceeds the maximum transmission time slot. Detailed descriptions refer to the above implementation manner, which will not be repeated here.
[0069] (4) Prioritize the transmission of time-sensitive burst messages.
[0070] When the total frame length does not exceed the preset total time slot length, the time-sensitive burst message is arranged before the time-sensitive periodic message in the next message sending slot for transmission, and the sending order is the time-sensitive burst message and the time-sensitive periodic message.
[0071] Assume that the time slot Ts of the time-sensitive network is 200us, the total time slot length B of the 100M port is (200us×100Mbit / s) / 8bit=2500, that is, the number of bytes that can be transmitted in the time slot of the 100M port is 2500. Figure 4 As shown in the figure, the frame length of the time-sensitive periodic message A1 is L1=1200, T D1 =1ms, T J1 =400us; frame length of time-sensitive periodic message A2 L2 = 200, T D2 =1.2ms, T J2 =600us; frame length of time-sensitive periodic message A3 L3 = 1200, T D3 =1ms, T J3 =800us.
[0072] The target transmission time slots of the time-sensitive periodic message A1, the time-sensitive periodic message A2 and the time-sensitive periodic message A3 in the switching node 3 are (3, 5), (4, 7) and (3, 4) respectively, that is, the earliest transmission time slot of the time-sensitive periodic message A1 in the switching node 3 is not less than T 1 3-min =3, the latest sending time slot is no greater than T 1 3-max =5; the earliest sending time slot of the time-sensitive periodic message A2 in the switching node 3 is not less than T 2 3-min =4, the latest sending time slot is no greater than T 2 3-max =7; the earliest sending time slot of time-sensitive periodic message A3 in switching node 3 is not less than T 3 3-min =3, the latest sending time slot is no greater than T 3 3-max =4.
[0073] Assume that time-sensitive burst messages B1, B2, and B3 with total frame lengths of 500, 1200, and 1500 enter switching node 3 at time slots 2, 3, and 4, respectively, and need to be transmitted to switching node 4, and switching node 3 is connected to the port of switching node 4. The message scheduling method of the time-sensitive network described above is as follows:
[0074] Total frame length of the message in time slot 3 = L1 + L3 + L B1 =1200+1200+500=2900>B, so the deferrable time-sensitive periodic message A1 is put into time slot 4, and time slot 3 transmits the time-sensitive burst message B1 and the time-sensitive periodic message A3;
[0075] Total frame length of the message in time slot 4 = L1 + L2 + L B2 =1200+200+1200=2600>B, at this time, the deferrable time-sensitive periodic message A1 is placed in time slot 5, so time slot 4 can transmit the time-sensitive burst message B2. Since the available bandwidth is insufficient to transmit the time-sensitive periodic message A1, the time-sensitive periodic message A2 can only be transmitted first, and the deferrable time-sensitive periodic message A1 is placed in time slot 5;
[0076] Total frame length of messages in time slot 5 = L1 + L B3 =1200+1500=2700>B, at this time, the time-sensitive periodic message A1 can no longer be postponed, so time slot 5 needs to transmit the time-sensitive periodic message A1, and postpone the time-sensitive burst message B2 to time slot 6 for transmission.
[0077] By executing the above steps, when a transmission conflict occurs between a time-sensitive periodic message and a time-sensitive burst message, the total frame length of the time-sensitive periodic message and the time-sensitive burst message is obtained to compare the total frame length with the total length of the preset time slot. When the total frame length does not exceed the total length of the preset time slot, the time-sensitive burst message is arranged before the time-sensitive periodic message for transmission in the next message sending time slot; when the total frame length exceeds the total length of the preset time slot, it is further determined whether the maximum transmission time slot is reached in the next message sending time slot, so as to accurately schedule the time-sensitive periodic message and the time-sensitive burst message.
[0078] The message scheduling method for a time-sensitive network provided in this embodiment can give priority to transmitting time-sensitive burst messages and postpone the transmission of time-sensitive periodic messages to the next time slot to ensure the real-time performance of time-sensitive burst messages when the next message transmission time slot does not reach the maximum transmission time slot, thereby meeting the transmission requirements of time-sensitive periodic messages and reducing the delay of time-sensitive burst messages. When the next message transmission time slot reaches the maximum transmission time slot, time-sensitive periodic messages that cannot be postponed to the next time slot are preferentially transmitted to ensure the transmission requirements of time-sensitive periodic messages.
[0079] In this embodiment, a message scheduling method for a time-sensitive network is provided, which can be used for electronic devices at any switching node in a power grid topology, such as mobile phones, tablet computers, servers, etc. Figure 3 is a flow chart of a method for scheduling messages in a time-sensitive network according to an embodiment of the present invention. Figure 3 As shown, the process includes the following steps:
[0080] S31, obtaining network parameters of a time-sensitive network. For detailed description, please refer to the relevant description of the above embodiment, which will not be repeated here.
[0081] S32, determining a target transmission time slot of the time-sensitive periodic message at each switching node based on the network parameters, wherein the target transmission time slot includes a maximum transmission time slot of the time-sensitive periodic message.
[0082] Specifically, the network parameters include a plurality of switching nodes corresponding to the network topology, and the time-sensitive periodic messages are scheduled for transmission through each switching node.
[0083] Accordingly, the above step S32 may include:
[0084] S321, obtaining a head-end switching node, a terminal switching node, an initial minimum time slot value, and an initial maximum time slot value corresponding to the time-sensitive periodic message.
[0085] The head-end switching node is the first switching node for a time-sensitive periodic message to enter the time-sensitive network; the terminal switching node is the last switching node for a time-sensitive periodic message in the time-sensitive network; the initial minimum time slot value is the earliest transmission time slot value of the time-sensitive periodic message at the head-end switching node; the initial maximum time slot value is the latest transmission time slot value of the time-sensitive periodic message at the terminal switching node.
[0086] Assume that the first-end switching node of the time-sensitive periodic message An entering the time-sensitive network is switching node i, and the terminal switching node is switching node j, then the initial minimum time slot value T ni-min The time slot value for time-sensitive periodic messages entering the time-sensitive network is increased by 1; the initial maximum time slot value T nj-max is the delay value D of the time-sensitive periodic message An Add the initial minimum time slot value T ni-min Subtract 1, which is T nj-max =D An +T ni-min -1.
[0087] Based on the above embodiments, it can be seen that: Among them, T Dn is the delay value of the nth time-sensitive periodic message; T Jn is the jitter value of the nth time-sensitive periodic message; Ts is the time slot.
[0088] by Figure 4 For example, the time slot is 200us, and the frame length L1 of the time-sensitive periodic message 1 is 1200, T D1 =1ms, T J1 =400us, the frame length L2 corresponding to the time-sensitive periodic message 2 is L2=200, T D2 =1.2ms, T J2 = 600us, the frame length of time-sensitive periodic message 3 corresponding to L3 = 1200, T D3=1ms, T J3 =800us. Based on the above calculation formula, we can know that: D A1 =5, J A1 =2,D A2 =6, J A2 =3,D A3 =5, J A3 =4.
[0089] The first-end switching node of the time-sensitive periodic message A1 entering the time-sensitive network is switching node 1, and the terminal switching node is switching node 4. The entry time slot value is 1, then the initial minimum time slot value T corresponding to the time-sensitive periodic message A1 can be determined. 1 1-min =2, initial maximum time slot value T 1 4-max =6.
[0090] The first-end switching node of the time-sensitive periodic message A2 entering the time-sensitive network is switching node 3, and the terminal switching node is switching node 4. The entry time slot value is 2. Then, the initial minimum time slot value T corresponding to the time-sensitive periodic message A2 can be determined. 2 3-min =3, initial maximum time slot value T 2 4-max =8.
[0091] The first-end switching node of the time-sensitive periodic message A3 entering the time-sensitive network is switching node 2, and the terminal switching node is switching node 5. The entry time slot value is 1, then the initial minimum time slot value T corresponding to the time-sensitive periodic message A3 can be determined. 3 2-min =2, initial maximum time slot value T 3 5-max =6.
[0092] S322 , in the direction from the head-end switching node to the end switching node, the minimum transmission time slot of the time-sensitive periodic message in each switching node is calculated step by step based on the initial minimum time slot value.
[0093] Calculate the minimum transmission time slot (i.e. the earliest transmittable time slot) T of the time-sensitive periodic message in the port queue step by step from the head-end switching node direction nm-min =T ni-min +1, where T ni-min It is the earliest transmittable time slot in the previous switching node that the time-sensitive periodic message An passes through. For the second switching node, its minimum transmission time slot is the initial minimum time slot value + 1; for the third switching node, its minimum transmission time slot is the minimum transmission time slot of the second switching node + 1, and so on, the minimum transmission time slot of each switching node can be obtained.
[0094] Specifically, the above step S322 may include:
[0095] (1) Obtain the mth switching node where the time-sensitive periodic message is located, where m is a positive integer greater than 0.
[0096] The mth switching node is the switching node that the time-sensitive periodic message passes through after entering the time-sensitive network.
[0097] (2) Determine whether the mth switching node is the head-end switching node for the time-sensitive periodic message to enter the time-sensitive network.
[0098] The mth switching node is compared with the head-end switching node corresponding to the time-sensitive periodic message to determine whether the mth switching node is the same as the head-end switching node. When the mth switching node is the same as the head-end switching node, it indicates that the mth switching node is the head-end switching node for the time-sensitive periodic message to enter the time-sensitive network, and steps (3) to (6) are performed. When the mth switching node is not the same as the head-end switching node, it indicates that the mth switching node is not the head-end switching node for the time-sensitive periodic message to enter the time-sensitive network, and step (7) is performed.
[0099] (3) When the mth switching node is not the head-end switching node of the time-sensitive network for the time-sensitive periodic message to enter, the first time-sensitive periodic message to be allocated corresponding to the mth switching node is obtained.
[0100] The first time-sensitive periodic message is a message that needs to be transmitted through the mth switching node in the current time slot. When the mth switching node is not the head-end switching node of the time-sensitive periodic message entering the time-sensitive network, the number of first time-sensitive periodic messages that need to be allocated and sent by the mth switching node in the current time slot is determined.
[0101] (4) When the number of first time-sensitive periodic messages to be allocated is greater than a first preset value, a first total frame length of the plurality of first time-sensitive periodic messages is obtained.
[0102] The first preset value is the number of time-sensitive periodic messages required to be allocated in the current time slot. The first preset value may be 1, which is used to determine whether there are multiple time-sensitive periodic messages required to be allocated in the current time slot. When the number of first time-sensitive periodic messages to be allocated is greater than the first preset value, that is, there are multiple time-sensitive periodic messages required to be allocated in the current time slot, the frame lengths of the multiple first time-sensitive periodic messages are accumulated to obtain a first total frame length.
[0103] (5) When the first total frame length exceeds the preset total time slot length, obtain a first transmission hop number corresponding to multiple first time-sensitive periodic messages.
[0104] The preset total time slot length is the number of bytes that can be transmitted in each preset time slot. The first transmission hop number is the difference between the total transmission hop number Hn of the time-sensitive periodic message and the transmission hop number to reach the current switching node, ie, Hn-Hnm.
[0105] In order to further determine whether the current time slot can transmit all the messages to be allocated, it is necessary to compare the first total frame length with the total length of the preset time slot to determine the size relationship between the first total frame length and the total length of the preset time slot. When the first total frame length exceeds the total length of the preset time slot, it means that the current time slot cannot complete the transmission of all time-sensitive periodic messages. At this time, the transmission of each time-sensitive periodic message is sorted based on the first-in-first-out principle. That is, the first transmission hop number of each first time-sensitive periodic message to reach the current switching node is obtained, and multiple first transmission hop numbers are sorted.
[0106] (6) Based on the sorting results of the multiple first transmission hop numbers, determine the minimum transmission time slot of each first time-sensitive periodic message in each switching node.
[0107] According to the sorting result of the first transmission hop number, the time-sensitive periodic message with the smallest first transmission hop number is determined, and the time-sensitive periodic message is moved to the next message sending time slot for transmission, that is, its minimum transmission time slot T is updated. nm-min T nm-min +1.
[0108] (7) When the mth switching node is the head-end switching node of a time-sensitive periodic message entering the time-sensitive network, the initial minimum time slot value is determined as the minimum transmission time slot.
[0109] When the mth switching node is the head-end switching node of a time-sensitive periodic message entering the time-sensitive network, then T nm-min The value of is the initial minimum time slot value determined in the above step S321, that is, the time slot value at which the time-sensitive periodic message An first enters the time-sensitive network plus 1.
[0110] by Figure 4 For example, the preset total time slot length B is 2500; the total transmission hop number of the time-sensitive periodic message A1 is 3, and the transmission hop numbers to reach the switching nodes 1, 3, and 4 are 1, 2, and 3 respectively; the total transmission hop number of the time-sensitive periodic message A2 is 2, and the transmission hop numbers to reach the switching nodes 3 and 4 are 1 and 2 respectively; the total transmission hop number of the time-sensitive periodic message A3 is 4, and the transmission hop numbers to reach the switching nodes 2, 3, 4, and 5 are 1, 2, 3, and 4 respectively.
[0111] Taking switching node 3 as an example, before calculating switching node 3, we must first calculate the previous level switching nodes 1 and 2; first calculate switching node 1: T 1 1-min =2; then calculate the switching node 2: T3 2-min =2; then calculate the switching node 3: T 1 3-min =T 1 1-min +1=3,T 2 3-min =3, T 3 3-min =T 3 2-min +1=3. At this time, in the port of switching node 3 connected to switching node 4, the total frame length of the time-sensitive periodic message in time slot 3 = L1+L2+L3=1200+1200+200>B. The time-sensitive periodic messages A1, A2, and A3 are sorted according to the number of transmission hops, and the sorting results A3, A1, and A2 can be obtained. A2 is placed in the next message sending time slot, that is, T is updated. 2 3-min =3+1=4; then calculate the switching node 4: T 1 4-min =T 1 3-min +1=4,T 2 4-min =T 23-min +1=5,T 3 4-min =T 3 3-min +1=4; finally calculate the exchange node 5: T 3 5-min =T 3 4-min +1=5.
[0112] According to the judgment result of whether the current switching node is the head-end switching node, different calculation methods are used to determine the minimum transmission time slot, so that when a message transmission conflict occurs, the transmission order of the message can be reasonably scheduled, and the accurate scheduling of multiple messages can be guaranteed to the greatest extent, ensuring the quality of shared network transmission.
[0113] S323 , in the direction from the end switching node to the head switching node, the maximum transmission time slot of the time-sensitive periodic message in each switching node is calculated step by step based on the initial maximum time slot value.
[0114] Calculate the maximum transmission time slot (i.e. the latest transmittable time slot) T of the time-sensitive periodic message in the port queue in reverse order from the end node direction nm-max =T nj-max -1, where T ni-max is the latest transmittable time slot of the time-sensitive periodic message An in the next switching node. For the second-to-last switching node, its maximum transmission time slot is the initial maximum time slot value - 1; for the third-to-last switching node, its maximum transmission time slot is the maximum transmission time slot of the second-to-last switching node - 1, and so on, the maximum transmission time slot of each switching node can be obtained.
[0115] Specifically, the above step S323 may include:
[0116] (1) Determine whether the mth switching node is the terminal switching node where the time-sensitive periodic message enters the time-sensitive network.
[0117] The mth switching node is compared with the terminal switching node corresponding to the time-sensitive periodic message to determine whether the mth switching node is the same as the terminal switching node. When the mth switching node is not the same as the terminal switching node, it means that the mth switching node is not the terminal switching node for the time-sensitive periodic message to enter the time-sensitive network, and steps (2) to (5) are executed; otherwise, steps (6) to (7) are executed.
[0118] (2) When the mth switching node is not the terminal switching node of the time-sensitive periodic message entering the time-sensitive network, a second time-sensitive periodic message to be allocated corresponding to the mth switching node is obtained.
[0119] The second time-sensitive periodic message is a message transmitted via the mth switching node in the current time slot. When the mth switching node is not the terminal switching node of the time-sensitive periodic message entering the time-sensitive network, the number of second time-sensitive periodic messages passing through the mth switching node in the current time slot is determined.
[0120] (3) When the number of second time-sensitive periodic messages to be allocated is greater than a second preset value, a second total frame length of the plurality of second time-sensitive periodic messages is obtained.
[0121] The second preset value is the number of time-sensitive periodic messages allocated to the current time slot. The second preset value may be 1, which is used to determine whether there are multiple time-sensitive periodic messages allocated to the current time slot. When the number of second time-sensitive periodic messages to be allocated is greater than the second preset value, that is, there are multiple time-sensitive periodic messages allocated to the current time slot, the frame lengths of the multiple second time-sensitive periodic messages are accumulated to obtain a second total frame length.
[0122] (4) When the second total frame length exceeds the preset total time slot length, obtain a second transmission hop number corresponding to multiple second time-sensitive periodic messages.
[0123] The preset total time slot length is the number of bytes that can be transmitted in each preset time slot. The second transmission hop number is the difference between the total transmission hop number Hn of the time-sensitive periodic message and the transmission hop number to reach the current switching node, ie, Hn-Hnm.
[0124] The second total frame length is compared with the preset total length of the time slot. When the first total frame length exceeds the preset total length of the time slot, it indicates that the current time slot cannot complete the transmission of all time-sensitive periodic messages. At this time, the second transmission hop count of each second time-sensitive periodic message to reach the current switching node is obtained, and the multiple second transmission hop counts are sorted.
[0125] (5) Based on the sorting results of the multiple second transmission hop numbers, determine the maximum transmission time slot of each second time-sensitive periodic message in each switching node.
[0126] According to the sorting result of the second transmission hop number, the time-sensitive periodic message with the smallest second transmission hop number is determined, and the time-sensitive periodic message is moved to the previous message sending time slot for transmission, that is, its maximum transmission time slot T is updated. nm-max T nm-max -1.
[0127] (6) When the mth switching node is the terminal switching node of the time-sensitive periodic message entering the time-sensitive network, the jitter value and the minimum transmission time slot of the time-sensitive periodic message at the mth switching node are obtained.
[0128] Jitter value of time-sensitive periodic message at the mth switching node Among them, T Jn is the nth time-sensitive periodicity A N The jitter value of Ts is the time slot. The minimum transmission time slot is obtained based on the method described in step S322 above.
[0129] (7) A smaller value is determined from the sum of the initial maximum time slot value and the jitter value and the minimum transmission time slot, and the smaller value is determined as the maximum transmission time slot.
[0130] The sum of the jitter value and the minimum transmission time slot is J An +T nm-min , the initial maximum time slot value is T nj-max . nj-max With J An +T nm-min Compare and determine the smaller value, and determine the smaller value as the maximum transmission time slot, that is, the maximum transmission time slot = min (J An +T nm-min , T nj-max )
[0131] According to the judgment result of whether the current switching node is the terminal switching node, different calculation methods are used to determine the maximum transmission time slot, so that when a message transmission conflict occurs, the transmission order of the message can be reasonably scheduled, and the accurate scheduling of multiple messages can be guaranteed to the greatest extent, ensuring the quality of shared network transmission.
[0132] S324, determining the minimum transmission time slot and the maximum transmission time slot as target transmission time slots.
[0133] The minimum transmission time slot and the maximum transmission time slot (T nm-min , T nm-max ) is sent to the corresponding switching node m, the (T nm-min , T nm-max) is the target transmission time slot of the time-sensitive periodic message in the switching node m. Specifically, in the switching node m, the time-sensitive periodic message An is transmitted according to the earliest transmission time slot not less than T nm-min , the latest sending time slot is no greater than T nm-max to transfer.
[0134] S33, when there is a transmission conflict between a time-sensitive periodic message and a time-sensitive burst message in the switching node, obtain the next message sending time slot. For detailed description, please refer to the relevant description of the above embodiment, which will not be repeated here.
[0135] S34, based on the comparison relationship between the next message sending time slot and the target transmission time slot, the time-sensitive periodic message and the time-sensitive burst message are scheduled for transmission. Detailed descriptions refer to the corresponding descriptions of the above embodiments, which will not be repeated here.
[0136] The message scheduling method for a time-sensitive network provided in this embodiment obtains the head-end switching node, the end switching node, the initial minimum time slot value and the initial maximum time slot value of the time-sensitive periodic message, and then calculates the minimum transmission time slot (i.e., the earliest transmittable time slot) of the time-sensitive periodic message in the port queue step by step from the head-end switching node direction, and calculates the maximum transmission time slot (i.e., the latest transmittable time slot) of the time-sensitive periodic message in the port queue step by step from the end node direction in the reverse direction. Thus, the switching nodes at all levels can accurately schedule the flow of the time-sensitive periodic message through the minimum transmission time slot and the maximum transmission time slot, and control the earliest transmission time slot of the time-sensitive periodic message to be not less than the minimum transmission time slot, and the latest transmission time slot to be not greater than the maximum transmission time slot.
[0137] In this embodiment, a message scheduling device for a time-sensitive network is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware for a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0138] This embodiment provides a message scheduling device for a time-sensitive network, such as Figure 5 As shown, including:
[0139] The first acquisition module 41 is used to acquire network parameters of a time sensitive network.
[0140] The determination module 42 is used to determine the target transmission time slot of the time-sensitive periodic message in each switching node based on the network parameters, wherein the target transmission time slot includes the maximum transmission time slot of the time-sensitive periodic message.
[0141] The second acquisition module 43 is used to acquire the next message sending time slot when there is a transmission conflict between a time-sensitive periodic message and a time-sensitive burst message in the switching node.
[0142] The scheduling module 44 is used to schedule the transmission of the time-sensitive periodic message and the time-sensitive burst message based on the comparison relationship between the next message sending time slot and the target transmission time slot.
[0143] Specifically, the maximum transmission time slot is the latest transmittable time slot allowed by the time-sensitive periodic message at the switching node. Accordingly, the scheduling module 44 may include:
[0144] The first judgment submodule is used to judge whether the next message sending time slot exceeds the maximum transmission time slot.
[0145] The transmission submodule is used to give priority to transmitting time-sensitive burst messages when the next message sending time slot does not exceed the maximum transmission time slot; when the next message sending time slot exceeds the maximum transmission time slot, give priority to transmitting time-sensitive periodic messages.
[0146] Optionally, the above-mentioned scheduling module 44 is also specifically used to: obtain the total frame length of time-sensitive periodic messages and time-sensitive burst messages; determine whether the total frame length exceeds the preset total length of the time slot; when the total frame length exceeds the preset total length of the time slot, determine whether the next message sending slot reaches the maximum transmission time slot; when the total frame length does not exceed the preset total length of the time slot, give priority to transmitting time-sensitive burst messages.
[0147] Specifically, the network parameters include multiple switching nodes corresponding to the network topology, and the time-sensitive periodic messages are scheduled for transmission through each switching node. Accordingly, the above-mentioned determination module 42 may include:
[0148] The acquisition submodule is used to acquire the head-end switching node, the end switching node, the initial minimum time slot value and the initial maximum time slot value corresponding to the time-sensitive periodic message.
[0149] The first calculation submodule is used to calculate the minimum transmission time slot of the time-sensitive periodic message in each switching node step by step based on the initial minimum time slot value in the direction from the head-end switching node to the end switching node.
[0150] The second calculation submodule is used to calculate the maximum transmission time slot of the time-sensitive periodic message in each switching node step by step according to the direction from the end switching node to the head switching node based on the initial maximum time slot value.
[0151] The determination submodule is used to determine the minimum transmission time slot and the maximum transmission time slot as the target transmission time slot.
[0152] Optionally, the above-mentioned first calculation submodule is specifically used to: obtain the mth switching node where the time-sensitive periodic message is located, where m is a positive integer greater than 0; determine whether the mth switching node is the head-end switching node for the time-sensitive periodic message to enter the time-sensitive network; when the mth switching node is not the head-end switching node for the time-sensitive periodic message to enter the time-sensitive network, obtain the first time-sensitive periodic message to be allocated corresponding to the mth switching node; when the number of first time-sensitive periodic messages to be allocated is greater than a first preset value, obtain a first total frame length of multiple first time-sensitive periodic messages; when the first total frame length exceeds the preset total time slot length, obtain a first transmission hop number corresponding to multiple first time-sensitive periodic messages; based on the sorting results of multiple first transmission hop numbers, determine the minimum transmission time slot of each first time-sensitive periodic message in each switching node; when the mth switching node is the head-end switching node for the time-sensitive periodic message to enter the time-sensitive network, determine the initial minimum time slot value as the minimum transmission time slot.
[0153] Optionally, the above-mentioned second calculation submodule is specifically used to: determine whether the mth switching node is the end switching node for the time-sensitive periodic message to enter the time-sensitive network; when the mth switching node is not the end switching node for the time-sensitive periodic message to enter the time-sensitive network, obtain the second time-sensitive periodic message to be allocated corresponding to the mth switching node; when the number of second time-sensitive periodic messages to be allocated is greater than the second preset value, obtain the second total frame length of multiple second time-sensitive periodic messages; when the second total frame length exceeds the preset total time slot length, obtain the second transmission hop number corresponding to the multiple second time-sensitive periodic messages; based on the sorting results of the multiple second transmission hop numbers, determine the maximum transmission time slot of each second time-sensitive periodic message at each switching node; when the mth switching node is the end switching node for the time-sensitive periodic message to enter the time-sensitive network, obtain the jitter value and the minimum transmission time slot of the time-sensitive periodic message at the mth switching node; determine the smaller value from the sum of the initial maximum time slot value and the jitter value and the minimum transmission time slot, and determine the smaller value as the maximum transmission time slot.
[0154] The message scheduling device of the time-sensitive network in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.
[0155] The further functional description of each of the above modules is the same as that of the above corresponding embodiments and will not be repeated here.
[0156] The message scheduling device for the time-sensitive network provided in this embodiment is capable of scheduling time-sensitive periodic messages at each level of switching nodes according to target transmission time slots. When there is a transmission conflict between time-sensitive periodic messages and time-sensitive burst messages, the time-sensitive burst messages can be sent preferentially on the premise that the time-sensitive periodic messages are satisfied, so as to meet the real-time nature of the time-sensitive burst messages and minimize their transmission delay, thereby achieving precise traffic scheduling for time-sensitive periodic messages and time-sensitive burst messages and ensuring the quality of shared network transmission of various power business flows.
[0157] The embodiment of the present invention also provides an electronic device having the above Figure 5 A message scheduling device for a time-sensitive network is shown.
[0158] See also Figure 6 , Figure 6 is a schematic diagram of the structure of an electronic device provided by an optional embodiment of the present invention, such as Figure 6 As shown, the electronic device may include: at least one processor 501, such as a central processing unit (CPU), at least one communication interface 503, a memory 504, and at least one communication bus 502. The communication bus 502 is used to realize the connection and communication between these components. The communication interface 503 may include a display screen (Display) and a keyboard (Keyboard), and the optional communication interface 503 may also include a standard wired interface and a wireless interface. The memory 504 may be a high-speed volatile random access memory (Random Access Memory, RAM) or a non-volatile memory (non-volatile memory), such as at least one disk storage. The memory 504 may optionally be at least one storage device located away from the aforementioned processor 501. The processor 501 may be combined with Figure 5 In the described device, the memory 504 stores an application program, and the processor 501 calls the program code stored in the memory 504 to execute any of the above method steps.
[0159] The communication bus 502 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus. The communication bus 502 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 6 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0160] Among them, the memory 504 may include a volatile memory (volatile memory), such as a random-access memory (RAM); the memory may also include a non-volatile memory (non-volatile memory), such as a flash memory (flash memory), a hard disk drive (HDD) or a solid-state drive (SSD); the memory 504 may also include a combination of the above types of memory.
[0161] The processor 501 may be a central processing unit (CPU), a network processor (NP), or a combination of a CPU and a NP.
[0162] The processor 501 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD) or a combination thereof. The PLD may be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL) or any combination thereof.
[0163] Optionally, the memory 504 is also used to store program instructions. The processor 501 can call the program instructions to implement the present application Figure 1 and 3 The message scheduling method of the time-sensitive network shown in the embodiment.
[0164] The embodiment of the present invention also provides a non-transitory computer storage medium, which stores computer executable instructions, and the computer executable instructions can execute the message scheduling method for the time-sensitive network in any of the above method embodiments. Among them, the storage medium can be a disk, an optical disk, a read-only memory (ROM), a random access memory (RAM), a flash memory (Flash Memory), a hard disk (HDD) or a solid-state drive (SSD), etc.; the storage medium can also include a combination of the above types of memory.
[0165] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the appended claims.
Claims
1. A message scheduling method for a time-sensitive network, characterized in that: include: Get network parameters of time-sensitive network; Determine a target transmission time slot of a time-sensitive periodic message at each switching node based on the network parameters, wherein the target transmission time slot includes a maximum transmission time slot of the time-sensitive periodic message, and the network parameters include a plurality of switching nodes corresponding to the network topology; When there is a transmission conflict between the time-sensitive periodic message and the time-sensitive burst message at the switching node, obtaining the next message sending time slot; Based on the comparison relationship between the next message sending time slot and the maximum transmission time slot, the time-sensitive periodic message and the time-sensitive burst message are scheduled for transmission; The step of determining a target transmission time slot of a time-sensitive periodic message at each switching node based on the network parameters includes: Obtaining a head-end switching node, a terminal switching node, an initial minimum time slot value, and an initial maximum time slot value corresponding to the time-sensitive periodic message; According to the direction from the head-end switching node to the end switching node, the minimum transmission time slot of the time-sensitive periodic message in each switching node is calculated step by step based on the initial minimum time slot value; According to the direction from the end switching node to the head-end switching node, the maximum transmission time slot of the time-sensitive periodic message in each switching node is calculated step by step based on the initial maximum time slot value; Determine the minimum transmission time slot and the maximum transmission time slot as the target transmission time slot; The performing transmission scheduling for the time-sensitive periodic message and the time-sensitive burst message based on the comparison relationship between the next message sending time slot and the maximum transmission time slot includes: Determining whether the next message sending time slot exceeds the maximum transmission time slot; When the next message sending time slot does not exceed the maximum transmission time slot, the time-sensitive burst message is preferentially transmitted; When the next message sending time slot exceeds the maximum transmission time slot, the time-sensitive periodic message is preferentially transmitted; The determining whether the next message sending time slot reaches the maximum transmission time slot includes: Obtaining a total frame length of the time-sensitive periodic message and the time-sensitive burst message; Determining whether the total frame length exceeds the preset total time slot length; When the total frame length exceeds the total length of the preset time slot, determining whether the next message sending time slot exceeds the maximum transmission time slot; When the total frame length does not exceed the total length of the preset time slot, the time-sensitive burst message is transmitted preferentially.
2. The method according to claim 1, characterized in that The step of calculating the minimum transmission time slot of the time-sensitive periodic message at each switching node based on the initial minimum time slot value in a direction from the head-end switching node to the terminal switching node includes: Obtaining the mth switching node where the time-sensitive periodic message is located, where m is a positive integer greater than 0; Determining whether the mth switching node is a head-end switching node for the time-sensitive periodic message to enter the time-sensitive network; When the mth switching node is not the head-end switching node of the time-sensitive periodic message entering the time-sensitive network, obtaining the first time-sensitive periodic message to be allocated corresponding to the mth switching node; When the number of the first time-sensitive periodic messages to be allocated is greater than a first preset value, obtaining a first total frame length of a plurality of the first time-sensitive periodic messages; When the first total frame length exceeds the preset total time slot length, obtaining a first transmission hop number corresponding to a plurality of the first time-sensitive periodic messages; Based on the sorting results of the plurality of first transmission hop numbers, the minimum transmission time slot of each first time-sensitive periodic message in each switching node is determined.
3. The method according to claim 2, characterized in that Also includes: When the mth switching node is the head-end switching node of the time-sensitive periodic message entering the time-sensitive network, the initial minimum time slot value is determined as the minimum transmission time slot.
4. The method according to claim 2, characterized in that: The step of calculating the maximum transmission time slot of the time-sensitive periodic message at each switching node step by step based on the initial maximum time slot value in the direction from the terminal switching node to the head-end switching node includes: Determining whether the mth switching node is an end switching node for the time-sensitive periodic message to enter the time-sensitive network; When the mth switching node is not the terminal switching node of the time-sensitive periodic message entering the time-sensitive network, obtaining a second time-sensitive periodic message to be allocated corresponding to the mth switching node; When the number of the second time-sensitive periodic messages to be allocated is greater than a second preset value, obtaining a second total frame length of a plurality of the second time-sensitive periodic messages; When the second total frame length exceeds the preset total time slot length, obtaining a second transmission hop number corresponding to a plurality of the second time-sensitive periodic messages; Based on the sorting results of the plurality of second transmission hop numbers, a maximum transmission time slot of each second time-sensitive periodic message in each switching node is determined.
5. The method according to claim 4, characterized in that Also includes: When the mth switching node is the terminal switching node of the time-sensitive periodic message entering the time-sensitive network, obtaining the jitter value and the minimum transmission time slot of the time-sensitive periodic message at the mth switching node; Determine a smaller value from the initial maximum time slot value and the sum of the jitter value and the minimum transmission time slot; The smaller value is determined as the maximum transmission time slot.
6. A message scheduling device for a time-sensitive network, characterized in that: include: A first acquisition module, used to acquire network parameters of a time-sensitive network; A determination module, configured to determine a target transmission time slot of a time-sensitive periodic message at each switching node based on the network parameters, wherein the target transmission time slot includes a maximum transmission time slot of the time-sensitive periodic message, and the network parameters include a plurality of switching nodes corresponding to a network topology; A second acquisition module, configured to acquire a next message sending time slot when there is a transmission conflict between the time-sensitive periodic message and the time-sensitive burst message on the switching node; A scheduling module, configured to schedule the transmission of the time-sensitive periodic message and the time-sensitive burst message based on a comparison relationship between the next message sending time slot and the maximum transmission time slot; Wherein, the determination module is used for: Obtaining a head-end switching node, a terminal switching node, an initial minimum time slot value, and an initial maximum time slot value corresponding to the time-sensitive periodic message; According to the direction from the head-end switching node to the end switching node, the minimum transmission time slot of the time-sensitive periodic message in each switching node is calculated step by step based on the initial minimum time slot value; According to the direction from the end switching node to the head-end switching node, the maximum transmission time slot of the time-sensitive periodic message in each switching node is calculated step by step based on the initial maximum time slot value; Determine the minimum transmission time slot and the maximum transmission time slot as the target transmission time slot; The scheduling module is used to: Determining whether the next message sending time slot exceeds the maximum transmission time slot; When the next message sending time slot does not exceed the maximum transmission time slot, the time-sensitive burst message is preferentially transmitted; When the next message sending time slot exceeds the maximum transmission time slot, the time-sensitive periodic message is preferentially transmitted; The scheduling module is specifically used for: Obtaining a total frame length of the time-sensitive periodic message and the time-sensitive burst message; Determining whether the total frame length exceeds the preset total time slot length; When the total frame length exceeds the total length of the preset time slot, determining whether the next message sending time slot exceeds the maximum transmission time slot; When the total frame length does not exceed the total length of the preset time slot, the time-sensitive burst message is transmitted preferentially.
7. An electronic device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the message scheduling method for a time-sensitive network as described in any one of claims 1-5 by executing the computer instructions.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the message scheduling method for a time-sensitive network according to any one of claims 1 to 5.
