Method, device and storage medium for dividing time windows in time-aware scheduler
By optimizing the division of time windows and processing data frame delays and priorities in smart substations, the problem of high non-periodic key message transmission delays is solved, and more efficient network performance and bandwidth utilization are achieved.
Patent Information
- Application Number
- CN202410033202.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-09
- Publication Date
- 2024-09-20
- Estimated Expiration
- 2044-01-09
AI Technical Summary
In smart substations, the traditional time window division method leads to high transmission delay of non-periodic key messages, resulting in bandwidth waste and performance impact.
By obtaining the data frame set, determine the data frame delay, divide the protection time window, prioritize the expired data frames, adjust the protection band and non-protection time window, and use the preset utility value model to optimize the time window division to ensure the timing of non-periodic traffic. Ductility.
It effectively reduces the transmission delay of non-periodic key messages, improves network performance, reduces bandwidth waste, and ensures the certainty of transmission of periodic traffic.
Smart Images

Figure CN118074841B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of intelligent substation communication technology, and in particular to a method, device and storage medium for dividing a time window in a time-aware scheduler. Background Art
[0002] The demand for power companies to provide customers with performance-guaranteed services is growing, and the construction of smart grids has become the key to the development of power systems. As an important node of the smart grid, the high-performance internal communication network with guaranteed latency is the foundation for the development of smart substations. To ensure standardized communication in substations, substations currently use the IEC 61850 unified communication standard. IEC 61850 is the only international standard for substation automation systems. IEC 61850 substations carry out data communication based on the Ethernet architecture and divide traffic into three categories, among which SMV messages are time-triggered periodic messages, while GOOSE messages and MMS messages are event-triggered non-periodic messages. TSN technology introduces a variety of traffic scheduling mechanisms and bandwidth allocation strategies to achieve determinism in traffic transmission. Among them, the TAS protocol is the key to ensuring transmission determinism. It divides traffic into protection traffic and non-protection traffic, allowing more refined transmission QoS management.
[0003] The application of TSN technology in the communication system of smart substations can achieve deterministic transmission of IEC 61850 messages. The TAS mechanism allocates a flow protection time window sufficient to complete all data transmission for periodic traffic in each scheduling cycle.
[0004] However, there are various periodic sampling data such as voltage sampling, current sampling, temperature sampling, etc. inside the smart substation. When there are differences in the arrival periods of various data and the arrival time distribution is relatively uniform, the traditional time window division method will set the TAS protection window long enough to ensure the transmission certainty of periodic traffic, which will lead to bandwidth waste, thereby seriously affecting the transmission delay performance of non-periodic key messages, and there is a problem of high transmission delay of non-periodic key messages. Summary of the invention
[0005] In view of this, the embodiments of the present invention provide a method, device and storage medium for dividing time windows in a time-aware scheduler to eliminate or improve one or more defects in the prior art. The present invention aims to solve the above-mentioned deficiencies of the TSN prior art, and can minimize the delay of non-periodic traffic in the network while ensuring the performance of periodic traffic, and solve the problem of high transmission delay of non-periodic key messages.
[0006] One aspect of the present invention provides a method for dividing a time window in a time-aware scheduler, the method comprising the following steps:
[0007] Acquire a data frame set within a first scheduling period; the data frame set includes a sampled measurement value data frame;
[0008] Determine the data frame delay corresponding to each data frame in the data frame set by using a preset delay analysis model;
[0009] Based on the data frame delay, determine the expired data frames in the data frame set to obtain the expired data frame set;
[0010] When the expired data frame set is not empty, determining the period length of the second scheduling period based on the sampling period corresponding to the sampled measurement value data frame; the second scheduling period is the next scheduling period adjacent to the first scheduling period;
[0011] Initialize a first gating list corresponding to the first scheduling period to obtain an initial gating list, and divide the second scheduling period into a protection band, a protection time window and a non-protection time window;
[0012] The partitioning benefit is obtained by subtracting the memory loss corresponding to the window partitioning and the delay loss corresponding to the sampled measurement value data frame from the sum of the priorities of the expired data frames;
[0013] According to the arrival time of each sampled measurement value data frame, the current protection time window is further divided and a protection band is added to obtain a protection time window division scheme, and the initial gating list is updated;
[0014] Based on the preset utility value model, determine the current utility value corresponding to the protection time window division scheme;
[0015] When the current utility value is equal to the partition benefit, the protection time window partition scheme is determined as the target partition scheme, and the initial gating list is determined as the second gating list.
[0016] Optionally, after determining the current utility value corresponding to the protection time window division scheme based on a preset utility value model, it also includes: when the current utility value is less than the division benefit, further dividing the current protection time window according to the arrival time of each sampled measurement value data frame and adding a protection band to obtain the protection time window division scheme.
[0017] Optionally, when the expired data frame set is an empty set, the first gating list is determined as the second gating list.
[0018] Optionally, after determining the period length of the second scheduling period based on the sampling period corresponding to the sampled measurement value data frame, the method further includes: initializing the number of divisions of the protection time window n=0; the upper limit of the number of divisions n is the number N of sampled measurement value data frames in the data frame set;
[0019] According to the arrival time of each sampled measurement value data frame, the current protection time window is further divided and a protection band is added to obtain a protection time window division scheme, and after updating the initial gating list, it also includes: setting n=n+1; when n is equal to N or the current utility value is equal to the division benefit, executing the step of determining the protection time window division scheme as the target division scheme and determining the initial gating list as the second gating list.
[0020] Optionally, the data frame set further includes a trip command data frame, a switch position change data frame or a manufacturing message specification data frame.
[0021] Optionally, the data frame delay includes a first total delay corresponding to a trip command data frame, and a second total delay corresponding to a switch position change data frame and a manufacturing message specification data frame.
[0022] Optionally, based on the data frame delay, determining the expired data frames in the data frame set to obtain the expired data frame set includes:
[0023] Obtaining a preset mapping relationship; the preset mapping relationship includes a mapping relationship between a data frame type and a delay requirement;
[0024] Traversing each data frame in the data frame set, and determining the target delay requirement corresponding to each data frame based on the data type and the preset mapping relationship of each data frame;
[0025] Compare the data frame delay with the target delay requirement to obtain a comparison result;
[0026] Based on the comparison result, expired data frames are determined in the data frame set.
[0027] Optionally, the preset mapping relationship also includes a mapping relationship between a data type and a preset priority.
[0028] Another aspect of the present invention provides an electronic device, which includes: a processor and a memory, characterized in that computer instructions are stored in the memory, and the processor is used to execute the computer instructions stored in the memory, and when the computer instructions are executed by the processor, the electronic device implements the steps of the time window division method in the above-mentioned time-aware scheduler.
[0029] Another aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, characterized in that when the program is executed by a processor, the program implements the steps of the method for dividing time windows in the above-mentioned time-aware scheduler.
[0030] The method, device and storage medium for dividing time windows in a time-aware scheduler of the present invention obtain a set of data frames in a first scheduling period; determine the data frame delay corresponding to each data frame in the data frame set; determine the expired data frames in the data frame set to obtain the expired data frame set; when the expired data frame set is not empty, determine the period length of the second scheduling period; initialize to obtain an initial gating list, and divide the second scheduling period into a protection band, a protection time window and a non-protection time window; subtract the memory loss corresponding to the window division and the delay loss corresponding to the sampled measurement value data frame from the sum of the priorities of the expired data frames to obtain the division benefit; further divide the current protection time window and add a protection band to obtain the protection time window division benefit. The algorithm updates the initial gating list according to the division scheme; determines the current utility value corresponding to the protection time window division scheme; when the current utility value is equal to the division benefit, determines the protection time window division scheme as the target division scheme, and determines the initial gating list as the second gating list; can solve the problem of high transmission delay of non-periodic critical messages; by analyzing all the delays that each data frame may face, proposes a delay analysis model to calculate the utility of the time window division algorithm scheme; at the same time, proposes a protection window division method in the TAS mechanism, and solves the critical non-periodic GOOSE traffic expiration problem by dividing the window of the periodic sampling measurement value data frame occupancy time, thereby reducing the transmission delay of non-periodic critical messages.
[0031] Additional advantages, purposes, and features of the present invention will be described in part in the following description, and will become apparent to those skilled in the art after studying the following, or may be learned from the practice of the present invention. The purposes and other advantages of the present invention may be achieved and obtained by the structures specifically indicated in the specification and the accompanying drawings.
[0032] Those skilled in the art will appreciate that the objectives and advantages that can be achieved with the present invention are not limited to the above specific description, and the above and other objectives that can be achieved by the present invention will be more clearly understood from the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] The drawings described herein are used to provide a further understanding of the present invention, constitute a part of the present application, and do not constitute a limitation of the present invention. In the drawings:
[0034] Figure 1 A method for dividing time windows in a time-aware scheduler provided in an embodiment of the present invention;
[0035] Figure 2 A schematic diagram of a TAS mechanism provided by an embodiment of the present invention;
[0036] Figure 3A method for dividing time windows in a time-aware scheduler provided in another embodiment of the present invention;
[0037] Figure 4 A block diagram of a device for dividing a time window in a time-aware scheduler provided by an embodiment of the present invention;
[0038] Figure 5 A block diagram of an electronic device provided according to an embodiment of the present invention. DETAILED DESCRIPTION
[0039] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the embodiments and the accompanying drawings. Here, the illustrative embodiments of the present invention and their descriptions are used to explain the present invention, but are not intended to limit the present invention.
[0040] It should also be noted that, in order to avoid obscuring the present invention due to unnecessary details, only structures and / or processing steps closely related to the solutions according to the present invention are shown in the accompanying drawings, while other details that are not closely related to the present invention are omitted.
[0041] It should be emphasized that the term “include / comprises” when used herein refers to the presence of features, elements, steps or components, but does not exclude the presence or addition of one or more other features, elements, steps or components.
[0042] It should also be noted that, unless otherwise specified, the term “connection” herein may refer not only to a direct connection but also to an indirect connection involving an intermediate.
[0043] Hereinafter, embodiments of the present invention will be described with reference to the accompanying drawings. In the accompanying drawings, the same reference numerals represent the same or similar components, or the same or similar steps.
[0044] The following is a detailed introduction to the method for dividing the time window in the time-aware scheduler (TAS) provided in the present application.
[0045] like Figure 1 As shown, an embodiment of the present application provides a method for dividing a time window in a time-aware scheduler. This embodiment takes the method used in a programmable switch (Programmable Switch) of a substation as an example. Specifically, it includes at least the following steps S101 to S109:
[0046] Step S101, obtaining a set of data frames in a first scheduling period.
[0047] The first scheduling period refers to any scheduling period of the time-aware scheduler. The scheduling period of the time-aware scheduler refers to the time interval for the time-aware scheduler to perform task scheduling, indicating how long the time-aware scheduler performs a task scheduling operation.
[0048] In this embodiment, the data frame set in the first scheduling period refers to the set F of all data frames in a scheduling period in the substation. For each data frame f in the data frame set, the structure definition is expressed as:
[0049] f=<T,d,type,p,s,j>
[0050] Where T is the period of data frame f; d is the expiration time of data frame f; type is the frame type of data frame f, p is the frame priority of data frame f in the communication system, which is given by the traffic mapping mechanism in the previous section, s is the length of data frame f, and j is the jitter probability of data frame f.
[0051] In this embodiment, a data frame that is not transmitted before the expiration time is regarded as an expired frame; the type of the data frame includes a sampled measurement value (SMV) type, and accordingly, the data frame set includes a sampled measurement value data frame.
[0052] Optionally, the data frame type further includes a Generic Object Oriented Substation Event (GOOSE) type or a Manufacturing Message Specification (MMS) type. The Generic Object Oriented Substation Event type includes a Trip Command (GOOSE 1A) type and a Switch Position Change Information (GOOSE 1B) type.
[0053] Correspondingly, the data frame set also includes a trip command data frame, a switch position change data frame or a manufacturing message specification data frame.
[0054] In actual implementation, the type of the data frame may also include other types, such as Simple Network Management Protocol (SNMP) type or File Transfer Protocol (FTP) type. This embodiment does not limit the type of the data frame.
[0055] Step S102: determining the data frame delay corresponding to each data frame in the data frame set by using a preset delay analysis model.
[0056] In this embodiment, the preset delay analysis model refers to a pre-established mathematical model for analyzing the delay of a trip command data frame, a switch position change data frame, and a manufacturing message specification data frame.
[0057] Specifically, the data frame delay includes a first total delay corresponding to the trip command data frame, and a second total delay corresponding to the switch position change data frame and the manufacturing message specification data frame.
[0058] Correspondingly, the preset time delay analysis model includes a first analysis sub-model corresponding to the trip command data frame, and a second analysis sub-model corresponding to the switch position change data frame and the manufacturing message specification data frame.
[0059] The first analysis sub-model is expressed by the following formula:
[0060] T G1A =T TSN +T QUE +T LP +T TRANS +T C
[0061] Where, T G1A Represents the first total delay corresponding to the trip command data frame; T TSN Indicates the TSN mechanism delay caused by the Time-Sensitive Networking (TSN) mechanism. Figure 2 Schematic diagram of TAS mechanism; T QUE Indicates the queuing delay caused by queuing of data frames of the same priority; T LP Indicates the low priority delay caused by low priority data frames; T TRANS Indicates line transmission delay; T C Indicates the credit value delay caused by TSN's credit-based traffic shaping mechanism.
[0062] TSN mechanism delay T TSN It refers to the delay caused by the TSN mechanism, including the length of the protection band and the length of the protection window. When the protection window ends, the non-protected flow can be transmitted. Among them, the protection band refers to the time period in the scheduling cycle where certain tasks or operations need to be avoided, the protection window refers to the time range in which certain specific tasks or operations are allowed to be performed, and the non-protected flow refers to the data flow that has not received special protection measures.
[0063] Specifically, the TSN mechanism latency can be expressed as follows:
[0064] T TSN =T GB +T PW
[0065] Where, TGB Indicates the length of the guard band; T PW Indicates the protection window length.
[0066] Queuing delay T QUE It refers to the queuing delay caused by the queuing of data frames with the same priority as the trip command data frame; when data frames with the same priority are queued for transmission in the gating queue, it is necessary to wait for all data frames with the same priority that have arrived at the port before to be transmitted before the current data frame can be transmitted.
[0067] Specifically, the queuing delay is expressed as follows:
[0068]
[0069] Where QUE represents the set of all other data frames in the gated queue with the same priority as the current data frame; f s Indicates data frames of the same priority; L s Represented as f s The data frame length; P represents the port rate of the substation programmable switch.
[0070] In this embodiment, the data frame set includes a sampled measurement value data frame, a trip command data frame, a switch position change data frame, or a manufacturing message specification data frame.
[0071] In this embodiment, the trip command data frame and the switch position change data frame are non-periodic messages, and therefore, the trip command data frame and the switch position change data frame are mapped to non-protection traffic in TSN.
[0072] At the same time, since the trip command is generally generated after a fault occurs and is a service group directly related to relay protection, its transmission time is part of the overall action time of the relay protection device, which directly affects the substation's processing speed for abnormal conditions. Therefore, the priority of the trip command should be the highest, set to 7.
[0073] The switch position change information is similar to the trip command. It is usually generated after a fault occurs. After the circuit breaker successfully trips, it is necessary to quickly inform the upper layer equipment through this group so that the station control layer and protection control equipment know the on-site situation and avoid sending repeated commands. Therefore, the priority of the switch position change information is lower than the trip command and is set to 6.
[0074] In this embodiment, the sampled measurement value data frame is mainly used to transmit sampled value information. The sampled value information has extremely high latency requirements, which are the same as the latency requirements of the trip command, and is a periodically transmitted message. Therefore, it is mapped to the protection traffic in TSN.
[0075] Since the trip command and switch position change information are only generated when a fault occurs, they are transmitted in a short period of time, while the sampled value information is transmitted continuously and stably, and the data flow is very large. Even if the priority of the trip command and switch position change information is higher than the sampled value information, so that the switch processes the trip command and switch position change information first, the impact on the real-time performance of the sampled value information is small. Therefore, the priority of the sampled value information is set to 5.
[0076] In this embodiment, the manufacturing message standard data frame includes multiple types of information, such as device status information, file transfer information or time synchronization information, and belongs to non-periodic traffic. The manufacturing message standard data frame is mapped to non-protected traffic in TSN.
[0077] Among them, the device status information does not have high requirements for latency, belongs to regular business during normal operation, and has relatively stable traffic; file transfer information has no specific latency requirements, and file transfer information mainly includes daily operation diaries, fault records, and fault log files, etc., which have little impact on primary and secondary equipment. If a conflict occurs, other business groups should be given priority; therefore, the priorities of device status information, time synchronization information, and file transfer information are uniformly set to 4.
[0078] In actual implementation, there are also protocols in the substation network that are not directly related to the IEC 61850 standard itself, such as the Simple Network Management Protocol or the File Transfer Protocol. The Best Effort flow in the substation network is mainly used for network management and monitoring and has no specific latency requirements. Based on this, the priority of the data frames corresponding to these not directly related protocols is set to 0, 1 or 3.
[0079] In this embodiment, the low priority delay T LP It refers to the delay caused by low-priority data frames; when a low-priority data frame arrives earlier than the current data frame and is being transmitted, the current data frame needs to wait until the low-priority data frame is transmitted before it can be transmitted. Specifically, the low-priority delay T LP It can be expressed by the following formula:
[0080]
[0081] Where, L max Indicates the maximum frame length; P indicates the port rate of the substation programmable switch.
[0082] Line transmission delay T TRANS Indicates the transmission delay of a data frame on a fixed line in the network, which consists of line transmission delay and data forwarding delay. Specifically, line transmission delay can be expressed by the following formula:
[0083]
[0084] Where, T path is the line transmission delay; L0 is the current frame length; P represents the port rate of the substation programmable switch.
[0085] Credit value delay T C It refers to the delay caused by TSN's credit-based traffic shaping mechanism. After transmitting multiple data frames of the same type, the credit value of this type of traffic will drop to a negative number and transmission will be prohibited. Transmission can only continue when the credit value returns to positive again. Specifically, the credit value delay can be expressed by the following formula:
[0086]
[0087] In the formula, α + Indicates the idle time credit change rate in TSN's credit-based traffic shaping mechanism; α - Indicates the credit change rate when sending in the TSN credit-based traffic shaping mechanism; C max Indicates the time required to send a trip command data frame of maximum length.
[0088] In this embodiment, the second analysis sub-model is represented by the following formula:
[0089] T G1B / MMS =T TSN +T QUE +T LP +T TRANS +T C +T HP
[0090] Where, T G1B / MMS Indicates switch position change data frame and manufacturing message specification data frame; T TSN Indicates the TSN mechanism delay caused by the TSN mechanism; T QUE Indicates the queuing delay caused by queuing of data frames of the same priority; T LP Indicates the low priority delay caused by low priority data frames; T TRANs Indicates line transmission delay; T C Indicates the credit value delay caused by TSN's credit-based traffic shaping mechanism; T HP Indicates the high priority delay caused by high priority data frames.
[0091] Since the TSN mechanism follows a strict priority policy, high-priority data frames are transmitted first, which will cause delays for low-priority data frames. When there are data frames in the high-priority queue that have not been transmitted, the low-priority data frames can only be transmitted after the high-priority data frames are transmitted. Specifically, the high-priority delay T HP It is expressed by the following formula:
[0092]
[0093] Where H represents the set of all other data frames in the gated queue with higher priority than the current data frame; f hp is a high-priority data frame; P represents the port rate of the substation programmable switch; L hp f hp The frame length.
[0094] Step S103: determining expired data frames in the data frame set based on the data frame delay to obtain an expired data frame set.
[0095] In this embodiment, the delay requirements of different types of data frames are the same or different. The data frame delay is compared with the delay requirement corresponding to the data frame to obtain a comparison result; if the comparison result indicates that the data frame delay is greater than the delay requirement corresponding to the data frame, the data frame is determined as an expired data frame.
[0096] Optionally, the delay requirement corresponding to the sampled measurement value data frame is 3 milliseconds; the delay requirement corresponding to the trip command data frame is 3 milliseconds; the delay requirement corresponding to the switch position change data frame is 10 milliseconds to 20 milliseconds; and the delay requirement corresponding to the manufacturing message specification data frame is 100 milliseconds to 1000 milliseconds.
[0097] In addition, the latency requirement for Best Effort flows such as Simple Network Management Protocol or File Transfer Protocol can be greater than 1000 milliseconds.
[0098] Based on this, in this embodiment, by analyzing the characteristics of various types of traffic transmission and latency requirements in the smart substation, an IEC 61850 traffic mapping solution based on TSN technology is proposed, so that the IEC 61850 traffic corresponds to the internal traffic of the TSN mechanism, which can solve the fusion problem between protocols.
[0099] Specifically, based on the data frame delay, expired data frames in the data frame set are determined to obtain the expired data frame set, including: obtaining a preset mapping relationship; the preset mapping relationship includes a mapping relationship between a data frame type and a delay requirement; traversing each data frame in the data frame set, and determining a target delay requirement corresponding to each data frame based on the data type of each data frame and the preset mapping relationship; comparing the data frame delay with the target delay requirement to obtain a comparison result; based on the comparison result, determining expired data frames in the data frame set.
[0100] Optionally, the preset mapping relationship also includes a mapping relationship between a data type and a preset priority.
[0101] For example: the priority of the sampled measurement value data frame is mapped to 5; the priority of the trip command data frame is mapped to 7; the priority of the switch position change data frame is mapped to 6; the priority of the manufacturing message specification data frame is mapped to 4; the priority of the Best Effort flow such as Simple Network Management Protocol or File Transfer Protocol is mapped to 0, 1 or 3.
[0102] Step S104: when the expired data frame set is not empty, determine the period length of the second scheduling period based on the sampling period corresponding to the sampled measurement value data frame, wherein the second scheduling period is the next scheduling period adjacent to the first scheduling period.
[0103] Specifically, the period length of the second scheduling period is the least common multiple of the sampling periods corresponding to the sampled measurement value data frames.
[0104] In addition, when the expired data frame set is an empty set, the first gating list is determined as the second gating list.
[0105] Step S105 , initializing a first gating list corresponding to the first scheduling period to obtain an initial gating list, and dividing the second scheduling period into a protection band, a protection time window, and a non-protection time window.
[0106] Step S106, subtracting the memory loss corresponding to the window division and the delay loss corresponding to the sampled measurement value data frame from the sum of the priorities of the expired data frames to obtain the division benefit.
[0107] In this embodiment, a preset utility value model based on utility is formed by combining the delay analysis model with the memory loss generated by window partitioning and the delay loss corresponding to the sampled measurement value data frame, and the partitioning benefit is obtained through the preset utility value model.
[0108] Specifically, the utility-based preset utility value model is expressed by the following formula:
[0109] W TOTAL =ω1×W T -ω2×W GCL -ω3×W JIT
[0110] Where W T W represents the delay benefit brought by time window division; GCL Indicates the memory loss caused by window division; W JIT represents the delay loss of the sampled measurement value data frame generated by window division; ω1, ω2 and ω3 are weight parameters, and ω1>>ω3>ω2.
[0111] The delay benefit of a protection window partitioning scheme is the sum of the priorities of the expired frames optimized within a scheduling cycle. Based on this, the delay benefit W brought by time window partitioning is T It is expressed by the following formula:
[0112] W T =∑ f∈Q fp
[0113] Where fp is the priority of the data frame that meets the delay requirement; Q is the set of frames that have been delay-optimized within a scheduling cycle.
[0114] The memory loss is determined by the length of the gate list. Each time a time window is divided, the length of the gate list increases by 3. Based on this, the memory loss caused by window division is W GCL It is expressed by the following formula:
[0115] W GCL =3n
[0116] Wherein, n represents the number of divisions that is greater than the protection window division scheme of the first scheduling period.
[0117] The transmission of the sampled measurement value data frame has jitter, and the time it arrives at the transmission port may deviate from the expected time. The delay loss W of the sampled measurement value data frame JIT It is expressed by the following formula:
[0118] W JIT =f SMV .j×fp×n
[0119] In the formula, f SMV .j represents the jitter probability of the sampled measurement value data frame; fp is the priority of the sampled measurement value data frame; and n is the number of divisions of the protection window.
[0120] In this embodiment, by using a preset utility value model, the priorities of all data frames in the expired data frame set are accumulated and the memory loss corresponding to the window division and the delay loss of the sampled measurement value data are subtracted to obtain the maximum division benefit.
[0121] Step S107: further divide the current protection time window and add a protection band according to the arrival time of each sampled measurement value data frame, obtain a protection time window division scheme, and update the initial gating list.
[0122] In this embodiment, the protection time window is divided into a number of continuous sub-time windows according to the arrival time of the sampled measurement value data frame. In each sub-time window, the timestamps of the arrived sampled measurement value data frames are compared and sorted to ensure the order and accuracy of the data. Then, the size of the protection band is determined according to the difference in timestamps, that is, a period of time is added at both ends of the protection time window as a protection band to handle possible delays or fluctuations.
[0123] Step S108: determining the current utility value corresponding to the protection time window division scheme based on a preset utility value model.
[0124] Step S109: when the current utility value is equal to the partition benefit, the protection time window partition scheme is determined as the target partition scheme, and the initial gating list is determined as the second gating list.
[0125] In addition, based on the preset utility value model, after determining the current utility value corresponding to the protection time window division scheme, it also includes: when the current utility value is less than the division benefit, further dividing the current protection time window according to the arrival time of each sampled measurement value data frame and adding a protection band to obtain the protection time window division scheme.
[0126] In this embodiment, there is an upper limit on the number of divisions of the protection time window. In each round of scheduling cycle, the number of divisions n of the protection time window needs to be initialized to 0, and the upper limit of the number of divisions n is the number of sampled measurement value data frames in the data frame set N. When the number of divisions of the protection time window reaches the upper limit, the protection time window division scheme is determined as the target division scheme, and the gating list is updated.
[0127] Specifically, after determining the period length of the second scheduling period based on the sampling period corresponding to the sampled measurement value data frame, the method further includes: initializing the number of divisions of the protection time window n=0.
[0128] Correspondingly, according to the arrival time of each sampled measurement value data frame, the current protection time window is further divided and a protection band is added to obtain a protection time window division scheme, and after updating the initial gating list, it also includes: setting n=n+1; when n is equal to N or the current utility value is equal to the division benefit, executing the step of determining the protection time window division scheme as the target division scheme and determining the initial gating list as the second gating list.
[0129] The method for dividing time windows in a time-aware scheduler provided in an embodiment obtains a set of data frames in a first scheduling period; determines the data frame delay corresponding to each data frame in the data frame set; determines expired data frames in the data frame set to obtain an expired data frame set; when the expired data frame set is not empty, determines the period length of a second scheduling period; initializes to obtain an initial gating list, and divides the second scheduling period into a protection band, a protection time window, and a non-protection time window; subtracts the memory loss corresponding to the window division and the delay loss corresponding to the sampled measurement value data frame from the sum of the priorities of the expired data frames to obtain a division benefit; further divides the current protection time window and adds a protection band to obtain a protection time window division scheme , update the initial gating list; determine the current utility value corresponding to the protection time window division scheme; when the current utility value is equal to the division benefit, determine the protection time window division scheme as the target division scheme, and determine the initial gating list as the second gating list; it can solve the problem of high transmission delay of non-periodic critical messages; by analyzing all the delays that each data frame may face, a delay analysis model is proposed to calculate the utility of the time window division algorithm scheme; at the same time, a protection window division method in the TAS mechanism is proposed, and the critical non-periodic GOOSE traffic expiration problem is solved by dividing the window of the periodic sampling measurement value data frame occupancy time, thereby reducing the transmission delay of non-periodic critical messages.
[0130] In order to more clearly understand the method for dividing time windows in the time-aware scheduler provided in the present application, an example is given below to illustrate the method. Figure 3 , the method includes the following steps:
[0131] Step S301, divide the second scheduling period, initialize the gating list, initialize the number of divisions n of the protection time window, and set the upper limit N of the number of divisions.
[0132] Step S302: Under the division scheme of the first scheduling period, the delays of all frames in the data frame set are calculated.
[0133] Step S303, sequentially determine whether the delay corresponding to the current data frame f meets the delay requirement. If it meets the delay requirement, execute step S304; otherwise, execute step S305.
[0134] Step S304: the expired data frame set S=S∪{f}, and based on a preset utility value model, determine the partitioning benefit.
[0135] Step S305, determining whether all data frames in the data frame set have been calculated, and executing step S306 if the calculation is completed; otherwise, executing step S303.
[0136] Step S306, determining whether the expired data frame set is an empty set; if the expired data frame set is an empty set, the process ends; otherwise, executing step S307.
[0137] Step S307, the number of divisions n=n+1, calculate the current utility value corresponding to the division scheme in the current round, and update the gating list.
[0138] Step S308, determine whether n is equal to N or whether the current utility value is equal to the partition benefit; if n is equal to N or the current utility value is equal to the partition benefit, end; otherwise, execute step S307.
[0139] The following is a detailed description of the time window division method in the time-aware scheduler of the present invention by simulating a substation communication network with examples:
[0140] like Figure 3 As shown in the figure, a multi-hop network topology consisting of 7 terminal nodes is built, in which workStation1 / 2 / 3 respectively send trip command data frames (GOOSE 1A), switch position change data frames (GOOSE 1B) and manufacturing message specification data frames (MMS data frames), and the target terminals are all backupServer.
[0141] RobotController1 and robotController2 respectively send a periodic sampled measurement value data frame (SMV data frame) with the same period but different start time, and the target terminal is roboticArm.
[0142] SwitchA and switchB are two substation programmable switches, which implement TAS mechanism at the output ports. All links in the network are full-duplex with a bandwidth of 100Mbps. According to the unified communication standard IEC61850 protocol within the substation.
[0143] In this embodiment, the frame length of the SMV data frame is 283 bytes, the sending period is 417 μs, the starting sending time is 0 μs / 250 μs / 400 μs, the source / destination node is robotController / roboticArm, and the frame jitter rate is 0.1.
[0144] The frame length of GOOSE 1A is 273 bytes, the sending period is 50μs, the starting sending time is 0μs, and the source / destination nodes are workStation1 / backupServer.
[0145] The frame length of GOOSE 1B is 273 bytes, the sending period is 200μs, the starting sending time is 0μs, and the source / destination nodes are workStation2 / backupServer.
[0146] The frame length of the MMS message is 1500 bytes, the sending period is random (exponential distribution λ=0.1), the starting sending time is 0 μs, and the source / destination node is workStation3 / backupServer.
[0147] The TSN super period is 417μs, the link bandwidth is 100Mbps, and the total simulation time is 1s.
[0148] The SMV message start time parameters are set to:
[0149] Scenario 1: SMV (robotController1) start time 0μs, SMV (robotController2) start time 0μs.
[0150] Scenario 2: SMV (robotController1) start time 0μs, SMV (robotController2) start time 250μs.
[0151] Scenario 3: SMV (robotController1) start time 0μs, SMV (robotController2) start time 400μs.
[0152] Specifically, the method for dividing the time window in the time-aware scheduler at this time includes the following steps S401 to S405:
[0153] Step S401, calculating the second scheduling period T according to the least common multiple of the periods of all SMV data frames GCL The time taken to initialize the gating list is 417 μs, and the upper limit of the number of divisions N is set to 1, and the initial number of divisions n is set to 0.
[0154] Step S402, calculating the delay of all messages in the network under the division scheme of the first scheduling period, and generating a set S of expired data frames.
[0155] In scenario 1, S is an empty set, but in scenarios 2 and 3, S is not empty. Therefore, the maximum partition benefit W in scenarios 2 and 3 is calculated. OP .
[0156] In scenario 2, GOOSE 1B and MMS traffic are at risk of expiration. OP is 10; in scenario 3, all non-periodic traffic faces the risk of expiration, W OP It is 72.
[0157] Step S403: if the set S is empty, directly output the partitioning scheme of the first scheduling period; otherwise, execute step S404 to perform cyclic partitioning.
[0158] In this embodiment, scenario 1 outputs a division scheme for the first scheduling period, and scenarios 2 and 3 perform the cyclic division in step S404.
[0159] Step S404, the number of divisions n is increased by 1, and the protection time window is further divided and a protection band is added according to the arrival time of each SMV data frame and all the division schemes in the previous round, so as to obtain all the division schemes in the current round; and the current utility value corresponding to each scheme in the current round is calculated to obtain the current global maximum current utility value W max , update the corresponding gating list.
[0160] Step S405, repeat step S404 until n=N or W max =W OP So far, output W max The corresponding gate list.
[0161] The embodiments described above are intended to help readers understand the principles of the present invention, but the protection scope of the present invention is not limited thereto. Various other substitutions or modifications made by technicians in this field based on the technical solutions disclosed by the present invention without departing from the essence of the present invention are all within the protection scope of the present invention.
[0162] Figure 4 This is a block diagram of a time window division device in a time-aware scheduler provided by an embodiment of the present application. In this embodiment, the device is applied to a receiving end, and the device includes at least the following modules: a set acquisition module 410, a delay determination module 420, a set determination module 430, a length determination module 440, a first division module 450, a benefit determination module 460, a second division module 470, a utility determination module 480, and a scheme determination module 490.
[0163] The set acquisition module 410 is used to acquire a data frame set within a first scheduling period; the data frame set includes a sampled measurement value data frame.
[0164] The delay determination module 420 is used to determine the data frame delay corresponding to each data frame in the data frame set by using a preset delay analysis model.
[0165] The set determination module 430 is used to determine the expired data frames in the data frame set based on the data frame delay to obtain the expired data frame set.
[0166] The length determination module 440 is used to determine the period length of the second scheduling period based on the sampling period corresponding to the sampled measurement value data frame when the expired data frame set is not empty; the second scheduling period is the next scheduling period adjacent to the first scheduling period.
[0167] The first division module 450 is used to initialize the first gating list corresponding to the first scheduling period, obtain the initial gating list, and divide the second scheduling period into a protection band, a protection time window, and a non-protection time window.
[0168] The benefit determination module 460 is used to subtract the memory loss corresponding to the window division and the delay loss corresponding to the sampled measurement value data frame from the sum of the priorities of the expired data frames to obtain the division benefit.
[0169] The second division module 470 is used to further divide the current protection time window and add a guard band according to the arrival time of each sampled measurement value data frame, obtain a protection time window division scheme, and update the initial gating list.
[0170] The utility determination module 480 is used to determine the current utility value corresponding to the protection time window division scheme based on a preset utility value model.
[0171] The scheme determination module 490 is used to determine the protection time window partition scheme as the target partition scheme and the initial gating list as the second gating list when the current utility value is equal to the partition benefit.
[0172] For relevant details, refer to the above method embodiment.
[0173] It should be noted that: the device for dividing time windows in the time-aware scheduler provided in the above embodiment only uses the division of the above functional modules as an example when dividing the time windows in the time-aware scheduler. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device for dividing time windows in the time-aware scheduler is divided into different functional modules to complete all or part of the functions described above. In addition, the device for dividing time windows in the time-aware scheduler provided in the above embodiment and the method for dividing time windows in the time-aware scheduler belong to the same concept. The specific implementation process is detailed in the method embodiment, which will not be repeated here.
[0174] This embodiment provides an electronic device, such as Figure 5 As shown, the electronic device at least includes a processor 510 and a memory 520 .
[0175] The processor 510 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 510 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). The processor 510 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 510 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 510 may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.
[0176] The memory 520 may include one or more computer-readable storage media, which may be non-transitory. The memory 520 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In some embodiments, the non-transitory computer-readable storage medium in the memory 520 is used to store at least one instruction, which is used to be executed by the processor 510 to implement the method for dividing time windows in the time-aware scheduler provided in the method embodiment of the present application.
[0177] In some embodiments, the electronic device may also optionally include: a peripheral device interface and at least one peripheral device. The processor 510, the memory 520 and the peripheral device interface may be connected via a bus or a signal line. Each peripheral device may be connected to the peripheral device interface via a bus, a signal line or a circuit board. Schematically, the peripheral devices include but are not limited to: a radio frequency circuit, a touch display screen, an audio circuit, and a power supply.
[0178] Of course, the electronic device may also include fewer or more components, which is not limited in this embodiment.
[0179] Optionally, the present application also provides a computer-readable storage medium, in which a program is stored, and the program is loaded and executed by a processor to implement the method for dividing time windows in the time-aware scheduler of the above method embodiment.
[0180] It should be understood by those skilled in the art that the exemplary components, systems and methods described in conjunction with the embodiments disclosed herein can be implemented in hardware, software or a combination of the two. Whether it is performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention. When implemented in hardware, it can be, for example, an electronic circuit, an application specific integrated circuit (ASIC), appropriate firmware, a plug-in, a function card, etc. When implemented in software, the elements of the present invention are programs or code segments used to perform the required tasks. The program or code segment can be stored in a machine-readable medium, or transmitted on a transmission medium or a communication link via a data signal carried in a carrier.
[0181] It should be clear that the present invention is not limited to the specific configuration and processing described above and shown in the figures. For the sake of simplicity, a detailed description of the known method is omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present invention is not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications and additions, or change the order between the steps after understanding the spirit of the present invention.
[0182] In the present invention, features described and / or illustrated for one embodiment may be used in the same or similar manner in one or more other embodiments, and / or combined with or replace features of other embodiments.
[0183] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the embodiments of the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A method for dividing time windows in a time-aware scheduler, characterized in that: The method comprises the following steps: Acquire a data frame set within a first scheduling period; the data frame set includes a sampled measurement value data frame; Determine the data frame delay corresponding to each data frame in the data frame set by using a preset delay analysis model; Based on the data frame delay, determine the expired data frames in the data frame set to obtain an expired data frame set; When the expired data frame set is not empty, determining the period length of a second scheduling period based on the sampling period corresponding to the sampled measurement value data frame; the second scheduling period is a next scheduling period adjacent to the first scheduling period; Initialize a first gating list corresponding to the first scheduling period to obtain an initial gating list, and divide the second scheduling period into a protection band, a protection time window, and a non-protection time window; The memory loss corresponding to the window division and the delay loss corresponding to the sampled measurement value data frame are subtracted from the sum of the priorities of the expired data frames to obtain the division benefit; According to the arrival time of each sampled measurement value data frame, the current protection time window is further divided and a protection band is added to obtain a protection time window division scheme, and the initial gating list is updated; Based on a preset utility value model, determine the current utility value corresponding to the protection time window division scheme; wherein the preset utility value model is represented by the following formula: IN TOTAL =ω1×W T -ω2×W GCL -ω3×W JIT In the formula, W T represents the delay benefit brought by time window division; the W GCL Represents the memory loss caused by window division; the W JIT represents the delay loss of the sampled measurement value data frame generated by window division; the ω1, ω2 and ω3 are weight parameters; In a case where the current utility value is equal to the partition benefit, the protection time window partitioning scheme is determined as a target partitioning scheme, and the initial gating list is determined as a second gating list.
2. The method for dividing time windows in a time-aware scheduler according to claim 1, characterized in that: After determining the current utility value corresponding to the protection time window division scheme based on the preset utility value model, it also includes: when the current utility value is less than the division benefit, executing the step of further dividing the current protection time window according to the arrival time of each sampled measurement value data frame and adding a protection band to obtain the protection time window division scheme.
3. The method for dividing time windows in a time-aware scheduler according to claim 1, characterized in that: When the expired data frame set is an empty set, the first gating list is determined as the second gating list.
4. The method for dividing time windows in a time-aware scheduler according to claim 1, characterized in that: After determining the period length of the second scheduling period based on the sampling period corresponding to the sampled measurement value data frame, the method further includes: initializing the number of divisions of the protection time window n=0; the upper limit of the number of divisions n is the number N of the sampled measurement value data frames in the data frame set; The method further divides the current protection time window and adds a protection band according to the arrival time of each sampled measurement value data frame to obtain a protection time window division scheme, and updates the initial gating list, and further includes: setting n=n+1; when n is equal to N or the current utility value is equal to the division benefit, executing the step of determining the protection time window division scheme as the target division scheme and determining the initial gating list as the second gating list.
5. The method for dividing time windows in a time-aware scheduler according to claim 1, characterized in that: The data frame set also includes a trip command data frame, a switch position change data frame or a manufacturing message specification data frame.
6. The method for dividing time windows in a time-aware scheduler according to claim 5, characterized in that: The data frame delay includes a first total delay corresponding to the trip command data frame, and a second total delay corresponding to the switch position change data frame and the manufacturing message specification data frame.
7. The method for dividing time windows in a time-aware scheduler according to claim 1, characterized in that: The determining, based on the data frame delay, expired data frames in the data frame set to obtain the expired data frame set includes: Obtaining a preset mapping relationship; the preset mapping relationship includes a mapping relationship between a data frame type and a delay requirement; Traversing each data frame in the data frame set, and determining a target latency requirement corresponding to each data frame based on a data type of each data frame and the preset mapping relationship; Compare the data frame delay with the target delay requirement to obtain a comparison result; Based on the comparison result, the expired data frame is determined in the data frame set.
8. The method for dividing time windows in a time-aware scheduler according to claim 7, characterized in that: The preset mapping relationship also includes a mapping relationship between the data type and the preset priority.
9. An electronic device comprising a processor and a memory, characterized in that: The memory stores computer instructions, and the processor is used to execute the computer instructions stored in the memory. When the computer instructions are executed by the processor, the electronic device implements the steps of the method as claimed in any one of claims 1 to 8.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.
Citation Information
Patent Citations
Message scheduling method of time-aware scheduler and time-aware scheduler
CN114401233A
Substation business data deterministic transmission method and system and network switch
CN115695329A
Self-adaptive adjustment algorithm based on time-aware shaper
CN117200961A
KR20230020210A
