Adaptive scheduling method and system for communication network
By calculating the difference between the response processing time of real-time data packets in the EPA communication network and the pre-allocated period time sub-slice, the time slice adjustment declaration message is generated, which solves the bandwidth of the EPA communication network when processing high-priority messages. Waste and real-time issues achieve more efficient bandwidth utilization and real-time guarantee.
Patent Information
- Application Number
- CN202411983919.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-02-07
- Estimated Expiration
- 2044-12-31
AI Technical Summary
When processing high-priority triggered messages, EPA communication networks have problems such as wasting bandwidth and real-time inability to guarantee, especially when devices need to transmit short data frames.
By calculating the difference between the response processing time of the real-time data packet and the periodic time sub-slice pre-allocated for it by the communication network, the corresponding time slice adjustment declaration message is generated, thereby adjusting the time slice and improving the adaptability of the communication network. .
It significantly improves the adaptability of communication network scheduling, reduces bandwidth waste, and ensures real-time real-time data.
Smart Images

Figure CN119402439A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of industrial communication networks, and in particular to an adaptive scheduling method and system for communication networks. Background Art
[0002] EPA (Ethernet for Plant Automation) is a real-time Ethernet technology for control systems independently developed by China. It has been included in the international fieldbus standard IEC61158 and the real-time Ethernet standard IEC61784. Currently, EPA has been widely used in many fields such as electricity, chemical industry, machinery, mining, and petroleum.
[0003] The minimum communication cycle of the EPA communication network is called the communication macrocycle, which is divided into cycle time and non-cycle time. In the EPA communication network, each device sends cycle data during the cycle time and non-cycle data during the non-cycle time. In a complex control system, there are both cycle messages and non-cycle messages, as well as high-priority trigger messages. The processing response time of high-priority trigger messages is usually required to be much shorter than the communication macrocycle.
[0004] When processing multiple types of real-time data communications, the device needs to be allocated a larger time sub-slice to adapt to the communication requirements of the longest data frame. Therefore, although the current scheduling method of the EPA communication network can ensure the communication certainty of various messages, it will not be able to guarantee the real-time requirements when facing messages whose processing response time is much shorter than the communication macrocycle. At this time, the device has a serious waste of bandwidth when transmitting short data frames (i.e., the processing response time is small). At the same time, when a time sub-slice cannot transmit multiple real-time data frames, there are also problems such as the inability to guarantee the real-time nature of real-time data. Summary of the invention
[0005] In response to the above problems, the present disclosure provides an adaptive scheduling method and system for a communication network, which can not only determine the difference between the periodic time sub-slice and the response processing time by calculating the response processing required for the real-time data message and the periodic time sub-slice pre-allocated by the communication network for the real-time data message, but also generate a corresponding time slice adjustment declaration message according to the difference, thereby facilitating corresponding time adjustment based on the generated time slice adjustment declaration message, thereby significantly improving the adaptability of communication network scheduling and solving the above problems.
[0006] According to a first aspect of the present disclosure, there is provided an adaptive scheduling method for a communication network, the adaptive scheduling method comprising: obtaining a real-time data message sent by a device to the communication network within a macrocycle; calculating the response processing time of the communication network to the real-time data message; obtaining a cycle time sub-slice pre-allocated by the communication network to the device within the macrocycle; comparing the size of the cycle time sub-slice with the response processing time to calculate the difference between the cycle time sub-slice and the response processing time; and generating a corresponding time slice adjustment declaration message based on the calculated difference to send a time slice adjustment declaration message including time slice adjustment information to the communication network.
[0007] In one embodiment, the method further includes: broadcasting the time slice adjustment declaration message to other devices in the communication network; and adjusting the real-time data message sending time of the other devices based on the time slice information included in the time slice adjustment declaration message.
[0008] In one embodiment, generating a corresponding time slice adjustment declaration message based on the calculated difference includes: in response to determining that the periodic time sub-slice is greater than the response processing time, generating a time slice adjustment declaration message including spare time slice information based on the difference; and in response to determining that the periodic time sub-slice is less than the response processing time, generating a time slice adjustment declaration message carrying increased time slice information based on the difference.
[0009] In one embodiment, the method further includes: after calculating the difference between the periodic time sub-slice and the response processing time, instead of generating a time slice adjustment declaration message, a corresponding time slice adjustment declaration field is added to the acquired real-time data message.
[0010] In one embodiment, the method also includes: determining whether the device has a real-time data message to be sent in the macro cycle; in response to determining that there is a real-time data message to be sent, determining the response processing time of the communication network to the real-time data message to be sent; and in response to determining that the cycle time sub-slice is greater than the response processing time and the difference is greater than the first response processing time, not generating a time slice adjustment declaration message but sending the real-time data message to be sent in the device to the communication network.
[0011] In one embodiment, the method also includes: after sending the time slice adjustment declaration message to the communication network, adjusting the cycle time and non-cycle time in the macro cycle based on the time slice information included in the time slice adjustment declaration message; after adjusting the cycle time of the macro cycle, determining whether the device has a real-time data message to be sent in the macro cycle; and in response to determining that the device has a real-time data message to be sent, determining the sending time of the real-time data message to be sent based on the adjusted cycle time and the time slice adjustment declaration.
[0012] In one embodiment, after the cycle time and non-cycle time of the macro cycle are adjusted, the macro cycle time is kept unchanged.
[0013] According to the second aspect of the present disclosure, a system for implementing the adaptive scheduling method according to the first aspect of the present disclosure is provided, the system comprising: an acquisition module, configured to acquire real-time data packets sent by a device to a communication network within the same macrocycle; a communication network unit, configured to pre-allocate periodic time sub-slices for the real-time data packets of the device; and a control unit, configured to be communicatively connected with the acquisition module and the communication network unit, calculate the response processing time of the communication network to the real-time data packets and the difference between the periodic time sub-slice and the response processing time; generate a corresponding time slice adjustment declaration message based on the difference, and send the time slice adjustment declaration message to the communication network unit.
[0014] According to a third aspect of the present disclosure, a computing device for implementing adaptive scheduling of a communication network is provided, the computing device comprising: one or more processors; and a memory storing computer executable instructions, which, when executed by the one or more processors, enables the one or more processors to execute the adaptive scheduling method according to the first aspect of the present disclosure.
[0015] According to a fourth aspect of the present disclosure, a non-volatile storage medium having computer executable instructions stored thereon is provided. When the computer executable instructions are executed by a computer, the computer executes the adaptive scheduling method according to the first aspect or the third aspect of the present disclosure.
[0016] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. In the accompanying drawings, the same or similar reference numerals represent the same or similar elements.
[0019] Figure 1 A schematic diagram showing the waste of communication network bandwidth in the prior art is shown.
[0020] Figure 2 A schematic diagram showing the waste of communication network bandwidth in the prior art is shown.
[0021] Figure 3 The diagram shows the insufficient real-time performance of the communication network in the prior art.
[0022] Figure 4 A flow chart of an adaptive scheduling method for a communication network according to an embodiment of the present disclosure is shown.
[0023] Figure 5 A schematic diagram of a time slice adjustment message sent to a communication network according to an embodiment of the present disclosure is shown.
[0024] Figure 6 A schematic diagram showing the adjusted real-time data message sending time and cycle time of the device 2 according to an embodiment of the present disclosure is shown.
[0025] Figure 7 A schematic diagram showing the adjusted real-time data message sending time and cycle time of the device 2 according to another embodiment of the present disclosure is shown.
[0026] Figure 8 A schematic diagram of a time slice adjustment message sent to a communication network according to an embodiment of the present disclosure is shown.
[0027] Fig. 9 A schematic diagram of a time slice adjustment message sent to a communication network according to another embodiment of the present disclosure is shown. DETAILED DESCRIPTION
[0028] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.
[0029] As used herein, the term "including" and its variations mean open inclusion, i.e., "including but not limited to". Unless otherwise stated, the term "or" means "and / or". The terms "an example embodiment" and "an embodiment" mean "at least one example embodiment". The term "another embodiment" means "at least one additional embodiment". Other explicit and implicit definitions may also be included below.
[0030] Each device in the EPA communication network transmits data according to the communication macrocycle. The communication macrocycle is divided into cycle time and non-cycle time. During the cycle time, each device is allocated a non-conflicting cycle time slice for transmitting real-time data. At the beginning of each cycle time slice allocated to it, each device in the EPA communication network sends a periodic message according to the preset configuration to transmit a frame of real-time data. As mentioned above, although the current scheduling method of the EPA communication network can ensure the communication certainty of various messages, when processing multiple types of real-time data communications, the device needs to be allocated a larger time sub-slice to adapt to the communication requirements of the longest data frame.
[0031] In the EPA communication network, there is a situation where a certain device needs to transmit real-time data of different lengths. When configuring the periodic time sub-slice of the device, the periodic time sub-slice must meet the requirements of real-time data message transmission carrying the longest payload data. Assuming that a certain device needs to transmit real-time data of two different lengths, the periodic time sub-slice allocated to the device must meet the requirements of real-time data message communication carrying the longest payload data. In this case, Figure 1 As shown, when the device needs to send a real-time data message carrying long payload data within macro cycle time 1, and needs to send a real-time data message carrying short payload or no payload data within macro cycle time 2 and 3, there is an idle time slice within the cycle time sub-slice allocated to it. When the device transmits the real-time data message carrying short or no payload data, there is a serious waste of time sub-slices, thereby resulting in bandwidth waste.
[0032] In another scenario, Figure 2 As shown in FIG. 1 , the macrocycle time of the communication network is Tm, where the cycle time is Tp and the non-cycle time is Tnp. Device 1 and device 2 send real-time data packets to the communication network within the cycle time of the communication network, where the time when device 1 and device 2 send real-time data packets are T0 and T1 respectively, and the communication network pre-allocates certain cycle time slices for device 1 and device 2. Figure 2 As shown, when device 1 needs to send a real-time data message carrying long payload data to the communication network in the first macro cycle, and send a real-time data message carrying short payload data to the communication network in the second macro cycle, there is serious waste of cycle time sub-slices when the device transmits the real-time data message carrying short payload data, thereby resulting in bandwidth waste.
[0033] At the same time, when a periodic time sub-slice cannot transmit multiple real-time data messages, there is also a problem that the real-time performance of the real-time data messages cannot be guaranteed. Figure 3As shown, the periodic time sub-slice allocated to device 1 satisfies the need to send a real-time data message carrying long payload data, but cannot satisfy the need to send a real-time data message carrying long payload data and a real-time data message carrying short payload data. At this time, the real-time data message carrying short payload data needs to be delayed until the next macrocycle time to be sent. When the real-time data communication requirements change, there is a problem that the real-time performance cannot meet the application requirements.
[0034] Therefore, how to improve the adaptive scheduling capability of the communication network to improve the utilization efficiency of the communication network bandwidth and ensure the real-time nature of real-time data messages becomes a consideration.
[0035] Based on the above situation, the present disclosure provides an improved adaptive scheduling method and system for communication networks, which can not only determine the difference between the periodic time sub-slice and the response processing time by calculating the response processing required for the real-time data message and the periodic time sub-slice pre-allocated by the communication network for the real-time data message, but also generate a corresponding time slice adjustment declaration message according to the difference, thereby facilitating the corresponding time adjustment based on the generated time slice adjustment declaration message, thereby significantly improving the adaptability of communication network scheduling and solving the above problems. The adaptive scheduling method according to various embodiments of the present disclosure will be described in detail below in conjunction with the accompanying drawings. It should be understood that the actual adaptive scheduling method may also have other method steps, but in order to avoid blurring the focus of the present disclosure, the present disclosure does not discuss and the accompanying drawings do not show these other method steps.
[0036] Figure 4 An adaptive scheduling method for a communication network according to some embodiments of the present disclosure is shown. Figure 4 As shown, the adaptive scheduling method for a communication network provided by the present disclosure includes: S1, obtaining a real-time data message sent by device 1 to the communication network within a macro cycle; S2, calculating the response processing time of the communication network to the real-time data message; S3, obtaining a periodic time sub-slice pre-allocated by the communication network to the device within the macro cycle, comparing the size of the periodic time sub-slice with the response processing time and calculating the difference between the two; and S4, generating a corresponding time slice adjustment declaration message based on the difference, and sending the time slice adjustment declaration message to the communication network, wherein the time slice adjustment declaration message carries the time slice adjustment information.
[0037] In step S3, generating a corresponding time slice adjustment declaration message based on the difference includes: when it is determined that the periodic time sub-slice is greater than the response processing time, generating a time slice adjustment declaration message carrying the spare time slice information based on the difference; and when it is determined that the periodic time sub-slice is less than the response processing time, generating a time slice adjustment declaration message carrying the increased time slice information based on the difference.
[0038] For example, Figure 5 As shown, after device 1 sends a real-time data message carrying short payload data to communication network 1, it immediately sends a time slice adjustment declaration message to the communication network. The time slice adjustment declaration message carries time information with an idle time slice length of △t, which indicates that there is an idle time with a time slice length of △t in the periodic time sub-slice currently pre-allocated to this device. This idle time slice can be used by other devices to transmit real-time data messages or increase the non-periodic time in the current macrocycle, thereby achieving the function of adaptive adjustment of the communication network bandwidth.
[0039] Optionally, after step S3, the adaptive scheduling method further includes: determining whether device 1 has real-time data packets to be sent in the macrocycle; when it is determined that there are real-time data packets to be sent, calculating the first response processing time of the communication network for the real-time data packets to be sent; and when it is determined that the cycle time sub-slice is greater than the response processing time and the time slice length △t is greater than the first response processing time, not generating a time slice adjustment declaration message, but sending the real-time data packets to be sent by device 1 to the communication network.
[0040] When it is determined that device 1 does not have a real-time data message to be sent in the macrocycle, the adaptive scheduling method further includes the following steps: broadcasting a time slice adjustment declaration message to other devices (such as device 2), and adjusting the real-time data message sending time of other devices based on the time slice information carried in the time slice adjustment declaration message. For example, Figure 6 As shown, after receiving the time slice adjustment declaration message carrying the idle time slice length △t from device 1, device 2 adjusts the real-time data message sending time of device 2 in the current macro cycle time to T1', where T1'= T1-△t.
[0041] Optionally, the adaptive scheduling method further includes: after sending a time slice adjustment declaration message to the communication network, adjusting the periodic time and non-periodic time in the macrocycle based on the time slice information carried in the time slice adjustment declaration message. Figure 6 As shown, after sending a time slice adjustment declaration message carrying an idle time slice length of △t to the communication network, the cycle time and non-cycle time within the current macrocycle time are adjusted from Tp and Tnp to Tp' and Tnp' respectively, where Tp'=Tp-△t, Tnp'=Tnp+△t.
[0042] It should be noted that the adjustable △t length should not exceed the non-periodic time length, and after the macrocycle period and non-periodic time are adjusted, the original macrocycle time remains unchanged, thereby ensuring the deterministic scheduling of the communication network. If the adjustable △t length exceeds the non-periodic time length, the macrocycle time may be changed, thereby affecting the determinism of data transmission in the communication network.
[0043] Optionally, after adjusting the periodic time and non-periodic time of the macro cycle, the adaptive scheduling method also includes: determining whether device 1 has real-time data packets to be sent in the macro cycle; when it is determined that there are real-time data packets to be sent, calculating whether the free time slice is greater than or equal to the response processing time required for the real-time data packets to be sent; and when it is determined that the free time slice meets the response processing time required for the real-time data packets to be sent, sending the real-time data packets to be sent of the device to the communication network.
[0044] For Figure 3 In the case shown in FIG. 1 , when device 1 needs to send a real-time data message carrying long payload data and a real-time data message carrying short payload data in the same macrocycle, the existing method will have real-time performance issues. Figure 7 As shown, in order to increase the length of the pre-allocated periodic time sub-slice of device 1, a time slice adjustment declaration message with a time slice length of △t is generated for the real-time data message of device 1. After device 1 sends the first real-time data message, it sends the time slice adjustment declaration message to the communication network, thereby adjusting the periodic time and non-periodic time in the communication network to Tp' and Tnp', respectively, where Tp'=Tp+△t, Tnp'=Tnp-△t. And broadcast the time slice adjustment declaration message to device 2, as well as the message used to inform device 2 that device 1 needs a periodic time sub-slice with a length of △t. At the same time, after device 2 receives the time adjustment declaration message, the real-time data message sending time of device 2 is adjusted to T1', T1'=T1+△t. In this way, device 1 and device 2 can send real-time data messages that need to be sent to the communication network within the same macro cycle, thereby ensuring the real-time performance of data transmission in the communication network 1.
[0045] Alternatively, if Figure 8 and 9 As shown, the adaptive scheduling method also includes calculating the difference between the periodic time sub-slice and the response processing time, and not generating a time slice adjustment declaration message, but adding a corresponding time slice adjustment declaration field in the real-time data message. By adding the time slice adjustment declaration field to the original real-time data message, the communication network bandwidth occupied by the time adjustment declaration is effectively reduced.
[0046] Through the above method, this solution can adaptively adjust the communication network bandwidth allocation for real-time data messages carrying different payload data or frame lengths, thereby effectively improving the communication network bandwidth utilization rate while ensuring the determinism and real-time performance of the communication network.
[0047] The present disclosure also provides a system for implementing the adaptive scheduling method according to any of the aforementioned embodiments of the present disclosure, the system comprising: an acquisition module, configured to acquire real-time data packets sent by a device to a communication network within the same macrocycle; a communication network unit, configured to pre-allocate periodic time sub-slices for the real-time data packets of the device; and a control unit, configured to be communicatively connected with the acquisition module and the communication network unit, calculate the response processing time of the communication network to the real-time data packets and the difference between the periodic time sub-slice and the response processing time; and generate a corresponding time slice adjustment declaration message based on the difference, and send the time slice adjustment declaration message to the communication network unit.
[0048] The present disclosure also provides a computing device for implementing adaptive scheduling of a communication network, which includes one or more processors and a memory storing computer executable instructions. When the computer executable instructions are executed by the one or more processors, the one or more processors execute the adaptive scheduling method according to any of the foregoing embodiments of the present disclosure.
[0049] The present disclosure also provides a non-volatile storage medium having computer executable instructions stored thereon, and when the computer executable instructions are executed by a computer, the computer executes the adaptive scheduling method according to any of the aforementioned embodiments of the present disclosure.
[0050] Those skilled in the art should understand that the present disclosure is not limited to the above-mentioned embodiments, and the present disclosure can be implemented in many other forms without departing from its subject matter and scope. Therefore, the examples and embodiments shown are considered to be illustrative rather than restrictive, and the present disclosure can cover various modifications and substitutions without departing from the spirit and scope of the present disclosure as defined in the appended claims.
Claims
1. An adaptive scheduling method for a communication network, characterized in that: The method comprises: Acquiring real-time data messages sent by a device to the communication network within a macrocycle; Calculating the response processing time of the communication network to the real-time data message; Acquire a cycle time sub-slice pre-allocated by the communication network to the device within the macrocycle; comparing the size of the cycle time sub-slice with the response processing time to calculate a difference between the cycle time sub-slice and the response processing time; and A corresponding time slice adjustment declaration message is generated based on the calculated difference, so as to send the time slice adjustment declaration message including the time slice adjustment information to the communication network.
2. The adaptive scheduling method according to claim 1, characterized in that: The method further comprises: broadcasting the time slice adjustment declaration message to other devices in the communication network; and The real-time data message sending time of the other device is adjusted based on the time slice information included in the time slice adjustment declaration message.
3. The adaptive scheduling method according to claim 1, characterized in that: Generating a corresponding time slice adjustment declaration message based on the calculated difference includes: In response to determining that the periodic time sub-slice is greater than the response processing time, generating a time slice adjustment declaration message including spare time slice information based on the difference; and In response to determining that the periodic time sub-slice is smaller than the response processing time, a time slice adjustment declaration message carrying information on increasing the time slice is generated based on the difference.
4. The adaptive scheduling method according to claim 1, characterized in that: The method further comprises: After calculating the difference between the periodic time sub-slice and the response processing time, no time slice adjustment declaration message is generated but a corresponding time slice adjustment declaration field is added to the acquired real-time data message.
5. The adaptive scheduling method according to claim 1, characterized in that: The method further comprises: Determine whether the device has a real-time data message to be sent in the macrocycle; In response to determining that there is a real-time data message to be sent, determining a response processing time of the communication network to the real-time data message to be sent; and In response to determining that the periodic time sub-slice is greater than the response processing time and the difference is greater than the first response processing time, no time slice adjustment declaration message is generated but the to-be-sent real-time data message in the device is sent to the communication network.
6. The adaptive scheduling method according to claim 1, characterized in that: The method further comprises: After sending the time slice adjustment declaration message to the communication network, adjusting the periodic time and the non-periodic time in the macrocycle based on the time slice information included in the time slice adjustment declaration message; After adjusting the cycle time of the macrocycle, determining whether the device has a real-time data message to be sent in the macrocycle; and In response to determining that the device has a real-time data message to be sent, a sending time of the real-time data message to be sent is determined based on the adjusted cycle time and the time slice adjustment statement.
7. The adaptive scheduling method according to claim 6, characterized in that: After the cycle time and the non-cycle time of the macro cycle are adjusted, the macro cycle time is kept unchanged.
8. A system for implementing the adaptive scheduling method according to any one of claims 1 to 7, characterized in that: The system comprises: An acquisition module configured to acquire real-time data messages sent by the device to the communication network within the same macrocycle; a communication network unit configured to pre-allocate periodic time sub-slices for the real-time data packets of the device; and A control unit is configured to be communicatively connected with the acquisition module and the communication network unit, calculate the response processing time of the communication network to the real-time data message and the difference between the periodic time sub-slice and the response processing time, generate a corresponding time slice adjustment declaration message based on the difference, and send the time slice adjustment declaration message to the communication network unit.
9. A computing device for implementing adaptive scheduling of a communication network, characterized in that: The computing device comprises: one or more processors; and A memory storing computer executable instructions, wherein when the computer executable instructions are executed by the one or more processors, the one or more processors execute the adaptive scheduling method according to any one of claims 1-7.
10. A non-transitory storage medium having computer executable instructions stored thereon, characterized in that: When the computer executable instructions are executed by a computer, the computer executes the adaptive scheduling method according to any one of claims 1-7.
Citation Information
Patent Citations
EPA protocol-based industrial Ethernet communication method supporting real-time and non-real-time application
CN102014057A
Distributed control aperiodic communication method
CN112764407A
Method for adjusting bandwidth, computing equipment and medium
CN113285844A
Redundancy switching method and device in industrial control network and storage medium
CN115941451A
Method for network communication time scheduling, computing device and storage medium
CN117278471A