Bus scheduling method and device based on time slot allocation, equipment and medium

By adopting a bus scheduling method based on slot allocation in industrial Ethernet, the problem of possible conflicts in parallel communication between multiple management nodes is solved, the orderly access of nodes and the active access of controlled nodes is realized, and the communication efficiency is improved and user experience.

CN119484196APending Publication Date: 2025-02-18HANGZHOU HOLLYSYS AUTOMATION
View PDF 0 Cites 4 Cited by

Patent Information

Application Number
CN202411630199.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-15
Publication Date
2025-02-18

AI Technical Summary

Technical Problem

In industrial Ethernet, parallel communication may conflict when there are multiple management nodes, and it is difficult for controlled nodes to initiate bus access actively.

Method used

By using the bus scheduling method based on slot allocation, the maximum time slot duration and maximum transmission data volume of each node are determined by obtaining the calibration transmission data volume and the maximum load data volume of a single frame, and the time slots of each node are allocated accordingly. duration and sort nodes and slot types to ensure that nodes access the bus in order and slots.

Benefits of technology

It realizes orderly accessing buses for all nodes in industrial Ethernet, avoids bus access conflicts when multiple management nodes, provides controlled nodes with the ability to access buses, and improves communication efficiency and user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119484196A_ABST
    Figure CN119484196A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of industrial Ethernet, and provides a bus scheduling method and device based on time slot allocation, equipment and a medium. According to the method, in the industrial Ethernet, the time slot duration of each node is determined by utilizing the maximum time slot duration of a single communication period, the maximum transmission data volume of the single communication period, the calibration transmission data volume and the maximum load data volume of a single frame, and then the nodes and the time slot types are sorted; and according to the sorting sequence and the time slot duration of each node, each node is sequentially scheduled to use the bus transmission data of the industrial Ethernet, so that all the nodes in the industrial Ethernet can access the bus in order, and bus access conflicts possibly occurring when a plurality of management nodes exist in the industrial Ethernet are avoided; and the capability of accessing the bus is also provided for the controlled node in the industrial Ethernet, so that the communication efficiency is improved, and the user experience is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of industrial Ethernet, and in particular to a bus scheduling method, device, equipment and medium based on time slot allocation. Background Art

[0002] Fieldbus has a long history. With the development of industrial automation from low speed to high speed, from low precision to high precision, and from centralized control to distributed control, new requirements have been put forward for the transmission speed and data volume of fieldbus. Industrial real-time Ethernet technologies such as POWERLINK and EtherCat have emerged.

[0003] At present, industrial real-time Ethernet is usually a master-slave network, in which there is only one running master node, namely the management node, which can actively initiate access to the bus, and the remaining slave nodes, namely the controlled nodes, need to initiate bus access through the management node. However, in the next-generation functional safety control system, it is necessary for multiple management nodes in the network to initiate access to the bus at the same time, and all of them can exchange IO data with the controlled nodes within one communication cycle.

[0004] Therefore, in the multi-master parallel communication application scenario, how to efficiently solve the problem of multiple management nodes initiating bus access in sequence, and how the controlled nodes can also actively initiate bus access according to actual needs, is a technical problem that needs to be solved. Summary of the invention

[0005] In view of this, the embodiments of the present application provide a bus scheduling method, apparatus, device and medium based on time slot allocation to solve the problem in the prior art that parallel communications may conflict when there are multiple management nodes in the industrial Ethernet.

[0006] According to a first aspect of an embodiment of the present application, a bus scheduling method based on time slot allocation is provided, the method being used to allocate bus time slots for nodes in an industrial Ethernet, comprising:

[0007] Obtain the calibrated transmission data volume of each node in the industrial Ethernet in a single communication cycle, as well as the maximum load data volume of a single frame of the industrial Ethernet;

[0008] Determine the maximum time slot length of a single communication cycle of Industrial Ethernet and the maximum amount of data transmitted in a single communication cycle;

[0009] Determine the time slot duration of each node based on the maximum time slot duration of a single communication cycle, the maximum amount of transmitted data in a single communication cycle, the calibrated amount of transmitted data, and the maximum amount of load data in a single frame;

[0010] The nodes and time slot types are sorted, and the nodes are scheduled to use the industrial Ethernet bus to transmit data according to the sorting order and the time slot duration of each node.

[0011] In some embodiments, the time slot duration of each node is determined based on the maximum time slot duration of a single communication cycle, the maximum transmission data volume of a single communication cycle, the calibrated transmission data volume, and the maximum load data volume of a single frame, including:

[0012] The number of packets for each node is determined according to the maximum transmission data volume and the calibrated transmission data volume of a single communication cycle;

[0013] Determine the quotient of the maximum transmission data volume of a single communication cycle and the maximum load data volume of a single frame as the unit time slot data volume;

[0014] Determine the quotient of the maximum time slot duration of a single communication cycle and the data volume per unit time slot as the unit time slot duration;

[0015] Determine the product of the number of subpackets of the target node and the unit time slot duration as the time slot duration of the target node;

[0016] The target node is any node in the industrial Ethernet.

[0017] In some embodiments, scheduling each node to use the bus of the industrial Ethernet to transmit data in sequence according to the sorting order and the time slot duration of each node includes:

[0018] Determine the time slot duration corresponding to each node in sequence according to the sorting order and the time slot duration of each node, wherein the time slot duration corresponding to each node includes at least one time slot arranged in sequence;

[0019] The first target node broadcasts and sends a first data packet in a first time slot;

[0020] In response to determining that the second time slot is the time slot corresponding to the first target node, the first target node broadcasts and sends a second data packet after waiting for a preset time period;

[0021] Among them, the second time slot is the next time slot of the first time slot, the preset duration is less than the timeout duration, the timeout duration is the duration of all time slots corresponding to the node with the largest number of subpackets, and the first target node is any node in the industrial Ethernet.

[0022] In some embodiments, scheduling each node to use the bus of the industrial Ethernet to transmit data in sequence according to the sorting order and the time slot duration of each node includes:

[0023] Determine the time slot duration corresponding to each node in sequence according to the sorting order and the time slot duration of each node, wherein the time slot duration corresponding to each node includes at least one time slot arranged in sequence;

[0024] The first target node broadcasts and sends a first data packet in a first time slot;

[0025] In response to determining that the second time slot is the time slot corresponding to the second target node, and the second target node determining that the first target node has timed out in sending the first data packet, the second target node broadcasts and sends a third data frame after waiting for the timeout period;

[0026] The second time slot is the next time slot of the first time slot, the timeout duration is the duration of all time slots corresponding to the node with the largest number of subpackets, and the first target node and the second target node are any two different nodes in the industrial Ethernet.

[0027] In some embodiments, the time slot duration of each node is determined based on the maximum time slot duration of a single communication cycle, the maximum transmission data volume of a single communication cycle, the calibrated transmission data volume, and the maximum load data volume of a single frame, including:

[0028] The number of packets for each node is determined according to the maximum transmission data volume and the calibrated transmission data volume of a single communication cycle;

[0029] Determine the quotient of the maximum transmission data volume of a single communication cycle and the maximum load data volume of a single frame as the unit time slot data volume;

[0030] Determine the quotient of the maximum time slot duration of a single communication cycle and the data volume per unit time slot as the unit time slot duration;

[0031] The product of the maximum number of subpackets and the unit time slot duration is determined as the time slot duration of each node.

[0032] In some embodiments, scheduling each node to use the bus of the industrial Ethernet to transmit data in sequence according to the sorting order and the time slot duration of each node includes:

[0033] Determine the starting point of the target time slot corresponding to the target node in sequence according to the sorting order and the time slot duration of each node;

[0034] When the current time reaches the starting point of the target time slot, the target node is scheduled to use the bus of the industrial Ethernet to transmit data;

[0035] The target node is any node in the industrial Ethernet.

[0036] In some embodiments, the industrial Ethernet is a peer-to-peer network;

[0037] Sort each node and slot type, including:

[0038] Determining that the downlink time slot is sequenced before the uplink time slot; and

[0039] Make sure that the management node is ranked before the controlled node in the Industrial Ethernet.

[0040] According to a second aspect of an embodiment of the present application, a bus scheduling device based on time slot allocation is provided, comprising:

[0041] The acquisition module is configured to acquire the calibrated transmission data volume of each node in the industrial Ethernet in a single communication cycle and the maximum load data volume of a single frame of the industrial Ethernet;

[0042] A determination module is configured to determine a maximum time slot length of a single communication cycle of the industrial Ethernet and a maximum amount of transmitted data in a single communication cycle;

[0043] The determination module is further configured to determine the time slot duration of each node based on the maximum time slot duration of a single communication cycle, the maximum transmission data volume of a single communication cycle, the calibrated transmission data volume and the maximum load data volume of a single frame;

[0044] The scheduling module is configured to sort the nodes and time slot types, and sequentially schedule the nodes to use the bus of the industrial Ethernet to transmit data according to the sorting order and the time slot duration of each node.

[0045] According to a third aspect of an embodiment of the present application, an electronic device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above method when executing the computer program.

[0046] According to a fourth aspect of an embodiment of the present application, a computer-readable storage medium is provided, which stores a computer program, and when the computer program is executed by a processor, the steps of the above method are implemented.

[0047] Compared with the prior art, the embodiments of the present application have the following beneficial effects: in the industrial Ethernet, the embodiments of the present application use the maximum time slot duration of a single communication cycle, the maximum transmission data volume of a single communication cycle, the calibrated transmission data volume and the maximum load data volume of a single frame to determine the time slot duration of each node, and then sort the nodes and time slot types, and schedule each node to use the bus of the industrial Ethernet to transmit data in sequence according to the sorting order and the time slot duration of each node, so that all nodes in the industrial Ethernet can access the bus in an orderly manner, avoid the bus access conflict that may occur when there are multiple management nodes in the industrial Ethernet, and also provide the controlled nodes in the industrial Ethernet with the ability to access the bus, thereby improving communication efficiency and enhancing user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0049] Figure 1This is the timing diagram in POWERLINK.

[0050] Figure 2 It is a schematic block diagram of an industrial Ethernet that includes only a master and a backup management node and multiple controlled nodes.

[0051] Figure 3 It is a schematic block diagram of an industrial Ethernet including multiple management nodes and multiple controlled nodes.

[0052] Figure 4 It is a flow chart of a bus scheduling method based on time slot allocation provided in an embodiment of the present application.

[0053] Figure 5 It is a schematic diagram of the method type for allocating time slots to each node provided in an embodiment of the present application.

[0054] Figure 6 It is a flowchart of a method for determining the time slot length of each node provided in an embodiment of the present application.

[0055] Figure 7 It is a timing diagram of scheduling each node in a variable-length time slot provided in an embodiment of the present application.

[0056] Figure 8 It is a flowchart of another method for determining the time slot duration of each node provided in an embodiment of the present application.

[0057] Fig. 9 This is a timing diagram of the fixed-length time slot scheduling of each node provided in an embodiment of the present application.

[0058] Fig.10 It is a schematic diagram of a bus scheduling device based on time slot allocation provided in an embodiment of the present application.

[0059] Fig.11 It is a schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0060] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.

[0061] A bus scheduling method and device based on time slot allocation according to an embodiment of the present application will be described in detail below with reference to the accompanying drawings.

[0062] Glossary:

[0063] Master-slave network: Network communication is achieved using the master-question-slave-answer method. The master-slave question-answer network naturally avoids bus access conflicts. All network communications are initiated by the master station, and the slave station responds immediately after receiving its own request.

[0064] Peer-to-peer network: All nodes in the network can initiate communication autonomously through a certain (conflict access) mechanism, and all nodes in the network have equal communication status while complying with unified communication rules.

[0065] Communication cycle: Industrial real-time Ethernet network communication is usually divided into equal-periodic (or approximately equal-periodic) communication time periods in the time domain, and the communication time periods repeat themselves.

[0066] Periodic communication sub-phase: According to the actual needs of the industrial bus, the communication cycle can be further divided into fixed communication sub-time periods, namely the periodic communication sub-phase.

[0067] Non-periodic communication sub-phase: According to the actual needs of the industrial bus, the communication cycle can be further subdivided into non-fixed communication sub-time periods, namely the non-periodic communication sub-phase.

[0068] Network manager: In a deterministic communication network, the network manager is responsible for the deterministic scheduling of communications among all network nodes. There are usually two scheduling methods: one is based on master-slave mode, and the other is based on time slot scheduling.

[0069] POWERLINK MN: The node in a POWERLINK network that manages the use of the bus is called a POWERLINK Management Node (MN). Only a MN can send messages independently - that is, not in response to a received message. A controlled node is only allowed to send messages when requested by the MN.

[0070] POWERLINK CN: All other nodes that send messages only in the communication time slots assigned by the MN are called controlled nodes. They are called controlled nodes because the data transmission and reception of the nodes are completely controlled by the management node. CN nodes only send data when requested by the MN.

[0071] IO: Input and output. In a control system, the field data collected by the acquisition module is usually called input data, and the data that the controller expects the output module to output is usually called output data.

[0072] NUT: Network Update Time, which indicates the network scheduling cycle. The main manager sends SYNC broadcast frames regularly according to the NUT time to start a network update cycle. It is also called the network scanning cycle time.

[0073] SYNC: An identification network broadcast frame. In a periodic real-time network, the host starts a new communication cycle by sending a SYNC frame.

[0074] Node ID: A unique ID number is assigned to all network nodes in the same network to identify the sender address and receiver address of the data frame.

[0075] Controller: A concept in the field of automation control. In a peer-to-peer communication network, the role is equivalent to a network manager. It is similar to the MN function of the Powerlink master-slave network.

[0076] Input module: A device that performs input data acquisition in the control system and uploads the acquired data periodically to the controller.

[0077] Output module: A device in a control system that periodically receives controller output data or instructions and executes output drive.

[0078] IO module: A general term for input and output modules.

[0079] As mentioned above, fieldbus has a long history. Several fieldbuses that appeared earlier and are widely used, such as CAN (Controller Area Network) and RS485, have slow transmission speeds and small data packets per frame. With the development of industrial automation from low speed to high speed, from low precision to high precision, and from centralized control to distributed control, new requirements have been put forward for the transmission speed and data volume of fieldbus. Therefore, many manufacturers have proposed to implement fieldbus based on Ethernet technology, thus giving birth to industrial real-time Ethernet technologies such as POWERLINK and EtherCat.

[0080] Taking the POWERLINK bus as an example, POWERLINK is based on the standard Ethernet CSMA / CD (Carrier Sense Multiple Access / collision detection) technology (IEEE802.3), so it can work on all traditional Ethernet hardware. However, POWERLINK does not use the message retransmission mechanism defined by IEEE 802.3 for resolving conflicts, which causes the uncertain behavior of traditional Ethernet. The slave nodes of POWERLINK send their own frames by obtaining permission from the POWERLINK MN, so there will be no conflicts, because the management node will uniformly plan the definite timing of sending and receiving data for each node. POWERLINK provides the following three services:

[0081] Isochronous data transmission: A pair of messages from each node is transmitted in each cycle. In addition, there may be a multicast PRes message sent from the MN in each cycle. Isochronous data transmission is usually used for the exchange of data with strict time requirements (real-time data).

[0082] Asynchronous data transmission: There may be one asynchronous message per cycle. The MN allocates the sending rights to the requesting node through the SoA message. Asynchronous data transmission is used for the exchange of data that has no strict time requirements.

[0083] Synchronization of all nodes: At the beginning of each isochronous synchronization phase, the MN sends a multicast SoC message very accurately to synchronize all nodes in the network.

[0084] Figure 1 This is the timing diagram in POWERLINK. Figure 1 As shown in the figure, the isochronous synchronization phase starts from the start of the SoC and ends at the start of the SoA. Only the SoC frame is generated periodically, and the generation of all other frames is controlled by events. After the SoC frame is sent, the management node MN starts the isochronous synchronization data exchange. The PReq frame is sent to each configured and active controlled node CN. The accessed controlled node CN should respond with a PRes frame.

[0085] After the isochronous synchronization phase is completed, the management node MN sends a SoA broadcast frame to indicate the start of the asynchronous phase. During the asynchronous phase of the cycle, access to the POWERLINK network can be granted to a CN or MN to transmit an asynchronous message. Currently, only one node can send an asynchronous message in each cycle. If multiple nodes want to send asynchronous messages, they need to queue.

[0086] The idle phase is the time interval remaining between the end of the asynchronous phase and the start of the next cycle, starting from the end of the SoA or ASnd and ending at the start of the SoC. During the idle phase, all network components "wait" for the start of the next cycle. The duration of the idle phase can be 0, i.e. the completion of the cycle should not depend on the existence or fixed idle phase.

[0087] Similar to POWERLINK, the current mainstream bus technology mostly adopts the master-slave communication mode. In the control network, the POWERLINK manager node is usually the only main controller node, that is, the master station; the POWERLINK controlled node is usually an ordinary slave station. The scheduling process of network communication is initiated by the master node, and the slave node responds completely passively.

[0088] That is to say, currently industrial real-time Ethernet is usually a master-slave network, in which there is only one running master node, namely the management node, which can actively initiate access to the bus, and the remaining slave nodes, namely the controlled nodes, need to initiate bus access through the management node. However, in the next-generation functional safety control system, it is necessary for multiple management nodes in the network to initiate access to the bus at the same time, and all of them can exchange IO data with the controlled nodes within one communication cycle.

[0089] Figure 2 It is a schematic block diagram of an industrial Ethernet that includes only a master and a backup management node and multiple controlled nodes. Figure 3 It is a schematic block diagram of an industrial Ethernet including multiple management nodes and multiple controlled nodes.

[0090] like Figure 2 As shown, the main management node can interact with multiple controlled nodes for IO data respectively, and the standby management node is in the bus monitoring state. When the main management node is abnormal, the standby management node takes over the main management node to interact with multiple controlled nodes for IO data respectively.

[0091] like Figure 3 As shown, multiple management nodes can exchange data with multiple controlled nodes respectively. At this time, how to efficiently solve the problem of multiple management nodes initiating bus access in sequence, and how controlled nodes can also actively initiate bus access according to actual needs, is a technical problem that needs to be solved.

[0092] In view of this, an embodiment of the present application provides a bus scheduling method based on time slot allocation. In the industrial Ethernet, the time slot length of each node is determined by using the maximum time slot length of a single communication cycle, the maximum transmission data volume of a single communication cycle, the calibrated transmission data volume and the maximum load data volume of a single frame. Then, each node and time slot type is sorted, and each node is scheduled in turn to use the bus of the industrial Ethernet to transmit data according to the sorting order and the time slot length of each node. This enables all nodes in the industrial Ethernet to access the bus in an orderly manner, avoids bus access conflicts that may occur when there are multiple management nodes in the industrial Ethernet, and also provides the controlled nodes in the industrial Ethernet with the ability to access the bus, thereby improving communication efficiency and enhancing user experience.

[0093] Figure 4 FIG. 1 is a flow chart of a bus scheduling method based on time slot allocation provided in an embodiment of the present application. Figure 4 As shown, the method comprises the following steps:

[0094] In step S401, the calibrated transmission data volume of each node in the industrial Ethernet in a single communication cycle and the maximum load data volume of a single frame of the industrial Ethernet are obtained.

[0095] In step S402, the maximum time slot length of a single communication cycle of the industrial Ethernet and the maximum transmission data volume of a single communication cycle are determined.

[0096] In step S403, the time slot duration of each node is determined based on the maximum time slot duration of a single communication cycle, the maximum transmission data volume of a single communication cycle, the calibrated transmission data volume and the maximum load data volume of a single frame.

[0097] In step S404, the nodes and time slot types are sorted, and the nodes are scheduled to use the bus of the industrial Ethernet to transmit data in sequence according to the sorting order and the time slot duration of each node.

[0098] In some examples of the present application, the bus scheduling method based on time slot allocation can be used to allocate bus use time slots for nodes in an industrial Ethernet. That is, the method is used to schedule each node in the industrial Ethernet so that each node uses the bus to transmit data in a pre-allocated time slot, thereby avoiding bus conflicts.

[0099] The nodes in the industrial Ethernet may include management nodes and controlled nodes. Furthermore, the number of management nodes and controlled nodes may be one or more, and the industrial Ethernet is a peer-to-peer network, that is, the management nodes and controlled nodes may autonomously access the bus.

[0100] In some embodiments of the present application, bus conflicts can be avoided by pre-allocating time slots for each node in the industrial Ethernet and calling each node to access the bus according to the pre-allocated time slots for data transmission in actual work.

[0101] When allocating time slots, on the one hand, the calibrated transmission data volume of each node in the industrial Ethernet in a single communication cycle and the maximum load data volume of a single frame of the industrial Ethernet can be obtained, and on the other hand, the maximum time slot duration of a single communication cycle of the industrial Ethernet and the maximum transmission data volume of a single communication cycle can also be determined. Finally, the time slot duration of each node can be determined based on the maximum time slot duration of the single communication cycle, the maximum transmission data volume of the single communication cycle, the calibrated transmission data volume and the maximum load data volume of a single frame.

[0102] After determining the time slot duration of each node, the nodes and time slot types need to be sorted. After the sorting is completed, each node can be scheduled to use the industrial Ethernet bus to transmit data according to the sorting order and the time slot duration of each node.

[0103] According to the technical solution provided in the embodiment of the present application, in the Industrial Ethernet, the time slot length of each node is determined by using the maximum time slot length of a single communication cycle, the maximum transmission data volume of a single communication cycle, the calibrated transmission data volume and the maximum load data volume of a single frame, and then each node and time slot type is sorted, and each node is scheduled in turn to use the bus of the Industrial Ethernet to transmit data according to the sorting order and the time slot length of each node. This can achieve orderly access to the bus by all nodes in the Industrial Ethernet, avoid bus access conflicts that may occur when there are multiple management nodes in the Industrial Ethernet, and also provide the controlled nodes in the Industrial Ethernet with the ability to access the bus, thereby improving communication efficiency and enhancing user experience.

[0104] Figure 5 Schematic diagram of the method type for allocating time slots to each node provided in the embodiment of the present application. Figure 5 As shown, in some examples of the present application, time slot allocation for each node may adopt a fixed-length time slot scheduling method or a variable-length time slot scheduling method.

[0105] Figure 6 FIG. 1 is a flow chart of a method for determining the time slot length of each node provided in an embodiment of the present application. Figure 6 As shown, the method comprises the following steps:

[0106] In step S601, the number of packets for each node is determined according to the maximum transmission data volume and the calibrated transmission data volume of a single communication cycle.

[0107] In step S602, the quotient of the maximum transmission data volume of a single communication cycle and the maximum load data volume of a single frame is determined as the unit time slot data volume.

[0108] In step S603, the quotient of the maximum time slot duration of a single communication cycle and the data volume per unit time slot is determined as the unit time slot duration.

[0109] In step S604, the product of the number of subpackets of the target node and the unit time slot duration is determined as the time slot duration of the target node.

[0110] The target node is any node in the industrial Ethernet.

[0111] In some embodiments of the present application, different time slot durations may be configured for each node according to the maximum amount of data transmitted by the different nodes in a single communication cycle.

[0112] In one example, the number of sub-packets of each node can be determined first according to the maximum transmission data volume and the calibrated transmission data volume of a single communication cycle, and the quotient of the maximum transmission data volume of a single communication cycle and the maximum load data volume of a single frame can be determined as the unit time slot data volume. Then, the quotient of the maximum time slot duration of a single communication cycle and the unit time slot data volume can be determined as the unit time slot duration, and finally, the product of the number of sub-packets of the target node and the unit time slot duration can be determined as the time slot duration of the target node.

[0113] That is, the number of periodic communication nodes (NodeSum) is determined, and the nodes include management nodes and controlled nodes participating in periodic communication. The communication cycle of periodic communication, the nodes participating in periodic communication, and the data information that each node needs to transmit in a single communication cycle, including data type, maximum transmission data volume, etc. can be pre-configured. After the configuration is completed, these data information will remain unchanged until the user modifies the configuration according to needs.

[0114] At the same time, the maximum time slot duration (Slotime) can also be determined. The maximum time slot duration can refer to the propagation time required to transmit the maximum Ethernet frame, for example, about 12us in the case of Gigabit Ethernet. Furthermore, link delay (including transmission delay and propagation delay) and redundancy reservation can also be considered. For example, the default value of Slotime can be set to 15us.

[0115] On the other hand, the length of the guard band (Gbtime) needs to be determined. The guard band length must ensure the time required for the SYNC frame to propagate, for example, about 12us in the case of Gigabit Ethernet. Considering the link delay and redundancy reservation, as well as the maximum possible guarantee that each node receives the communication message in the guard band, based on the above Slotime, the default value of the maximum time slot length can be set to 30us.

[0116] Next, the transmitted data can be packetized and calculated based on the amount of data (e.g., number of bytes) transmitted periodically by each node and the maximum load data amount of a single frame, i.e., the maximum Ethernet single frame load data length (e.g., 1.5KB), to obtain the number of periodic communication time slots occupied by each node.

[0117] Finally, the time slot layout is determined according to the number of periodic communication time slots occupied by each node. The principle of time slot layout can be to first determine the downlink time slot and then determine the uplink time slot. The time slot with a smaller node ID is placed in the front, and the time slot with a larger node ID is placed in the back. In practical applications, the node ID can be determined according to the physical location when the node is configured, or determined by other methods, which is not limited here. Furthermore, the node ID of the management node is usually smaller than the node ID of the controlled node.

[0118] Table 1 shows the time slots allocated to nodes 1 to 6.

[0119] Table 1 Allocated time slots

[0120]

[0121] As shown in Table 1, within one network update time, from the start of SYNC, the 1st to 3rd time slots are allocated to node 1, the 4th to 6th time slots are allocated to node 2, the 7th to 9th time slots are allocated to node 3, the 10th time slot is allocated to node 4, the 11th to 12th time slots are allocated to node 5, and the 13th to 15th time slots are allocated to node 6. Among them, nodes 1 to 3 are management nodes, and nodes 4 to 6 are controlled nodes.

[0122] In the master-slave communication mode, because the bus access is always initiated by the master node alone, and the message sent by the master node to the slave node will usually receive a response message from the slave node, in the master-slave communication system, within an approximate communication time slot, there is no need to consider time slot switching because of the "question-and-answer" communication method to be confirmed.

[0123] However, using the technical solution provided in the embodiment of the present application, within a communication time slot, the node to which the time slot belongs can only send one message without waiting for messages from other nodes. Therefore, how to solve the time slot switching problem during the communication process will be a key issue in communication based on time slot allocation.

[0124] In some embodiments of the present application, after the time slot allocation of each node is completed by using the above-mentioned variable-length time slot scheduling method, each node can be scheduled to use the bus of the industrial Ethernet to transmit data in sequence in the following manner: the time slot duration corresponding to each node is determined in sequence according to the sorting order and the time slot duration of each node, and the time slot duration corresponding to each node includes at least one time slot arranged in sequence. After the first target node broadcasts and sends the first data packet in the first time slot, if it is determined that the second time slot is the time slot corresponding to the first target node, the first target node broadcasts and sends the second data packet after waiting for a preset time length.

[0125] Alternatively, after the first target node broadcasts the first data packet in the first time slot, if it is determined that the second time slot is the time slot corresponding to the second target node, and the second target node determines that the first target node has timed out from sending the first data packet, the second target node can broadcast a third data frame after waiting for the timeout period.

[0126] Among them, the second time slot is the time slot after the first time slot, the preset duration is less than the timeout duration, the timeout duration is the total time slot duration corresponding to the node with the largest number of subpackets, and the first target node and the second target node are any two different nodes in the industrial Ethernet.

[0127] That is to say, in the industrial Ethernet provided in the embodiment of the present application, the industrial Ethernet is a peer-to-peer network, all nodes send data in predefined time slots, and the data link layer is transmitted in broadcast form, that is, all other network nodes can receive the data frame of the sending node. The scheduling timing state of the time slot in the case of non-periodic transmission based on time slot scheduling or non-continuous time slot transmission of a single node. For a time slot that is allocated but no data frame is to be transmitted or the transmission fails, the owner of the next time slot waits for the maximum time slot time, that is, starts his own time slot and starts transmission.

[0128] Figure 7 is a timing diagram of the variable length time slot scheduling of each node provided by the embodiment of the present application. Figure 7 As shown, time slot 0 and time slot 1 are used for node 1 to send data. After node 1 sends data in time slot 0 (fixedly sends the whole network synchronization data packet), it determines that the next time slot is still selected by this node, so after sending the data, it waits for a preset time length (for example, tHohld) and then continues to open time slot 1 and continues to send the second data packet. After receiving the data packet sent by node 1, node 2 determines that the next time slot belongs to this node, and opens time slot 2 after tHohld after receiving the data packet, and sends the data packet to be sent by this node. By analogy, all nodes in the network use the time slots allocated to themselves to send data.

[0129] Furthermore, Figure 7 Time slot 4 in the figure should belong to node 4 to send data, but because of the failure of node 4, the data of this node is not sent. Other nodes monitor whether the time slot data packet of node 4 has timed out. The timeout time is recorded as tSlot, which represents the maximum time slot length. After determining the timeout, the time slot is switched. Node 5 determines that the next time slot data is itself, so it opens time slot 5 to send the data packet of this node.

[0130] It is understandable that in Figure 7 In the scheduling method shown, the length of the time slot occupied by each node on the bus is not a fixed value. This is because when the link length is very long, the link delay time for data packets to reach different nodes is inconsistent, resulting in inconsistent time for the listening node in the time slot to decide to switch time slots.

[0131] As before, each node can also be scheduled via fixed-length time slots.

[0132] Figure 8 FIG. 1 is a flow chart of another method for determining the time slot length of each node provided in an embodiment of the present application. Figure 8 As shown, the method comprises the following steps:

[0133] In step S801, the number of subpackets for each node is determined according to the maximum transmission data volume and the calibrated transmission data volume of a single communication cycle.

[0134] In step S802, the quotient of the maximum transmission data volume of a single communication cycle and the maximum load data volume of a single frame is determined as the unit time slot data volume.

[0135] In step S803, the quotient of the maximum time slot duration of a single communication cycle and the data volume per unit time slot is determined as the unit time slot duration.

[0136] In step S804, the product of the maximum number of subpackets and the unit time slot duration is determined as the time slot duration of each node.

[0137] In some implementations of the present application, when allocating fixed-length time slots to each node, the unit time slot length can still be determined by the method for allocating variable-length time slots. Further, the unit time slot length multiplied by the maximum number of subpackets is used as a fixed time slot length and allocated to each node.

[0138] In some embodiments of the present application, when each node is scheduled using a fixed-length time slot, each node is sequentially scheduled to use the bus of the industrial Ethernet to transmit data according to the sorting order and the time slot duration of each node, and the target time slot starting point corresponding to the target node is sequentially determined according to the sorting order and the time slot duration of each node; when the current time reaches the target time slot starting point, the target node is scheduled to use the bus of the industrial Ethernet to transmit data. The target node is any node in the industrial Ethernet.

[0139] That is to say, fixed-length time slots can be used as a supplement to variable-length time slot scheduling. The difference between the two lies in whether the time slot length is fixed. In the fixed-length time slot switching method, the time slot length is fixed, and the determination of the time slot length needs to comprehensively consider the transfer delay and transmission delay of the network link. In addition, the timed time slot switching method strictly relies on the time synchronization between network nodes, so it is necessary to provide a periodic time synchronization solution in the fixed-length time slot switching network. The specific implementation method of periodic time synchronization is described in the relevant technology and will not be repeated here.

[0140] Fig. 9 is a timing diagram of scheduling each node in a fixed-length time slot provided in an embodiment of the present application. Fig. 9 As shown in the figure, the network is divided into 16 time slots in total, and the time of each time slot is fixed to st. Among them, time slot 0 is fixed for sending the synchronization packet data of the whole network; time slots 1 to 3 are assigned to node 1; time slots 4 to 6 are assigned to node 2; time slots 7 to 9 are assigned to node 3; time slots 10 to 12 are assigned to node 4; time slots 13 to 14 are assigned to node 5; time slot 15 is assigned to node 6. There is no time slot timeout during the operation of the network, because all nodes send data at a fixed time, even if the data packet conflicts on the bus, it does not change the time slot duration.

[0141] The industrial Ethernet provided in the embodiment of the present application is a peer-to-peer network. The ordering of each node and time slot type may be to determine that the ordering of the downlink time slot is before the ordering of the uplink time slot; and to determine that the ordering of the management node in the industrial Ethernet is before the controlled node.

[0142] In traditional control systems facing multiple applications, multiple controllers are required to exchange data with controlled nodes (or IO modules) within the same communication cycle. In order to solve the problem of bus access conflicts, the control system network architecture solutions in related technologies mostly use multi-hop parallel communication links to solve this problem. This solution greatly increases the real-time cost of the network, and it is difficult for multiple networks to achieve system synchronization, which increases the instability of the system.

[0143] The technical solution provided in the embodiment of the present application divides time slots according to the amount of data exchanged between the controller and the controlled nodes on the same network, and abandons the traditional master-slave communication method, thereby solving multiple communication needs while ensuring system consistency.

[0144] All the above optional technical solutions can be arbitrarily combined to form optional embodiments of the present application, which will not be described one by one here.

[0145] The following is an embodiment of the device of the present application, which can be used to execute the embodiment of the method of the present application. For details not disclosed in the embodiment of the device of the present application, please refer to the embodiment of the method of the present application.

[0146] Fig.10 Schematic diagram of a bus scheduling device based on time slot allocation provided by an embodiment of the present application. Fig.10 As shown, the device comprises:

[0147] The acquisition module 1001 is configured to acquire the calibrated transmission data volume of each node in the industrial Ethernet in a single communication cycle, and the maximum load data volume of a single frame of the industrial Ethernet.

[0148] The determination module 1002 is configured to determine a maximum time slot length of a single communication cycle of the industrial Ethernet and a maximum transmission data volume of a single communication cycle.

[0149] The determination module 1002 is further configured to determine the time slot duration of each node based on the maximum time slot duration of a single communication cycle, the maximum transmission data volume of a single communication cycle, the calibrated transmission data volume and the maximum load data volume of a single frame.

[0150] The scheduling module 1003 is configured to sort the nodes and time slot types, and sequentially schedule the nodes to use the bus of the industrial Ethernet to transmit data according to the sorting order and the time slot duration of each node.

[0151] According to the technical solution provided in the embodiment of the present application, in the Industrial Ethernet, the time slot length of each node is determined by using the maximum time slot length of a single communication cycle, the maximum transmission data volume of a single communication cycle, the calibrated transmission data volume and the maximum load data volume of a single frame, and then each node and time slot type is sorted, and each node is scheduled in turn to use the bus of the Industrial Ethernet to transmit data according to the sorting order and the time slot length of each node. This can achieve orderly access to the bus by all nodes in the Industrial Ethernet, avoid bus access conflicts that may occur when there are multiple management nodes in the Industrial Ethernet, and also provide the controlled nodes in the Industrial Ethernet with the ability to access the bus, thereby improving communication efficiency and enhancing user experience.

[0152] In some implementations, the time slot duration of each node is determined based on the maximum time slot duration of a single communication cycle, the maximum transmission data volume of a single communication cycle, the calibrated transmission data volume and the maximum load data volume of a single frame, including: determining the number of subpackets of each node according to the maximum transmission data volume and the calibrated transmission data volume of a single communication cycle; determining the quotient of the maximum transmission data volume of a single communication cycle and the maximum load data volume of a single frame as the unit time slot data volume; determining the quotient of the maximum time slot duration of a single communication cycle and the unit time slot data volume as the unit time slot duration; determining the product of the number of subpackets of the target node and the unit time slot duration as the time slot duration of the target node; wherein the target node is any node in the Industrial Ethernet.

[0153] In some embodiments, each node is scheduled to use the bus of the Industrial Ethernet to transmit data based on the sorting order and the time slot length of each node, including: the time slot length corresponding to each node is determined based on the sorting order and the time slot length of each node, and the time slot length corresponding to each node includes at least one time slot arranged in sequence; the first target node broadcasts and sends a first data packet in the first time slot; in response to determining that the second time slot is the time slot corresponding to the first target node, the first target node broadcasts and sends a second data packet after waiting for a preset time length; wherein the second time slot is the next time slot of the first time slot, the preset time length is less than the timeout time length, the timeout time length is the total time slot length corresponding to the node with the largest number of subpackets, and the first target node is any node in the Industrial Ethernet.

[0154] In some embodiments, each node is scheduled to use the bus of the Industrial Ethernet to transmit data in sequence according to the sorting order and the time slot duration of each node, including: determining the time slot duration corresponding to each node in sequence according to the sorting order and the time slot duration of each node, the time slot duration corresponding to each node includes at least one time slot arranged in sequence; the first target node broadcasts and sends a first data packet in the first time slot; in response to determining that the second time slot is the time slot corresponding to the second target node, and the second target node determines that the first target node has timed out in sending the first data packet, the second target node broadcasts and sends a third data frame after waiting for the timeout period; wherein the second time slot is the next time slot of the first time slot, the timeout period is the total time slot duration corresponding to the node with the largest number of subpackets, and the first target node and the second target node are any two different nodes in the Industrial Ethernet.

[0155] In some implementations, the time slot duration of each node is determined based on the maximum time slot duration of a single communication cycle, the maximum transmission data volume of a single communication cycle, the calibrated transmission data volume and the maximum load data volume of a single frame, including: determining the number of subpackets of each node based on the maximum transmission data volume and the calibrated transmission data volume of a single communication cycle; determining the quotient of the maximum transmission data volume of a single communication cycle and the maximum load data volume of a single frame as the unit time slot data volume; determining the quotient of the maximum time slot duration of a single communication cycle and the unit time slot data volume as the unit time slot duration; determining the product of the maximum number of subpackets and the unit time slot duration as the time slot duration of each node.

[0156] In some implementations, each node is scheduled in turn to use the bus of Industrial Ethernet to transmit data based on a sorting order and a time slot length of each node, including: determining a target time slot starting point corresponding to a target node in turn based on a sorting order and a time slot length of each node; when the current time reaches the target time slot starting point, scheduling the target node to use the bus of Industrial Ethernet to transmit data; wherein the target node is any node in Industrial Ethernet.

[0157] In some implementations, the industrial Ethernet is a peer-to-peer network; sorting the nodes and time slot types includes: determining that the downlink time slot is sorted before the uplink time slot; and determining that the management node in the industrial Ethernet is sorted before the controlled node.

[0158] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0159] Fig.11 Schematic diagram of an electronic device provided in an embodiment of the present application. Fig.11As shown, the electronic device 11 of this embodiment includes: a processor 1101, a memory 1102, and a computer program 1103 stored in the memory 1102 and executable on the processor 1101. When the processor 1101 executes the computer program 1103, the steps in the above-mentioned method embodiments are implemented. Alternatively, when the processor 1101 executes the computer program 1103, the functions of the modules / units in the above-mentioned device embodiments are implemented.

[0160] The electronic device 11 may be a desktop computer, a notebook, a PDA, a cloud server, or other electronic device. The electronic device 11 may include, but is not limited to, a processor 1101 and a memory 1102. Those skilled in the art will appreciate that Fig.11 The electronic device 11 is merely an example and does not limit the electronic device 11 , and may include more or less components than those shown in the figure, or different components.

[0161] Processor 1101 can be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.

[0162] The memory 1102 may be an internal storage unit of the electronic device 11, for example, a hard disk or memory of the electronic device 11. The memory 1102 may also be an external storage device of the electronic device 11, for example, a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card (FlashCard), etc. equipped on the electronic device 11. The memory 1102 may also include both an internal storage unit of the electronic device 11 and an external storage device. The memory 1102 is used to store computer programs and other programs and data required by the electronic device.

[0163] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units.

[0164] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. The computer program may include computer program code, which may be in source code form, object code form, executable file or some intermediate form. Computer-readable media may include: any entity or device capable of carrying computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium, etc.

[0165] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.

Claims

1. A bus scheduling method based on time slot allocation, characterized in that: The method is used to allocate bus usage time slots to nodes in an industrial Ethernet, and the method comprises: Obtaining the calibrated transmission data volume of each node in the industrial Ethernet in a single communication cycle, and the maximum load data volume of a single frame of the industrial Ethernet; Determine the maximum time slot duration of a single communication cycle of the industrial Ethernet and the maximum amount of transmitted data in a single communication cycle; Determine the time slot duration of each node based on the maximum time slot duration of the single communication cycle, the maximum transmission data volume of the single communication cycle, the calibrated transmission data volume and the maximum load data volume of the single frame; The nodes and time slot types are sorted, and the nodes are sequentially scheduled to use the bus of the industrial Ethernet to transmit data according to the sorting order and the time slot duration of each node.

2. The method according to claim 1, characterized in that The determining of the time slot duration of each node based on the maximum time slot duration of a single communication cycle, the maximum transmission data volume of a single communication cycle, the calibrated transmission data volume and the maximum load data volume of a single frame includes: Determine the number of subpackets for each node according to the maximum transmission data volume of the single communication cycle and the calibrated transmission data volume; Determine the quotient of the maximum transmission data volume of the single communication cycle and the maximum load data volume of the single frame as the unit time slot data volume; Determine the quotient of the maximum time slot duration of the single communication cycle and the data volume per unit time slot as the unit time slot duration; Determine that the product of the number of subpackets of the target node and the unit time slot duration is the time slot duration of the target node; Wherein, the target node is any node in the industrial Ethernet.

3. The method according to claim 2, characterized in that The method of sequentially scheduling each node to use the bus of the industrial Ethernet to transmit data according to the sorting order and the time slot duration of each node includes: Determine the time slot duration corresponding to each node in sequence according to the sorting order and the time slot duration of each node, wherein the time slot duration corresponding to each node includes at least one time slot arranged in sequence; The first target node broadcasts and sends a first data packet in a first time slot; In response to determining that the second time slot is the time slot corresponding to the first target node, the first target node broadcasts and sends a second data packet after waiting for a preset time period; The second time slot is the next time slot of the first time slot, the preset duration is less than the timeout duration, the timeout duration is the duration of all time slots corresponding to the node with the largest number of subpackets, and the first target node is any node in the industrial Ethernet.

4. The method according to claim 2, characterized in that: The method of sequentially scheduling each node to use the bus of the industrial Ethernet to transmit data according to the sorting order and the time slot duration of each node includes: Determine the time slot duration corresponding to each node in sequence according to the sorting order and the time slot duration of each node, wherein the time slot duration corresponding to each node includes at least one time slot arranged in sequence; The first target node broadcasts and sends a first data packet in a first time slot; In response to determining that the second time slot is the time slot corresponding to the second target node, and the second target node determining that the first target node has timed out in sending the first data packet, the second target node broadcasts and sends a third data frame after waiting for a timeout period; The second time slot is the time slot after the first time slot, the timeout duration is the duration of all time slots corresponding to the node with the largest number of subpackets, and the first target node and the second target node are any two different nodes in the industrial Ethernet.

5. The method according to claim 1, characterized in that The determining of the time slot duration of each node based on the maximum time slot duration of a single communication cycle, the maximum transmission data volume of a single communication cycle, the calibrated transmission data volume and the maximum load data volume of a single frame includes: Determine the number of subpackets for each node according to the maximum transmission data volume of the single communication cycle and the calibrated transmission data volume; Determine the quotient of the maximum transmission data volume of the single communication cycle and the maximum load data volume of the single frame as the unit time slot data volume; Determine the quotient of the maximum time slot duration of the single communication cycle and the data volume per unit time slot as the unit time slot duration; The product of the maximum number of subpackets and the unit time slot duration is determined as the time slot duration of each node.

6. The method according to claim 5, characterized in that The method of sequentially scheduling each node to use the bus of the industrial Ethernet to transmit data according to the sorting order and the time slot duration of each node includes: Determine the starting point of the target time slot corresponding to the target node in sequence according to the sorting order and the time slot duration of each node; When the current time reaches the starting point of the target time slot, scheduling the target node to use the bus of the industrial Ethernet to transmit data; Wherein, the target node is any node in the industrial Ethernet.

7. The method according to any one of claims 1 to 6, characterized in that The industrial Ethernet is a peer-to-peer network; The sorting of the nodes and time slot types includes: Determining that the downlink time slot is sequenced before the uplink time slot; and It is determined that the management node in the industrial Ethernet is arranged before the controlled node.

8. A bus scheduling device based on time slot allocation, characterized in that: include: An acquisition module is configured to acquire a calibrated transmission data volume of each node in the industrial Ethernet in a single communication cycle, and a maximum load data volume of a single frame of the industrial Ethernet; A determination module is configured to determine a maximum time slot duration of a single communication cycle of the industrial Ethernet and a maximum amount of transmitted data in a single communication cycle; The determination module is further configured to determine the time slot duration of each node based on the maximum time slot duration of the single communication cycle, the maximum transmission data volume of the single communication cycle, the calibrated transmission data volume and the maximum load data volume of the single frame; The scheduling module is configured to sort the nodes and time slot types, and sequentially schedule the nodes to use the bus of the industrial Ethernet to transmit data according to the sorting order and the time slot duration of each node.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

Citation Information

Cited By

  • Data transmission method, node, industrial network and storage medium

    CN120675956A

  • RS485 bus communication system and communication method, device, equipment and medium thereof

    CN121125386A

  • Distributed energy storage scheduling method and system

    CN121192802A

  • A distributed energy storage scheduling method and system

    CN121192802B