Method, computing device, storage medium and product for adjusting message sending time

By adjusting the message sending time by adjacent node devices, the synchronization abnormalities and communication paralysis problems caused by external attacks and hardware failures in the industrial Ethernet system are solved, and the effect of maintaining the normal operation of abnormal node devices and ensuring the reliability and stability of the communication network is achieved.

CN119363664BActive Publication Date: 2025-04-25ZHEJIANG GUOLI XINAN TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411905023.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-23
Publication Date
2025-04-25
Estimated Expiration
2044-12-23

AI Technical Summary

Technical Problem

Industrial Ethernet (EPA) systems are vulnerable to external attacks and hardware failures, resulting in synchronous abnormalities and communication paralysis. Traditional solutions cannot maintain the normal operation of abnormal node devices and ensure the reliability and stability of the communication network.

Method used

The message sending time is adjusted by adjacent node devices so that it does not collide with other node devices. The network configuration information and message reception time are used to determine whether it is within the preset time period, and the response is not within the preset time period to adjust the sending time.

Benefits of technology

Effectively maintain the normal operation of abnormal node equipment, reduce message loss rate, improve the stability and reliability of the communication system, and ensure the continuity and stability of the communication network.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119363664B_ABST
    Figure CN119363664B_ABST
Patent Text Reader

Abstract

The present invention relates to a method, a computing device, a storage medium and a product for adjusting the time of sending a message. The method is applied in a communication system, wherein a communication network related to the communication system includes a target node device and an adjacent node device adjacent to the target node device, and the method is executed by the adjacent node device, and includes receiving a message sent by the target node device in a target macrocycle. The method also includes determining whether the receiving time is within a preset time period indicated in the network configuration information and the receiving time of the message based on the network configuration information of the communication network. In addition, the method also includes adjusting the time of sending the message based on at least the type of the message and / or the circumstance between the receiving time and the preset time period in response to determining that the receiving time is not within the preset time period indicated in the network configuration information. In this way, the normal operation of the abnormal node device can be maintained, and the continuity and stability of the communication network can be ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of communications, and more particularly, to a method, a computing device, a storage medium and a product for adjusting message sending time. Background Art

[0002] As a fieldbus standard with completely independent intellectual property rights in China, the Industrial Ethernet for Plant Automation (EPA) bus has been accepted and published by the International Electrotechnical Commission (IEC) as an international fieldbus standard, becoming my country's first international standard for industrial automation. It is widely used in control systems, data acquisition and monitoring in the manufacturing industry. The EPA system is based on the Open System Interconnect (OSI) model, using the physical layer of Ethernet as the transmission basis, and achieving high-speed, strong real-time reliability transmission through the EPA protocol. However, this also makes EPA vulnerable to external attacks, and the EPA network is prone to synchronization anomalies due to external attacks or hardware failures, which can lead to paralysis of the entire network communication.

[0003] Conventional methods for resolving network anomalies include directly shutting down the communication port with the faulty node device when a node device in the communication network is detected to have failed, thereby physically isolating the faulty network from the normal network.

[0004] In summary, the shortcomings of the traditional methods for solving network anomalies are that they cannot maintain the normal operation of abnormal node devices, and on the other hand, they cannot guarantee the reliability and stability of the communication network. Summary of the invention

[0005] The embodiments of the present invention provide a method, a computing device, a computer storage medium and a computer program product for adjusting the message sending time, which can maintain the normal operation of abnormal node devices and ensure the continuity and stability of the communication network.

[0006] In a first aspect of the present invention, a method for adjusting a message sending time is provided. The method is applied in a communication system, wherein a communication network related to the communication system includes a target node device and an adjacent node device adjacent to the target node device, and the method is executed by the adjacent node device, and includes receiving a message sent by the target node device in a target macrocycle. The method also includes determining whether the receiving time is within a preset time period indicated in the network configuration information based on the network configuration information of the communication network and the receiving time of the message. In addition, the method also includes adjusting the time of sending the message based on at least the type of the message and / or the causal relationship between the receiving time and the preset time period in response to determining that the receiving time is not within the preset time period indicated in the network configuration information.

[0007] In a second aspect of the present invention, an electronic device is provided, which includes one or more processors and a storage device for storing one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors implement the method provided according to the first aspect of the present invention.

[0008] In a third aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer-executable instructions, wherein the computer-executable instructions are executed by a processor to implement the method provided according to the first aspect of the present invention.

[0009] According to a fourth aspect of the present invention, there is provided a computer program product, comprising machine executable instructions, which, when executed, enable a machine to perform the method provided by the first aspect of the present invention.

[0010] It should be understood that the contents described in the summary of the invention are not intended to limit the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] The above and other features, advantages and aspects of the embodiments of the present invention 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.

[0012] Figure 1 A schematic diagram is shown of an example environment in which various embodiments of the invention may be implemented.

[0013] Figure 2 A flow chart illustrating a method 200 for adjusting a message sending time according to some embodiments of the present invention is shown.

[0014] Figure 3 A schematic diagram of adjusting periodic message forwarding time according to some embodiments of the present invention is shown.

[0015] Figure 4 A schematic diagram of an adjusted message according to some embodiments of the present invention is shown.

[0016] Figure 5 A schematic diagram showing the time slices occupied by the adjusted periodic messages according to other embodiments of the present invention is shown.

[0017] Figure 6 A schematic diagram of adjusting aperiodic message forwarding time according to some embodiments of the present invention is shown.

[0018] Figure 7A schematic diagram of adjusting aperiodic messages according to some embodiments of the present invention is shown.

[0019] Figure 8 A block diagram of an apparatus for adjusting message sending time according to some embodiments of the present invention is shown.

[0020] Fig. 9 A block diagram is shown of a device in which various embodiments of the present invention may be implemented. DETAILED DESCRIPTION

[0021] Embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present invention are shown in the accompanying drawings, it should be understood that the present invention can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present invention. It should be understood that the drawings and embodiments of the present invention are only for exemplary purposes and are not intended to limit the scope of protection of the present invention.

[0022] In the description of the embodiments of the present invention, the term "including" and similar terms should be understood as open inclusion, that is, "including but not limited to". The term "based on" should be understood as "based at least in part on". The term "one embodiment" or "the embodiment" should be understood as "at least one embodiment". The terms "first", "second", etc. may refer to different or the same objects. Other explicit and implicit definitions may also be included below.

[0023] As mentioned above, the node devices in the communication network may send messages incorrectly due to external attacks or other factors, such as not sending the message within the specified time, resulting in overlap or conflict with the time when other node devices send messages. If the above situation occurs, the message may be lost, affecting the normal communication of the entire network. If the faulty node device is directly isolated, the normal operation of the faulty node cannot be guaranteed, thereby affecting the communication efficiency of the communication network.

[0024] To this end, an embodiment of the present invention proposes a method for adjusting the time of sending a message. The method is applied to a communication system, wherein a communication network related to the communication system includes a target node device and an adjacent node device adjacent to the target node device, and the method is executed by the adjacent node device, and includes receiving a message sent by the target node device in a target macrocycle. The method also includes determining whether the receiving moment is within a preset time period indicated in the network configuration information based on the network configuration information of the communication network and the receiving moment of the message. In addition, the method also includes adjusting the time of sending the message based on at least the type of the message and / or the causal relationship between the receiving moment and the preset time period in response to determining that the receiving moment is not within the preset time period indicated in the network configuration information.

[0025] In this way, the adjacent node devices are used to adjust the timing of forwarding messages so that they do not collide with messages from other node devices. In this way, even if a node device fails, it will not cause abnormal phenomena such as message collision and packet loss in the communication network. This can maintain the normal operation of the abnormal node device and ensure the continuity and stability of the communication network.

[0026] Figure 1 1 is a schematic diagram of an example environment 100 in which various embodiments of the present invention may be implemented. Figure 1 As shown, in the environment 100, a communication network 102 and a plurality of node devices (e.g., node device 104, node device 106, node device 108, node device 110, node device 112, and node device 114) included in the communication network 102 are included. Among them, the node can be a terminal device, a wireless communication device, a gateway device, or a sensor (e.g., a temperature sensor, a humidity sensor) used to transmit information in a terminal device. In some embodiments, the communication network 102 can be a network system built on an Ethernet bus, such as an EPA network system. The EPA bus is a real-time Ethernet bus implemented based on the Ethernet physical layer.

[0027] In this example environment, the communication mode between multiple node devices is full-duplex communication. Taking node device 104 as an example, node device 104 can send messages to node device 106 connected to it, and can also send messages to node device 114 connected to it. Node device 104 can receive messages sent by node device 106 connected to it, and can also receive messages sent by node device 114 connected to it. In some embodiments, the message can contain multiple types of information, for example, the message can be control-related data in communication network 102, such as control instructions, status data, control signals, priority information, etc. It can be understood that multiple node devices can be connected end to end to form a ring type, or a bus type, or connected through a switch to form a star topology.

[0028] In some embodiments of the present invention, the communication network 102 is a periodic communication, and the communication cycle is called a macrocycle T, which is divided into a periodic time Tp and a non-periodic time Tn. Before starting the communication network 102, the user (e.g., a system administrator) can configure the communication network 102 to determine the network configuration information of the communication network 102. The network configuration information may include a preset time period for each node device to transmit a message in the communication macrocycle (e.g., the start time and end time of the message transmission) and identification information corresponding to each node device. It can be understood that the preset time period may be a time slice allocated by the node device within the macrocycle time.

[0029] In actual applications, various unexpected factors or emergencies may cause multiple node devices to send messages in the same time period, which may cause message loss and affect the communication abnormality of the communication network 102. On this basis, the node device adjacent to the node device with the failure can adjust the time of forwarding the message so that the message is sent within the set time slice (so that it occupies the correct time slice), thereby ensuring the normal operation of the communication network 102. For example, after receiving the message sent by the node device 106, the node device 108 can determine whether the node device 106 has a failure according to the timestamp carried by the message (used to characterize the time when the node device 106 sends the message) or the time when the message is received. For example, the node device 108 can determine that the node device 106 has an abnormal situation such as message collision according to the preset time period set for the node device 106 in the network configuration information. If the time when the message is received is not within the preset time period, it is determined that the node device 106 has a message collision problem with other node devices. On this basis, the node device 108 can control the time of forwarding the message so that it occupies the correct time slice, thereby maintaining the stable operation of the communication network 102.

[0030] In this way, by using the adjacent node devices of the abnormal node device to adjust the time of forwarding the message, the collision problem caused by multiple node devices sending messages in the same time slice can be avoided, thereby reducing the message loss rate, improving the stability and reliability of the communication system, and enabling the communication network to better cope with various emergencies and unexpected factors. In addition, the adjacent node devices can reasonably adjust the time of message forwarding based on the comparison result between the preset time period and the receiving time, so as to more effectively utilize network resources and improve the transmission efficiency of the communication network.

[0031] Figure 2 A flow chart of a method 200 for adjusting a message sending time according to some embodiments of the present invention is shown. The method is applied in a communication system. A communication network (e.g. Figure 1 The communication network 102 shown in FIG. 1 includes a target node device (eg, Figure 1 ) and adjacent node devices adjacent to the target node device (e.g. Figure 1 Node device 108 or node device 104 shown in FIG. 2 ). Method 200 may be performed by Figure 1 The node device 108 or the node device 104 shown in FIG. Figure 2 As shown, at block 202, method 200 may include receiving a message from a target node device in a target macrocycle. The communication network may be a network that uses periodic communication and full-duplex communication between node devices. For example, the communication network may be an EPA network.

[0032] In the network segment of the communication network, the communication of all wireless node devices is carried out in cycles. On this basis, the time T required to complete a communication cycle can be called a communication macrocycle. A communication macrocycle T can be divided into two stages, such as the periodic message transmission stage Tp and the non-periodic message transmission stage Tn, which are respectively used for the wireless node devices in the network segment to transmit periodic data messages and non-periodic data messages. For example, in the periodic message transmission stage Tp, the node device sends messages containing periodic data to other nodes in the network segment, such as periodic measurement values, periodic control values, periodic input and output data, etc. In the non-periodic message transmission stage Tn, the node device sends messages containing non-periodic data to other nodes in the network segment, such as program upload and download data, variable read and write data, event notifications, etc. It can be understood that all node devices in the system are synchronized under the same time base, that is, the start time and end time of the macrocycle of all node devices are consistent.

[0033] In some embodiments of the present invention, the cycle time Tp is the time when each node in the network sends a periodic message. The time point when each node sends a message during the cycle time Tp is a fixed time point. The time taken by each node to send a message is a time slice. Only one fixed node can send a message in each time slice. The sending time of any time message within the cycle time Tp is unique, and there will be no overlap or conflict.

[0034] In some embodiments of the present invention, the communication mechanism between node devices in the communication network is full-duplex communication, which allows data to be transmitted simultaneously in two directions at the same time, that is, each node device can send and receive data at the same time. In one example, a communication network such as an EPA network may include node device 1, node device 2, node device 3, node device 4, node device 5, and node device 6. Taking node device 4 as an example, the adjacent node devices of node device 4 are node device 5 and node device 3. Node device 4 can send messages to node device 5 and node device 3 respectively, or can receive messages sent by node device 5 or receive messages sent by node device 3.

[0035] In box 204, method 200 may include determining whether the receiving time is within a preset time period indicated in the network configuration information based on the network configuration information of the communication network and the receiving time of the message. Among them, the network configuration information of the communication network may be the time period or time slice set by the user for each node device in the communication network in which the message can be sent, and the identification information corresponding to each node device. Among them, the identification information of the node device can be used to uniquely characterize the node device. For example, in a macro cycle, time slice 1 can be assigned to node device 1, time slice 2 can be assigned to node device 2, time slice 3 can be assigned to node device 3, and time slice 4 can be assigned to node device 4. That is, node device 1 can send a message in time slice 1 of the cycle time of each macro cycle, and node device 2 can send a message in time slice 2 of the cycle time of each macro cycle, etc. It should be understood that under normal circumstances, the time slices assigned to each node device in the cycle time will not overlap or conflict with each other. For example, under normal scheduling conditions, each node device can send data within a pre-allocated time slice without conflict. However, if a node device fails, such as an abnormal phenomenon such as excessive time synchronization error, the node device's message error will occupy the time slices of other node devices, thereby affecting the normal communication of the entire network.

[0036] In some embodiments of the present invention, a node device can determine the configuration information corresponding to other node devices in the communication network through network configuration information, such as the time period in which other node devices can send messages. On this basis, when an adjacent node device, such as node device 5, receives a message sent by a target node device such as node device 4, it can determine whether node device 4 sends a message within a specified preset time period based on the network configuration information and the receiving time, that is, whether there is a message collision. It can be understood that in actual applications, the difference between the time when node device 5 receives the message and the time when node device 4 sends the message is small, and can basically be on the order of one ns or one ps. On this basis, the receiving time and the sending time can be approximately equal. In other words, node device 5 can determine the sending time when node device 4 sends the message based on the time when the message is received.

[0037] In some embodiments of the present invention, the adjacent node devices may determine the configuration information for the target node device in the network configuration information (e.g., the preset time period or preset time slice corresponding to the target node device) based on the identification information of the target node device. When it is determined that the receiving time of the message (the sending time of the message sent by the target node device) is not in the preset time period, it can be determined that the target node device has a fault. Among them, the fault may be that the target node device does not send the message within the specified preset time period or the time when the target node device sends the message has a large synchronization error with the set time. In other embodiments, the message may carry time indication information, and the time indication information may be used to indicate the sending time when the target node device sends the message. On this basis, the adjacent node devices may also determine whether the target node device is abnormal based on the comparison result between the sending time carried in the message and the preset time period.

[0038] In box 206, the method may include adjusting the time of sending the message based on at least the type of the message and / or the circumstance relationship between the receiving time and the preset time period in response to determining that the receiving time is not within the preset time period indicated in the network configuration information. The circumstance relationship between the receiving time and the preset time period can be used to indicate whether the message arrives before or after the preset time period. For example, the adjacent node device can adjust the time of forwarding the message according to the direction and size of the time difference between the receiving time and the preset time period. Among them, adjusting the time of forwarding the message refers to forwarding the message within the preset time period originally set in the current macro cycle or forwarding the message within the time slice set in the current macro cycle, and of course, the message can also be forwarded within the predetermined time period of the next macro cycle. The specific adjustment method can be determined according to the type of the message and the circumstance relationship between the receiving time and the preset time period. In other embodiments, the adjacent node device can also determine the time or adjustment method of forwarding the message according to the communication requirements or the constraints of the communication system (such as bandwidth restrictions, delay requirements).

[0039] In some embodiments of the present invention, different types of messages may carry different information or have different priorities. Therefore, in order to ensure the timely transmission of key information or the reasonable scheduling of information of different priorities, adjacent node devices may adjust the forwarding time of the message according to the message type. In other embodiments, if the moment of receiving the message is before the preset time period, the adjacent node device may forward the message at a certain time point within the preset time period corresponding to the target node device according to the size of the time difference. If the moment of receiving the message is after the preset time period, the adjacent node device may forward the message within the remaining time slice of the current macro cycle or postpone it to the predetermined time period of the next macro cycle for forwarding.

[0040] In this way, the adjacent node devices can flexibly deal with the uncertainty of the target node device sending message time, ensuring the continuity and stability of the communication network. In addition, the adjustment method for the message can also improve the responsiveness and adaptability of the communication network to emergencies. At the same time, by adjusting the time of forwarding messages by the adjacent node devices, even if a node device is abnormal, it will not cause abnormal phenomena such as message collision and packet loss in the communication network, so that the normal operation of the node device can be maintained.

[0041] In actual applications, different types of messages have completely different corresponding transmission characteristics and uses in the communication network. For example, in the case where the message is a non-periodic message, the message sending time is often not fixed, but is determined according to the data generation time, priority or other specific conditions. Once the time of a non-periodic message sent by a node device collides with the time of a non-periodic message sent by another node device, it is necessary to re-apply for scheduling and re-determine the time slice of the node device. In the case where the message is a periodic message, a time slice is generally reserved in the macro cycle to reserve a time period for coordination for the message sending time. Based on this, when the adjacent node device determines that the moment when the target node device sends the message is not within the preset time period corresponding to the node device, it can adjust the time for forwarding the message according to the type of message.

[0042] Figure 3 FIG. 2 shows a schematic diagram of adjusting the periodic message forwarding time according to some embodiments of the present invention. Figure 3 As shown, in the example environment 300, in box 302, the user can configure the communication network according to the actual application and obtain the network configuration information of the communication network. Among them, the network configuration information may include a preset time period set for each node device, and each node device may send a periodic message in the preset time period. The communication network may notify each node device in the communication network of the network configuration information through a broadcast mechanism. Through the broadcast mechanism, each node device can synchronously update its communication behavior to adapt to changes in the network configuration.

[0043] like Figure 3As shown, in box 304, after the configuration of the communication network is completed, normal scheduling can be performed based on the network configuration information, for example, node device 1 of the communication network sends periodic messages according to the assigned time slice 1, and node device 2 sends periodic messages according to the assigned time slice 2. In box 306, adjacent node devices can receive periodic messages sent by node devices connected to them. For example, node device 5 can receive periodic messages sent by node device 4. It can be understood that adjacent node devices can record the moment when they receive the periodic message as the reception moment. In box 308, the adjacent node device can determine the configuration information for the node device from the network configuration information based on the identification information of the node device, such as a preset time period or time slice assigned to the node device by a macro cycle.

[0044] like Figure 3 As shown, in box 310, the adjacent node device can determine whether the receiving time (the time slice actually occupied by the node device sending the periodic message) is within the preset time period (the time slice allocated to the node device). In box 312, if the time slice actually occupied by the node device sending the periodic message is within the time slice allocated by the current macro cycle, the adjacent node device can forward the periodic message normally. In box 314, if the time slice actually occupied by the node device sending the periodic message is not within the time slice allocated by the current macro cycle, the relationship between the actually occupied time slice and the allocated time slice can be further determined.

[0045] like Figure 3 As shown, in box 316, if the time when the node device sends the periodic message is earlier than the preset time period or the allocated time slice, the adjacent node device can cache the periodic message until the preset time period and then forward the message. For example, in one example, the time slice of the periodic time of the current macrocycle allocated to the node device 4 in the network configuration information is 2:00-3:00 pm. If the adjacent node device 5 receives the periodic message sent by the node device 4 at 12:00 noon, the periodic message can be cached and forwarded at any time point in the 2:00-3:00 pm time period. In box 318, if the time when the node device sends the periodic message is later than the preset time period or the allocated time slice, the adjacent node device has missed the opportunity to forward the periodic message within the preset time period. On this basis, in order to avoid the problem of message collision, the periodic message can be cached and forwarded within the time slice allocated to the node device in the next macrocycle or forwarded within the time slice reserved for the current macrocycle. The reserved time slice may be determined according to network configuration information, and the reserved time slice is within the cycle time TP of the current macrocycle.

[0046] In this way, even if a node device fails, it will not cause abnormal phenomena such as message collision and packet loss in the communication network, and can even maintain the normal operation of the node, thereby improving the reliability and adaptability of the communication network.

[0047] Figure 4 FIG. 4 is a schematic diagram showing a message after adjustment according to some embodiments of the present invention. Figure 4 As shown, in the example environment 400, the current macrocycle T can be divided into a periodic time Tp and a non-periodic time Tn, and a time slice can be reserved in the periodic time Tp. In the current periodic time Tp, each node device such as node device 1, node device 2, etc. can each occupy a time slice. The node device can send a periodic message in its own time slice of the periodic time Tp of each macrocycle.

[0048] like Figure 4 As shown, the time slice occupied by node device 4 for sending periodic messages overlaps with the time slice occupied by node device 3 for sending periodic messages, which will cause a collision of periodic messages and cause the periodic messages to be lost in the communication network. Moreover, if the lost periodic message carries a non-periodic declaration, it will also cause multi-frame collisions during the non-periodic time, resulting in a large number of packet losses, thereby causing communication anomalies in the communication network. On this basis, if node device 5 detects that the time slice occupied by node device 4 for sending periodic messages is inconsistent with the preset time slice indicated by the network configuration information, it can further determine the relationship between the time slice occupied by the sending periodic message and the preset time slice. Reference Figure 4 If the time slice occupied by node device 4 for sending the periodic message is earlier than the preset time slice indicated by the network configuration information, node device 5 can adjust the forwarding time of the periodic message, for example, it can cache the periodic message and forward the periodic message within a preset time period.

[0049] Figure 5 FIG. 2 is a schematic diagram showing the time slices occupied by the adjusted periodic messages according to some other embodiments of the present invention. Figure 5 As shown, in the example environment 500, the time slice occupied by the node device 4 for sending the periodic message overlaps with the time slice occupied by the node device 5 for sending the periodic message. On this basis, the node device 5 can detect that the time slice occupied by the node device 4 for sending the periodic message is later than the preset time slice indicated by the network configuration information, and the node device 5 can adjust the forwarding time of the periodic message, for example, the periodic message can be cached and forwarded at an appropriate time. For example, if there is an unused or reserved time slice within the current cycle time Tp, the node device 5 can forward the periodic message within the reserved time slice of the cycle time Tp. In other embodiments, the node device 5 can also forward the periodic message in the time slice allocated to the node device 4 in the cycle time Tp of the next macro cycle.

[0050] In this way, the time node for periodic message forwarding can be flexibly selected according to actual conditions, thereby reducing the risk of data conflict and message loss, and ensuring the reliability, security and flexibility of the communication network.

[0051] Figure 6 FIG. 2 shows a schematic diagram of adjusting the non-periodic message forwarding time according to some embodiments of the present invention. Figure 6 As shown, in the example environment 600, in box 602, the user can configure the communication network according to the actual application and obtain the network configuration information of the communication network. Among them, the network configuration information may include the preset time period corresponding to each node device (the preset time period is a time slice within the non-periodic time Tn). Each node device can send a non-periodic message in the preset time period. It can be understood that the non-periodic time Tn can be a time period shared by all node devices in the communication network, and the sending time slices of all messages within the non-periodic time Tn do not overlap, but the sending time point is not fixed. Each node device can determine the preset time period corresponding to the message sent in the non-periodic time Tn of the current macro cycle T in each cycle time Tp according to the non-periodic declaration information carried in the periodic message sent by the cycle time Tp (for example, it can include the non-periodic priority declaration field and the non-periodic total time occupied field).

[0052] The priority information in the non-periodic priority declaration field may be the priority of the node device, and the priority may be a specific priority value such as a priority of 0-100 or a priority of 0-20, or a priority level such as "high priority", "low priority" and "medium priority". In some examples, the priority of node device 1 may be 2, the priority of node device 2 may be 15, and the priority of node device 3 may be 15. The non-periodic occupied total time field may be the total time information occupied by the non-periodic message that the node device needs to send during the non-periodic time Tn.

[0053] like Figure 6 As shown, in box 604, after the configuration of the communication network is completed, each node device can send non-periodic messages normally. In box 606, the adjacent node device can receive the non-periodic message sent by the target node device connected to it. In box 608, the adjacent node device can determine the non-periodic declaration information carried in the non-periodic message corresponding to the target node device based on the identification information and network configuration information corresponding to the target node device, and based on the non-periodic declaration information, the preset time period corresponding to the target node device (i.e., the non-periodic declaration time period configured for the target node device) can be determined.

[0054] like Figure 6As shown, in box 610, the adjacent node device can determine whether the time when the target node device sends the non-periodic message is within the preset time period based on the non-periodic declaration information. For example, the time when the target node device sends the non-periodic message is 3:30 pm, and the time slice within the non-periodic time Tn corresponding to the target node device is 2:00-3:00 pm. Then the adjacent node device can determine that the target node device does not send the message within the specified time slice. On this basis, in box 614, the adjacent node device can cache the non-periodic message, for example, the non-periodic message can be stored in its buffer area. In box 616, the adjacent node device has missed the opportunity to forward the message, so it is necessary to reapply for non-periodic scheduling to determine the sending time of the non-periodic message. In box 618, the adjacent node device can forward the non-periodic message within the predetermined time period of the non-periodic time Tn of the next macrocycle or forward the non-periodic message in other set time periods. It should be noted that, in block 612, if the node device sends the non-periodic message within a specified time period, the adjacent node device forwards the message normally without the need for caching or other allocation actions.

[0055] In this way, it is possible to ensure that non-periodic messages are sent and forwarded at the appropriate time. That is, even if the target node device does not send the message within the specified time period, the adjacent node devices can ensure the final forwarding of the message through caching and rescheduling, thereby improving the flexibility and reliability of the communication network and enabling the communication network to better adapt to the dynamically changing environment and needs.

[0056] Figure 7 FIG. 2 shows a schematic diagram of adjusting aperiodic messages according to some embodiments of the present invention. Figure 7 As shown, in the example environment 700, the current macrocycle T can be divided into a periodic time Tp and a non-periodic time Tn. Within the current periodic time Tp, each node device such as node device 1, node device 2, etc. can each occupy a time slice for sending a periodic message, and the periodic message can carry non-periodic declaration information such as a non-periodic priority declaration field and a non-periodic occupied total length field. Based on the non-periodic declaration information, the time slice of the non-periodic time Tn occupied by the non-periodic message corresponding to each node device can be determined. For example, the priority of node device 5 is 1, and the non-periodic message can be sent preferentially. When the priority of the node devices is the same (for example, the priority of node device 3 and node device 2 is the same as 15), the time slice corresponding to the node device can be determined according to the non-periodic occupied total length field of the non-periodic message corresponding to the node device.

[0057] like Figure 7As shown, the time slices corresponding to the non-periodic message of node device 3 and the non-periodic message of node device 1 collide, which will cause a collision of periodic messages and cause the periodic message to be lost in the communication network. When the node device 2 adjacent to the node device 3 detects that the node device 3 does not send the non-periodic message in the predetermined time slice, the non-periodic message can be cached. It can be understood that in order for the non-periodic message to be forwarded at an appropriate time, the adjacent node device 2 can re-apply for scheduling in the next macrocycle and determine the time slice of the next macrocycle for sending the non-periodic message. In this way, the adjacent node device 2 can send the non-periodic message within the time slice within the non-periodic time Tn of the next macrocycle.

[0058] It should be noted that if abnormalities occur in multiple consecutive node devices in the communication network (for example, multiple consecutive node devices fail to send messages within a preset time period), the node devices adjacent to the last abnormal node can also adjust the message forwarding time based on the above method, so that the abnormal message can be limited to the abnormal network area, thereby ensuring the normal operation of the communication network.

[0059] Figure 8 A block diagram of an apparatus 800 for adjusting a message sending time according to some embodiments of the present invention is shown. The apparatus is applied to a communication system, wherein a communication network related to the communication system includes a target node device and an adjacent node device adjacent to the target node device, and the apparatus is arranged in the adjacent node device. Figure 8 As shown, the device 800 includes a message receiving unit 802, which is configured to receive a message sent by a target node device in a target macrocycle. The device 800 also includes a determining unit 804, which is configured to determine whether the receiving time is within the preset time period indicated in the network configuration information based on the network configuration information of the communication network and the receiving time of the message. The device 800 also includes an adjusting unit 806, which is configured to adjust the time of sending the message based on at least the type of the message and / or the circumstance relationship between the receiving time and the preset time period in response to determining that the receiving time is not within the preset time period indicated in the network configuration information.

[0060] It can be understood that by using the device 800 of the present invention, at least one of the advantages that can be achieved by the method or process described above can be achieved.

[0061] In some embodiments of the present invention, the adjustment unit 806 is further configured to: determine the type of message sent by the target node device, including periodic message and non-periodic message; and adjust the time of sending the message based on the type of the message.

[0062] In some embodiments of the present invention, the adjustment unit 806 is further configured to: when it is determined that the message sent by the target node device is a periodic message, compare the receiving time of the received message with a preset time period; in response to the receiving time being earlier than the start time of the preset time period, cache the message; and send the cached message within the preset time period.

[0063] In some embodiments of the present invention, the adjustment unit 806 is further configured to: cache the message in response to the reception time being later than the end time of the preset time period; and send the cached message within the reserved time period of the target macrocycle or within the preset time period of the next macrocycle of the target macrocycle, the reserved time period of the target macrocycle being within the cycle time of the target macrocycle.

[0064] In some embodiments of the present invention, the adjustment unit 806 is further configured to: cache the non-periodic message when it is determined that the message sent by the target node is a non-periodic message; and adjust the time for sending the cached non-periodic message by reapplying for scheduling of the non-periodic message.

[0065] In some embodiments of the present invention, the adjustment unit 806 is further configured to: reapply for scheduling of non-periodic messages so as to determine a preset time period corresponding to the target node device in the next macrocycle of the target macrocycle; and send the cached non-periodic messages within the preset time period corresponding to the target node device in the next macrocycle.

[0066] In some embodiments of the present invention, the message carries identification information of the target node device, and the determination unit 804 is also configured to: based on the identification information, obtain a preset time period configured for the target node device from the network configuration information; and based on a comparison result between the receiving time and the preset time period, determine whether the receiving time is within the preset time period.

[0067] In some embodiments of the present invention, the device 800 also includes a preset time period determination unit, which is configured to: determine the preset time period corresponding to the target node device sending the message based on the priority and total occupied length of the non-periodic message corresponding to the target node device in the network configuration information.

[0068] In some embodiments of the present invention, the preset time period determination unit is further configured to: determine the priority and total non-periodic occupancy time of non-periodic messages corresponding to multiple node devices in the communication network; and determine the preset time period corresponding to the target node device sending the message based on the priority and total non-periodic occupancy time of multiple non-periodic messages corresponding to the multiple node devices and the priority and total non-periodic occupancy time of the non-periodic messages corresponding to the target node device.

[0069] In some embodiments of the present invention, the communication mode between two adjacent node devices in the communication network is full-duplex communication, and the communication system is an industrial Ethernet system.

[0070] Fig. 9 A schematic block diagram of an example device 900 that can be used to implement an embodiment of the present invention is shown. As shown, the device 900 includes a computing unit (i.e., CPU 901), which can perform various appropriate actions and processes according to computer program instructions stored in a read-only memory (i.e., ROM 902) or loaded from a storage unit 908 to a random access memory (i.e., RAM 903). In RAM 903, various programs and data required for the operation of the device 900 can also be stored. CPU 901, ROM 902, and RAM 903 are connected to each other via a bus 904. An input / output interface (i.e., I / O interface 905) is also connected to the bus 904.

[0071] A number of components in the device 900 are connected to the I / O interface 905, including: an input unit 906, such as a keyboard, a mouse, etc.; an output unit 907, such as various types of displays, speakers, etc.; a storage unit 908, such as a disk, an optical disk, etc.; and a communication unit 909, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 909 allows the device 900 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0072] CPU 901 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of CPU 901 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 901 performs the various methods and processes described above, such as method 200. For example, in some embodiments, method 200 may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 908. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 900 via ROM 902 and / or communication unit 909. When the computer program is loaded into RAM 903 and executed by CPU 901, one or more steps of method 200 described above may be performed. Alternatively, in other embodiments, CPU 901 may be configured to execute method 200 in any other appropriate manner (e.g., by means of firmware).

[0073] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chip systems (SOCs), load programmable logic devices (CPLDs), and the like.

[0074] The program code for implementing the method of the present invention can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general-purpose computer, a special-purpose computer or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code can be executed entirely on the machine, partially on the machine, partially on the machine as a stand-alone software package and partially on a remote machine, or entirely on a remote machine or server.

[0075] In the context of the present invention, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In addition, although each operation is depicted in a specific order, this should be understood as requiring such operations to be performed in the specific order shown or in a sequential order, or requiring that all illustrated operations should be performed to obtain the desired result. In certain environments, multitasking and parallel processing may be advantageous. Similarly, although several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of the present invention. Certain features described in the context of a separate embodiment may also be implemented in a single implementation in combination. On the contrary, the various features described in the context of a single implementation may also be implemented in multiple implementations individually or in any suitable sub-combination.

[0076] Although the subject matter has been described in language specific to structural features and / or methodological logical actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims.

Claims

1. A method for adjusting a message sending time, characterized in that: The method is applied in a communication system, wherein a communication network related to the communication system includes a target node device and an adjacent node device adjacent to the target node device, and the method is performed by the adjacent node device, including: Receiving a message sent by the target node device in a target macrocycle; Based on network configuration information of the communication network and the reception time of the message, determining whether the reception time is within a preset time period indicated in the network configuration information, wherein the network configuration information is a time period for sending messages set for each node device in the communication network, identification information corresponding to each node device, and a reserved time period of the target macrocycle; and In response to determining that the receiving moment is not within the preset time period indicated in the network configuration information, adjusting the time for sending the message based at least on the type of the message and / or the causal relationship between the receiving moment and the preset time period, including: in response to the message being a periodic message and the receiving moment being later than the end moment of the preset time period, caching the message; and sending the cached message within the reserved time period of the target macrocycle or within the preset time period of the next macrocycle of the target macrocycle, the reserved time period of the target macrocycle being within the cycle time of the target macrocycle.

2. The method according to claim 1, characterized in that Adjusting the time of sending the message based at least on the type of the message includes: Determining the type of the message sent by the target node device, the type including a periodic message and a non-periodic message; and Based on the type of the message, the time of sending the message is adjusted.

3. The method according to claim 2, characterized in that Adjusting the time for sending the message based at least on the type of the message and / or the circumstance between the receiving time and the preset time period includes: When it is determined that the message sent by the target node device is the periodic message, comparing the receiving time of the message with the preset time period; In response to the receiving time being earlier than the start time of the preset time period, buffering the message; and The cached message is sent within the preset time period.

4. The method according to claim 2, characterized in that Adjusting the time for sending the message based at least on the type of the message and / or the circumstance between the receiving time and the preset time period includes: When it is determined that the message sent by the target node is the non-periodic message, buffering the non-periodic message; and The time for sending the buffered aperiodic message is adjusted by re-applying for scheduling of the aperiodic message.

5. The method according to claim 4, characterized in that Adjusting the time of sending the buffered aperiodic message by re-applying for scheduling of the aperiodic message includes: Re-applying for scheduling of the aperiodic message to determine a preset time period corresponding to the target node device in a next macrocycle of the target macrocycle; and The buffered non-periodic message is sent within a preset time period corresponding to the target node device in the next macrocycle.

6. The method according to claim 1, characterized in that The message carries identification information of the target node device, and determining whether the receiving time is within a preset time period indicated in the network configuration information includes: Based on the identification information, acquiring the preset time period configured for the target node device from the network configuration information; and Based on the comparison result between the receiving time and the preset time period, it is determined whether the receiving time is within the preset time period.

7. The method according to claim 1, characterized in that Also includes: Based on the priority and total occupied length of the non-periodic message corresponding to the target node device in the network configuration information, a preset time period corresponding to the message sent by the target node device is determined.

8. The method according to claim 7, characterized in that Determining a preset time period corresponding to when the target node device sends the message includes: Determining the priorities and total occupancy duration of aperiodic messages corresponding to a plurality of node devices in the communication network; and Based on the priorities and total non-periodic occupancy durations of the multiple non-periodic messages corresponding to the multiple node devices and the priorities and total non-periodic occupancy durations of the non-periodic messages corresponding to the target node device, a preset time period corresponding to when the target node device sends the message is determined.

9. The method according to claim 1, characterized in that: The communication mode between two adjacent node devices in the communication network is full-duplex communication, and the communication system is an industrial Ethernet system.

10. A computing device, characterized in that: include: at least one processor; as well as A memory coupled to the at least one processor and having instructions stored thereon, the instructions, when executed by the at least one processor, causing the apparatus to perform the method according to any one of claims 1-9.

11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a machine, the method according to any one of claims 1 to 9 is performed.

12. A computer program product, characterized in that The method comprises machine executable instructions which, when executed, cause a machine to perform the method according to any one of claims 1 to 9.

Citation Information

Patent Citations

  • Method and device for updating mapping relation

    CN112825510A

  • Message forwarding method, device, equipment, medium and product

    CN118337725A