A method for determining a message period and related device
By determining the periodic offset value in the deterministic network, ensuring that the packet is sent within the period of reserved resources, the data transmission chaos and resource disorder caused by multi-line connections between adjacent nodes are solved, and efficient resource utilization and stable data transmission are achieved.
Patent Information
- Application Number
- CN202111087385.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-16
- Publication Date
- 2025-07-04
- Estimated Expiration
- 2041-09-16
AI Technical Summary
In deterministic networks, multi-line connections between adjacent nodes lead to data transmission confusion and resource confusion, especially when connecting lines are switched, which may cause periodic data overflow and resource occupation problems.
By determining the period offset value at the first node based on the first period mapping relationship and the second period mapping relationship, it is ensured that the target message is sent within the period of reserved resources, avoid occupying the resources of other messages, and reduce resource confusion and data confusion.
It effectively avoids resource confusion and data confusion, ensures that packets are sent within the period of reserved resources, reduces the possibility of data confusion, and improves network resource utilization efficiency.
Smart Images

Figure CN115834508B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of communications, and in particular, to a method for determining a message period and related devices thereof. Background Art
[0002] Deterministic networks are a current industry hotspot. The requirements for deterministic networks come from scenarios such as industrial Internet, smart factories, and cloudification, and also from remote real-time services such as augmented reality (AR) or virtual reality (VR) real-time interaction, remote surgery, and tactile Internet. A deterministic network refers to a network that can ensure service quality guarantee indicators such as deterministic bandwidth, delay, jitter, and packet loss rate of services, and the deterministic network can perform deterministic periodic forwarding of messages through a periodic mapping relationship to ensure the determinacy of end-to-end delay.
[0003] Network devices in current deterministic networks divide time into equal-length periods, arrange and send messages according to the periods, and ensure the determinacy of end-to-end delay of messages. However, relying on current technical support, when there are multiple lines connecting adjacent nodes, it will affect data transmission and there is a greater possibility of data chaos. Summary of the Invention
[0004] The embodiments of the present application provide a method for determining a message period and related devices thereof, which are applied to an Internet Protocol (IP) network and can reduce resource disorder and the possibility of data chaos.
[0005] In a first aspect of the embodiments of the present application, a method for determining a message period is provided, including:
[0006] A first node determines a period offset value according to a first period mapping relationship and a second period mapping relationship. The first period mapping relationship is a period mapping relationship generated by a message sent by a second node received by the first node at a first moment, and the second period mapping relationship is a period mapping relationship generated by a message sent by the second node received by the first node at a second moment. The second node is an upstream node of the first node, and the second moment is before the first moment, that is, the first period mapping relationship is generated after the second period mapping relationship. The period mapping relationship is a correspondence between a first period and a second period, where the first period is the period carried by the message sent by the second node, and the second period is the period in which the moment when the first node is predicted to send a message carrying the first period is located.
[0007] Then, the first node determines the sending period of the target message according to the first period mapping relationship and the period offset value, and the sending period is the period in which the first node plans to send the target message.
[0008] In the embodiment of the present application, the first node determines a period offset value according to the first period mapping relationship and the second period mapping relationship, and determines the transmission period of the target message according to the first period mapping relationship and the period offset value, ensuring that the first node sends the target message within the period when corresponding resources are reserved for the target message, avoiding occupying the resources of other messages, reducing resource chaos, and reducing the possibility of data chaos.
[0009] In a possible implementation manner of the first aspect, the first node determines a period offset value according to the first period mapping relationship and the second period mapping relationship between the first node and the second node. The second node is the upstream node of the first node, where the first node periodically learns and generates the period mapping relationship between the first node and the second node according to a preset timing mechanism. For example, the first node learns the period mapping relationship every half hour, one hour, or two hours, and the specific setting is determined according to the actual situation and is not limited here. The period mapping relationship refers to the corresponding relationship between the first period and the second period, where the first period is the period in which the second node sends the message, and the second node marks this period in the message. Therefore, the first period can also be understood as the period carried by the message sent by the second node. Then, the first period after the period in which the first node receives the message carrying the first period is the predicted period for the first node to send the message carrying the first period. So, the period in which the predicted time for the first node to send the message carrying the first period is located is the second period. The first period mapping relationship is the period mapping relationship generated by the first node based on the message sent by the second node received at the first moment, and the second period mapping relationship is the period mapping relationship generated by the first node based on the message sent by the second node received at the second moment, where the second moment is earlier than the first moment, that is, the first period mapping relationship is generated after the second period mapping relationship. Since the second period corresponding to the second period mapping relationship is the period in which resources are reserved for the message, the period offset value is the number of periods that the second period corresponding to the first node under the first period mapping relationship needs to be offset from the period in which the corresponding resources are reserved.
[0010] After obtaining the determined period offset value, the first node further offsets the target message by the period offset value on the basis of the first period mapping relationship, and the offset period is determined as the transmission period of the target message, that is, the period in which the first node plans to send the target message.
[0011] In the embodiment of the present application, the first node periodically learns the period mapping relationship according to a timing mechanism, generates the first period mapping relationship after the second period mapping relationship. The first node determines the period offset value according to the first period mapping relationship and the second period mapping relationship, and then determines the transmission period of the target message according to the first period mapping relationship and the period offset value, ensuring that after the period mapping relationship changes, the first node still sends the target message within the period with corresponding resources reserved, avoiding occupying the resources of other messages, reducing resource disorder, and reducing the possibility of data chaos.
[0012] In a possible implementation manner of the first aspect, when the transmission period and / or the adjacent period is in an active state such as a transmission state or a reception state, the first node discards the target message, where the adjacent period is n periods continuously adjacent to the transmission period, and n is a preset value and n is a positive integer.
[0013] In the embodiment of the present application, when the transmission period and / or the adjacent period of the target message is in an active state, the first node discards the target message, avoiding receiving the data volume of two periods in the same period, reducing the problem of period data overflow, and also reducing the possibility of data chaos.
[0014] In a possible implementation manner of the first aspect, when updating the period mapping relationship between the first node and the second node from the second period mapping relationship to the first period mapping relationship, the periods in which the first node may be in a transmission state or a reception state, and the n continuously adjacent periods are all defined as active state periods, where n is a preset value and n is greater than or equal to 1. Therefore, when the transmission period and / or the adjacent period of the target message is in an active state, the first node discards the target message, where the active state is a transmission state or a reception state, and the adjacent period is n periods continuously adjacent to the transmission period.
[0015] In the embodiment of the present application, the periods of the active state are specifically described, and when the transmission period and / or the adjacent period of the target message is in an active state, the first node discards the target message, avoiding receiving the data volume of two periods in the same period, reducing the problem of period data overflow, and also reducing the possibility of data chaos.
[0016] In a possible implementation manner of the first aspect, when the transmission period and / or the adjacent period of the target message is not in an active state such as a transmission state or a reception state, the first node performs an operation of sending the target message into the queue corresponding to the transmission period, and then sends it in the queue of this transmission period.
[0017] In the embodiments of the present application, when the transmission period and / or the adjacent period of the target message are not in the active state, the first node performs the operation of sending the target message into the queue corresponding to the transmission period, so as to ensure that the target message is sent within the transmission period within the period with the corresponding resources reserved, avoiding resource disorder. At the same time, the fact that the transmission period is not in the active state indicates that there is no other data within this transmission period. Therefore, it can be ensured that only the target message is received within the transmission period, avoiding the problem of cycle data overflow and further reducing the possibility of data chaos.
[0018] In a possible implementation manner of the first aspect, the second period determined by the first node based on the first period mapping relationship is the third period, and the second period determined by the first node based on the second period mapping relationship is the fourth period. Then, the first node uses the difference between the third period and the fourth period as the period offset value.
[0019] In the embodiments of the present application, where the fourth period is the period that reserves the resources corresponding to the message carrying the first period, and the first node uses the difference between the third period and the fourth period as the period offset value, directly determining the period offset value between the third period of the message carrying the first period received by the first node and the period that reserves the corresponding resources.
[0020] In a possible implementation manner of the first aspect, the period offset value is the number of periods that the second period corresponding to the first node under the first period mapping relationship needs to be offset from the period that reserves the corresponding resources. Taking the second period determined after prediction by the first node under the first period mapping relationship as the third period, the difference between the first period and the third period is the first offset value. Taking the second period determined after prediction by the first node under the second period mapping relationship as the fourth period, the difference between the first period and the fourth period is the second offset value. Therefore, the first node uses the difference between the first offset value and the second offset value as the period offset value.
[0021] In the embodiments of the present application, the first node obtains the first offset value and the second offset value through the first period mapping relationship and the second period mapping relationship, and the first node represents the first period mapping relationship and the second period mapping relationship based on the first offset value and the second offset value respectively. Then, the first node uses the difference between the first offset value and the second offset value as the period offset value, more quickly and efficiently determining the period offset value and improving the work efficiency.
[0022] In a possible implementation of the first aspect, the first node determines a period offset value according to the first period mapping relationship, the second period mapping relationship, and the macro period, where the macro period is composed of H (H is greater than or equal to 1) consecutive periods, and the macro period corresponding to each message represents the minimum repetition duration for reserving resources for the message. The first node reserves corresponding resources for the message in a repeated arrangement according to the macro period, and within the macro period, one period or multiple periods may reserve resources for the message.
[0023] In the embodiments of the present application, the first node determines the period offset value according to the first period mapping relationship, the second period mapping relationship, and the macro period, which can ensure that the period offset value is greater than or equal to 0, avoiding the possibility that the transmission period of the target message is in a state of having been sent or being active when the period offset value is negative, improving the flexibility of the solution, and also ensuring that the target message is sent within the reserved resource period, thereby avoiding resource chaos.
[0024] In a possible implementation of the first aspect, the first node determines the period offset value in the following manner:
[0025] Z = (Δ - Δ′) mod H;
[0026] Where Z is the period offset value, Δ is the second offset value, Δ′ is the first offset value, and H is the value of the macro period. mod represents taking the remainder, that is, Z is the remainder obtained by performing a division operation on the difference between the first offset value and the second offset value and the value of the macro period.
[0027] The first offset value is the difference between the first period and the third period, and the third period is the second period determined by the first node based on the first period mapping relationship. The second offset value is the difference between the first period and the fourth period, and the fourth period is the second period determined by the first node based on the second period mapping relationship.
[0028] In the embodiments of the present application, the first node uses the value obtained by taking the remainder of the difference between the first offset value and the second offset value and the value of the macro period as the period offset value, which can ensure that the target message is sent within the next reserved resource period after the third period, avoiding the situation where when the difference between the first offset value and the second offset value is negative, the target message is sent into the previous possible reserved resource period that may have been sent or is being sent in the third period, reducing the problems of message loss or period data overflow, and thus reducing the possibility of resource disorder.
[0029] In a possible manner of the first aspect, the first node determines the period offset value in the following manner:
[0030] Z = (Δ - Δ′) mod H + H;
[0031] Where Z is the period offset value, Δ is the second offset value, Δ′ is the first offset value, and H is the value of the macro period. In addition, the period offset value can also be determined according to Z = (Δ - Δ′) mod H + k * H, where k is a preset coefficient, and natural numbers such as 1, 2, 3, 4, etc. can be set according to the actual situation.
[0032] In the embodiment of the present application, the first node uses the value obtained according to the formula Z = (Δ - Δ′) mod H + H as the period offset value. The transmission period of the target packet obtained based on this period offset value can more likely avoid discarding the target packet, reduce data loss, and save network resources.
[0033] In a possible implementation manner of the first aspect, when the macro period corresponding to the target packet is at least 2, the first node determines the transmission period of the target packet according to the first period mapping relationship and the period offset value.
[0034] In the embodiment of the present application, when the macro period corresponding to the target packet is at least 2, the first node determines the transmission period of the target packet according to the first period mapping relationship and the period offset value, reducing the possibility of data chaos while saving the occupancy of network resources.
[0035] In a possible implementation manner of the first aspect, the first node determines that the macro period corresponding to the target packet is at least 2 through a preset identifier carried by the target packet.
[0036] In the embodiment of the present application, the first node determines that the macro period corresponding to the target packet is at least 2 through a preset identifier carried by the target packet, thereby determining the transmission period of the packet with a macro period of at least 2, which improves the working efficiency of the first node.
[0037] In a possible implementation manner of the first aspect, the first node also receives a target packet carrying a target period sent by the second node, and the target period is the period in which the second node sends the target packet.
[0038] Then the first node determines the transmission period of the target packet according to the first period mapping relationship, the target period carried by the target packet, and the period offset value.
[0039] In the embodiment of the present application, after receiving the target packet, the first node determines the transmission period of the target packet according to the first period mapping relationship, the target period carried by the target packet, and the period offset value, improving the reliability of the solution.
[0040] In a possible manner of the first aspect, the first node uses the sum of the first offset value, the target period, and the period offset value as the transmission period of the target packet.
[0041] In the embodiments of the present application, a specific implementation manner for a first node to determine the transmission period of a target message is given, which has selectivity.
[0042] In a possible manner of the first aspect, there are multiple connection lines between the first node and the second node. Among them, the first period mapping relationship corresponds to the first connection line between the first node and the second node, and the second period mapping relationship corresponds to the second connection line between the first node and the second node. The first connection line is different from the second connection line.
[0043] In the embodiments of the present application, the first period mapping relationship corresponds to the first connection line, and the second period mapping relationship corresponds to the second connection line, indicating that a change in the connection line between the first node and the second node will cause a change in the period mapping relationship, clarifying the application scenario of a solution and having selectivity in the application scenario.
[0044] In a possible manner of the first aspect, the value of the macro period is pre-configured in the first node, or the value of the macro period is carried by a message sent by the second node, and the message also includes the target message.
[0045] In the embodiments of the present application, the macro period can be pre-configured in the first node, reducing the occupation of network resources and saving network resources; or it is carried by a message sent by the second node, and the message includes the target message, so that the corresponding macro period can be directly obtained from the message, improving work efficiency.
[0046] In the second aspect of the embodiments of the present application, a communication device is provided. The communication device has the function of implementing the method in the above first aspect or any possible implementation manner of the first aspect. This function can be implemented by hardware or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above functions.
[0047] The communication device in the second aspect of the embodiments of the present application executes the method described in the first aspect of the embodiments of the present application or any possible implementation manner of the first aspect.
[0048] In the third aspect of the embodiments of the present application, another communication device is provided, which may include a processor. The processor is coupled to a memory, where the memory is used to store instructions, and the processor is used to execute the instructions in the memory so that the communication device executes the method in the first aspect of the embodiments of the present application or any possible implementation manner of the first aspect.
[0049] In the fourth aspect of the embodiments of the present application, another communication device is provided, including a processor for executing a computer program (or computer-executable instructions) stored in a memory. When the computer program (or computer-executable instructions) are executed, the communication device executes the method in the first aspect and each possible implementation in the first aspect.
[0050] In one possible implementation, the processor and the memory are integrated together;
[0051] In another possible implementation, the above-mentioned memory is located outside the communication device.
[0052] The communication device further includes a communication interface, which is used for the communication device to communicate with other devices, such as sending or receiving data and / or signals. Exemplarily, the communication interface can be a transceiver, a circuit, a bus, a module or other types of communication interfaces.
[0053] A fifth aspect of the embodiments of the present application provides a computer-readable storage medium, including computer-readable instructions, which, when running on a computer, cause the method described in the first aspect of the embodiments of the application or any possible implementation manner of the first aspect to be executed.
[0054] A sixth aspect of the embodiments of the present application provides a computer program product, including computer-readable instructions, which, when running on a computer, cause the method described in the first aspect of the embodiments of the application or any possible implementation manner of the first aspect to be executed.
[0055] A seventh aspect of the embodiments of the present application provides a chip, which includes at least one processor and at least one interface circuit. The interface circuit is coupled to the processor. The at least one interface circuit is used to perform a transceiver function and send instructions to the at least one processor. The at least one processor is used to run a computer program or instructions, and has the function of implementing the method described in the first aspect or any possible implementation manner of the first aspect above. This function can be implemented by hardware, or by software, or by a combination of hardware and software. The hardware or software includes one or more modules corresponding to the above functions.
[0056] In an eighth aspect, the embodiments of the present application further provide a communication system, including the communication devices provided by the second aspect, the third aspect, the fourth aspect and various possible implementations of the foregoing aspects. Description of the Drawings
[0057] Figure 1 It is a schematic diagram of the periodic mapping relationship between adjacent nodes in a deterministic network;
[0058] Figure 2 It is a schematic diagram of learning the periodic mapping relationship;
[0059] Figure 3 It is a schematic diagram of connection line switching;
[0060] Figure 4 It is a schematic diagram of the periodic mapping relationship corresponding to the connection line switching;
[0061] Figure 5 Another schematic diagram of the inverted correspondence cycle mapping relationship of the connection line;
[0062] Figure 6 A schematic diagram of the application scenario of the embodiment of the present application;
[0063] Figure 7 A schematic diagram of the method for determining the message period in the embodiment of the present application;
[0064] Figure 8 A schematic diagram of determining the cycle offset value in the embodiment of the present application;
[0065] Figure 9 A schematic diagram of the cycle mapping table entry in the embodiment of the present application;
[0066] Figure 10 Another schematic diagram of the cycle mapping table entry in the embodiment of the present application;
[0067] Figure 11 Another schematic diagram of determining the cycle offset value in the embodiment of the present application;
[0068] Figure 12 A schematic diagram of the macro cycle configuration in the embodiment of the present application;
[0069] Figure 13 A schematic diagram of the message carrying the macro cycle in the embodiment of the present application;
[0070] Figure 14 A schematic diagram of the message carrying the preset identifier in the embodiment of the present application;
[0071] Figure 15 A schematic diagram of the structure of the communication device in the embodiment of the present application;
[0072] Figure 16 Another schematic diagram of the structure of the communication device in the embodiment of the present application. Detailed implementation manners
[0073] The embodiment of the present application provides a method for determining a message period and its related device, which is applied to the IP network and can reduce resource disorder and the possibility of data chaos.
[0074] In the description, claims and the above-mentioned drawings of this application, terms such as "first" and "second" are used to distinguish similar objects, and do not necessarily describe a specific order or sequence. It should be understood that such terms can be interchanged under appropriate circumstances, which is only a way of distinguishing objects with the same attributes when describing embodiments of this application. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion, so that a process, method, system, product or device including a series of units does not have to be limited to those units, but may include other units not clearly listed or inherent to these processes, methods, products or devices.
[0075] Before introducing the embodiments of this application, a brief introduction to the periodic mapping relationship between adjacent nodes in a common deterministic network currently will be given to facilitate the subsequent understanding of the embodiments of this application.
[0076] Currently, the key technologies of deterministic networks lie in achieving deterministic delay, jitter, packet loss rate, bandwidth, and reliability, etc. The deterministic network introduces the idea of periodic forwarding on the basis of traditional networks, and controls the forwarding timing of each packet at each hop by means of deterministic periodic forwarding according to the periodic mapping relationship to reduce microbursts and eliminate the long-tail effect, and finally achieve the determinacy of end-to-end delay.
[0077] Please refer to Figure 1 , Figure 1 , which is a schematic diagram of the periodic mapping relationship between adjacent nodes in a deterministic network. Assume that a packet sent by the sending end node A is forwarded by node B and finally received by node C, that is, the transmission path of the packet is A→B→C. The output interfaces of nodes A and B involved in this path are divided into periods of length T according to the time axis to send the packets periodically, that is, the packets are sent into the queues corresponding to the periods for sending. Each period has a corresponding preset number (the number can be in the form of T1, T2, T3 or 1, 2, 3, etc. In actual situations, it can be set according to specific circumstances, and it is not specifically limited here). When the packet is sent, nodes A and B will mark the period number of the period in which the sending time of the packet is located, that is, the period number, in the packet. The length T can be 10 microseconds, or 20 microseconds, or 1 millisecond. In actual situations, it can also be a reasonable value set according to specific circumstances, and it is not specifically limited here. As Figure 1 shown, T1-T7 are the respective 7-period division situations indicated by nodes A and B. Since node A is the upstream node of node B, node B will determine a periodic mapping relationship Y = X + Δ based on the packet received from node A, where X represents the period carried by the packet sent by node A, Y represents the period in which the packet carrying period X is planned to be sent by node B, and Δ represents the offset value, that is, the number of offset periods required for the packet to be offset from period X to period Y. Figure 1The Δ between intermediate node B and node A is 3. That is, the periodic mapping relationship Y = X + 3 means that for the message sent by node A in the X period received by node B, node B will perform periodic forwarding of this message in the X + 3 period (periodic forwarding means that each period divided by the output interface of each node corresponds to a queue, the queue index is the period carried in the message, the queue is only opened within the period range and closed at other times, and the message to be sent within this period is enqueued and sent according to the mapped period). For example, for the message sent by node A in the queue of the T1 period received by node B, this message will carry the T1 period. Therefore, after receiving this message, node B will offset this message by three periods from the T1 period and send it to node C in the queue of the T4 period. Messages in subsequent periods also follow this periodic mapping relationship. For example, when node A sends a message in the queue of the T2 period, according to the periodic mapping relationship, node B will send it in the queue of the T5 period. When node A sends a message in the queue of the T3 period, according to the periodic mapping relationship, node B will send it in the queue of the T6 period, etc.
[0078] The periodic mapping relationship between node B and node A is learned and determined by node B receiving the message sent by node A. Now, please refer to Figure 2 , Figure 2 Figure 1 is a schematic diagram for learning the periodic mapping relationship. Node A sends a message at the end of the X period. After the message is transmitted through the connection line between node A and node B, node B will receive this message at a certain moment in the Y period, that is, on the basis of the transmission delay p of the connection line. To ensure the complete transmission of the message, node B will send this message in the next complete period after the message reception moment. As Figure 2 shown, in the periodic mapping relationship between node A and node B, Δ = Y + 1 - X, that is, the message of node A in the X period is sent in the Y + 1 period at node B under the periodic mapping relationship.
[0079] The downstream node in adjacent nodes (such as Figure 2 node B shown) will periodically learn the periodic mapping relationship with the upstream node (such as Figure 2 node A shown) according to the preset timing mechanism. If the newly generated periodic mapping relationship is different from the previous one, the new periodic mapping relationship will be adopted. The timing mechanism set in the downstream node can be set to re-learn the periodic mapping relationship with the upstream node every 10 minutes, half an hour, or one hour. In actual situations, the specific timing mechanism shall be determined according to the actual situation and is not specifically limited here.
[0080] Moreover, in the current actual network, adjacent nodes may be connected through any connection method such as dual-transmit selective reception, multi-line connection, optical transport network (OTN) or other underlying transmission networks. Therefore, when the connection line currently performing transmission fails, it will switch to another connection line to continue transmission to ensure normal communication between adjacent nodes. Figure 3 , Figure 3 The figure is a schematic diagram of connection line switching. Node R1 and node R2 are connected via OTN. When the original connection line A fails, it will switch to the new connection line B to continue transmission.
[0081] The transmission delay p of different connection lines may be different, so the switching of connection lines will also cause the change of period mapping relationship. Figure 4 , Figure 4 FIG. 1 is a schematic diagram of the periodic mapping relationship corresponding to the switching of the connection line. Node R1 is the upstream node of node R2. Before the switching of the connection line, node R2, as the downstream node, learns that the initial periodic mapping relationship between node R1 and node R2 is Y=X+3. However, after the switching of the connection line, the new periodic mapping relationship between node R1 and node R2 is Y=X+4. That is, in the example Figure 3 In the case where the R1 node and the R2 node are connected by the original connection line A, the message sent by the R1 node in the T1 cycle will be sent by the R2 node in the T4 cycle. After switching to the new connection line B, the message sent by the R1 node in the T1 cycle will be sent by the R2 node in the T5 cycle, and the corresponding situations in subsequent cycles are similar.
[0082] However, the resources corresponding to each message are divided and reserved according to a predetermined period, such as Figure 4 As shown, the R1 node sends a message in the T1 period, and the R2 node reserves resources for the message in the T1 period in the T4 period. After the connection line is switched, the message in the T1 period is sent in the T5 period at the R2 node according to the new period mapping relationship, and the resources reserved in the T5 period are for other messages, so the resources of other messages will be occupied, resulting in resource confusion.
[0083] In addition, switching the connection line may also cause periodic data overflow problems. Figure 5 , Figure 5Another schematic diagram of the switching corresponding cycle mapping relationship of the connection line. Assume that the cycle mapping relationship between the R1 node and the R2 node before switching is Y = X, that is, Δ = 0. The packets sent by the R1 node in cycle 1 and cycle 2 under the original connection line enter the queues of cycle 1 and cycle 2 of the R2 node for sending respectively. However, after the connection line is switched, a new cycle mapping relationship Y = X + 1 is adopted between the R1 node and the R2 node at the switching moment. Under the new connection line, the packet sent by the R1 node in cycle 1 will enter the queue of cycle 2 of the R2 node and wait for sending. This cycle 2 may be the cycle 2 in the active state of sending packets or receiving packets into the queue (such as Figure 5 the cycle 2 with a slash in the dashed box shown in Figure 5 or other cycle 2 (such as the blank cycle 2 outside the dashed box shown in
[0084] ). If the cycle 2 entered is in the active state, the cycle 2 receives the packet sent by the R1 node in cycle 2 under the original connection line and the packet sent by the R1 node in cycle 1 under the new connection line, exceeding the data range that the cycle 2 can carry, resulting in a cycle data overflow problem. Therefore, in the case of multi-line connection, it will affect data transmission and the possibility of data chaos is relatively large.
[0085] The embodiments of the present application can be applied to an IP network. Packets are transmitted through paths composed of nodes in the IP network. The actual form of the node can be products such as routers, switches or hubs, or other devices or products that can achieve the same function or purpose. Specifically, it is not limited here. To more intuitively understand the application of the embodiments of the present application in the IP network, the following briefly describes an application scenario with an example. Please refer to Figure 6 , Figure 6This is a schematic diagram of the application scenario of the embodiment of the present application. The access node in the IP network is the upstream node of the first intermediate forwarding node. The first intermediate forwarding node periodically learns the periodic mapping relationship with the access node according to a timing mechanism. The second periodic mapping relationship is the periodic mapping relationship between the first intermediate forwarding node and the access node generated by the first intermediate forwarding node at a certain moment. In the case where the first intermediate forwarding node generates the first periodic mapping relationship after the second periodic mapping relationship, the first intermediate forwarding node determines the periodic offset value according to the first periodic mapping relationship and the second periodic mapping relationship. Then, the access node sends the target packet to the first intermediate forwarding node under the first periodic mapping relationship. Then, the first intermediate forwarding node that receives the target packet determines the sending period of the target packet according to the first periodic mapping relationship and the periodic offset value, and then processes the target packet according to the sending period to reduce resource occupancy. In Figure 6 After the periodic mapping relationship between any intermediate forwarding node between the first intermediate forwarding node and the Mth intermediate forwarding node in
[0086] After briefly describing the application scenario of the embodiment of the present application, the method for determining the packet period of the embodiment of the present application will be described below with reference to the accompanying drawings. Those of ordinary skill in the art will know that with the development of technology and the emergence of new scenarios, the technical solutions provided by the embodiments of the present application are equally applicable to similar technical problems. For details, please refer to Figure 7 , Figure 7 This is a schematic diagram of the method for determining the packet period of the embodiment of the present application, which specifically includes:
[0087] 701. The first node determines the periodic offset value according to the first periodic mapping relationship and the second periodic mapping relationship.
[0088] The first node determines the periodic offset value according to the first periodic mapping relationship and the second periodic mapping relationship between the first node and the second node. The second node is the upstream node of the first node. The first periodic mapping relationship is generated by the first node based on the packet sent by the second node received at the first moment, and the second periodic mapping relationship is generated by the first node based on the packet sent by the second node received at the second moment, where the second moment is earlier than the first moment.
[0089] In a possible implementation, as a downstream node, the first node periodically learns the periodic mapping relationship with the second node under a preset timing mechanism. Among them, the timing mechanism and the learning method of the periodic mapping relationship are similar to those described in the periodic mapping relationship between adjacent nodes in the above-mentioned deterministic network, and will not be elaborated here specifically. This periodic mapping relationship is the corresponding relationship between a first period and a second period. The first period is the period in which the moment when the second node sends a message is located. Optionally, the second node marks the first period in the message. The first period can also be understood as the period carried by the message sent by the second node. The second period is the period predicted to be in when the first node sends the message carrying the first period. Optionally, the second period is the next period after the period in which the moment when the first node receives the message carrying the message is located.
[0090] It should be noted that in some embodiments of the present application, the first node and the second node may be connected by any one of connection methods such as two-way selection and reception, multi-line connection, OTN, or other underlying transmission networks, or it may be other connection methods that satisfy the current connection line failure and can switch to another connection line to continue data transmission between the first node and the second node. The first periodic mapping relationship is the periodic mapping relationship generated after the connection line between the first node and the second node is switched from the second connection line to the first connection line. Among them, the first periodic mapping relationship corresponds to the first connection line between the first node and the second node, and the second periodic mapping relationship corresponds to the second connection line between the first node and the second node.
[0091] In some embodiments of the present application, the first node determines the period offset value according to the first periodic mapping relationship and the second periodic mapping relationship, or the first node determines the period offset value according to the first periodic mapping relationship, the second periodic mapping relationship, and the macro period, and stores the period offset value.
[0092] Method 1: The first node determines the period offset value according to the first periodic mapping relationship and the second periodic mapping relationship.
[0093] The first node takes the second period corresponding to the first period based on the first periodic mapping relationship as the third period, and also takes the second period corresponding to the first period based on the second periodic mapping relationship as the fourth period. Then, the first node takes the difference between the third period and the fourth period as the period offset value.
[0094] The following combines the accompanying drawings to illustrate that the first node takes the difference between the third period and the fourth period as the period offset value. For details, please refer to Figure 8 , Figure 8This is a schematic diagram for determining the cycle offset value in the embodiment of the present application. Before the switchover, the first cycle carried by the message sent by the second node on the second connection line is the X cycle. Under the second cycle mapping relationship, the first node determines that the fourth cycle corresponding to the X cycle is the bY cycle, that is, the message carrying the X cycle received by the first node is scheduled to be sent in the bY cycle. After the switchover, for the message carrying the first cycle of X cycle sent by the second node on the first connection line, under the first cycle mapping relationship, the first node determines that the third cycle corresponding to the X cycle is the gY cycle. Since the slanted bY cycle is the cycle that reserves resources for the message of the X cycle, and the gY cycle is the cycle that reserves resources for other messages, in order not to occupy the resources of other messages, it is necessary to offset the message of the X cycle from the gY cycle corresponding to the first cycle mapping relationship to the bY cycle. Therefore, the cycle offset value can be obtained by Z = (bY - gY), where Z represents the cycle offset value. So the first node can use the difference between the third cycle and the fourth cycle as the cycle offset value.
[0095] Among them, the fourth cycle is the cycle that reserves resources corresponding to the message carrying the first cycle. The first node uses the difference between the third cycle and the fourth cycle as the cycle offset value, intuitively determining the cycle offset value between the third cycle of the message carrying the first cycle received by the first node and the cycle that reserves the corresponding resources.
[0096] In a possible implementation, the first node uses the difference between the first offset value and the second offset value as the cycle offset value. The first node uses the difference between the first cycle and the third cycle as the first offset value, and the corresponding Figure 8 first offset value Δ′ = gY - X can be obtained, and uses the difference between the first cycle and the fourth cycle as the second offset value, and the corresponding Figure 8 second offset value Δ = bY - X can be obtained. Then the first node uses the difference between the first offset value and the second offset value as the cycle offset value. Optionally, the cycle offset value can be determined as shown in the formula Z = (Δ - Δ′), where Z represents the cycle offset value, Δ′ represents the first offset value, and Δ represents the second offset value.
[0097] The first node uses the difference between the first offset value and the second offset value as the cycle offset value, which can quickly obtain the number of cycles that need to be offset on the basis of the third cycle when sending the target message to the cycle that reserves resources under the first cycle mapping relationship, improving work efficiency.
[0098] In some embodiments of the embodiment of the present application, the first node can update the first cycle mapping relationship to a predetermined cycle mapping entry, and this cycle mapping entry records the cycle mapping relationship between the first node and the upstream node. Exemplarily, please refer to Figure 9 , Figure 9This is a schematic diagram of a cycle mapping table entry in an embodiment of the present application. The cycle mapping table entry reflects the cycle mapping relationship between the first node and its upstream node by recording the upstream node label of the first node and the offset value of the corresponding cycle mapping relationship between the first node and the upstream node. When the second node is Figure 9 the R1 node shown, the second offset value corresponding to the second cycle mapping relationship recorded in the cycle mapping table entry is Δ. After the first node learns and generates the first cycle mapping relationship, the second offset value can be updated to the first offset value Δ' corresponding to the first cycle mapping relationship. For the specific updated cycle mapping table entry, please refer to Figure 10 another schematic diagram of the cycle mapping table entry in. After the first node updates the first cycle mapping relationship to the cycle mapping table entry, the packets subsequently received by the first node are target packets, and these target packets will be sent under the first cycle mapping relationship.
[0099] Method 2: The first node determines the cycle offset value according to the first cycle mapping relationship, the second cycle mapping relationship, and the macro cycle.
[0100] Based on the first cycle mapping relationship, the second cycle mapping relationship, and the macro cycle, the first node can determine the cycle offset value through the formula Z = (Δ - Δ') mod H or Z = ((Δ - Δ') mod H) + H. The following is an explanation for each case:
[0101] Method 2.1: The first node takes the second cycle corresponding to the first cycle based on the first cycle mapping relationship as the third cycle, and also takes the second cycle corresponding to the first cycle based on the second cycle mapping relationship as the fourth cycle. And the first node takes the difference between the first cycle and the third cycle as the first offset value, and takes the difference between the first cycle and the fourth cycle as the second offset value. Then the first node performs a modulo operation on the difference between the first offset value and the second offset value and the macro cycle, and the obtained value is the cycle offset value. The cycle offset value can be determined specifically according to the following formula:
[0102] Z = (Δ - Δ') mod H;
[0103] where Z is the cycle offset value, Δ is the second offset value, Δ' is the first offset value, and H is the value of the macro cycle. H is a positive integer, and mod represents modulo operation, that is, Z is the remainder obtained by performing a division operation on the difference between the first offset value and the second offset value and the value of the macro cycle. The macro cycle refers to the duration composed of H consecutive and connected cycles. Each packet's corresponding macro cycle contains the cycles that reserve the resources corresponding to the packet, and they are arranged repeatedly according to the macro cycle.
[0104] Please refer to Figure 11 , Figure 11Another schematic diagram for determining the cycle offset value in the embodiment of this application. The transmission time bY cycle corresponding to the first node is the cycle that reserves resources for the message sent by the second node in the X cycle. And every 7 consecutive cycles contain the bY cycle, and the arrangement of resource reservation is repeated in 7 consecutive cycles in sequence. Therefore, the macro cycle H corresponding to the message carrying the X cycle is 7.
[0105] And it can be seen from Figure 11 that when the connection line between the first node and the second node is the second connection line, according to the second cycle mapping relationship, the fourth cycle corresponding to the X cycle is the bY cycle. However, when the connection line is switched to the first connection line, according to the first cycle mapping relationship, the third cycle corresponding to the X cycle is the gY cycle. At this time, (bY - gY) = -1, which means that the message carrying the X cycle needs to be shifted forward by one cycle to the bY cycle on the basis of the gY cycle. But at this time, it cannot be guaranteed whether the bY cycle before the gY cycle has been occupied. Therefore, the message carrying the X cycle is shifted backward on the basis of the gY cycle to the first bY cycle after the gY cycle. Because the macro cycle H corresponding to the message carrying the X cycle is 7, the cycle offset value of 6 can be obtained through the formula Z = (bY - gY) mod H, that is, shifting backward by 6 cycles on the basis of the gY cycle is the bY cycle that reserves the corresponding resources.
[0106] As can be seen from the foregoing Figure 11 that the first node can determine the first offset value Δ′ = gY - X and the second offset value Δ = bY - X. Then, based on the formula Z = (bY - gY) mod H obtained by the first node, the first node can obtain the cycle offset value of 6 through the formula Z = (Δ - Δ′) mod H.
[0107] From the above Figure 11 it can be seen that the first node can determine the cycle offset value through Z = (Δ - Δ′) mod H. In another possible implementation, the cycle offset value can also be determined through the formula Z = (bY - gY) mod H.
[0108] The cycle offset value determined through the formula Z = (Δ - Δ′) mod H or Z = (bY - gY) mod H ensures that the message can be shifted backward on the basis of the third cycle to the cycle that reserves the corresponding resources, further avoiding resource occupation and reducing the possibility of causing data chaos.
[0109] It should also be noted that the value of the macro cycle can be configured locally in the first node or carried by the message sent by the second node. In actual situations, either method can be adopted, and specific details are not limited here. The following is a specific description:
[0110] In one possible implementation, the macro cycle is configured locally at the first node. Exemplarily, please refer to Figure 12 , Figure 12 which is a schematic diagram of the macro cycle configuration in an embodiment of the present application. In an entry, the identifier of the message and the macro cycle corresponding to the message are recorded. For example, the macro cycle corresponding to the message with the message identifier Flow1 is 7, and the macro cycle corresponding to the message with the message identifier Flow2 is 5. In actual situations, the macro cycle of the message is defined according to specific settings, and no specific limitation is made here. Configuring the macro cycle corresponding to the message directly locally at the first node reduces the occupation of network transmission resources.
[0111] In another possible implementation, the macro cycle is carried by the message sent by the second node. Exemplarily, please refer to Figure 13 , Figure 13 which is a schematic diagram of the message carrying the macro cycle in an embodiment of the present application. X carried in the message is the cycle number, and H is the macro cycle. The first node can directly obtain the macro cycle from the message carrying the first cycle to determine the cycle offset value, improving the work efficiency.
[0112] Method 2.2: The first node determines the cycle offset value according to the formula Z = ((Δ - Δ′) mod H) + H obtained on the basis of the formula Z = (Δ - Δ′) mod H.
[0113] From Figure 11 it can be seen that the first node can offset the message carrying the X cycle to the bY cycle for reserving corresponding resources within the second macro cycle after the gY cycle on the basis of the gY cycle. Thus, when the first bY cycle after the gY cycle is in the active state, offsetting the message carrying the X cycle to the second bY cycle after the gY cycle can further avoid the problem of cycle data overflow. Therefore, the cycle offset value can be determined by the formula Z = ((Δ - Δ′) mod H) + H. In another possible implementation, the first node can also determine the cycle offset value according to the formula Z = (bY - gY) mod H + H obtained on the basis of the formula Z = (bY - gY) mod H.
[0114] Determining the cycle offset value through Z = ((Δ - Δ′) mod H) + H or Z = (bY - gY) mod H + H as described above further reduces the possibility of cycle data overflow, and thus reduces the possibility of data chaos.
[0115] In addition, it should be noted that in one possible implementation, the first node can also determine the cycle offset value according to the formula Z = ((Δ - Δ′) mod H) + k * H or Z = (bY - gY) mod H + k * H, where k is a preset constant coefficient, and the preset value can be natural numbers such as 0, 1, 2, 3, etc., and no specific limitation is made here.
[0116] 702. The first node determines a sending period of a target message according to a first period mapping relationship and a period offset value.
[0117] The first node determines a sending period of the target message according to the first period mapping relationship and the period offset value. The sending period is the period in which the target message is planned to be sent.
[0118] In a possible implementation, after the first node updates the mapping relationship table entry according to the first mapping relationship, after receiving the message sent by the second node, that is, the target message, the first node determines the sending period of the received target message.
[0119] The target message carries the identifier of the period at which the second node sends the target message, ie, the target period. The first node uses the sum of the first offset value, the period offset value and the target period as the sending period.
[0120] For example, assuming that the second node is Figure 10 The R1 node shown, and the target period carried by the target message is X, then the sending period is defined as Y, then the first node can directly determine the sending period according to the first offset value Δ′ corresponding to the second node in the period mapping table entry and the period offset value Z, that is, Y=X+Z+Δ′.
[0121] Optionally, the first node may update the carried period X to X+Z when receiving the target message, and then obtain the sending period according to the first offset value, that is, Y=(X+Z)+Δ′. In actual situations, other similar forms may be used for determination, which are not specifically limited here.
[0122] The first node directly determines the sending period for the received target message, ensuring that all target messages are actively shifted to the period for which corresponding resources are reserved, so as to avoid preempting the resources reserved for other messages.
[0123] In another possible implementation, the first node determines the sending period of the target message only when the macrocycle corresponding to the target message is at least 2. The first node determines the sending period of the target message using Y=X+Z+Δ′ as described above.
[0124] The first node only determines the sending period for the target message with a macro period of at least 2, which further improves the efficiency of data transmission. Because the target message with a macro period of 1 indicates that the target message with a macro period of 1 on the first node has reserved resources in each period, the target message does not need to be offset based on the mapping relationship of the first period, and it can also ensure that the target message can be sent within the period with reserved resources.
[0125] It should be noted that the first node can determine that the macro period corresponding to the target message is at least 2 through the preset identifier carried in the target message, or the first node can also determine that the macro period corresponding to the target message is at least 2 by directly determining the macro period corresponding to the target message. The following is a separate description:
[0126] In a possible implementation, the first node determines that the macro period corresponding to the target message is at least 2 through the preset identifier carried in the target message.
[0127] The target message sent by the second node carries not only a period identifier but also a preset identifier. Exemplarily, please refer to Figure 14 , Figure 14 , which is a schematic diagram of the message carrying the preset identifier in the embodiment of the present application. Here, X is the period carried in the target message received by the first node, and F is the preset identifier. This identifier can be a bit. Setting this bit to 0 or 1 represents that the macro period of the target message is 1, or represents that the macro period of the target message is greater than or equal to 2; this identifier can also be represented by a byte indicating that the macro period is greater than or equal to 2, and the value of this byte can be set according to actual situations, and specific details are not limited here. Optionally, the preset identifier F can also be a field. When the message carries the field F, it indicates that the macro period of the target message is greater than or equal to 2, and when the message does not carry the field F, it indicates that the macro period of the target message is equal to 1. When the first node confirms that the target message carries the preset identifier F, after the first node determines that the macro period of the target message is greater than or equal to 2 according to the preset identifier, the first node then determines the transmission period of the target message.
[0128] Optionally, the target message can also carry the preset identifier and the macro period at the same time. This not only facilitates the first node to determine the period offset value but also enables the first node to quickly determine the message for which the target period needs to be determined, improving work efficiency. The carrying method of the corresponding macro period and the preset identifier should be set according to actual situations, and specific details are not limited here.
[0129] The first node directly determines that the macro period corresponding to the target message is at least 2 through the preset identifier carried in the target message, improving work efficiency.
[0130] In another possible implementation, the first node determines whether the macro period corresponding to the target message is at least 2 by determining the macro period corresponding to the target message.
[0131] Optionally, the macro cycle can be configured locally at the first node or carried in the target message. The specific form has been described in detail in step 701 above and will not be elaborated here. The first node can determine the macro cycle corresponding to the target message based on the locally configured information or the macro cycle carried in the target message, and determine whether the macro cycle is at least 2. Only when the macro cycle of the target message is at least 2 does the first node confirm the transmission cycle of the target message.
[0132] By determining the macro cycle of the target message and then determining whether the macro cycle is at least 2, the first node reduces the occupancy of network resources and saves network resources.
[0133] 703. The first node processes the target message according to the transmission cycle.
[0134] After the first node determines the transmission cycle of the target message, the first node processes the target message according to the state of the transmission cycle. This state includes an active state and an inactive state. The active state means that the current cycle is in the transmission state or the reception state; the inactive state means that the current cycle is not in the transmission state or the reception state.
[0135] In a possible implementation, when the transmission cycle and / or the adjacent cycle is in the active state, the first node discards the target message.
[0136] Optionally, the cycles in the active state and the adjacent n cycles are grouped into active cycles. When the transmission cycle belongs to the active cycle, the first node discards the target message, where n is a positive integer. In actual situations, the value of n can be set according to specific circumstances and is not specifically limited here. For example, as shown above Figure 11 The cycles in the dotted box are the current active cycles, which include the bY cycle for reserved resources. If the first node determines that the transmission cycle of the target message is the bY cycle in the active cycle, the first node discards the target message.
[0137] In a possible implementation, when the transmission cycle and / or the adjacent cycle is in the active state, the first node can also re-determine the transmission cycle of the target message through the formula Z = ((Δ - Δ′) mod H) + H or Z = (bY - gY) mod H + k * H, and the transmission cycles of subsequent target messages are also determined by this formula. This can reduce data packet loss and greatly reduce the possibility of data chaos.
[0138] In another possible implementation, when the transmission cycle of the target message or the adjacent cycle is in the inactive state, that is, when the transmission cycle of the target message does not belong to the active cycle, the first node sends the target message in the transmission cycle. For example, the transmission cycle of the target message is as above Figure 11The first bY period after the gY period shown in the figure, and this bY period does not belong to the active period, then the first node sends the target message in this bY period.
[0139] Optionally, when the sending period of the target message or the adjacent period is in the inactive state, the first node can perform the operation of putting the target message into the queue corresponding to the sending period. According to the above Figure 11 example, the sending period of the target message is the first bY period after the gY period and does not belong to the active period, then the first node performs the operation of putting the target message into the queue corresponding to the sending period, and then waits for subsequent instructions.
[0140] When the sending period and / or the adjacent period is in the active state, the first node discards the target message, and when the sending period and / or the adjacent period is in the inactive state, the first node sends the target message into the queue corresponding to the sending period, both of which can avoid the problem of cycle data overflow caused by exceeding the data range that the sending period can carry, thereby reducing the possibility of data chaos.
[0141] In addition, it should be noted that the second node in the embodiments of the present application can also be the downstream node of other nodes. After the cycle mapping relationship between the second node and the upstream node changes, the second node can also determine the cycle offset value in the same way as the first node in the above method embodiments through various methods in the above method embodiments, and then determine the sending period of the target message.
[0142] In the embodiments of the present application, the first node determines the cycle offset value according to the first cycle mapping relationship and the second cycle mapping relationship, and then the first node determines the sending period of the target message according to the first cycle mapping relationship and the cycle offset value. When the sending period or the adjacent period is in the active state, the first node discards the target message to avoid the sending of cycle data problems as much as possible. When the sending period or the adjacent period is not in the active state, the first node sends the target message into the queue corresponding to the sending period to ensure that the target message received by the first node can be sent in the period with the corresponding resources reserved, avoiding resource occupation and minimizing the possibility of data chaos to the greatest extent.
[0143] To implement the various functions in the method provided by the embodiments of the present application, both the first node and the second node can include a hardware structure and / or a software module, and implement the above various functions in the form of a hardware structure, a software module, or a combination of a hardware structure and a software module. Whether a certain function among the above various functions is executed in the form of a hardware structure, a software module, or a combination of a hardware structure and a software module depends on the specific application and design constraints of the technical solution.
[0144] As Figure 15 shown, the embodiments of the present application also provide a communication device 1500. For details, please refer toFigure 15 , Figure 15 This is a schematic structural diagram of a communication device according to an embodiment of the present application. The communication device 1500 may be a first node or a second node, or may be a routing device in a network device, such as at least one of a router, a switch, and a hub, or a device that can be used in combination with a terminal device and a network device. In a possible implementation, the communication device 1500 may include modules or units corresponding one by one to the methods / operations / steps / actions executed by the first node or the second node in the above method embodiments. The unit may be a hardware circuit, software, or a combination of a hardware circuit and software. In a possible implementation, the communication device 1500 may include: a first determination unit 1501 and a second determination unit 1502. The first determination unit 1501 may be configured to execute the step of determining a cycle offset value in the above method embodiment, and the second determination unit 1502 may be configured to execute the step of determining the transmission cycle of a target message in the above method embodiment.
[0145] In another possible implementation, the communication device may further include a discard unit 1503, a transmission unit 1504, and a reception unit 1505. The discard unit 1503 may be configured to discard a target message when the transmission cycle and / or the adjacent cycle of the target message is in an active state such as a transmission state or a reception state. The adjacent cycle is n consecutive cycles adjacent to the transmission cycle, and n≥1. The transmission unit 1504 may be configured to transmit the target message in the transmission cycle when the transmission cycle and / or the adjacent cycle of the target message is not in an active state. The reception unit 1505 may be configured to receive the target message sent by the second node, and the target message carries a target cycle.
[0146] In the embodiment of the present application, the first determination unit 1501 determines a cycle offset value according to a first cycle mapping relationship and a second cycle mapping relationship. Then, the reception unit 1505 receives the target message sent by the second node. Next, the second determination unit 1502 determines the transmission cycle of the target message according to the first cycle mapping relationship and the cycle offset value. When the transmission cycle and / or the adjacent cycle is not in an active state, the transmission unit 1504 transmits the target message in the transmission cycle, which can ensure that the cycle for transmitting the target message is a cycle that reserves resources for the target message, reducing resource occupation. However, when the transmission cycle and / or the adjacent cycle is not in an active state, the discard unit 1503 discards the target message, reducing the problem of cycle data overflow and minimizing the possibility of data chaos.
[0147] In other possible designs, the above-mentioned first determination unit 1501, second determination unit 1502, discard unit 1503, sending unit 1504, or receiving unit 1505 may respectively execute the methods / operations / steps / actions in various possible implementation manners in the above method embodiments.
[0148] In one possible design, the above-mentioned first determination unit 1501 may be used to use the difference between the third period and the fourth period in the above method embodiment as the period offset value.
[0149] In one possible design, the above-mentioned first determination unit 1501 may be used to use the difference between the first offset value and the second offset value in the above method embodiment as the period offset value.
[0150] In one possible design, the first determination unit 1501 may be used to determine the period offset value according to the first period mapping relationship, the second period mapping relationship, and the macro period in the above method embodiment.
[0151] In one possible design, the above-mentioned first determination unit 1501 may also be used to determine the period offset value according to any one of the following formulas in the above method embodiment: Z = (Δ - Δ′) mod H, Z = (bY - gY) mod H, Z = ((Δ - Δ′) mod H) + H, Z = (bY - gY) mod H + H, Z = ((Δ - Δ′) mod H) + k*H, or Z = (bY - gY) mod H + k*H:
[0152] In one possible design, the above-mentioned second determination unit 1502 may be used to determine the sending period of the target packet according to the first period mapping relationship and the period offset value when the macro period corresponding to the target packet is at least 2.
[0153] In one possible design, the above-mentioned second determination unit 1502 may also be used to determine that the macro period corresponding to the target packet is at least 2 through a preset identifier carried by the target packet.
[0154] In one possible design, the above-mentioned second determination unit 1502 may also be used to determine the sending period of the target packet according to the first period mapping relationship, the target period, and the period offset value.
[0155] In the above implementation manner of the present application, determining the sending period of the target packet according to the first period mapping relationship, the target period carried by the target packet, and the period offset value improves the reliability of the solution.
[0156] In one possible design, the second determination unit 1502 is specifically used to use the sum of the first offset value, the target period, and the period offset value as the sending period.
[0157] In the above embodiments of the present application, a specific implementation manner for determining the transmission period of the target message is given, which is optional.
[0158] In a possible design, the first period mapping relationship corresponds to the first connection line between the first node and the second node, and the second period mapping relationship corresponds to the second connection line between the first node and the second node, and the first connection line is different from the second connection line.
[0159] In a possible design, the above-mentioned sending unit 1504 may also be used to send a message carrying a macro period and / or a preset identifier, and the message includes the target message.
[0160] For the beneficial effects of the communication devices in the various designs of the present application above, please refer to the beneficial effects of the corresponding implementation manners in the method embodiments above Figure 7 one by one, and the details are not described here again.
[0161] It should be noted that Figure 15 Regarding the information interaction, execution process, etc. among the modules / units in the first node described in the corresponding embodiment, it is based on the same concept as the method embodiment in the present application Figure 7 The specific content can be seen in the description in the method embodiment shown above in the present application, and will not be repeated here.
[0162] In addition, in each embodiment of the present application, each functional module or unit may be integrated in a processor, or may exist physically alone, or two or more modules or units may be integrated in one module or unit. The above integrated module or unit may be implemented in the form of hardware or in the form of a software functional module.
[0163] Next, another communication device provided by the embodiments of the present application will be introduced. Please refer to Figure 16 , Figure 16 is another structural schematic diagram of the communication device in the embodiment of the present application. The communication device 1600 may be deployed with Figure 15 the modules described in the corresponding embodiment for implementing Figure 15Corresponding to the functions of the communication device in the embodiments, specifically, the communication device 1600 is implemented by one or more servers. The communication device 1600 may vary significantly due to configuration or performance differences. It may include one or more central processing units (CPUs) 1622 (for example, one or more central processors) and a memory 1632, and one or more storage media 1630 (for example, one or more mass storage devices). Among them, the memory 1632 and the storage media 1630 may be transient storage or persistent storage. The program stored in the storage media 1630 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations on the communication device 1600. Further, the central processor 1622 may be configured to communicate with the storage media 1630 and execute a series of instruction operations in the storage media 1630 on the communication device 1600.
[0164] The communication device 1600 may further include one or more power supplies 1626, one or more wired or wireless network interfaces 1650, and / or one or more input / output interfaces 1658.
[0165] In the embodiments of the present application, the central processor 1622 is used to execute Figure 7 the method in the corresponding embodiment. For example, the central processor 1622 may be used to: determine a cycle offset value according to a first cycle mapping relationship and a second cycle mapping relationship. The first cycle mapping relationship is a cycle mapping relationship generated from the message sent by the second node received by the communication device 1600 at the first moment. The second cycle mapping relationship is a cycle mapping relationship generated from the message sent by the second node received by the communication device 1600 at the second moment. The second node is the upstream node of the communication device 1600, and the second moment is before the first moment, that is, the first cycle mapping relationship is generated after the second cycle mapping relationship. The cycle mapping relationship is the corresponding relationship between the first cycle and the second cycle, where the first cycle is the cycle carried by the message sent by the second node, and the second cycle is the cycle in which the predicted time for the communication device 1600 to send the message carrying the first cycle is located. Then, determine the sending cycle of the target message according to the first cycle mapping relationship and the cycle offset value.
[0166] It should be noted that the central processor 1622 may also be used to execute any step in the corresponding method embodiment in the present application Figure 7 The specific content can be seen in the description of the method embodiments shown above in the present application, and will not be repeated here.
[0167] The embodiments of the present application also provide a computer-readable storage medium, including computer-readable instructions. When the computer-readable instructions run on a computer, the computer is caused to execute any implementation manner shown in the foregoing method embodiments.
[0168] The embodiments of the present application also provide a computer program product, which includes a computer program or instructions. When the computer program or instructions run on a computer, the computer is caused to execute any implementation manner shown in the foregoing method embodiments.
[0169] The present application also provides a chip or a chip system. The chip may include a processor. The chip may further include a memory (or a storage module) and / or a transceiver (or a communication module), or the chip is coupled to the memory (or the storage module) and / or the transceiver (or the communication module). Wherein, the transceiver (or the communication module) can be used to support the chip for wired and / or wireless communication, and the memory (or the storage module) can be used to store a program or a set of instructions. The processor can call the program or the set of instructions to implement the operations executed by the terminal or the network device in any possible implementation manner of the foregoing method embodiments and the method embodiments. The chip system may include the above chip, or may include the above chip and other discrete devices, such as a memory (or a storage module) and / or a transceiver (or a communication module).
[0170] The present application also provides a communication system, which may include the above first node and second node. The communication system can be used to implement the operations executed by the first node or the second node in the foregoing method embodiments and any possible implementation manner of the method embodiments.
[0171] In addition, it should be noted that the device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. In addition, in the drawings of the device embodiments provided in the present application, the connection relationship between the modules indicates that they have a communication connection, which can be specifically implemented as one or more communication buses or signal lines.
[0172] Through the description of the above embodiments, those skilled in the art can clearly understand that the present application can be implemented by means of software plus necessary general hardware. Of course, it can also be implemented by dedicated hardware including application-specific integrated circuits, dedicated CPUs, dedicated memories, dedicated components, etc. Generally, functions completed by computer programs can be easily implemented by corresponding hardware, and the specific hardware structures for implementing the same function can also be diverse, such as analog circuits, digital circuits, or dedicated circuits. However, for the present application, in more cases, software program implementation is a better embodiment. Based on such an understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art can be embodied in the form of a software product. This computer software product is stored in a readable storage medium, such as a floppy disk, USB flash drive, mobile hard disk, read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disc of a computer, etc., and includes several instructions to enable a computer device (which can be a personal computer, training device, or network device, etc.) to execute the methods described in various embodiments of the present application.
[0173] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product.
[0174] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions described in the embodiments of the present application are generated in whole or in part. The computer can be a general-purpose computer, a dedicated computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website, computer, training device, or data center to another website, computer, training device, or data center by wired (such as coaxial cable, optical fiber, digital subscriber line) or wireless (such as infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can store, or a training device, data center, etc. data storage device that includes one or more integrated available media. The available medium can be a magnetic medium (such as a floppy disk, hard disk, magnetic tape), an optical medium (such as a high-density digital video disc (DVD)), or a semiconductor medium (such as a solid-state drive (SSD)), etc.
Claims
1. A method for determining a message period, characterized in that Including: The first node determines a cycle offset value according to a first cycle mapping relationship and a second cycle mapping relationship. The first cycle mapping relationship is a cycle mapping relationship generated by the first node based on a message sent by a second node received at a first moment. The second cycle mapping relationship is a cycle mapping relationship generated by the first node based on a message sent by the second node received at a second moment. The second moment is before the first moment. The cycle mapping relationship is a correspondence between a first cycle and a second cycle. The first cycle is the cycle carried by the message sent by the second node. The second cycle is the cycle in which the moment predicted for the first node to send a message carrying the first cycle is located. The second node is an upstream node of the first node. The first node determines a transmission cycle of a target message according to the first cycle mapping relationship and the cycle offset value. The transmission cycle is the cycle in which the first node plans to send the target message.
2. The method according to claim 1, characterized in that, The method further includes: When the transmission cycle and / or an adjacent cycle is in an active state, the first node discards the target message. The active state is a transmission state or a reception state. The adjacent cycle is n consecutive cycles adjacent to the transmission cycle, and n is a positive integer.
3. The method according to claim 1, wherein The method further includes: When the transmission cycle and / or an adjacent cycle is not in an active state, the first node sends the target message in the transmission cycle. The active state is a transmission state or a reception state. The adjacent cycle is n consecutive cycles adjacent to the transmission cycle, and n is a positive integer.
4. The method according to any one of claims 1 to 3, characterized in that, The first node determines a cycle offset value according to a first cycle mapping relationship and a second cycle mapping relationship, including: The first node takes the difference between a third cycle and a fourth cycle as the cycle offset value. The third cycle is the second cycle determined based on the first cycle mapping relationship. The fourth cycle is the second cycle determined based on the second cycle mapping relationship.
5. The method according to any one of claims 1 to 3, characterized in that The first node determines a cycle offset value according to a first cycle mapping relationship and a second cycle mapping relationship, including: The first node determines the cycle offset value according to the first cycle mapping relationship, the second cycle mapping relationship, and a macro cycle. The macro cycle is H consecutive cycles including cycles with reserved resources, and H is greater than or equal to 1.
6. The method according to claim 5, wherein The first node determines the cycle offset value according to the first cycle mapping relationship, the second cycle mapping relationship, and a macro cycle, including: The first node determines the cycle offset value in the following manner: Z = (Δ - Δ ′ ) mod H; Z is the cycle offset value; Δ is a second offset value; The described Δ ′ is the first offset value; H is the value of the macro cycle; The first offset value is the difference between the first cycle and the third cycle. The second offset value is the difference between the first cycle and the fourth cycle. The third cycle is the second cycle determined based on the first cycle mapping relationship. The fourth cycle is the second cycle determined based on the second cycle mapping relationship.
7. The method according to claim 5, wherein The first node determines a transmission cycle of a target message according to the first cycle mapping relationship and the cycle offset value, including: When the macro period corresponding to the target message is at least 2, the first node determines the transmission period of the target message according to the first period mapping relationship and the period offset value.
8. The method according to claim 7, wherein Before the first node determines the transmission period of the target message, the method further includes: The first node determines that the macro period corresponding to the target message is at least 2 through a preset identifier carried by the target message.
9. The method according to claim 6, wherein The method further includes: The first node receives the target message sent by the second node, and the target period is carried in the target message, where the target period is the period in which the second node sends the target message. The first node determines the transmission period of the target message according to the first period mapping relationship and the period offset value, including: The first node determines the transmission period of the target message according to the first period mapping relationship, the target period, and the period offset value.
10. The method according to claim 9, wherein The first node determines the transmission period of the target message according to the first period mapping relationship, the target period, and the period offset value, including: The first node uses the sum of the first offset value, the target period, and the period offset value as the transmission period.
11. The method according to any one of claims 1-3, characterized in that The first period mapping relationship corresponds to the first connection line between the first node and the second node, the second period mapping relationship corresponds to the second connection line between the first node and the second node, and the first connection line is different from the second connection line.
12. The method according to claim 5, characterized in that The macro period is pre-configured in the first node; Or, The macro period is carried by a message sent by the second node, and the message includes the target message.
13. A communication device, characterized in that, The communication device is the first node, and the communication device includes: A first determination unit, configured to determine a period offset value according to a first period mapping relationship and a second period mapping relationship. The first period mapping relationship is a period mapping relationship generated by the first node based on a message sent by the second node received at a first moment. The second period mapping relationship is a period mapping relationship generated by the first node based on a message sent by the second node received at a second moment. The second moment is before the first moment. The period mapping relationship is a corresponding relationship between a first period and a second period. The first period is the period carried by the message sent by the second node. The second period is the period in which it is predicted that the first node sends the message carrying the first period. The second node is the upstream node of the first node; A second determination unit, configured to determine the transmission period of the target message according to the first period mapping relationship and the period offset value, where the transmission period is the period in which the first node plans to send the target message.
14. The communication device according to claim 13, wherein The communication device further includes: A discard unit, configured to discard the target message when the sending period and / or the adjacent periods are in an active state, where the active state is a sending state or a receiving state, and the adjacent periods are n consecutive periods adjacent to the sending period, and n is a positive integer.
15. The communication device according to claim 13, characterized in that, The communication device further includes: A sending unit, configured to send the target message in the sending period when the sending period and / or the adjacent periods are not in an active state, where the active state is a sending state or a receiving state, and the adjacent periods are n consecutive periods adjacent to the sending period, and n is a positive integer.
16. The communication device according to any one of claims 13-15, wherein: The first determining unit is specifically configured to use the difference between the third period and the fourth period as the period offset value, where the third period is the second period determined based on the first period mapping relationship, and the fourth period is the second period determined based on the second period mapping relationship.
17. The communication device according to any one of claims 13-15, characterized in that, The first determining unit is specifically configured to determine the period offset value according to the first period mapping relationship, the second period mapping relationship, and a macro period, where the macro period is H consecutive periods of a period including reserved resources, and H is greater than or equal to 1.
18. The communication device according to claim 17, wherein The first determining unit specifically determines the period offset value in the following manner: Z = (Δ - Δ ′ ) mod H; Z is the period offset value; Δ is the second offset value; The said Δ ′ is the first offset value; H is the value of the macro period; The first offset value is the difference between the first period and the third period, the second offset value is the difference between the first period and the fourth period, the third period is the second period determined based on the first period mapping relationship, and the fourth period is the second period determined based on the second period mapping relationship.
19. The communication device according to claim 17, characterized in that, The second determining unit is specifically configured to, when the macro period corresponding to the target message is at least 2, determine the sending period of the target message according to the first period mapping relationship and the period offset value.
20. The communication device according to claim 19, wherein The second determining unit is further configured to determine that the macro period corresponding to the target message is at least 2 through a preset identifier carried by the target message.
21. The communication device according to claim 18, characterized in that, The communication device further includes: A receiving unit, configured to receive the target message sent by the second node, where a target period is carried in the target message, and the target period is the period in which the second node sends the target message. The second determining unit is specifically configured to determine the sending period of the target message according to the first period mapping relationship, the target period, and the period offset value.
22. The communication device according to claim 21, characterized in that, The second determining unit is specifically configured to use the sum of the first offset value, the target period, and the period offset value as the sending period.
23. The communication device according to any one of claims 13-15, wherein: The first period mapping relationship corresponds to a first connection line between the communication device and the second node, the second period mapping relationship corresponds to a second connection line between the communication device and the second node, and the first connection line is different from the second connection line.
24. The communication device according to claim 17, wherein: the macro period is pre-configured in the communication device; or the macro period is carried by a message sent by the second node, and the message includes the target message.
25. A communication device, characterized in that, comprising a processor and a memory integrated together; the processor is configured to execute computer-executable instructions stored in the memory, and when the computer-executable instructions are executed, cause the communication device to execute the method according to any one of claims 1 to 12.
26. A communication device, characterized in that, including: a processor configured to execute computer-executable instructions stored in a memory, and when the computer-executable instructions are executed, cause the communication device to execute the method according to any one of claims 1 to 12, and the memory is located outside the communication device.
27. A computer-readable storage medium, comprising computer-readable instructions, characterized in that, When the computer-readable instructions are run on a computer, the method according to any one of claims 1-12 is caused to be executed.
28. A computer program product comprising computer-readable instructions, characterized in that, When the computer-readable instructions are run on a computer, the method according to any one of claims 1-12 is caused to be executed.
Citation Information
Patent Citations
Method and device for determining transmission period in deterministic network
CN112448896A
Method and device for updating mapping relation
CN112825510A