CN115604197A - Message scheduling method, device, equipment and storage medium of time-sensitive network - Google Patents
Message scheduling method, device, equipment and storage medium of time-sensitive network Download PDFInfo
- Publication number
- CN115604197A CN115604197A CN202211221234.XA CN202211221234A CN115604197A CN 115604197 A CN115604197 A CN 115604197A CN 202211221234 A CN202211221234 A CN 202211221234A CN 115604197 A CN115604197 A CN 115604197A
- Authority
- CN
- China
- Prior art keywords
- time
- sensitive
- message
- switching node
- time slot
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 56
- 230000005540 biological transmission Effects 0.000 claims abstract description 320
- 230000000737 periodic effect Effects 0.000 claims abstract description 309
- 230000015654 memory Effects 0.000 claims description 31
- 235000008694 Humulus lupulus Nutrition 0.000 claims description 15
- 238000012163 sequencing technique Methods 0.000 claims description 10
- 238000004891 communication Methods 0.000 description 11
- 230000003111 delayed effect Effects 0.000 description 7
- 238000010586 diagram Methods 0.000 description 6
- 230000006870 function Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000012545 processing Methods 0.000 description 2
- 238000005070 sampling Methods 0.000 description 2
- 230000011664 signaling Effects 0.000 description 2
- 230000002159 abnormal effect Effects 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 239000002360 explosive Substances 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L47/00—Traffic control in data switching networks
- H04L47/50—Queue scheduling
- H04L47/56—Queue scheduling implementing delay-aware scheduling
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/12—Shortest path evaluation
- H04L45/121—Shortest path evaluation by minimising delays
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The invention discloses a message scheduling method, a message scheduling device, message scheduling equipment and a message scheduling storage medium for a time-sensitive network. Wherein, the method comprises the following steps: acquiring network parameters of a time sensitive network; determining target transmission time slots of the time-sensitive periodic messages at each switching node based on network parameters, wherein the target transmission time slots comprise the maximum transmission time slots of the time-sensitive periodic messages; when the switching node has the transmission conflict of the time-sensitive periodic message and the time-sensitive burst message, acquiring the next message sending time slot; and performing transmission scheduling on the time-sensitive periodic message and the time-sensitive burst message based on the comparison relation between the next message sending time slot and the maximum transmission time slot. By implementing the invention, the shortest time delay of the time-sensitive burst message transmission is realized under the condition of meeting the transmission requirement of the time-sensitive periodic message, the accurate flow scheduling of the time-sensitive periodic message and the time-sensitive burst message is ensured, and the common-network transmission quality of various power service flows is improved.
Description
Technical Field
The invention relates to the technical field of sensitive power service message transmission, in particular to a message scheduling method, a device, equipment and a storage medium of a time sensitive network.
Background
With the explosive growth of distributed power supplies, the bottom form of a power grid is deeply changed, multi-service co-networking becomes a development trend, and the problem of the transmission of multiple services with different communication requirements in the co-networking becomes a technical problem to be solved urgently. When multiple electric power services are in a network, time-sensitive periodic electric power service messages (such as periodic sampling and the like), time-sensitive burst electric power service messages (such as control, remote signaling and the like) and common electric power service messages are transmitted in a mixed mode, the time-sensitive periodic electric power service messages can be predicted, certain requirements on time delay and jitter are required in transmission, the time-sensitive burst electric power service messages cannot be predicted, and the requirements on time delay are high. The current message scheduling method still has certain defects in real-time performance and flow scheduling accuracy, and scheduling aiming at the time-sensitive periodic power service message and the time-sensitive burst power service message is difficult to realize well so as to meet the requirements of the time-sensitive periodic power service message on time delay and jitter and ensure that the time delay of the time-sensitive burst power service message is shortest.
Disclosure of Invention
In view of this, embodiments of the present invention provide a method, an apparatus, a device, and a storage medium for scheduling a message in a time-sensitive network, so as to solve a problem that it is difficult to schedule a time-sensitive periodic power service message and a time-sensitive burst power service message.
According to a first aspect, an embodiment of the present invention provides a method for scheduling a packet in a time-sensitive network, including: acquiring network parameters of a time sensitive network; determining target transmission time slots of the time-sensitive periodic messages at each switching node based on the network parameters, wherein the target transmission time slots comprise the maximum transmission time slots of the time-sensitive periodic messages; when the switching node has the transmission conflict between the time-sensitive periodic message and the time-sensitive burst message, acquiring the next message sending time slot; and performing transmission scheduling on 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.
The message scheduling method of the time-sensitive network provided by the embodiment of the invention determines the target transmission time slot of the time-sensitive periodic message at the switching node through the network parameters, so that the switching node of each stage can schedule the time-sensitive periodic message according to the target transmission time slot, and the problem of conflict of the time-sensitive periodic message is considered from the whole network in the calculation process of the target transmission time slot, thereby ensuring that the transmission delay and jitter of the time-sensitive periodic power service message can meet the transmission requirement as long as the switching node of each stage is executed according to the target transmission time slot. And when the transmission conflict of the time-sensitive periodic message and the time-sensitive burst message exists, acquiring a next message sending time slot corresponding to the current switching node, and performing transmission scheduling on the time-sensitive periodic message and the time-sensitive burst message by comparing the next message sending time slot with a target transmission time slot. Therefore, the time-sensitive burst message can be sent preferentially on the premise of meeting the requirement of the time-sensitive periodic message, so that the real-time property of the time-sensitive burst message is met, and the transmission delay of the time-sensitive burst message is shortest. According to the method, the shortest time delay of time-sensitive burst message transmission is realized under the condition that the transmission requirement of the time-sensitive periodic message is met, so that accurate flow scheduling aiming at the time-sensitive periodic message and the time-sensitive burst message is realized, and the common-network transmission quality of various power service flows is ensured.
With reference to the first aspect, in a first implementation manner of the first aspect, the performing transmission scheduling on the time-sensitive periodic packet and the time-sensitive burst packet based on a comparison relationship between the next packet sending time slot and the maximum transmission time slot includes: judging whether the next message sending time slot exceeds the maximum transmission time slot or not; when the next message sending time slot does not exceed the maximum transmission time slot, the time-sensitive burst message is transmitted preferentially; and when the next message sending time slot exceeds the maximum transmission time slot, preferentially transmitting the time-sensitive periodic message.
According to the message scheduling method of the time-sensitive network provided by the embodiment of the invention, when the next message sending time slot does not reach the maximum transmission time slot, in order to ensure the real-time performance of the time-sensitive burst message, the time-sensitive burst message can be transmitted preferentially, and the time-sensitive periodic message is delayed to be sent to the next time slot, so that the transmission requirement of the time-sensitive periodic message can be met, and the time delay of the time-sensitive burst message can be reduced. And when the sending time slot of the next message reaches the maximum transmission time slot, preferentially transmitting the time-sensitive periodic message which cannot be delayed to the next time slot, and ensuring the transmission requirement of the time-sensitive periodic message.
With reference to the first implementation manner of the first aspect, in a second implementation manner of the first aspect, the determining whether the next packet transmission timeslot reaches the maximum transmission timeslot includes: acquiring the total frame length of the time-sensitive periodic message and the time-sensitive burst message; judging whether the total frame length exceeds the total length of a preset time slot or not; and when the total frame length exceeds the total length of the preset time slot, judging whether the next message sending time slot exceeds the maximum transmission time slot.
With reference to the second embodiment of the first aspect, in a third embodiment of the first aspect, the method further includes: and when the total frame length does not exceed the total length of the preset time slot, preferentially transmitting the time sensitive burst message.
In the method for scheduling a message in a time-sensitive network according to the embodiments of the present invention, when a transmission collision 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 a preset time slot. When the total frame length does not exceed the total length of the preset time slot, arranging the time-sensitive burst message in front of the time-sensitive periodic message for transmission in the next message sending time slot; and when the total frame length exceeds the total length of the preset time slots, further judging whether the sending time slot of the next message reaches the maximum transmission time slot or not so as to accurately schedule the time-sensitive periodic message and the time-sensitive burst message.
With reference to the first aspect, in a fourth implementation manner of the first aspect, the network parameter includes a plurality of switching nodes corresponding to a network topology; the determining the target transmission time slot of the time-sensitive periodic packet at each switching node based on the network parameters includes: acquiring a head end switching node, a tail end switching node, an initial minimum time slot value and an 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 based on the initial minimum time slot value according to the direction from the head-end switching node to the tail-end switching node; calculating the maximum transmission time slot of the time-sensitive periodic message in each switching node step by step based on the initial maximum time slot value according to the direction from the tail end switching node to the head end switching node; determining the minimum transmission time slot and the maximum transmission time slot as the target transmission time slot.
The method for scheduling a message of a time-sensitive network according to the embodiments of the present invention obtains a head-end switching node, a tail-end switching node, an initial minimum time slot value, and an initial maximum time slot value of a time-sensitive periodic message, then calculates a minimum transmission time slot (i.e., the earliest transmittable time slot) of the time-sensitive periodic message in a port queue step by step from the direction of the head-end switching node, and calculates a 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 direction of the tail-end switching node in a reverse direction. Therefore, each stage of switching nodes can carry out accurate flow scheduling on the time-sensitive periodic messages through the minimum transmission time slot and the maximum transmission time slot, and control the earliest sending time slot of the time-sensitive periodic messages to be not smaller than the minimum transmission time slot and the latest sending time slot to be not larger than the maximum transmission time slot.
With reference to the fourth implementation manner of the first aspect, in a fifth implementation manner of the first aspect, the step of calculating, step by step, a minimum transmission timeslot of the time-sensitive periodic packet at each switching node based on the initial minimum timeslot value according to a direction from the head-end switching node to the tail-end switching node includes: acquiring the mth switching node where the time-sensitive periodic message is located, wherein i is a positive integer greater than 0; judging whether the mth switching node is the switching node of the head end of the time sensitive network where the time sensitive periodic message enters; when the mth switching node is not the switching node of the head end of the time-sensitive network, acquiring a first time-sensitive periodic message to be distributed corresponding to the mth switching node; when the number of the first time-sensitive periodic messages to be distributed is larger than a first preset value, acquiring a first total frame length of a plurality of the first time-sensitive periodic messages; when the length of the first total frame exceeds the total length of a preset time slot, acquiring a plurality of first transmission hops corresponding to the first time-sensitive periodic messages; and determining the minimum transmission time slot of each first time-sensitive periodic message at each switching node based on the sequencing result of the plurality of first transmission hop counts.
With reference to the fifth embodiment of the first aspect, in a sixth embodiment of the first aspect, the method further comprises: and when the mth switching node is the switching node at the head end of the time-sensitive network when the time-sensitive periodic message enters the time-sensitive network, determining the initial minimum time slot value as the minimum transmission time slot.
According to the message scheduling method of the time-sensitive network provided by the embodiment of the invention, the minimum transmission time slot is determined by adopting different calculation modes according to the judgment result of whether the current switching node is the head-end switching node, so that the accurate scheduling aiming at the time-sensitive periodic messages is conveniently realized, the transmission sequence of the messages is conveniently and reasonably scheduled when message transmission conflicts occur, and the common-network transmission quality of various messages is ensured to the greatest extent.
With reference to the fifth implementation manner of the first aspect, in a seventh implementation manner of the first aspect, the calculating, according to the direction from the end switching node to the head switching node, a maximum transmission timeslot of the time-sensitive periodic packet at each switching node based on a maximum timeslot value of the next switching node includes: judging whether the mth switching node is the terminal switching node of the time-sensitive network into which the time-sensitive periodic message enters; when the mth switching node is not the end switching node of the time-sensitive network where the time-sensitive periodic message enters, acquiring a second time-sensitive periodic message to be distributed corresponding to the mth switching node; when the total frame length of the plurality of second time-sensitive periodic messages to be distributed exceeds the total length of a preset time slot, acquiring second transmission hops corresponding to the plurality of second time-sensitive periodic messages to be distributed; and determining the maximum transmission time slot of the time-sensitive periodic message at each switching node based on the sequencing result of the plurality of second transmission hops.
With reference to the seventh implementation manner of the first aspect, in an eighth implementation manner of the first aspect, the method further includes: when the mth switching node is the end switching node of the time-sensitive network, acquiring a jitter value and a minimum transmission time slot of the time-sensitive periodic message at the mth switching node; determining a smaller value from the initial maximum slot value and the sum of the jitter value and the minimum transmission slot; determining the smaller value as the maximum transmission slot.
According to the message scheduling method of the time-sensitive network provided by the embodiment of the invention, the maximum transmission time slot is determined by adopting different calculation modes according to the judgment result of whether the current switching node is the terminal switching node, so that the accurate scheduling aiming at the time-sensitive periodic message is conveniently realized, the transmission sequence of the message is conveniently and reasonably scheduled when the message transmission conflict occurs, and the common-network transmission quality of various messages is ensured to the maximum extent.
According to a second aspect, an embodiment of the present invention provides a packet scheduling apparatus for a time-sensitive network, including: the first acquisition module is used for acquiring network parameters of the time-sensitive network; a determining module, configured to determine a target transmission timeslot of the time-sensitive periodic packet at each switching node based on the network parameter, where the target transmission timeslot includes a maximum transmission timeslot of the time-sensitive periodic packet; a second obtaining module, configured to obtain a next message sending timeslot when a transmission conflict exists between the time-sensitive periodic packet and the time-sensitive burst packet at the switching node; and the scheduling module is used for performing transmission scheduling on the time-sensitive periodic message and the time-sensitive burst message based on the comparison relation between the next message sending time slot and the maximum transmission time slot.
According to a third aspect, an embodiment of the present invention provides an electronic device, including: a memory and a processor, the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the computer instructions to execute the message scheduling method of the time-sensitive network according to the first aspect or any embodiment of the first aspect.
According to a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, where computer instructions are stored, and the computer instructions are configured to cause a computer to execute the method for scheduling packets in a time-sensitive network according to the first aspect or any implementation manner of the first aspect.
It should be noted that, for the corresponding beneficial effects of the message scheduling apparatus, the electronic device, and the computer-readable storage medium of the time-sensitive network provided in the embodiments of the present invention, please refer to the description of the corresponding contents in the message scheduling method of the time-sensitive network, which is not described herein again.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
FIG. 1 is a flow diagram of a method for message scheduling for a time sensitive network according to an embodiment of the present invention;
FIG. 2 is another flow diagram of a method for message scheduling for a time sensitive network according to an embodiment of the present invention;
FIG. 3 is yet another flow chart of a method for message scheduling for a time sensitive network according to an embodiment of the present invention;
FIG. 4 is a diagram illustrating message scheduling according to an embodiment of the present invention;
FIG. 5 is a block diagram of a message scheduling apparatus of a time-sensitive network according to an embodiment of the present invention;
fig. 6 is a schematic diagram of a hardware structure of an electronic device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be obtained by a person skilled in the art without making any creative effort based on the embodiments in the present invention, belong to the protection scope of the present invention.
In accordance with an embodiment of the present invention, there is provided an embodiment of a method for scheduling packets in a time-sensitive network, where the steps illustrated in the flowchart of the drawings may be performed in a computer system, such as a set of computer-executable instructions, and where a logical order is illustrated in the flowchart, in some cases, the steps illustrated or described may be performed in an order different than that illustrated.
In this embodiment, a method for scheduling a message in a time-sensitive network is provided, which may be used for an electronic device, such as a mobile phone, a tablet computer, a server, and the like, at any switching node in a power grid topology structure, and fig. 1 is a flowchart of a method for scheduling a message in a time-sensitive network according to an embodiment of the present invention, where as shown in fig. 1, the flowchart includes the following steps:
s11, obtaining network parameters of the time sensitive network.
The network parameters are parameters of the power field communication network. Specifically, the network parameters are basic parameters set by a technician when constructing a time-sensitive network for a power site. The network parameters may include a time slot Ts, the number of bytes per time slot (i.e., total time slot length), and a time delay requirement table (denoted as T) of time-sensitive periodic messages D ) Jitter requirement table (denoted as T) of time-sensitive periodic messages J ) And the number of transmission hops H, etc.
Wherein, the time delay requirement table:wherein,T Dn is the nth time sensitive periodicity (denoted as A) N ) A delay value of; ts is a time slot.
Wherein, the jitter requirement table:wherein,T Jn is the nth time sensitive periodicity (denoted as A) N ) A jitter value of; ts is a time slot.
And S12, determining target transmission time slots of the time-sensitive periodic messages at each switching node based on the network parameters, wherein the target transmission time slots comprise the maximum transmission time slots of the time-sensitive periodic messages.
The target transmission time slot is used for representing the minimum transmission time slot and the maximum transmission time slot of the time-sensitive periodic message at the switching node. The minimum transmission time slot represents the earliest allowed transmission time slot of the time-sensitive periodic message at the current node, and the maximum transmission time slot represents the latest allowed transmission time slot of the time-sensitive periodic message at the current node.
Based on the network parameters of the time-sensitive network, a message scheduling policy can be constructed consisting of the target transmission timeslots of the individual switching nodes, i.e. (T) nm-min ,T nm-max ) Wherein, T nm-min And T nm-max Respectively representing the earliest transmittable time slot and the latest transmittable time slot of the time-sensitive periodic message An at the switching node m.
Specifically, according to the switching node where the time-sensitive periodic packet enters the time-sensitive network and the initial transmission time slot at the switching node, and with the switching nodes of each stage where the time-sensitive periodic packet passes in 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 packet at each switching node are calculated step by step.
S13, when the transmission conflict of the time-sensitive periodic message and the time-sensitive burst message exists in the switching node, the next message sending time slot is obtained.
Generally, the transmission of the time-sensitive periodic message is predictable, and the time-sensitive periodic message is mainly generated by the time-sensitive periodic power service (such as periodic sampling and the like) and is transmitted periodically. The time-sensitive burst message is unpredictable, and is mainly generated by a time-sensitive burst power service (such as control, remote signaling, and the like), and the time-sensitive burst power service has a high requirement on time delay, so that the time delay of the time-sensitive burst message needs to be ensured to be the shortest to the greatest extent.
When multiple electric power services share the network, the time-sensitive periodic message and the time-sensitive burst message are in mixed transmission. When the time-sensitive periodic message and the time-sensitive burst message have transmission conflict, the time-sensitive periodic message and the time-sensitive burst message need to be reasonably scheduled, so that the time delay of the time-sensitive burst message is shortest under the condition of ensuring the time delay and jitter requirements of the time-sensitive periodic message.
The next message sending timeslot is a timeslot when the current switching node accesses the next switching node, for example, the timeslot value corresponding to the current switching node is 2, when the current switching node is connected to a port of the next switching node, the timeslot value is 3, that is, the next message sending timeslot corresponding to the current switching node is timeslot 3, and the current switching node transmits the time-sensitive periodic message and/or the time-sensitive burst message at timeslot 3.
And S14, based on the comparison relation between the next message sending time slot and the maximum transmission time slot, performing transmission scheduling on the time-sensitive periodic message and the time-sensitive burst message.
Because the time-sensitive periodic message is transmitted according to the target transmission time slot, when there is a message transmission conflict, the next message transmission time slot can be compared with the maximum transmission time slot to determine whether the transmission time-sensitive periodic message exceeds the maximum transmission time slot at the next message 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 preferentially, and the time sensitive periodic message is delayed to the next message sending time slot for transmission. Therefore, the time delay requirement of the time-sensitive periodic message can be ensured, and the time 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 can not be delayed and is transmitted in the current time slot.
In the packet scheduling method of the time-sensitive network provided by this embodiment, the target transmission time slot of the time-sensitive periodic packet at the switching node is determined by the network parameter, so that the switching node at each stage can perform scheduling of the time-sensitive periodic packet according to the target transmission time slot. In the calculation process of the target transmission time slot, the problem of conflict of the time-sensitive periodic messages is considered from the overall network, so that the transmission delay and jitter of the time-sensitive periodic power service messages can meet the transmission requirements as long as each stage of switching node is executed according to the target transmission time slot.
And when the transmission conflict of the time-sensitive periodic message and the time-sensitive burst message exists, acquiring a next message sending time slot corresponding to the current switching node, and performing transmission scheduling on the time-sensitive periodic message and the time-sensitive burst message by comparing the next message sending time slot with a target transmission time slot. Therefore, the time-sensitive burst message can be sent preferentially on the premise of meeting the time-sensitive periodic message, so that the real-time property of the time-sensitive burst message is met, and the transmission delay of the time-sensitive burst message is shortest. The method realizes the shortest time delay of time-sensitive burst message transmission under the condition of meeting the transmission requirement of the time-sensitive periodic message, thereby realizing accurate flow scheduling aiming at the time-sensitive periodic message and the time-sensitive burst message and ensuring the common-network transmission quality of various power service flows.
In this embodiment, a method for scheduling a message of a time-sensitive network is provided, which may be used for an electronic device at any switching node in a power grid topology structure, such as a mobile phone, a tablet computer, a server, and the like, and fig. 2 is a flowchart of a method for scheduling a message of a time-sensitive network according to an embodiment of the present invention, where as shown in fig. 2, the flowchart includes the following steps:
and S21, acquiring network parameters of the time sensitive network. For detailed description, reference is made to the corresponding related description of the above embodiments, and details are not repeated herein.
And S22, determining target transmission time slots of the time-sensitive periodic messages at each switching node based on the network parameters, wherein the target transmission time slots comprise the maximum transmission time slots of the time-sensitive periodic messages. For a detailed description, refer to the corresponding related description of the above embodiments, which is not repeated herein.
S23, when the transmission conflict of the time-sensitive periodic message and the time-sensitive burst message exists in the switching node, the next message sending time slot is obtained. For a detailed description, refer to the corresponding related description of the above embodiments, which is not repeated herein.
And S24, based on the comparison relation between the next message sending time slot and the maximum transmission time slot, performing transmission scheduling on the time-sensitive periodic message and the time-sensitive burst message.
Specifically, the maximum transmission time slot is the latest transmission time slot allowed by the time-sensitive periodic message at the switching node.
Accordingly, the step S24 may include:
s241, judging whether the next message sending time slot exceeds the maximum transmission time slot.
The transmission time slot of the time-sensitive periodic message cannot exceed the maximum transmission time slot, and 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 that the phenomenon that the operation of the time-sensitive periodic power service is influenced due to abnormal transmission of the time-sensitive periodic message is avoided. When the next message sending time slot does not exceed the maximum transmission time slot, step S242 is executed, otherwise step S243 is executed.
And S242, preferentially transmitting the time sensitive burst message.
When the next message transmission time slot does not exceed the maximum transmission time slot, the time-sensitive periodic message can be postponed to the next message transmission time slot. At this time, in order to ensure the shortest time delay of the time-sensitive burst message to the greatest extent, the time-sensitive burst message can be transmitted preferentially at the current time slot, and the time-sensitive periodic message is moved to the next message sending time slot.
S243, the time sensitive periodic message is transmitted preferentially.
When the next message sending time slot exceeds the maximum transmission time slot, the current time slot is indicated to reach the maximum transmission time slot of the time-sensitive periodic message, namely, the time-sensitive periodic message cannot be delayed to the next message sending time slot. At this time, the time-sensitive periodic message may be controlled to be transmitted prior to the time-sensitive burst message, that is, the transmission sequence is: the method comprises the following steps of non-deferrable time-sensitive periodic message 1, non-deferrable time-sensitive periodic messages 2, … …, time-sensitive burst messages, deferrable time-sensitive periodic message 1, deferrable time-sensitive periodic messages 2 and … …, namely, the time-sensitive burst messages are transmitted preferentially under the condition that the requirements of time delay and jitter of the time-sensitive periodic messages are met.
Optionally, before executing step S241, the method further includes:
(1) And acquiring the total frame length of the time-sensitive periodic message and the time-sensitive burst message.
The frame lengths of the time-sensitive periodic message and the time-sensitive burst message entering the current switching node in each time slot are accumulated to obtain the total frame length, namely the total transmission byte number of each message.
(2) And judging whether the total frame length exceeds the total length of the preset time slot or not.
The preset total slot length is determined according to the ports of the pre-constructed communication network, for example, the total slot length of a hundred mega port is set to be 2500 bytes. And comparing the total frame length with the total length of the preset time slot to determine whether the total frame length exceeds the total length of the preset time slot. When the total frame length exceeds the total length of the preset time slot, further executing the step (3); and (4) when the total frame length does not exceed the total length of the preset time slot, executing the step.
(3) And judging whether the next message sending slot exceeds the maximum transmission time slot.
And comparing the next message sending time slot with the maximum transmission time slot to determine whether the next message sending time slot exceeds the maximum transmission time slot. The detailed description is made with reference to the above embodiments, and is not repeated herein.
(4) And preferentially transmitting the time sensitive burst message.
And when the total frame length does not exceed the total length of the preset time slot, arranging the time-sensitive burst message in front of the time-sensitive periodic message in the next message sending slot for transmission, wherein the sending sequence is the time-sensitive burst message and the time-sensitive periodic message.
Suppose that the time slot Ts of the time sensitive network is 200us, and the total time slot length B of the hundred mega port is = (200 us × 100 Mbit/s)/8bit =2500, that is, the number of bytes transmittable by the time slot of the hundred mega port is 2500. Taking the example shown in FIG. 4, the time-sensitive periodic message A 1 Frame length L 1 =1200,T D1 =1ms,T J1 =400us; time sensitive periodic message a 2 Frame length L 2 =200,T D2 =1.2ms,T J2 =600us; time sensitive periodic message a 3 Frame length L 3 =1200,T D3 =1ms,T J3 =800us。
Time sensitive periodic message a 1 Time sensitive periodic message a 2 And time sensitive periodicityMessage A 3 The target transmission time slots at the switching node 3 are (3,5), (4,7) and (3,4), respectively, that is, the time-sensitive periodic packet a 1 The earliest transmission time slot in the switching node 3 is not less than T 1 3-min =3, latest transmission slot is not greater than T 1 3-max =5; time sensitive periodic message a 2 The earliest transmission time slot in the switching node 3 is not less than T 2 3-min =4, latest transmission slot is not greater than T 2 3-max =7; time sensitive periodic message a 3 The earliest transmission time slot in the switching node 3 is not less than T 3 3-min =3, latest transmission slot is not greater than T 3 3-max =4。
Suppose 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 a port of switching node 4. The message scheduling method of the time sensitive network comprises the following steps:
total frame length = L of message in time slot 3 1 +L 3 +L B1 =1200+ 500 + 2900 > B, so deferrable time-sensitive periodic messages A will be used 1 Put into time slot 4, time slot 3 transmits time sensitive burst message B1 and time sensitive periodic message A 3 ;
Total frame length = L of message in time slot 4 1 +L 2 +L B2 =1200+200+1200=2600>B, at the moment, the deferrable time-sensitive periodic message A 1 Put into the time slot 5, so the time slot 4 can transmit the time sensitive burst message B2, because the spare bandwidth is not enough to transmit the time sensitive periodic message A 1 Only the time-sensitive periodic message A can be transmitted first 2 A deferrable time-sensitive periodic message A 1 Put into time slot 5;
the total frame length = L of the message in time slot 5 1 +L B3 =1200+1500=2700>B, the time sensitive periodic message A 1 Has not been postponed, so slot 5 requires transmission of time sensitive periodic message a 1 And defers the time sensitive burst message B2 to the timeslot 6 for transmission.
By executing the steps, when the transmission conflict of the time-sensitive periodic message and the time-sensitive burst message occurs, 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, arranging the time-sensitive burst message in front of the time-sensitive periodic message for transmission in the next message sending time slot; and when the total frame length exceeds the total length of the preset time slots, further judging whether the sending time slot of the next message reaches the maximum transmission time slot or not so as to accurately schedule the time-sensitive periodic message and the time-sensitive burst message.
In the message scheduling method of the time-sensitive network provided in this embodiment, when the next message sending time slot does not reach the maximum transmission time slot, in order to ensure the real-time property of the time-sensitive burst message, the time-sensitive burst message may be preferentially transmitted, and the time-sensitive periodic message is delayed to be sent to the next time slot, so that the transmission requirement of the time-sensitive periodic message can be met, and the time delay of the time-sensitive burst message can be reduced. And when the sending time slot of the next message reaches the maximum transmission time slot, preferentially transmitting the time-sensitive periodic message which cannot be delayed to the next time slot, and ensuring the transmission requirement of the time-sensitive periodic message.
In this embodiment, a method for scheduling a message of a time-sensitive network is provided, which may be used for an electronic device at any switching node in a power grid topology structure, such as a mobile phone, a tablet computer, a server, and the like, where fig. 3 is a flowchart of a method for scheduling a message of a time-sensitive network according to an embodiment of the present invention, and as shown in fig. 3, the flowchart includes the following steps:
and S31, acquiring the network parameters of the time-sensitive network. For a detailed description, refer to the corresponding related description of the above embodiments, which is not repeated herein.
And S32, determining target transmission time slots of the time-sensitive periodic messages at each switching node based on the network parameters, wherein the target transmission time slots comprise the maximum transmission time slots of the time-sensitive periodic messages.
Specifically, the network parameters include a plurality of switching nodes corresponding to the network topology, and the time-sensitive periodic packet is transmitted and scheduled by each switching node.
Accordingly, the step S32 may include:
s321, a head end switching node, a tail end switching node, an initial minimum time slot value and an initial maximum time slot value corresponding to the time-sensitive periodic message are obtained.
The head end switching node is a first switching node for the time sensitive periodic message to enter a time sensitive network; the terminal switching node is the last switching node of the time-sensitive periodic message in the time-sensitive network; the initial minimum time slot value is a time sensitive periodic message an earliest transmission slot value of the switching node at the head end; the initial maximum time slot value is the latest transmission time slot value of the time sensitive periodic message at the terminal switching node.
Assuming that the head-end switching node of the time-sensitive periodic message An entering the time-sensitive network is switching node i and the tail-end switching node is switching node j, the initial minimum time slot value T ni-min Adding 1 to the time slot value of the time sensitive periodic message entering the time sensitive network; initial maximum slot value T nj-max Delay value D for time sensitive periodic message An Plus the initial minimum slot value T ni-min Then subtract 1, i.e. T nj-max =D An +T ni-min -1。
Based on the above embodiments, it can be seen that:wherein, T Dn The time delay value is the time delay value of the nth time sensitive periodic message; t is Jn Jitter value of the nth time sensitive periodic message; ts is a time slot.
Taking fig. 4 as an example, the time slot is 200us, and the frame length L corresponding to the time-sensitive periodic message 1 is 1 =1200、T D1 =1ms、T J1 =400us, frame length L corresponding to time-sensitive periodic packet 2 2 =200、T D2 =1.2ms、T J2 =600us, frame length L corresponding to time-sensitive periodic packet 3 3 =1200、T D3 =1ms、T J3 =800us. Based on the aboveThe calculation formula shows that: d A1 =5,J A1 =2,D A2 =6,J A2 =3,D A3 =5,J A3 =4。
Time sensitive periodic message a 1 If the switching node at the head end of the time-sensitive network is switching node 1, the switching node at the tail end is switching node 4, and the value of the entering time slot is 1, the time-sensitive periodic message A can be determined 1 Corresponding initial minimum time slot value T 1 1-min =2, initial maximum slot value T 1 4-max =6。
Time sensitive periodic message a 2 If the switching node at the head end of the time-sensitive network is switching node 3, the switching node at the tail end is switching node 4, and the value of the access time slot is 2, the time-sensitive periodic message A can be determined 2 Corresponding initial minimum time slot value T 2 3-min =3, initial maximum slot value T 2 4-max =8。
Time sensitive periodic message a 3 If the switching node at the head end of the time-sensitive network is switching node 2, the switching node at the tail end is switching node 5, and the value of the entering time slot is 1, the time-sensitive periodic message A can be determined 3 Corresponding initial minimum time slot value T 3 2-min =2, initial maximum slot value T 3 5-max =6。
And S322, calculating the minimum transmission time slot of the time-sensitive periodic message at each switching node step by step based on the initial minimum time slot value according to the direction from the head-end switching node to the tail-end switching node.
The minimum transmission time slot (i.e. the earliest transmittable time slot) T of the time-sensitive periodic message in the port queue is calculated step by step from the direction of the head-end switching node nm-min =T ni-min +1, wherein T ni-min The earliest transmittable time slot in the previous switching node through which the time-sensitive periodic message An passes. For the second switching node, the minimum transmission time slot is the initial minimum time slot value +1; for the third switching node, the minimum transmission time slot is the minimum transmission time slot +1 of the second switching node, and so on, and the minimum transmission time slot of each switching node can be obtained.
Specifically, the step S322 may include:
(1) And acquiring the mth switching node where the time-sensitive periodic message is located, wherein m is a positive integer greater than 0.
The mth switching node is a switching node through which the time-sensitive periodic message enters the time-sensitive network.
(2) And judging whether the mth switching node is a head end switching node for the time-sensitive periodic message to enter the time-sensitive network.
And comparing the mth switching node 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. And (3) when the mth switching node is the same as the head end switching node, indicating that the mth switching node is the head end switching node for the time-sensitive periodic message to enter the time-sensitive network, and executing the steps (3) to (6). And (4) when the mth switching node is different from the head end switching node, indicating 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 executing the step (7).
(3) And when the mth switching node is not the switching node at the head end of the time-sensitive network, acquiring a first time-sensitive periodic message to be distributed corresponding to the mth switching node.
The first time-sensitive periodic message is a message which needs to be transmitted through the mth switching node at the current time slot. And when the mth switching node is not the switching node at the head end of the time-sensitive network, determining the number of the first time-sensitive periodic messages which are distributed and sent by the mth switching node in the current time slot.
(4) When the number of the first time-sensitive periodic messages to be distributed is larger than a first preset value, acquiring a first total frame length of a plurality of first time-sensitive periodic messages.
The first preset value is the number of the time-sensitive periodic messages required to be allocated to the current time slot. The first preset value may be 1, and is used to determine whether there are multiple time-sensitive periodic packets that need to be allocated to the current timeslot. When the number of the first time-sensitive periodic messages to be distributed is larger than a first preset value, namely a plurality of time-sensitive periodic messages required to be distributed in the current time slot exist, at the moment, the frame lengths of the plurality of first time-sensitive periodic messages are accumulated to obtain a first total frame length.
(5) And when the length of the first total frame exceeds the total length of the preset time slot, acquiring a first transmission hop number corresponding to a plurality of first time-sensitive periodic messages.
The total length of the preset time slot is the number of bytes which can be transmitted in each preset time slot. The first transmission hop count is the difference between the total transmission hop count Hn of the time-sensitive periodic packet and the transmission hop count arriving at the current switching node, i.e., hn-Hnm.
In order to further determine whether the current timeslot can transmit all messages to be allocated, the length of the first total frame needs to be compared with the total length of the preset timeslot to determine the size relationship between the length of the first total frame and the total length of the preset timeslot. When the length of the first total frame exceeds the total length of the preset time slot, the current time slot can not finish the transmission of all time-sensitive periodic messages. At this time, the transmission of each time-sensitive periodic message is sequenced based on a first-in first-out principle. That is, the first transmission hop count of each first time-sensitive periodic packet reaching the current switching node is obtained, and the plurality of first transmission hop counts are sequenced.
(6) And determining the minimum transmission time slot of each first time-sensitive periodic message at each switching node based on the sequencing result of the plurality of first transmission hops.
According to the sequencing result of the first transmission hop count, determining the time-sensitive periodic message with the minimum first transmission hop count, and transferring the time-sensitive periodic message to the next message sending time slot for transmission, namely updating the minimum transmission time slot T of the time-sensitive periodic message nm-min Is T nm-min +1。
(7) And when the mth switching node is a switching node at the head end of the time-sensitive network when the time-sensitive periodic message enters the time-sensitive network, determining the initial minimum time slot value as the minimum transmission time slot.
When the mth switching node is a time-sensitive periodic message, the mth switching node enters a time-sensitive networkWhen the head end of (2) switches the node, then T nm-min The value of (a) is the initial minimum timeslot value determined in the above step S321, i.e. the timeslot value at which the time sensitive periodic packet An enters the time sensitive network earliest is added by 1.
Taking fig. 4 as an example, the total default timeslot length B is 2500; time sensitive periodic message a 1 The total number of transmission hops to reach the switching nodes 1, 3,4 is 1, 2, 3, respectively; time sensitive periodic message a 2 The total number of transmission hops of (2), the number of transmission hops to reach the switching nodes 3,4 is 1, 2 respectively; time sensitive periodic message a 3 Is 4, and the number of transmission hops to reach the switching nodes 2, 3,4, 5 is 1, 2, 3,4, respectively.
Taking the switching node 3 as an example, the previous-stage switching nodes 1 and 2 must be calculated before the switching node 3 is calculated; first, the switching node 1 is calculated: t is a unit of 1 1-min =2; the switching node 2 is then calculated: t is 3 2-min =2; the switching node 3 is then calculated: t is 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 where the switching node 3 is connected to the switching node 4, the total frame length of the time-sensitive periodic packet in the timeslot 3 = L 1 +L 2 +L 3 =1200+1200+200>B, according to transmission jump number, time sensitive periodic message A 1 、A 2 、A 3 Sorting to obtain a sorting result A 3 、A 1 、A 2 A is prepared by 2 Put into the next message sending time slot, i.e. update T 2 3-min =3+1=4; the switching node 4 is then calculated: t is 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, the switching node 5 is calculated: t is 3 5-min =T 3 4-min +1=5。
According to the judgment result of whether the current switching node is the head-end switching node or not, the minimum transmission time slot is determined by adopting different calculation modes, so that the transmission sequence of the messages can be reasonably scheduled when message transmission conflicts occur, accurate scheduling of various messages is guaranteed to the maximum extent, and the transmission quality of the common network is guaranteed.
And S323, calculating the maximum transmission time slot of the time-sensitive periodic message in each switching node step by step based on the initial maximum time slot value according to the direction from the tail end switching node to the head end switching node.
The maximum transmission time slot (namely the latest transmittable time slot) T of the time-sensitive periodic message in the port queue is reversely calculated step by step from the direction of the end node nm-max =T nj-max -1, wherein T ni-max The time-sensitive periodic message An passes through the latest transmittable time slot in the next switching node. For the last-but-one switching node, the maximum transmission time slot is the initial maximum time slot value-1; for the last-but-one switching node, the maximum transmission time slot is the maximum transmission time slot-1 of the last-but-one switching node, and so on, the maximum transmission time slot of each switching node can be obtained.
Specifically, the step S323 may include:
(1) And judging whether the mth switching node is the terminal switching node of the time-sensitive network for the time-sensitive periodic message to enter.
And comparing the mth switching node 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 different from the end switching node, indicating that the mth switching node is not the end switching node of the time-sensitive network into which the time-sensitive periodic message enters, and executing the steps (2) to (5); otherwise, executing steps (6) to (7).
(2) And when the mth switching node is not the end switching node of the time-sensitive network into which the time-sensitive periodic message enters, acquiring a second time-sensitive periodic message to be distributed corresponding to the mth switching node.
The second time-sensitive periodic message is a message transmitted by the mth switching node in the current time slot. And when the mth switching node is not the end switching node of the time-sensitive network, determining the quantity of the second time-sensitive periodic messages of the mth switching node of the current time slot path.
(3) And when the number of the second time-sensitive periodic messages to be distributed is greater than a second preset value, acquiring a second total frame length of the plurality of second time-sensitive periodic messages.
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, and is used to determine whether there are multiple time-sensitive periodic messages allocated to the current timeslot. When the number of the second time-sensitive periodic messages to be distributed is larger than a second preset value, that is, a plurality of time-sensitive periodic messages distributed at the current time slot exist, the frame lengths of the plurality of second time-sensitive periodic messages are accumulated, so that a second total frame length is obtained.
(4) And when the second total frame length exceeds the preset total time slot length, acquiring second transmission hop counts corresponding to the plurality of second time-sensitive periodic messages.
The total length of the preset time slot is the number of bytes which can be transmitted by each preset time slot. The second transmission hop count is the difference between the total transmission hop count Hn of the time-sensitive periodic packet and the transmission hop count arriving at the current switching node, i.e., hn-Hnm.
And comparing the second total frame length with the total length of the preset time slot, and when the first total frame length exceeds the total length of the preset time slot, indicating that the current time slot cannot finish the transmission of all the time-sensitive periodic messages. At this time, a second transmission hop count of each second time-sensitive periodic packet reaching the current switching node is obtained, and the plurality of second transmission hop counts are sequenced.
(5) And determining the maximum transmission time slot of each second time-sensitive periodic message at each switching node based on the sequencing result of the plurality of second transmission hops.
According to the sequencing result of the second transmission hop count, determining the time-sensitive periodic message with the minimum second transmission hop count, and transferring the time-sensitive periodic message to the previous message sending time slot for transmission, namely updating the maximum transmission time slot T of the time-sensitive periodic message nm-max Is T nm-max -1。
(6) And when the mth switching node is the end switching node of the time-sensitive network, acquiring the jitter value and the minimum transmission time slot of the time-sensitive periodic message at the mth switching node.
Jitter value of time-sensitive periodic message at mth switching nodeWherein, T Jn Is the nth time sensitive periodicity A N A jitter value of; ts is a time slot. The minimum transmission timeslot is obtained based on the method described in step S322 above.
(7) And determining the smaller value from the initial maximum time slot value and the sum of the jitter value and the minimum transmission time slot, and determining the smaller value as the maximum transmission time slot.
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 . Will T nj-max And J An +T nm-min A comparison is made, from which a smaller value is determined and determined as the maximum transmission time slot, i.e. maximum transmission time slot = min (J) An +T nm-min ,T nj-max )
According to the judgment result of whether the current switching node is the terminal switching node or not, the maximum transmission time slot is determined by adopting different calculation modes, so that the transmission sequence of the messages can be reasonably scheduled when message transmission conflict occurs, accurate scheduling of various messages is guaranteed to the maximum extent, and the transmission quality of the common network is guaranteed.
S324, determining the minimum transmission timeslot and the maximum transmission timeslot as target transmission timeslots.
Minimum and maximum transmission time slots (T) to be determined nm-min ,T nm-max ) Is sent down to the corresponding switching node m, the (T) nm-min ,T nm-max ) I.e. the target transmission timeslot of the time-sensitive periodic message at the switching node m. Specifically, in the switching node m, the time-sensitive periodic message An is sent according to the earliest sending time slot not less than T nm-min The latest transmission time slot is not more than T nm-max And (6) carrying out transmission.
S33, when the transmission conflict of the time-sensitive periodic message and the time-sensitive burst message exists in the switching node, the next message sending time slot is obtained. For a detailed description, refer to the corresponding related description of the above embodiments, which is not repeated herein.
And S34, based on the comparison relation between the next message sending time slot and the target transmission time slot, performing transmission scheduling on the time-sensitive periodic message and the time-sensitive burst message. For a detailed description, refer to the corresponding related description of the above embodiments, which is not repeated herein.
In the packet scheduling method of the time-sensitive network provided by this embodiment, the head-end switching node, the tail-end switching node, the initial minimum time slot value, and the initial maximum time slot value of the time-sensitive periodic packet are obtained, then the minimum transmission time slot (i.e., the earliest transmittable time slot) of the time-sensitive periodic packet in the port queue is calculated step by step from the head-end switching node direction, and the maximum transmission time slot (i.e., the latest transmittable time slot) of the time-sensitive periodic packet in the port queue is calculated step by step from the tail-end node direction in the reverse direction. Therefore, each stage of switching nodes can carry out accurate flow scheduling on the time-sensitive periodic messages through the minimum transmission time slot and the maximum transmission time slot, and control the earliest sending time slot of the time-sensitive periodic messages to be not smaller than the minimum transmission time slot and the latest sending time slot to be not larger than the maximum transmission time slot.
In this embodiment, a message scheduling apparatus of a time-sensitive network is further provided, where the apparatus is used to implement the foregoing embodiment and preferred embodiments, and details are not repeated for what has been described. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. Although the means described in the embodiments below are preferably implemented in software, an implementation in hardware, or a combination of software and hardware is also possible and contemplated.
This embodiment provides a packet scheduling apparatus for a time-sensitive network, as shown in fig. 5, including:
a first obtaining module 41, configured to obtain a network parameter of the time-sensitive network.
A determining module 42, configured to determine a target transmission timeslot of the time-sensitive periodic packet at each switching node based on the network parameter, where the target transmission timeslot includes a maximum transmission timeslot of the time-sensitive periodic packet.
A second obtaining module 43, configured to obtain a next message sending timeslot when the switching node has a transmission collision between the time-sensitive periodic message and the time-sensitive burst message.
And the scheduling module 44 is configured to perform transmission scheduling on the time-sensitive periodic packet and the time-sensitive burst packet based on a comparison relationship between a next packet sending time slot and a target transmission time slot.
Specifically, the maximum transmission time slot is the latest transmission time slot allowed by the time-sensitive periodic message at the switching node. Accordingly, the scheduling module 44 may include:
and the first judgment sub-module is used for judging whether the next message sending time slot exceeds the maximum transmission time slot.
The transmission submodule is used for preferentially transmitting the time sensitive burst message when the next message sending time slot does not exceed the maximum transmission time slot; and when the next message sending time slot exceeds the maximum transmission time slot, the time-sensitive periodic message is transmitted preferentially.
Optionally, the scheduling module 44 is further specifically configured to: acquiring the total frame length of a time-sensitive periodic message and a time-sensitive burst message; judging whether the total frame length exceeds the total length of a preset time slot or not; when the total frame length exceeds the total length of the preset time slot, judging whether the next message sending slot reaches the maximum transmission time slot; and when the total frame length does not exceed the total length of the preset time slot, preferentially transmitting the time sensitive burst message.
Specifically, the network parameters include a plurality of switching nodes corresponding to the network topology, and the time-sensitive periodic packet is transmitted and scheduled by each switching node. Accordingly, the determining module 42 may include:
and the obtaining submodule is used for obtaining a head end switching node, a tail end switching node, an initial minimum time slot value and an initial maximum time slot value corresponding to the time-sensitive periodic message.
And the first calculation submodule is used for calculating the minimum transmission time slot of the time-sensitive periodic message at each switching node step by step based on the initial minimum time slot value according to the direction from the head-end switching node to the tail-end switching node.
And the second calculation submodule is used for 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 according to the direction from the tail end switching node to the head end switching node.
And the determining submodule is used for determining the minimum transmission time slot and the maximum transmission time slot as target transmission time slots.
Optionally, the first computing submodule is specifically configured to: acquiring an mth switching node where a time-sensitive periodic message is located, wherein m is a positive integer greater than 0; judging 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 switching node of the head end of the time sensitive network, acquiring a first time sensitive periodic message to be distributed corresponding to the mth switching node; when the number of first time-sensitive periodic messages to be distributed is larger than a first preset value, acquiring a first total frame length of a plurality of first time-sensitive periodic messages; when the length of the first total frame exceeds the total length of a preset time slot, acquiring a first transmission hop number corresponding to a plurality of first time-sensitive periodic messages; determining the minimum transmission time slot of each first time-sensitive periodic message at each switching node based on the sequencing result of the plurality of first transmission hops; and when the mth switching node is a switching node at the head end of the time-sensitive network, which enters the time-sensitive periodic message, determining the initial minimum time slot value as the minimum transmission time slot.
Optionally, the second computing submodule is specifically configured to: judging whether the mth switching node is a terminal switching node for the time-sensitive periodic message to enter a time-sensitive network; when the mth switching node is not the end switching node of the time-sensitive network into which the time-sensitive periodic message enters, acquiring a second time-sensitive periodic message to be distributed corresponding to the mth switching node; when the number of the second time-sensitive periodic messages to be distributed is larger than a second preset value, acquiring a second total frame length of a plurality of second time-sensitive periodic messages; when the second total frame length exceeds the total length of the preset time slot, acquiring second transmission hop numbers corresponding to a plurality of second time-sensitive periodic messages; determining the maximum transmission time slot of each second time-sensitive periodic message at each switching node based on the sequencing result of the plurality of second transmission hops; when the mth switching node is the end switching node of the time-sensitive network, acquiring the jitter value and the minimum transmission time slot of the time-sensitive periodic message at the mth switching node; a smaller value is determined from the initial maximum slot value and the sum of the jitter value and the minimum transmission slot, and the smaller value is determined as the maximum transmission slot.
The message scheduling apparatus 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 a memory executing one or more software or fixed programs, and/or other devices capable of providing the above-mentioned functions.
Further functional descriptions of the modules are the same as those of the corresponding embodiments, and are not repeated herein.
In the message scheduling apparatus for a time-sensitive network provided in this embodiment, each level of switching node can schedule a time-sensitive periodic message according to a target transmission timeslot, and when there is a transmission conflict between the time-sensitive periodic message and a time-sensitive burst message, the switching node can preferentially send the time-sensitive burst message on the premise that the time-sensitive periodic message is satisfied, so as to satisfy the real-time property of the time-sensitive burst message and minimize the transmission delay, thereby implementing accurate traffic scheduling for the time-sensitive periodic message and the time-sensitive burst message, and ensuring the co-network transmission quality of multiple power service traffic.
An embodiment of the present invention further provides an electronic device, which has the message scheduling apparatus of the time-sensitive network shown in fig. 5.
Referring to fig. 6, fig. 6 is a schematic structural diagram of an electronic device according to an alternative embodiment of the present invention, and as shown in fig. 6, the electronic device may include: at least one processor 501, such as a Central Processing Unit (CPU), at least one communication interface 503, memory 504, and at least one communication bus 502. Wherein a communication bus 502 is used to enable connective communication between these components. The communication interface 503 may include a Display (Display) and a Keyboard (Keyboard), and the optional communication interface 503 may also include a standard wired interface and a standard wireless interface. The Memory 504 may be a high-speed volatile Random Access Memory (RAM) or a non-volatile Memory (non-volatile Memory), such as at least one disk Memory. The memory 504 may optionally be at least one storage device located remotely from the processor 501. Wherein the processor 501 may be in connection with the apparatus described in fig. 5, an application program is stored in the memory 504, and the processor 501 calls the program code stored in the memory 504 for performing any of the above-mentioned method steps.
The communication bus 502 may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus 502 may be divided into an address bus, a data bus, a control bus, and the like. For ease of illustration, only one thick line is shown in FIG. 6, but this is not intended to represent only one bus or type of bus.
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 comprise a combination of the above-described types of memory.
The processor 501 may be a Central Processing Unit (CPU), a Network Processor (NP), or a combination of the CPU and the NP.
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 General Array Logic (GAL), or any combination thereof.
Optionally, the memory 504 is also used to store program instructions. The processor 501 may call program instructions to implement the message scheduling method of the time-sensitive network as shown in the embodiments of fig. 1 and 3 of the present application.
The embodiment of the present invention further provides a non-transitory computer storage medium, where the computer storage medium stores computer executable instructions, and the computer executable instructions may execute the message scheduling method of the time sensitive network in any of the method embodiments described above. The storage medium may be a magnetic Disk, an optical Disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a Flash Memory (Flash Memory), a Hard Disk (Hard Disk Drive, HDD), a Solid-State Drive (SSD), or the like; the storage medium may also comprise a combination of memories of the above kind.
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 invention, and such modifications and variations fall within the scope defined by the appended claims.
Claims (12)
1. A message scheduling method of a time sensitive network is characterized by comprising the following steps:
acquiring network parameters of a time sensitive network;
determining target transmission time slots of the time-sensitive periodic messages at each switching node based on the network parameters, wherein the target transmission time slots comprise the maximum transmission time slots of the time-sensitive periodic messages;
when the switching node has the transmission conflict between the time-sensitive periodic message and the time-sensitive burst message, acquiring the next message sending time slot;
and performing transmission scheduling on 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.
2. The method according to claim 1, wherein said performing transmission scheduling for said time-sensitive periodic packet and said time-sensitive burst packet based on a comparison between said next packet transmission timeslot and said maximum transmission timeslot comprises:
judging whether the next message sending time slot exceeds the maximum transmission time slot or not;
when the next message sending time slot does not exceed the maximum transmission time slot, the time-sensitive burst message is transmitted preferentially;
and when the next message sending time slot exceeds the maximum transmission time slot, the time-sensitive periodic message is transmitted preferentially.
3. The method of claim 2, wherein said determining whether the next messaging timeslot reaches the maximum transmission timeslot comprises:
acquiring the total frame length of the time-sensitive periodic message and the time-sensitive burst message;
judging whether the total frame length exceeds the total length of a preset time slot or not;
and when the total frame length exceeds the total length of the preset time slots, judging whether the next message sending time slot exceeds the maximum transmission time slot.
4. The method of claim 3, further comprising:
and when the total frame length does not exceed the total length of the preset time slot, preferentially transmitting the time sensitive burst message.
5. The method of claim 1, wherein the network parameters include a plurality of switching nodes corresponding to a network topology; the determining the target transmission time slot of the time-sensitive periodic packet at each switching node based on the network parameters includes:
acquiring a head end switching node, a tail end switching node, an initial minimum time slot value and an 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 based on the initial minimum time slot value according to the direction from the head-end switching node to the tail-end switching node;
calculating the maximum transmission time slot of the time-sensitive periodic message in each switching node step by step based on the initial maximum time slot value according to the direction from the tail end switching node to the head end switching node;
determining the minimum transmission time slot and the maximum transmission time slot as the target transmission time slot.
6. The method as claimed in claim 5, wherein said step-by-step calculating the minimum transmission timeslot of the time-sensitive periodic packet at each switching node based on the initial minimum timeslot value according to the direction from the head-end switching node to the tail-end switching node comprises:
acquiring the mth switching node where the time-sensitive periodic message is located, wherein m is a positive integer greater than 0;
judging whether the mth switching node is a head-end switching node of the time-sensitive network for the time-sensitive periodic message to enter;
when the mth switching node is not the switching node of the head end of the time-sensitive network, acquiring a first time-sensitive periodic message to be distributed corresponding to the mth switching node;
when the number of the first time-sensitive periodic messages to be distributed is larger than a first preset value, acquiring a first total frame length of a plurality of the first time-sensitive periodic messages;
when the length of the first total frame exceeds the total length of a preset time slot, acquiring a plurality of first transmission hops corresponding to the first time-sensitive periodic messages;
and determining the minimum transmission time slot of each first time-sensitive periodic message at each switching node based on the sequencing result of the plurality of first transmission hop counts.
7. The method of claim 6, further comprising:
and when the mth switching node is the switching node at the head end of the time-sensitive network when the time-sensitive periodic message enters the time-sensitive network, determining the initial minimum time slot value as the minimum transmission time slot.
8. The method as claimed in claim 6, wherein said step-by-step calculating the maximum transmission timeslot of the time-sensitive periodic packet at each switching node based on the initial maximum timeslot value according to the direction from the end switching node to the head switching node comprises:
judging whether the mth switching node is the terminal switching node of the time-sensitive network into which the time-sensitive periodic message enters;
when the mth switching node is not the end switching node of the time-sensitive network where the time-sensitive periodic message enters, acquiring a second time-sensitive periodic message to be distributed corresponding to the mth switching node;
when the number of the second time-sensitive periodic messages to be distributed is larger than a second preset value, acquiring a second total frame length of a plurality of second time-sensitive periodic messages;
when the second total frame length exceeds the preset total time slot length, acquiring a plurality of second transmission hops corresponding to the second time-sensitive periodic messages;
and determining the maximum transmission time slot of each second time-sensitive periodic message at each switching node based on the sequencing result of the plurality of second transmission hops.
9. The method of claim 8, further comprising:
when the mth switching node is the end switching node of the time-sensitive network, acquiring a jitter value and a minimum transmission time slot of the time-sensitive periodic message at the mth switching node;
determining a smaller value from the initial maximum slot value and the sum of the jitter value and the minimum transmission slot;
determining the smaller value as the maximum transmission slot.
10. A message scheduling apparatus for a time sensitive network, comprising:
the first acquisition module is used for acquiring network parameters of the time-sensitive network;
a determining module, configured to determine a target transmission timeslot of the time-sensitive periodic packet at each switching node based on the network parameter, where the target transmission timeslot includes a maximum transmission timeslot of the time-sensitive periodic packet;
a second obtaining module, configured to obtain a next message sending timeslot when a transmission conflict exists between the time-sensitive periodic packet and the time-sensitive burst packet at the switching node;
and the scheduling module is used for performing transmission scheduling on the time-sensitive periodic message and the time-sensitive burst message based on the comparison relation between the next message sending time slot and the maximum transmission time slot.
11. An electronic device, comprising:
a memory and a processor, the memory and the processor being communicatively coupled to each other, the memory having stored therein computer instructions, the processor executing the computer instructions to perform the method of message scheduling for a time-sensitive network of any of claims 1-9.
12. A computer-readable storage medium storing computer instructions for causing a computer to perform the method of message scheduling for a time-sensitive network of any of claims 1-9.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211221234.XA CN115604197A (en) | 2022-10-08 | 2022-10-08 | Message scheduling method, device, equipment and storage medium of time-sensitive network |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211221234.XA CN115604197A (en) | 2022-10-08 | 2022-10-08 | Message scheduling method, device, equipment and storage medium of time-sensitive network |
Publications (1)
Publication Number | Publication Date |
---|---|
CN115604197A true CN115604197A (en) | 2023-01-13 |
Family
ID=84844986
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211221234.XA Pending CN115604197A (en) | 2022-10-08 | 2022-10-08 | Message scheduling method, device, equipment and storage medium of time-sensitive network |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115604197A (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2021057523A1 (en) * | 2019-09-27 | 2021-04-01 | 腾讯科技(深圳)有限公司 | Method for realizing data transmission of time-sensitive network, related device and medium |
CN113498106A (en) * | 2020-03-18 | 2021-10-12 | 华为技术有限公司 | Scheduling method and device for time-sensitive network TSN (transport stream network) stream |
CN114615211A (en) * | 2022-03-08 | 2022-06-10 | 重庆邮电大学 | Method for managing and scheduling time-sensitive network queue in spacecraft with wired and wireless integration |
WO2022199007A1 (en) * | 2021-03-26 | 2022-09-29 | 鹏城实验室 | Time-sensitive networking time slot scheduling method, terminal and storage medium |
-
2022
- 2022-10-08 CN CN202211221234.XA patent/CN115604197A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2021057523A1 (en) * | 2019-09-27 | 2021-04-01 | 腾讯科技(深圳)有限公司 | Method for realizing data transmission of time-sensitive network, related device and medium |
CN113498106A (en) * | 2020-03-18 | 2021-10-12 | 华为技术有限公司 | Scheduling method and device for time-sensitive network TSN (transport stream network) stream |
WO2022199007A1 (en) * | 2021-03-26 | 2022-09-29 | 鹏城实验室 | Time-sensitive networking time slot scheduling method, terminal and storage medium |
CN114615211A (en) * | 2022-03-08 | 2022-06-10 | 重庆邮电大学 | Method for managing and scheduling time-sensitive network queue in spacecraft with wired and wireless integration |
Non-Patent Citations (1)
Title |
---|
葛楼: "时间确定性网络时隙化转发技术研究", 《 中国优秀硕士论文电子期刊网》, 1 March 2021 (2021-03-01) * |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11316795B2 (en) | Network flow control method and network device | |
CN106789729B (en) | Cache management method and device in network equipment | |
CN110166380B (en) | Method for scheduling message, first network device and computer readable storage medium | |
US7653069B2 (en) | Two stage queue arbitration | |
EP4258611A2 (en) | Message sending method, network node and system | |
CN110138610B (en) | Service message sending method and device | |
US20050201373A1 (en) | Packet output-controlling device, packet transmission apparatus | |
US11258717B2 (en) | Method for sending service packet, network device, and system | |
CN110636011A (en) | Intelligent scheduling method and device for power communication service data stream and terminal equipment | |
WO2021148020A1 (en) | Service class adjustment method, apparatus, device and storage medium | |
JP6756070B2 (en) | Methods and network nodes for traffic management at network nodes in packet-switched networks | |
US20030165149A1 (en) | Hardware self-sorting scheduling queue | |
EP3726787A1 (en) | Data stream sending method, device and system | |
CN113783785A (en) | ECN (engineering-centric networking) water line value configuration method and device and network equipment | |
EP3340548B1 (en) | Scheduling method and customer premises equipment | |
US20190075058A1 (en) | Weighted fair queueing using severity-based window in reliable packet delivery network | |
CN108989233B (en) | Congestion management method and device | |
CN111740922B (en) | Data transmission method, device, electronic equipment and medium | |
WO2005062560A1 (en) | Preventative congestion control for application support | |
CN111638986A (en) | QoS queue scheduling method, device, system and readable storage medium | |
CN115604197A (en) | Message scheduling method, device, equipment and storage medium of time-sensitive network | |
CN113765796B (en) | Flow forwarding control method and device | |
CN109391558B (en) | Queue control method and device | |
EP4207687A1 (en) | Traffic shaping method and device | |
JP2008125073A (en) | Stale data removal using latency count in wimax scheduler |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |