Data transmission method, electronic device and storage medium

By calculating the received sub-period tags and directly sending messages, the problem of high resource consumption in the existing technology is solved, and efficient data transmission in asynchronous mode is achieved.

CN114679418BActive Publication Date: 2025-12-19ZTE CORP
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202011550526.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-12-24
Publication Date
2025-12-19
Estimated Expiration
2040-12-24

AI Technical Summary

Technical Problem

Existing technologies require extending protocols and modifying messages to add and replace time period tag information when transmitting data in asynchronous mode, resulting in high resource consumption and cumbersome steps.

Method used

The received sub-period tag is calculated by receiving the arrival time and period value information of the received message, and the message can be sent directly without adding or replacing the time tag information, which simplifies the data transmission process.

Benefits of technology

Data transmission in asynchronous mode was achieved without extending the protocol or modifying the message, which improved processing efficiency and saved storage space.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114679418B_ABST
    Figure CN114679418B_ABST
Patent Text Reader

Abstract

The application relates to the communication field and discloses a data transmission method, an electronic device and a storage medium. The data transmission method comprises the following steps: receiving a message sent by an upstream device, wherein the message carries first information for indicating an interface and second information for indicating a period value; obtaining a receiving sub-period label according to the arrival time of the message and the second information, wherein the receiving sub-period label is used for indicating the sequence of a receiving sub-period used for receiving the message in a whole receiving period, and the receiving period comprises a plurality of receiving sub-periods; and sending the message according to the receiving sub-period label and the first information. The application is applied to the data forwarding process in a deterministic network, and data transmission can be realized in an asynchronous mode without expanding a protocol or modifying a message.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The embodiment of the present application relates to the field of communication, in particular to a data transmission method, an electronic device and a storage medium. BACKGROUND

[0002] Deterministic Networking (DetNet) refers to the ability of providing deterministic service guarantees for the service of a bearer in a network domain, and the deterministic service guarantee capabilities include indicators such as time delay, time delay jitter and packet loss rate. In order to guarantee the time delay jitter of the message in the end-to-end transmission in the asynchronous mode, the source device needs to add the time period label information of the upstream device in the message, so that the forwarding device can find the forwarding sub-period label information of the out interface in the fixed mapping relationship table of the in interface label and the out interface label according to the time period label information of the upstream device carried in the message and the out interface number determined according to the address information carried in the message after receiving the message. Then the forwarding device replaces the time label information in the original message with the forwarding sub-period label information, and finally the replaced message is transmitted from the corresponding out interface according to the forwarding sub-period indicated by the forwarding sub-period label information.

[0003] However, the original protocol does not contain the time period label information, so it is necessary to expand the protocol to add the time period label information in the message, and it is also necessary to modify the message to replace the time label information in the original message with the forwarding sub-period label information, and the steps are more complicated and the resource consumption is more. SUMMARY

[0004] The main purpose of the embodiment of the present application is to provide a data transmission method, an electronic device and a storage medium, which can realize data transmission in the asynchronous mode without expanding the protocol and modifying the message.

[0005] In order to achieve the above-mentioned purpose, the embodiment of the present application provides a data transmission method, which comprises the following steps: receiving a message sent by an upstream device, wherein the message carries first information used for indicating an out interface and second information used for indicating a period value; obtaining a receiving sub-period label according to the arrival time of the message and the second information; and transmitting the message according to the receiving sub-period label and the first information.

[0006] In order to achieve the above-mentioned purpose, the embodiment of the present application further provides an electronic device, which comprises:

[0007] at least one processor; and

[0008] a memory connected with the at least one processor in communication; wherein

[0009] The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the data transmission method described above.

[0010] Embodiments of the present application also provide a computer readable storage medium storing a computer program, the computer program being executed by a processor to implement the data transmission method described above.

[0011] Compared with the prior art, the embodiments of the present application can, after receiving a packet sent by an upstream device and not adding time period label information of the upstream device, acquire a receiving sub-period label according to the arrival time of the packet and second information carried in the packet for indicating a period value, and finally send the packet directly according to the receiving sub-period label and first information carried in the packet for indicating an interface. Since the packet does not carry time label information of the upstream device, only the second information in the packet and the arrival time of the packet are needed to calculate the receiving sub-period of the device to replace the time label information of the upstream device, and further, the time label information does not need to be updated correspondingly due to changes of the upstream device before being forwarded to a downstream device, so that data transmission can be performed in an asynchronous mode without extending a protocol or modifying a packet. BRIEF DESCRIPTION OF DRAWINGS

[0012] One or more embodiments are illustrated by way of example in the figures that form a part of this patent document, and which do not limit the scope of the embodiments.

[0013] Figure 1 is a flowchart of the data transmission method provided by the first embodiment of the present application;

[0014] Figure 2 is Figure 1 is a flowchart of step 102 in the data transmission method provided by the first embodiment of the present application;

[0015] Figure 3 is a flowchart of the data transmission method provided by the second embodiment of the present application;

[0016] Figure 4 is a flowchart of the data transmission method provided by the third embodiment of the present application;

[0017] Figure 5 is a flowchart of the data transmission method provided by the fourth embodiment of the present application;

[0018] Figure 6 is an application scenario of the data transmission method provided by the fourth embodiment of the present application;

[0019] Figure 7is a flow chart of a data transmission method provided by the fifth embodiment of the present application;

[0020] Figure 8 is a flow chart of a data transmission method provided by the sixth embodiment of the present application;

[0021] Figure 9 is a structural schematic diagram of an electronic device provided by the seventh embodiment of the present application. DETAILED DESCRIPTION

[0022] In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the embodiments of the present application will be described in detail below with reference to the drawings. However, those skilled in the art can understand that, in the embodiments of the present application, many technical details are presented in order to make the readers better understand the present application. However, the technical solutions claimed by the present application can be implemented even without these technical details and based on various changes and modifications of the following embodiments. The division of the following embodiments is for the convenience of description, and should not constitute any limitation on the specific embodiments of the present application, and the embodiments can be combined with each other and cited to each other without contradiction.

[0023] The first embodiment of the present application relates to a data transmission method applied to a forwarding device, such as a router, as shown in Figure 1 , and specifically includes:

[0024] Step 101, receiving a packet sent by an upstream device, wherein the packet carries first information for indicating an interface and second information for indicating a period value.

[0025] In the embodiment, the upstream device can be a source device sending the packet, and can also be other forwarding devices in the forwarding process. The first information includes a destination IP address, a MAC, etc. The second information includes a flow identification number, a priority, or a six-tuple of a data packet, etc., wherein the elements of the six-tuple of the data packet can include a source IP address, a destination IP address, a protocol number, a source port, a destination port, a service type, and an interface index, etc., and the six-tuple is a multi-tuple composed of six elements selected from the above elements according to actual conditions. Of course, the above is only a specific example, and in the actual use process, the first information can also include other information included in the protocol specified packet that can be used to indicate the interface, and the second information can also include other information included in the protocol specified packet that can be used to indicate the period value, which will not be described one by one here.

[0026] Step 102, obtaining a receiving sub-period label according to the arrival time of the packet and the second information.

[0027] Specifically, as shown in Figure 2 , step 102 specifically includes the following steps:

[0028] Step 201, determining the period value corresponding to the packet according to the second information.

[0029] Step 202, calculating the receiving sub-period label according to the period value and the arrival time.

[0030] In the embodiment, the receiving sub-period label is calculated according to the following formula:

[0031]

[0032] Wherein, T n is the period value obtained by executing step 201, x is the receiving sub-period label, indicating the order of the receiving sub-period used when receiving the packet in the whole receiving period, the receiving period contains a plurality of receiving sub-periods, t start is a preset value, which can be the time corresponding to the local clock when the device is started, t arrive is the arrival time of the packet, m n is the number of receiving sub-periods contained in the receiving period determined according to T n , the square brackets in the formula are the integral symbol, and the percent sign is the remainder symbol.

[0033] Step 103, sending the packet according to the receiving sub-period label and the first information.

[0034] In the embodiment, the forwarding sub-period label is first determined according to the receiving sub-period label, then the forwarding sub-period is determined according to the forwarding sub-period label, and finally the packet is sent out from the out interface determined according to the first information in the forwarding sub-period.

[0035] Compared with the prior art, the embodiment of the application can obtain the receiving sub-period label according to the arrival time of the packet and the second information carried in the packet for indicating the period value after receiving the packet sent by the upstream device without adding the time period label information of the upstream device, and finally send the packet out directly according to the receiving sub-period label and the first information carried in the packet for indicating the out interface. Since the packet does not carry the time label information of the upstream device, only the second information in the packet and the arrival time of the packet are needed to calculate the receiving sub-period of the device to replace the time label information of the upstream device, and further, the time label information does not need to be updated accordingly due to the change of the upstream device before forwarding to the downstream device, so that the data transmission can be performed in the asynchronous mode without expanding the protocol and modifying the packet.

[0036] The second embodiment of the application relates to a data transmission method, which is substantially the same as the first embodiment, and the difference lies in that a local period mapping table needs to be generated, as shown in Figure 3 , which specifically includes:

[0037] Step 301, setting a period generation strategy.

[0038] In the embodiment, the period generation strategy is to acquire a period value according to the second information. Since the second information can be a flow identification number or a six-tuple of a data packet or a priority, etc., the period generation strategy can be to acquire a period value according to a flow identification number, to acquire a period value according to a six-tuple of a data packet, or to acquire a period value according to a priority, etc. Of course, the above is only a specific example, and in actual use, the period generation strategy can also include other information, which is not described one by one here.

[0039] Step 302, acquiring at least one period value according to the period generation strategy.

[0040] Step 303, generating and saving a local period mapping table according to the period value.

[0041] Step 304, receiving a message sent by an upstream device, wherein the message carries first information for indicating an interface and second information for indicating a period value.

[0042] Step 304 in the embodiment is substantially the same as step 101 in the first embodiment, which is not described one by one here.

[0043] It should be noted that the second information in step 304 needs to be consistent with the second information used in the period generation strategy in step 301. For example, if the period generation strategy is to acquire a period value according to a flow identification number, then the flow identification number carried in the message needs to be extracted as the second information in step 304.

[0044] Step 305, acquiring a receiving sub-period label according to the arrival time of the message and the second information.

[0045] Step 305 in the embodiment is substantially the same as step 102 in the first embodiment, which is not described one by one here.

[0046] Step 306, recording the incoming interface used when the message arrives.

[0047] Step 307, determining the interface according to the first information.

[0048] Step 308, finding a forwarding sub-period label in the local period mapping table according to the forwarding sub-period label, the incoming interface, and the outgoing interface.

[0049] Step 309, sending the message out from the outgoing interface in the forwarding sub-period indicated by the forwarding sub-period label.

[0050] It should be noted that the above steps 306-309 are further detailed steps of step 103 in the first embodiment.

[0051] Compared with the prior art, the first embodiment is based on the first embodiment, and one or more periodic values are generated according to the periodic generation strategy, so that the number of available periodic values can exceed one, and the mapping forwarding in the multi-period scenario can be supported.

[0052] The third embodiment of the present application relates to a data transmission method, which is basically the same as the first embodiment, and the difference lies in that a simple calculation is used to obtain a forwarding sub-period label, and the specific process is as shown in Figure 4

[0053] Step 401, receiving a message sent by an upstream device, wherein the message carries first information for indicating an interface and second information for indicating a periodic value.

[0054] Step 401 in the embodiment is basically the same as step 101 in the first embodiment, and will not be described here.

[0055] Step 402, obtaining a receiving sub-period label according to the arrival time of the message and the second information.

[0056] Step 402 in the embodiment is basically the same as step 102 in the first embodiment, and will not be described here.

[0057] Step 403, calculating a forwarding sub-period label according to the receiving sub-period label.

[0058] In the embodiment, the forwarding sub-period label is calculated by the following formula:

[0059] y = (x + i) % m n

[0060] Wherein, y is the forwarding sub-period label, x is the receiving sub-period label obtained in step 402, i is a natural number preset according to actual conditions, and m is the number of receiving sub-periods contained in the receiving period determined according to T n is the periodic value determined by the periodic information in step 402. n n

[0061] Step 404, sending the message from the out-interface indicated by the first information in the forwarding sub-period indicated by the forwarding sub-period label.

[0062] Compared with the prior art, the first embodiment is based on the first embodiment, and one or more periodic values are generated according to the periodic generation strategy, so that the number of available periodic values can exceed one, and the mapping forwarding in the multi-period scenario can be supported.​​​

[0063] In order to make the skilled in the art more clearly understand the overall flow of the data transmission method disclosed in the first to third embodiments of the present application, the fourth to sixth embodiments of the present application are described by taking specific application scenarios as examples.

[0064] As shown in Figure 5 , the data transmission method provided by the fourth embodiment of the present application is applied to the data transmission scenario as shown in Figure 6 , and is described by taking the second information as an example of priority, and includes the following steps.

[0065] Step 501, router1 and router2 set the period generation strategy to obtain the period value according to the priority.

[0066] Step 502, router1 and router2 obtain two period values and determine the corresponding sub-period number according to the period generation strategy.

[0067] In this embodiment, as shown in Figure 6 , there are two forwarding devices in the network: router1 and router2; four non-forwarding devices host1, host2, host3 and host4. Moreover, host1 and host3 are connected to interface 1 and interface 2 of router1 respectively, and host2 and host4 are connected to interface 2 and interface 3 of router2 respectively. It is assumed that host1 is the source device of stream stream1 with a priority of 2, host2 is the destination device of stream stream1, and the message stream1 sent by host1 reaches host2 through router1 and router2. Host3 is the source sending end of stream stream2 with a priority of 3, and host4 is the destination receiving end of stream stream2, and the message stream2 sent by host3 reaches host4 through router1 and router2. Therefore, two period values T1=10us and T2=20us are generated for priorities 2 and 3 respectively, and the period value 10us corresponds to the period number m1=12, and the period value 20us corresponds to the period number m2=6.

[0068] Step 503, router1 and router2 generate local period mapping tables according to the period values respectively.

[0069] In this embodiment, the local period mapping tables of router1 and router2 generated are shown in the following table:

[0070] Table 1 router1 period mapping table

[0071]

[0072] Table 2 router2 period mapping table

[0073]

[0074]

[0075] Step 504, router1 receives the packet sent by host1 and records the time when the packet arrives and the incoming interface used.

[0076] In this embodiment, the stream1 source packet sent by host1 is received by router1, and the time when the packet arrives at interface 1 of router1 is recorded as 145us.

[0077] Step 505, router1 determines the period value used according to the priority carried by the packet and determines the interface according to the first information carried by the packet.

[0078] In this embodiment, the priority carried by the packet is 2, the period value used is 10us, and the first information is the IP address of host2, so the outgoing interface is interface 3 of router1.

[0079] Step 506, router1 calculates the receiving sub-period label of router1 according to the packet arrival time and the corresponding number of sub-periods.

[0080] In this embodiment, the initial time when router1 starts is set as 0us in advance, so the receiving sub-period label of router1 is: Therefore, in this embodiment, the receiving sub-period label of the packet arriving at the incoming interface is 3.

[0081] Step 507, router1 looks up the forwarding sub-period in the local period mapping table of router1 according to the receiving sub-period label of router1 and the incoming interface and the outgoing interface.

[0082] In this embodiment, the sub-period label is determined to be 3 according to steps 504-506, the incoming interface is interface 1 of router1, and the outgoing interface is interface 3 of router1, so it can be known through the query of table 1 that the forwarding sub-period label is 9.

[0083] Step 508, router1 sends the packet to router2 according to the forwarding sub-period label and the outgoing interface.

[0084] In this embodiment, router1 sends the packet to router2 in the 9th forwarding sub-period through interface 3.

[0085] Step 509, router2 receives the packet sent by routerl and records the time when the packet arrives and the incoming interface used.

[0086] In this embodiment, router2 receives the packet sent by routerl from interface 3 in the 9th sub-period of the period with a period value of 10us, and records the time of reception as 185us and the incoming interface used as interface 1 of router2.

[0087] Step 510, router2 determines the period value used according to the priority carried by the packet and determines the outgoing interface according to the first information carried by the packet.

[0088] In this embodiment, the priority carried by the packet is 2, the period value used is 10us, the first information is the IP address of host2, and the outgoing interface is interface 2 of router2.

[0089] Step 511, router2 calculates the receiving sub-period label of router2 according to the time when the packet arrives and the corresponding number of sub-periods.

[0090] In this embodiment, the initial time when router2 is started is set as 0us in advance, and the receiving sub-period label of router2 is: Therefore, in this embodiment, the receiving period label of the packet arriving at interface 1 of router2 is 3.

[0091] Step 512, router2 looks up the forwarding sub-period in the local period mapping table of router2 according to the receiving sub-period label, the incoming interface, and the outgoing interface.

[0092] In this embodiment, the receiving sub-period label is 7, the incoming interface is interface 1 of router2, and the outgoing interface is interface 2 of router2, which are obtained by performing steps 509-511, and it can be known from the lookup of table 2 that the forwarding sub-period label is 10.

[0093] Step 513, router2 sends the packet to host2 according to the forwarding sub-period label of router2 and the outgoing interface.

[0094] In this embodiment, router2 sends the packet to host2 in the 10th forwarding sub-period through interface 2, for host2 to receive and use the packet.

[0095] Compared with the prior art, the embodiment of the present application can receive the message sent by the upstream device without adding the time period label information of the upstream device, acquire the receiving sub-period label according to the arrival time of the message and the priority in the message for indicating the period value, and finally send the message directly according to the receiving sub-period label and the destination IP address of the interface in the message. Since the message does not carry the time label information of the upstream device, the receiving sub-period of the device is calculated by extracting the priority in the message and the arrival time of the message to replace the time label information of the upstream device, and further, the time label information does not need to be updated according to the change of the upstream device before being forwarded to the downstream device, so that the data transmission can be performed in the asynchronous mode without extending the protocol and modifying the message. Meanwhile, two period values can be generated according to the actual situation, so that the multi-period mapping forwarding can be supported.

[0096] The application scenario of the data transmission method provided by the fifth embodiment of the present application is as shown in Figure 6 As shown in Figure 7 The second information is taken as an example of the six-tuple of the data packet, and specifically includes:

[0097] In step 701, the router 1 and the router 2 set the period generation strategy as acquiring the period value according to the six-tuple of the data packet.

[0098] In step 702, the router 1 and the router 2 acquire two period values and determine the corresponding sub-period number according to the period generation strategy.

[0099] In the embodiment, as shown in Figure 6 There are two forwarding devices, the router 1 and the router 2, and four non-forwarding devices, the host 1, the host 2, the host 3 and the host 4, in the network. The host 1 and the host 3 are connected to the interface 1 and the interface 2 of the router 1 respectively, and the host 2 and the host 4 are connected to the interface 2 and the interface 3 of the router 2 respectively. It is assumed that the host 1 is the source device of the stream stream 1 with the priority of 2, the host 2 is the destination device of the stream stream 1, the message stream 1 sent by the host 1 reaches the host 2 through the router 1 and the router 2. The host 3 is the source sending end of the stream stream 2 with the priority of 3, the host 4 is the destination receiving end of the stream stream 2, the message stream 2 sent by the host 3 reaches the host 4 through the router 1 and the router 2. Therefore, the corresponding period of the stream 1 six-tuple and the stream 2 six-tuple is generated as 20us and 40us respectively, the period number m1 corresponding to the period value 20us is 4, and the period number m2 corresponding to the period value 40us is 2.

[0100] Step 703, router1 and router2 generate local period mapping table according to period value respectively.

[0101] In the embodiment, the generated local period mapping table of router1 and router2 is shown in the following table:

[0102] Table 3 router1 period mapping table

[0103]

[0104] Table 4 router2 period mapping table

[0105]

[0106] Step 704, router1 receives the packet sent by host3 and records the time when the packet arrives and the used incoming interface.

[0107] In the embodiment, the stream2 source packet sent by host3 is received by router1, and the time when the packet arrives at interface2 of router1 is recorded as 1045us.

[0108] Step 705, router1 determines the used period value according to the six-tuple of the packet corresponding to the data packet and determines the interface according to the first information carried by the packet.

[0109] In the embodiment, the six-tuple corresponding to the packet determines that the used period value is 40us, and the first information is the IP address of host4, so the outgoing interface is interface3 of router1.

[0110] Step 706, router1 calculates the receiving sub-period label of router1 according to the packet arrival time and the corresponding sub-period number.

[0111] In the embodiment, the initial time of router1 is set as 1000us in advance, so the receiving sub-period label of router1 is: Therefore, in the embodiment, the receiving period label of the incoming interface of the packet is 3.

[0112] Step 707, router1 looks up the forwarding sub-period in the local period mapping table of router1 according to the receiving sub-period label of router1, the incoming interface and the outgoing interface.

[0113] In the embodiment, according to steps 604-606, it is determined that the local sub-period label is 0, the incoming interface is interface2 of router1, and the outgoing interface is interface3 of router1, so it can be known through the query of table 3 that the forwarding sub-period label is 1.

[0114] Step 708, router1 sends the packet to router2 according to the forwarding sub-period label and the out interface.

[0115] In this embodiment, router1 sends the packet to router2 through interface 3 in the third forwarding sub-period.

[0116] Step 709, router2 receives the packet sent by router1 and records the time when the packet arrives and the in interface used.

[0117] In this embodiment, router2 receives the packet sent by router1 from interface 3 in the third sub-period within the period with the period value of 10us, records the time of receiving as 1125us, and the in interface used is interface 1 of router2.

[0118] Step 710, router2 determines the period value used according to the six-tuple of the data packet corresponding to the packet and determines the out interface according to the first information carried by the packet.

[0119] In this embodiment, the period value used is determined as 40us according to the six-tuple of the data packet corresponding to the packet, and the first information is the IP address of host4, so the out interface is interface 3 of router2.

[0120] Step 711, router2 calculates the receiving sub-period label of router2 according to the time when the packet arrives and the corresponding number of sub-periods.

[0121] In this embodiment, the initial time when router2 starts is set as 1000us in advance, so the receiving sub-period label of router2 is: So in this embodiment, the receiving period label of the packet arriving at the in interface is 0.

[0122] Step 712, router2 looks up the forwarding sub-period in the local period mapping table of router2 according to the receiving sub-period label of router2, the in interface and the out interface.

[0123] In this embodiment, the local sub-period label is determined as 0, the in interface is interface 1 of router2, and the out interface is interface 3 of router2 according to steps 709-711, so it can be known from the query of table 2 that the forwarding sub-period label is 1.

[0124] Step 713, router2 sends the packet to host2 according to the forwarding sub-period label of router2 and the out interface.

[0125] In the embodiment, router2 sends the packet to host4 through the out interface 3 in the first forwarding sub-period, for host4 to receive and use the packet.

[0126] Compared with the prior art, the embodiment of the application can obtain a receiving sub-period label according to the arrival time of the packet and the six-tuple of the data packet for indicating the period value carried in the packet after receiving the packet sent by the upstream device without adding the time period label information of the upstream device, and finally send the packet directly according to the receiving sub-period label and the destination IP address of the out interface carried in the packet. Since the packet does not carry the time label information of the upstream device, only the receiving sub-period of the device is calculated by extracting the priority in the packet and the arrival time of the packet to replace the time label information of the upstream device, and further, the time label information does not need to be updated correspondingly due to the change of the upstream device before forwarding to the downstream device, so that the data transmission can be performed in the asynchronous mode without extending the protocol and modifying the packet. Meanwhile, two period values can be generated according to the actual situation, so that the multi-period mapping forwarding can be supported.

[0127] As shown in Figure 8 The data transmission method provided by the sixth embodiment of the application takes the second information as an example, and includes the following steps:

[0128] In step 801, a packet sent by an upstream device is received, wherein the packet carries first information for indicating an out interface and a flow identification number for indicating a period value.

[0129] In the embodiment, the flow identification number carried in the packet is 3.

[0130] In step 802, the period value used, the number of forwarding sub-periods and the mapping strategy of the local period corresponding to the period value are determined according to the flow identification number.

[0131] In the embodiment, the period value corresponding to the flow identification number 3 obtained by performing step 801 is 25us, the number of forwarding sub-periods is 8, and the local period mapping strategy is y=(x+1)%8, wherein y is a forwarding sub-period label and x is a local sub-period label.

[0132] It should be noted that the local period mapping strategy is a mapping relationship pre-stored in the device, for example, the period mapping formula of the period value 25us and the period number 8 between the ingress interface 1 and the egress interface 2 is y=(x+1)%8, the period mapping formula of the period value 30us and the period number 6 between the ingress interface 1 and the egress interface 3 is y=(x+2)%6, and so on. Only the corresponding specific mapping relationship needs to be further obtained according to the determined period. Of course, the above is only a specific example for illustration, and the mapping strategy of the local period can also include other mapping relationships in actual use, which will not be described one by one here.

[0133] In step 803, the receiving sub-period label is obtained according to the arrival time of the packet and the flow identification number.

[0134] In the embodiment, assuming that the arrival time is 98us, the local sub-period label can be obtained according to the data obtained in the above steps as follows: The local period label of the packet arriving at the ingress interface is 2.

[0135] In step 804, the forwarding sub-period label is obtained according to the receiving sub-period label and the mapping strategy of the local period.

[0136] In the embodiment, the forwarding sub-period label is y=(2+1)%8=3.

[0137] In step 805, the packet is sent according to the forwarding sub-period label and the first information.

[0138] In the embodiment, the packet is sent out through the egress interface indicated by the first information in the third forwarding sub-period.

[0139] Compared with the prior art, on the basis of the first embodiment, since the local period mapping table does not need to be obtained, the data forwarding can be completed by simple calculation, the storage space is saved, and the method is more concise.

[0140] In addition, it should be understood that the division of steps of the above methods is only for clear description, and can be combined into one step or split into multiple steps by splitting some steps, as long as the same logical relationship is included, which is within the protection scope of the patent; adding irrelevant modifications or introducing irrelevant designs in the algorithm or process, but not changing the core design of the algorithm and process, are within the protection scope of the patent.

[0141] The seventh embodiment of the present application relates to an electronic device, such as Figure 9As shown, the apparatus includes at least one processor 901, and a memory 902 connected with the at least one processor 901; the memory 902 stores instructions executable by the at least one processor 901, and the instructions are executed by the at least one processor 901 to enable the at least one processor 901 to perform the data transmission method described in any of the preceding method embodiments.

[0142] The memory 902 and the processor 901 are connected in a bus manner, the bus can include any number of interconnected buses and bridges, and the bus connects various circuits of the one or more processors 901 and the memory 902 together. The bus can also connect various other circuits such as peripheral devices, voltage stabilizers, and power management circuits together, which are well known in the art, and thus, further description is not given herein. The bus interface provides an interface between the bus and the transceiver. The transceiver can be one element or multiple elements such as multiple receivers and transmitters, and provides a unit for communicating with various other devices on a transmission medium. The data processed by the processor 901 is transmitted on a wireless medium through an antenna, and further, the antenna also receives data and transmits the data to the processor 901.

[0143] The processor 901 is responsible for managing the bus and general processing, and can also provide various functions including timing, peripheral interface, voltage regulation, power management, and other control functions. The memory 902 can be used to store data used by the processor 901 in performing operations.

[0144] The eighth embodiment of the present application relates to a computer readable storage medium storing a computer program. The computer program is executed by a processor to implement the method embodiments.

[0145] That is, those skilled in the art can understand that all or part of the steps of the above-mentioned method embodiments can be completed by programs instructing related hardware, the programs are stored in a storage medium, and include a plurality of instructions for causing a device (which can be a single-chip microcomputer, a chip, etc.) or a processor to execute all or part of the steps of the method described in the various embodiments of the present application. The foregoing storage medium includes a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, and various media that can store program codes.

[0146] Those skilled in the art can understand that the above-mentioned embodiments are specific implementation manners of the present application, and in actual applications, various changes can be made in form and details without departing from the spirit and scope of the present application.

Claims

1. A data transmission method, characterized by, The method comprises: receiving a message sent by an upstream device, wherein the message carries first information indicating an interface and second information indicating a period value; determining the period value corresponding to the message according to the second information; calculating a receiving sub-period label according to the period value and the arrival time of the message, wherein the receiving sub-period label indicates the order of a receiving sub-period used for receiving the message in a receiving period, and the receiving period comprises a plurality of receiving sub-periods; sending the message according to the receiving sub-period label and the first information.

2. The data transmission method of claim 1, wherein, Before receiving the message sent by the upstream device, the method further comprises: setting a period generation strategy; obtaining at least one period value according to the period generation strategy; generating and saving a local period mapping table according to the period value.

3. The data transmission method of claim 2, wherein, The sending of the message according to the receiving sub-period label and the first information comprises: recording an incoming interface used when the message arrives; determining an outgoing interface according to the first information; finding a forwarding sub-period label in the local period mapping table according to the receiving sub-period label, the incoming interface and the outgoing interface, wherein the forwarding sub-period label indicates the order of a forwarding sub-period used for forwarding the message in a forwarding period, and the forwarding period comprises a plurality of forwarding sub-periods; sending the message from the outgoing interface in the forwarding sub-period indicated by the forwarding sub-period label.

4. The data transmission method of claim 2, wherein, The period generation strategy is to obtain the period value according to the second information, and the second information is a flow identification number, a six-tuple of a data packet or a priority.

5. The method of claim 1, wherein, The sending of the message according to the receiving sub-period label and the first information comprises: calculating a forwarding sub-period label according to the receiving sub-period label, wherein the forwarding sub-period label indicates the order of a forwarding sub-period used for forwarding the message in a forwarding period, and the forwarding period comprises a plurality of forwarding sub-periods; sending the message from the outgoing interface indicated by the first information in the forwarding sub-period indicated by the forwarding sub-period label.

6. The method of claim 5, wherein, The calculation of the forwarding sub-period label according to the receiving sub-period label is implemented by the following formula: wherein, is a forwarding sub-period label, is the receiving sub-period label, is a predetermined natural number, is the period value, is the number of receiving sub-periods contained in the receiving period determined according to the receiving period, and the percent sign is the modulo symbol.

7. The method of claim 1, wherein, The calculation of the receiving sub-period label according to the period value and the arrival time is implemented by the following formula: wherein, is the receive sub-period tag, is a preset value, is the arrival time, is the period value, is the number of receive sub-periods contained in the receive period determined according to is the receive period, the square brackets in the formula are the integer symbol, and the percent sign is the remainder symbol.

8. An electronic device, comprising: The method comprises: at least one processor; and a memory connected to the at least one processor in communication; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the data transmission method of any one of claims 1 to 7.

9. A computer readable storage medium storing a computer program, characterized in that, The computer program is executed by the processor to implement the data transmission method of any one of claims 1 to 7.

Citation Information

Patent Citations

  • Method for periodic mapping and network device

    WO2020042875A1