Message Forwarding Method, Apparatus, Device, and Storage Medium
By determining different parts of the field processing order between the message forwarding device and the receiving device, and determining the message forwarding time according to the positional relationship, the problem of high message forwarding delay in the prior art is solved, and more efficient message forwarding is achieved.
Patent Information
- Application Number
- CN202111355493.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-16
- Publication Date
- 2025-07-18
- Estimated Expiration
- 2041-11-16
AI Technical Summary
In the prior art, the message forwarding device needs to reorder its multiple fields after receiving the data packet, resulting in high delay and complexity.
By determining the first field of different parts of the field processing order between the message forwarding device and the receiving device, the message forwarding time is determined based on the positional relationship of the field, and the message fields are sent in the order of the receiving device, uniform sorting of all fields is avoided.
The delay in the message forwarding process is reduced and the forwarding efficiency is improved. In particular, the processing efficiency is significantly improved when the processing order of the receiving device is different from the processing order of the forwarding device.
Smart Images

Figure CN116137612B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of communication technologies, and in particular, to a method, apparatus, device, and storage medium for message forwarding. Background Art
[0002] With the continuous development of communication technologies, people's requirements for data transmission efficiency are also getting higher and higher. Store and Forward is one of the most widely used technologies for sending data messages in the field of computer networks.
[0003] However, in the process of a message forwarding device transmitting a data message to a message receiving device in a store-and-forward manner, after receiving the data message, the message forwarding device stores multiple fields of the data message, reorders the multiple fields in the data message according to the field processing order of the receiving device, and then forwards the data message with the multiple fields reordered to the message receiving device. This process will generate a relatively high delay. Summary of the Invention
[0004] This application provides a method, apparatus, device, and storage medium for message forwarding, which is used to reduce the delay during the forwarding process of data messages.
[0005] In a first aspect, this application provides a message forwarding method, which is applied to a message forwarding device. The message forwarding method includes:
[0006] Determine a target field, where the target field is the first field in the different order part between the second field order and the first field order. The first field order is the field processing order of the target message by the message forwarding device, and the second field order is the field processing order of the target message by the message receiving device. The target message includes multiple fields; determine the message forwarding time according to the position of the target field in the first field order and the position of the target field in the second field order; send the multiple fields in the target message to the message receiving device in the second field order according to the message forwarding time, where the multiple fields in the target message are received by the message forwarding device in the first field order.
[0007] Optionally, determining the message forwarding time according to the position of the target field in the first field order and the position of the target field in the second field order includes: determining the position interval between the target field in the first field order and the target field in the second field order according to the position of the target field in the first field order and the position of the target field in the second field order; determining a first duration according to the position interval and the field transmission rate of the message forwarding device; determining the message forwarding time according to the first duration.
[0008] Optionally, determining the message forwarding time according to the first duration includes: determining the variable-length fields in the first field order and the second field order; determining the second duration according to the first field length of the variable-length field in the first field order and the second field length of the variable-length field in the second field order; and determining the message forwarding time according to the first duration and the second duration.
[0009] Optionally, determining the message forwarding time according to the first duration includes: obtaining the message receiving rate and the message forwarding rate of the message forwarding device; determining the third duration according to the message receiving rate, the message forwarding rate, and the length of the target message; and determining the message forwarding time according to the first duration and the third duration.
[0010] Optionally, determining the message forwarding time according to the first duration and the third duration includes: if the message receiving rate is greater than the message forwarding rate, determining the message forwarding time according to the difference between the first duration and the third duration; if the message receiving rate is less than the message forwarding rate, determining the message forwarding time according to the sum of the first duration and the third duration.
[0011] Optionally, determining the target field includes: obtaining the second field order of the message receiving device; if the first field order and the second field order are different, determining the first field of the different field part as the target field.
[0012] Optionally, the message forwarding method further includes: if the first field order and the second field order are the same, sending multiple fields in the target message to the message receiving device according to the second field order.
[0013] In a second aspect, an embodiment of the present application provides a message forwarding device, which is applied to a message forwarding device. The message forwarding device includes:
[0014] A determination module, configured to determine a target field, where the target field is the first field of the different order part in the second field order from the first field order. The first field order is the field processing order of the target message by the message forwarding device, and the second field order is the field processing order of the target message by the message receiving device. The target message includes multiple fields. The message forwarding time is determined according to the position of the target field in the first field order and the position of the target field in the second field order. A sending module, configured to send multiple fields in the target message to the message receiving device according to the message forwarding time and in the second field order. The multiple fields in the target message are received by the message forwarding device in the first field order.
[0015] Optionally, the determining module is specifically configured to: determine the position interval of the target field in the first field order and the second field order according to the position of the target field in the first field order and the position of the target field in the second field order; determine the first duration according to the position interval and the field transmission rate of the packet forwarding device; and determine the packet forwarding time according to the first duration.
[0016] Optionally, the determining module is specifically configured to: determine the variable-length fields in the first field order and the second field order; determine the second duration according to the first field length of the variable-length field in the first field order and the second field length of the variable-length field in the second field order; and determine the packet forwarding time according to the first duration and the second duration.
[0017] Optionally, the determining module is specifically configured to: obtain the packet receiving rate and the packet forwarding rate of the packet forwarding device; determine the third duration according to the packet receiving rate, the packet forwarding rate, and the length of the target packet; and determine the packet forwarding time according to the first duration and the third duration.
[0018] Optionally, the determining module is specifically configured to: if the packet receiving rate is greater than the packet forwarding rate, determine the packet forwarding time according to the difference between the first duration and the third duration; if the packet receiving rate is less than the packet forwarding rate, determine the packet forwarding time according to the sum of the first duration and the third duration.
[0019] Optionally, the determining module is specifically configured to: obtain the second field order of the packet receiving device; if the first field order is different from the second field order, determine the first field of the different field part as the target field.
[0020] Optionally, the sending module is further configured to: if the first field order is the same as the second field order, send multiple fields in the target packet to the packet receiving device according to the second field order.
[0021] In a third aspect, an embodiment of the present application provides a packet forwarding device, and the packet forwarding device includes: a memory for storing a computer program; a transceiver for receiving and sending data under the control of a processor; and a processor for reading the computer program in the memory and performing the following operations: determining a target field, where the target field is the first field of the different order part in the second field order and the first field order, the first field order is the field processing order of the packet forwarding device for the target packet, the second field order is the field processing order of the packet receiving device for the target packet, and the target packet includes multiple fields; determining the packet forwarding time according to the position of the target field in the first field order and the position of the target field in the second field order; and sending multiple fields in the target packet to the packet receiving device according to the second field order according to the packet forwarding time, where the multiple fields in the target packet are received by the packet forwarding device according to the first field order.
[0022] Optionally, determine the message forwarding time according to the position of the target field in the first field order and the position of the target field in the second field order, including: determining the position interval of the target field in the first field order and the second field order according to the position of the target field in the first field order and the position of the target field in the second field order; determining a first duration according to the position interval and the field transmission rate of the message forwarding device; determining the message forwarding time according to the first duration.
[0023] Optionally, determine the message forwarding time according to the first duration, including: determining the variable-length fields in the first field order and the second field order; determining a second duration according to the first field length of the variable-length field in the first field order and the second field length of the variable-length field in the second field order; determining the message forwarding time according to the first duration and the second duration.
[0024] Optionally, determine the message forwarding time according to the first duration, including: obtaining the message receiving rate and the message forwarding rate of the message forwarding device; determining a third duration according to the message receiving rate, the message forwarding rate, and the length of the target message; determining the message forwarding time according to the first duration and the third duration.
[0025] Optionally, determine the message forwarding time according to the first duration and the third duration, including: if the message receiving rate is greater than the message forwarding rate, determining the message forwarding time according to the difference between the first duration and the third duration; if the message receiving rate is less than the message forwarding rate, determining the message forwarding time according to the sum of the first duration and the third duration.
[0026] Optionally, determine the target field, including: obtaining the second field order of the message receiving device; if the first field order and the second field order are different, determining the first field of the different field part as the target field.
[0027] Optionally, the processor is further configured to perform the following operations: if the first field order and the second field order are the same, sending multiple fields in the target message to the message receiving device according to the second field order.
[0028] In a fourth aspect, an embodiment of the present application provides a processor-readable storage medium storing a computer program for causing the processor to execute the message forwarding method of the first aspect.
[0029] In a fifth aspect, an embodiment of the present application provides a computer program product, including: a computer program that, when executed by a processor, implements the message forwarding method as in the first aspect.
[0030] A message forwarding method, apparatus, device, and storage medium provided by this application. The message forwarding method includes: determining a target field, where the target field is the first field in the different order part between the second field order and the first field order. The first field order is the field processing order of the target message by the message forwarding device, and the second field order is the field processing order of the target message by the message receiving device. The target message includes multiple fields; determining the message forwarding time according to the position of the target field in the first field order and the position of the target field in the second field order; and sending multiple fields in the target message to the message receiving device according to the message forwarding time and in accordance with the second field order. In this solution, the target message can be sent to the message receiving device according to the message forwarding time, without the need to sort and send the target message to the message receiving device after receiving all of the target messages, which can greatly improve the message forwarding efficiency and reduce the message transmission delay.
[0031] It should be understood that the content described in the above-mentioned invention content part is not intended to limit the key or important features of the embodiments of this application, nor is it used to limit the scope of this application. Other features of this application will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] In order to more clearly illustrate the technical solutions in this application or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are some embodiments of this application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0033] Figure 1 It is a schematic diagram of the application scenario provided by the embodiments of this application;
[0034] Figure 2 It is a signaling interaction schematic diagram of the message forwarding method provided by the embodiments of this application;
[0035] Figure 3 It is a principle schematic of the message forwarding method provided by the embodiments of this application Figure 1 ;
[0036] Figure 4 It is a flow schematic of the message forwarding method provided by the embodiments of this application Figure 1 ;
[0037] Figure 5 It is a flow schematic of the message forwarding method provided by the embodiments of this application Figure 2 ;
[0038] Figure 6 It is a principle schematic of the message forwarding method provided by the embodiments of this application Figure 2 ;
[0039] Figure 7 Schematic diagram of the principle of the packet forwarding method provided by the embodiment of the present application Figure 3 ;
[0040] Figure 8 Schematic diagram of the principle of the packet forwarding method provided by the embodiment of the present application Figure 4 ;
[0041] Figure 9 Flow schematic diagram of the packet forwarding method provided by the embodiment of the present application Figure 3 ;
[0042] Figure 10 Schematic diagram of the principle of the packet forwarding method provided by the embodiment of the present application Figure 5 ;
[0043] Figure 11 Structure schematic diagram of the packet forwarding device provided by the embodiment of the present application;
[0044] Figure 12 Structure schematic diagram of the packet forwarding device provided by the embodiment of the present application. Detailed implementation manners
[0045] In the present application, the term "and / or" describes the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist simultaneously, and B exists alone. The character " / " generally represents an "or" relationship between the associated objects before and after. In the embodiments of the present application, the term "a plurality of" refers to two or more, and other quantifiers are similar thereto.
[0046] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments of the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.
[0047] For ease of understanding, first, in conjunction with Figure 1 the application scenario of the embodiment of the present application will be described:
[0048] Figure 1 Schematic diagram of the application scenario provided by the embodiment of the present application. As Figure 1 shown, this scenario includes: a packet forwarding device 101 and a packet receiving device 102.
[0049] In some embodiments, the above message forwarding device 101 and message receiving device 102 can be any two network devices in a multi-hop forwarding network. In this network architecture, the message forwarding device 101 receives message fields sent by other network devices and forwards the messages to the message receiving device 102.
[0050] In practical applications, when the message forwarding device 101 forwards a message to the message receiving device 102, it needs to send the message according to the message field processing order of the message receiving device 102. This requires the message forwarding device 101 to store each received message field when it receives the message fields sent by other devices. After receiving all the message fields, these message fields are re-sorted according to the field processing order of the message receiving device 102 and then sent to the message receiving device 102.
[0051] However, this process needs to wait until all the message fields are received before sending, and all the message fields need to be re-sorted. This process is relatively complex and will cause message forwarding delay.
[0052] The inventors found that the field processing orders of the message forwarding device 101 and the message receiving device 102 may only be partially different. Therefore, to solve the above problems, the embodiments of the present application provide a message forwarding method, apparatus, device and storage medium. First, determine the first field in the different parts of the field processing orders of the message forwarding device 101 and the message receiving device 102. Then, based on the positions of this field in the message processing orders of the two devices, determine the message sending time. Finally, according to the message sending time, send the message fields received by the message forwarding device 101 to the message receiving device 102 according to the field processing order of the message receiving device 102.
[0053] In this solution, the message forwarding device 101 can send message fields to the message receiving device 102 according to the message sending time, without waiting until all the message fields are received and then performing unified sorting and forwarding. This enables the message receiving device 102 to receive the fields that need to be processed first earlier, thereby improving the field processing efficiency. At the same time, through this solution, only the message fields in the different parts need to be sorted, which can greatly reduce the message processing time and thus reduce the message forwarding delay.
[0054] In some embodiments, the packet forwarding device 101 and the packet receiving device 102 can be wireless terminals or wired terminals. A wireless terminal can be a device that provides voice and / or other service data connectivity to users, a handheld device with wireless connection capabilities, or other processing devices connected to a wireless modem. The wireless terminal can communicate with one or more core network devices via a Radio Access Network (RAN). The wireless terminal can be a mobile terminal, such as a mobile phone (or "cellular" phone) and a computer with a mobile terminal. For example, it can be a portable, pocket-sized, handheld, computer-integrated, or vehicle-mounted mobile device that exchanges voice and / or data with the wireless access network. For another example, the wireless terminal can also be a Personal Communication Service (PCS) phone, a cordless phone, a Session Initiation Protocol (SIP) phone, a Wireless Local Loop (WLL) station, a Personal Digital Assistant (PDA), and other devices. The wireless terminal can also be referred to as a system, a subscriber unit, a subscriber station, a mobile station, a mobile, a remote station, a remote terminal, an access terminal, a user terminal, a user agent, a user device or user equipment, which is not limited herein. Optionally, the above terminal device can also be a smart watch, a tablet computer, and other devices.
[0055] In some other embodiments, the packet forwarding device 101 and the packet receiving device 102 may also be base stations, specifically, they may be base transceiver stations (BTS) and / or base station controllers in Global System of Mobile communication (GSM) or Code Division Multiple Access (CDMA), or they may be Node B (NB) and / or Radio Network Controller (RNC) in Wideband Code Division Multiple Access (WCDMA), or they may be Evolutional Node B (4G base station or eNodeB) in Long Term Evolution (LTE), or relay stations or access points, or base stations (5G base stations) in future 5G networks, etc. The embodiments of the present application do not limit this here.
[0056] In addition, it should be noted that the above Figure 1 For illustration purposes, other network devices or terminal devices may also be included in the above scenario, such as wireless repeater devices and wireless backhaul devices, etc. (not shown in Figure 1 ), and the packet forwarding device 101 and the packet receiving device 102 in the above scenario are shown by taking one as an example, but this is not a limitation.
[0057] It should be understood that the technical solutions provided in the embodiments of the present application can be applied to multiple systems, especially 5G systems. For example, the applicable systems can be Global System of Mobile Communication (GSM) systems, Code Division Multiple Access (CDMA) systems, Wideband Code Division Multiple Access (WCDMA) General Packet Radio Service (GPRS) systems, Long Term Evolution (LTE) systems, LTE Frequency Division Duplex (FDD) systems, LTE Time Division Duplex (TDD) systems, Long Term Evolution Advanced (LTE-A) systems, Universal Mobile Telecommunication System (UMTS), Worldwide Interoperability for Microwave Access (WiMAX) systems, 5G New Radio (NR) systems, etc. Both terminals and network devices are included in these multiple systems. The core network part is also included in the system, such as the Evolved Packet System (EPS), 5G System (5GS), etc.
[0058] Among them, the communication system applicable to the technical solutions provided in the embodiments of the present application includes a message forwarding device and a message receiving device. It should be understood that the methods and devices provided in the embodiments of the present application are based on the same inventive concept. Since the principles of the methods and devices for solving problems are similar, the implementation of the device and the method can be referred to each other, and the repeated parts will not be described again.
[0059] The technical solutions of the embodiments of the present application and how the technical solutions of the present application solve the above technical problems will be described in detail below with specific embodiments. These several specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments.
[0060] Figure 2 It is a signaling interaction schematic diagram of the message forwarding method provided in the embodiment of the present application. As Figure 2 shown, the message forwarding method provided in the embodiment of the present application specifically includes the following steps:
[0061] S201. Determine the target field.
[0062] Among them, the target field is the first field in the different order part between the second field order and the first field order. The first field order is the field processing order of the target message by the message forwarding device, and the second field order is the field processing order of the target message by the message receiving device. The target message includes multiple fields.
[0063] It should be noted that the type and specific content of the target message are not limited in the embodiments of the present disclosure application. For example, the target message can be the header field of a data message, where the data content in each field is different.
[0064] Figure 3 Schematic diagram of the principle of the message forwarding method provided by the embodiments of the present application Figure 1 . As Figure 3 shown, in the embodiments of the present application, taking the target message as a message including "field 1, field 2, field 3, field 4, field 5, field 6, and field 7" as an example, among them, the field processing order (i.e., the first field order) of the message forwarding device for this target message is "field 1 - field 2 - field 3 - field 4 - field 5 - field 6 - field 7", and the message processing order (i.e., the second field order) of the message receiving device for this target message is "field 1 - field 2 - field 3 - field 6 - field 5 - field 7 - field 4".
[0065] In this example, the different order part between the second field order and the first field order is "field 6 - field 5 - field 7 - field 4", that is to say, the target field is "field 6".
[0066] S202. Determine the message forwarding time according to the position of the target field in the first field order and the position of the target field in the second field order.
[0067] Among them, the message forwarding time is used to indicate the time when the message forwarding device sends the first field to the message receiving device. In some embodiments, since the message forwarding device can only send the fields that the message forwarding device has currently received to the message receiving device, and when a certain field is received, if the forwarding opportunity for this field has not arrived, it will be stored, and when the forwarding opportunity for this field arrives, it will be sent again. Please refer to Figure 3 , since field 6 is the first field in the different order part, if when the message forwarding device receives the target field "field 6", it does not store it but directly sends the target field to the message receiving device, the forwarding efficiency of the target message can be maximally improved. Therefore, it can be determined that the forwarding opportunity for the target field "field 6" is the time when the target field "field 6" is received.
[0068] Further, according to the positions of the target field "Field 6" in the first field order and the second field order, the correspondence between the fields currently received by the packet forwarding device and the fields currently to be sent can be obtained, thereby obtaining the packet forwarding time for sending the target packet.
[0069] Please continue to refer to Figure 3 , the target field "Field 6" is the sixth field in the first field order, and the target field "Field 6" is the fourth field in the second field order. That is to say, when the packet forwarding device receives its required sixth field, it needs to send the fourth field required by the packet receiving device to the packet receiving device.
[0070] From this, it can be obtained that the time for sending the first field "Field 1" required by the packet receiving device to the packet receiving device is the time when the packet forwarding device receives its required third field "Field 3", that is, the packet forwarding time is the time when the packet forwarding device receives "Field 3".
[0071] S203. According to the packet forwarding time, send multiple fields in the target packet to the packet receiving device in accordance with the second field order.
[0072] Among them, the multiple fields in the target packet are received by the packet forwarding device in accordance with the first field order. In this step, when the packet forwarding device receives the field "3", it starts to send the target packet to the packet receiving device in accordance with the first field order. It should be understood that for the fields that have not been sent currently, they can be cached first. Specifically, the correspondence between the fields sent by the packet forwarding device to the packet receiving device and the received fields is as follows:
[0073] Receive Send Field 1 Cache [Field 1], do not send Field 2 Cache [Field 1, Field 2], do not send Field 3 Cache [Field 2, Field 3], send Field 1 Field 4 Cache [Field 3, Field 4], send Field 2 Field 5 Cache [Field 4, Field 5], send Field 3 Field 6 Cache [Field 4, Field 5], send Field 6 Field 7 Cache [Field 4, Field 7], send Field 5 / Cache [Field 4], send Field 7 / Send Field 4
[0074] In the embodiment of the present application, taking the switch of the packet forwarding device as V580 and the switching chip as 8096 as an example, its standard delay is 0.612 us. Taking the actual test of 1518 bytes as an example, the delay situation of the packet forwarding device during the packet forwarding process is as follows:
[0075] Switch Switch chip Standard delay Transmission delay Processing delay V580 8096 0.612 us 1.2 us 0.63 us
[0076] In summary, it can be obtained that the processing delay for each byte is 0.63 / 1518 us = 0.415 ns, and the transmission delay for each byte is: 1.2 / 1518 us = 0.791 ns. Taking the number of bytes included in each field as 1 byte as an example, if the method in the prior art is followed, after all fields of the target message are received, the order of the fields of the target message is re-sorted. During this process, the time t1 for the target message to pass through the message forwarding device is: 0.791 ns * 7 + 0.415 ns * 7. And through the method of the present application, the time t2 for the target message to pass through the message forwarding device is: 0.791 ns * 7. It can be obtained that the yield rate obtained through the solution of the embodiment of the present application is: (t1–t2) / t1 = 34%.
[0077] Compared with the prior art, the present solution does not need to send to the message receiving device after all target messages are received, and only needs to sort the fields in different order parts, rather than sorting all fields in the target message, which can greatly improve the message forwarding efficiency and reduce the message transmission delay.
[0078] Figure 4 Flow schematic of the message forwarding method provided by the embodiment of the present application Figure 1 In Figure 2 Based on the embodiment shown, the embodiment of the present application further elaborates on the solution executed by the message forwarding device. As Figure 4 shown, the message forwarding method provided in the embodiment of the present application specifically includes the following steps:
[0079] S401. Obtain the second field order of the message receiving device.
[0080] S402. If the first field order is the same as the second field order, send multiple fields in the target message to the message receiving device according to the second field order.
[0081] It should be noted that when the first field order is the same as the second field order, the currently received field can be sent to the message receiving device while each field in the target message is received by the message forwarding device. Exemplarily, taking the first field order and the second field order both being "field 1 - field 2 - field 3 - field 4 - field 5 - field 6 - field 7" as an example, the message forwarding device can send the target message to the message receiving device according to the following table:
[0082] Receive Send Field 1 Send Field 1 Field 2 Send Field 2 Field 3 Send Field 3 Field 4 Send Field 4 Field 5 Send Field 5 Field 6 Send Field 6 Field 7 Send Field 7
[0083] Through this solution, when the message processing orders of the message forwarding device and the message receiving device are the same, while the message forwarding device receives a field, it sends the currently received field to the message receiving device, which enables the message receiving device to obtain the field that conforms to its message processing order earlier, thereby improving the processing efficiency of the target message.
[0084] S403. If the first field order is different from the second field order, determine the first field of the different field part as the target field.
[0085] It should be noted that the method for determining the target field is similar to step S201 above. For details, please refer to the above embodiments and will not be elaborated here.
[0086] S404. Determine the position interval of the target field in the first field order and the second field order according to the position of the target field in the first field order and the position of the target field in the second field order.
[0087] Please continue to refer to Figure 3 , in Figure 3 's example, the position of the target field "field 6" in the first field order is the sixth field, and the position of the target field "field 6" in the second field order is the fourth field. That is to say, the positions of the target field in the first field order and the second field order are separated by two fields, that is, the position interval of the target field in the first field order and the second field order is 2. It should be noted that in the embodiments of the present application, the field lengths of each field are the same.
[0088] S405. Determine the first duration according to the position interval and the field transmission rate of the message forwarding device.
[0089] Since the transmission rates of each field are the same, the first duration is the product of the position interval and the field transmission rate. Exemplarily, taking the transmission rate of each field as T, the first duration can be obtained as 2T.
[0090] S406. Determine the message forwarding time according to the first duration.
[0091] Among them, the message forwarding time is used to indicate the time when the message forwarding device sends the first field to the message receiving device. In this step, after obtaining the first duration, the message forwarding time can be determined according to the sum of the time when the message forwarding device receives the first field and the first duration.
[0092] S407. Send multiple fields in the target message to the message receiving device according to the message forwarding time in accordance with the second field order.
[0093] Among them, the multiple fields in the target message are received by the message forwarding device in accordance with the first field order.
[0094] Please continue to refer to Figure 3 , after the packet forwarding device receives "Field 1", it determines the time when "Field 1" is received, and after a duration of 2T from this time, it sends "Field 1" to the packet receiving device, and according to the transmission rate of the fields, in accordance with the second field order, it sends the other fields in the target packet to the packet receiving device.
[0095] Exemplarily, in the embodiments of the present application, the packet forwarding device may send the target packet to the packet receiving device at the time shown in the following table:
[0096] Time Send T Cache [Field 1] 2T Cache [Field 1, Field 2] 3T Cache [Field 2, Field 3], send Field 1 4T Cache [Field 3, Field 4], send Field 2 5T Cache [Field 4, Field 5], send Field 3 6T Cache [Field 4, Field 5], send Field 6 7T Cache [Field 4, Field 7], send Field 5 8T Cache [Field 4], send Field 7 9T Send Field 4
[0097] In some embodiments, there may be variable-length fields in the target packet, where the variable-length field is: in the processing process of the packet forwarding device and the packet receiving device, the same field with different field lengths. Next, in combination with Figure 5 this embodiment will be described.
[0098] Figure 5 is a flowchart of the packet forwarding method provided by the embodiments of the present application Figure 2 . As Figure 5 shown, the packet forwarding method provided in the embodiments of the present application specifically includes the following steps:
[0099] S501. Obtain the target field.
[0100] It should be noted that the packet forwarding method when the first field order and the second field are the same is similar to steps S401 - S402 in the embodiment shown in Figure 4 and will not be elaborated here.
[0101] S502. Determine the position interval of the target field in the first field order and the second field order according to the position of the target field in the first field order and the position of the target field in the second field order.
[0102] S503. Determine the first duration according to the position interval and the field forwarding rate of the packet forwarding device.
[0103] It should be noted that the scheme for determining the first duration in steps S502 - S503 is similar to the scheme of steps S404 - S405 in the embodiment shown in Figure 4 and will not be elaborated here.
[0104] S504. Determine the variable-length fields in the first field order and the second field order.
[0105] S505. Determine a second duration according to the first field length of the variable-length field in the first field order and the second field length of the variable-length field in the second field order.
[0106] S506. Determine the message forwarding time according to the first duration and the second duration.
[0107] Wherein, the second duration is the ratio of the absolute value of the difference between the first field length and the second field length to the field transmission rate.
[0108] Exemplarily, Figure 6 is a schematic diagram of the principle of the message forwarding method provided by the embodiment of the present application Figure 2 . In Figure 6 , taking the variable-length field as "field 4" as an example, and the length of field 4 in the first field order is greater than that in the second field order.
[0109] In the embodiment of the present application, taking the field transmission rate of a single field as V, the length of field 4 in the first field order as L1, and the length of field 4 in the second field order as L2 as an example, the second duration is |L1 - L2| / V.
[0110] In some embodiments, if the first field length is greater than the second field length, the message forwarding time is the sum of the first duration and the second duration, that is, |L1 - L2| / V + 2T. That is, when the message forwarding device receives field 1 for a duration of (|L1 - L2| / V + 2T), it sends field 1 to the message receiving device.
[0111] In other embodiments, if the length of the variable-length field in the first field order is less than that in the second field order, that is, the first field length is less than the second field length, the message forwarding time is the difference between the first duration and the second duration, that is, 2T - |L1 - L2| / V.
[0112] Exemplarily, Figure 7 is a schematic diagram of the principle of the message forwarding method provided by the embodiment of the present application Figure 3 . In Figure 7 , still taking the variable-length field as "field 4" as an example, and the length of field 4 in the first field order is less than that in the second field order. At this time, when the message forwarding device receives field 1 for a duration of (2T - |L1 - L2| / V), it sends field 1 to the message receiving device.
[0113] S507. According to the message forwarding time, send multiple fields in the target message to the message receiving device in the second field order.
[0114] Wherein, the multiple fields in the target message are received by the message forwarding device in the first field order.
[0115] It should be noted that for the case where the length of the first field is less than that of the second field, the message forwarding method is the same as that of Figure 4 the embodiment type shown, which will not be elaborated here.
[0116] When the length of the first field is greater than that of the second field, at the time of "(L1 - L2) / V + 2T" after the message forwarding device receives the first field, the first field is sent to the message receiving device, and other fields are sent to the message receiving device in the order of the second field.
[0117] In some embodiments, when the variable-length field is at the end of the first field order and the second field order, since the length of the variable-length field does not affect the reception of the fields before it, the message forwarding time is still the first duration, that is, at the first duration after the message forwarding device receives the first field, the target message starts to be forwarded to the message receiving device.
[0118] Exemplarily, Figure 8 is the principle schematic of the message forwarding method provided by the embodiment of the present application Figure 4 . As Figure 8 shown, the variable-length field is field 7, and the length of field 7 in the first field order is greater than that in the second field order.
[0119] At this time, the message forwarding time is the first duration, that is, at the first duration after the message forwarding device receives the first field "field 1", the target message starts to be sent to the message receiving device in the order of the second field. When "field 5" is sent, the message forwarding device forwards the received "field 7" according to the variable-length logic as required by "field 7" in the second field order.
[0120] Correspondingly, when the length of the variable-length field in the first field order is less than that in the second field order, the message forwarding method is similar to the solution of the Figure 8 embodiment shown, which will not be elaborated here.
[0121] In the embodiment of the present application, by considering the influence of the variable-length field on the message forwarding time, the accuracy of the message forwarding time can be further improved, the target message can be forwarded more precisely, and the message forwarding delay can be reduced.
[0122] Figure 9 is the process schematic of the message forwarding method provided by the embodiment of the present application Figure 3 . As Figure 9 shown, the message forwarding method provided by the embodiment of the present application specifically includes the following steps:
[0123] S901. Obtain the target field.
[0124] It should be noted that the message forwarding method when the first field order and the second field are the same is the same as that ofFigure 4 Steps S401 - S402 in the illustrated embodiment are similar and will not be elaborated here.
[0125] S902. Determine the position interval of the target field in the first field order and the second field order according to the position of the target field in the first field order and the position of the target field in the second field order.
[0126] S903. Determine the first duration according to the position interval and the field transmission rate of the packet forwarding device.
[0127] It should be noted that the scheme for determining the first duration in steps S902 - S903 is similar to the scheme of steps S404 - S405 in the Figure 4 illustrated embodiment and will not be elaborated here.
[0128] The inventor found that the packet forwarding rate and packet receiving rate of the packet forwarding device may be different, which will also affect the packet sending time. In view of this, in the embodiments of the present application, the packet forwarding time is further obtained by combining the packet forwarding rate and packet receiving rate of the packet forwarding device. Next, this scheme will be described in combination with steps S904 - S907.
[0129] S904. Obtain the packet receiving rate and packet forwarding rate of the packet forwarding device.
[0130] S905. Determine the third duration according to the packet receiving rate, packet forwarding rate, and the length of the target packet.
[0131] In some embodiments, when the packet receiving rate and packet forwarding rate are different, the third duration is the ratio of the length of the target packet to the difference between the packet forwarding rate and the packet receiving rate.
[0132] Exemplarily, taking the length of the target packet as L, the packet receiving rate of the packet forwarding device as V1, and the packet forwarding rate as V2, the third duration is L / |V1 - V2|.
[0133] S906. Determine the packet forwarding time according to the first duration and the third duration.
[0134] S907. Send multiple fields in the target packet to the packet receiving device according to the packet forwarding time in the second field order.
[0135] Among them, multiple fields in the target packet are received by the packet forwarding device in the first field order.
[0136] Among them, the packet forwarding time includes the following two cases:
[0137] (1) If the message reception rate is greater than the message forwarding rate, determine the message forwarding time according to the difference between the first duration and the third duration.
[0138] Exemplarily, when V1 > V2, the message forwarding time is: 2T - L / |V1 - V2|.
[0139] That is to say, starting from when the message forwarding device receives the first field, after a duration of 2T - L / |V1 - V2|, the first field is sent to the message reception device.
[0140] (2) If the message reception rate is less than the message forwarding rate, determine the message forwarding time according to the sum of the first duration and the third duration.
[0141] Exemplarily, when V1 < V2, the message forwarding time is: 2T + L / |V1 - V2|.
[0142] That is to say, starting from when the message forwarding device receives the first field, after a duration of 2T + L / |V1 - V2|, the first field is sent to the message reception device immediately.
[0143] In the embodiments of the present application, by considering the influence of the message reception rate and the message forwarding rate of the message forwarding device on the message forwarding time, the accuracy of the message forwarding time can be further improved, the target message can be forwarded more precisely, and the message forwarding delay can be reduced.
[0144] It should be understood that the above message forwarding device and message reception device are functionally divided. In actual applications, the message reception device can also execute the functions of the message forwarding device in the above solution to forward the message to the next-hop device of this device. Correspondingly, the message forwarding device can also implement the functions of the message reception device to receive the message forwarded by the previous-hop device of this device.
[0145] In some embodiments, there may also be a situation where there are fields with the same order in the different order parts of the first field order and the second field order. In the embodiments of the present application, these fields with the same order can be regarded as a field group, and then this field group is received, cached, and forwarded.
[0146] Figure 10 Schematic diagram of the principle of the message forwarding method provided by the embodiments of the present application Figure 5 . In Figure 10 , taking the first field order as "field 7 - field 1 - field 3 - field 4 - field 6 - field 2 - field 5" and the second field order as "field 6 - field 7 - field 3 - field 4 - field 5 - field 1 - field 2" as an example.
[0147] In Figure 10In the two field orders shown, the different order part of the second field order compared to the first field order is the second field order. However, in this different order part, the order of "Field 3" and "Field 4" is the same as their order in the first field order.
[0148] At this time, "Field 3" and "Field 4" are regarded as a whole. That is, when the packet forwarding device receives "Field 3" and completes the forwarding, it directly forwards "Field 4" to the packet receiving device. During this process, there is no need to determine the field after "Field 3", which can further improve the field forwarding efficiency.
[0149] In some embodiments, the same packet forwarding device may be connected to different packet receiving devices to send target packets to these packet receiving devices. When the packet processing orders of these packet receiving devices are different, the packet forwarding device can, according to the packet processing orders of different packet receiving devices, respectively Figures 2 to 10 forward packets according to the solutions of the embodiments shown. The specific sending methods are not elaborated here.
[0150] It should be understood that although the steps in the flowcharts in the above embodiments are shown in sequence according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless there is a clear description in this article, the execution of these steps has no strict order limit, and they can be executed in other orders. Moreover, at least a part of the steps in the figure may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same moment, but can be executed at different moments. Their execution order is not necessarily sequential, but can be executed alternately or in turn with at least a part of other steps or sub-steps or stages of other steps.
[0151] An embodiment of the present application provides a packet forwarding device, which is applied to a packet forwarding device. Figure 11 It is a schematic structural diagram of a packet forwarding device provided by an embodiment of the present application. As Figure 11 shown, the packet forwarding device 1100 includes:
[0152] A determination module 1101, configured to determine a target field. The target field is the first field in the different order part of the second field order compared to the first field order. The first field order is the field processing order of the target packet by the packet forwarding device, and the second field order is the field processing order of the target packet by the packet receiving device. The target packet includes multiple fields. According to the position of the target field in the first field order and the position of the target field in the second field order, determine the packet forwarding time;
[0153] A sending module 1102, configured to send multiple fields in a target packet to a packet receiving device according to a packet forwarding time and in a second field order, where the multiple fields in the target packet are received by a packet forwarding device in a first field order.
[0154] Optionally, the determining module 1101 is specifically configured to: determine a position interval of a target field in the first field order and the second field order according to the position of the target field in the first field order and the position of the target field in the second field order; determine a first duration according to the position interval and the field transmission rate of the packet forwarding device; and determine the packet forwarding time according to the first duration.
[0155] Optionally, the determining module 1101 is specifically configured to: determine variable-length fields in the first field order and the second field order; determine a second duration according to a first field length of a variable-length field in the first field order and a second field length of the variable-length field in the second field order; and determine the packet forwarding time according to the first duration and the second duration.
[0156] Optionally, the determining module 1101 is specifically configured to: obtain a packet receiving rate and a packet forwarding rate of the packet forwarding device; determine a third duration according to the packet receiving rate, the packet forwarding rate, and the length of the target packet; and determine the packet forwarding time according to the first duration and the third duration.
[0157] Optionally, the determining module 1101 is specifically configured to, if the packet receiving rate is greater than the packet forwarding rate, determine the packet forwarding time according to a difference between the first duration and the third duration; if the packet receiving rate is less than the packet forwarding rate, determine the packet forwarding time according to a sum of the first duration and the third duration.
[0158] Optionally, the determining module 1101 is specifically configured to: obtain the second field order of the packet receiving device; and if the first field order is different from the second field order, determine the first field of the different field part as the target field.
[0159] Optionally, the sending module 1102 is further configured to: if the first field order is the same as the second field order, send multiple fields in the target packet to the packet receiving device according to the second field order.
[0160] Optionally, the sending module 1102 is specifically configured to: send multiple fields in the target packet to the packet receiving device according to a packet forwarding time and in a second field order, where the multiple fields in the target packet are received by a packet forwarding device in a first field order.
[0161] It should be noted here that the above message forwarding device provided by this application can implement all the method steps in the above method embodiments and can achieve the same technical effects. Therefore, the same parts and beneficial effects as those in the method embodiments will not be specifically described herein.
[0162] Figure 12 This is a schematic structural diagram of a user equipment provided by an embodiment of this application. As Figure 12 shown, the user equipment includes: a transceiver 1201, a processor 1202, and a memory 1203.
[0163] The transceiver 1201 is configured to receive and send data under the control of the processor 1202. Among them, in Figure 12 it, the bus architecture may include any number of interconnected buses and bridges, specifically various circuits of one or more processors represented by the processor 1202 and the memory represented by the memory 1203 are linked together. The bus architecture can also link various other circuits such as peripheral devices, voltage regulators, and power management circuits, which are well known in the art. Therefore, they will not be further described herein. The bus interface provides an interface. The transceiver 1201 may be multiple elements, that is, including a transmitter and a receiver, and provides a unit for communicating with various other devices on a transmission medium, and these transmission mediums include wireless channels, wired channels, optical fiber cables, etc. The processor 1202 is responsible for managing the bus architecture and general processing, and the memory 1203 may store data used by the processor 1202 when executing operations.
[0164] The processor 1202 is responsible for managing the bus architecture and general processing, and the memory 1203 may store data used by the processor 1202 when executing operations.
[0165] Optionally, the processor 1202 may be a central processing unit (CPU), an application specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or a complex programmable logic device (CPLD), and the processor may also adopt a multi-core architecture.
[0166] The processor 1202 is configured to execute any method related to the terminal device provided by an embodiment of this application by calling a computer program stored in the memory 1203, and the processor and the memory may also be physically separated.
[0167] Specifically, the processor 1202 is configured to read a computer program in the memory and perform the following operations: determine a target field, where the target field is the first field in the different order part of the second field order from the first field order, the first field order is the field processing order of the target message by the message forwarding device, the second field order is the field processing order of the target message by the message receiving device, and the target message includes multiple fields; determine the message forwarding time according to the position of the target field in the first field order and the position of the target field in the second field order; and send multiple fields in the target message to the message receiving device in accordance with the second field order according to the message forwarding time, where the multiple fields in the target message are received by the message forwarding device in accordance with the first field order.
[0168] Optionally, determining the message forwarding time according to the position of the target field in the first field order and the position of the target field in the second field order includes: determining the position interval of the target field in the first field order and the second field order according to the position of the target field in the first field order and the position of the target field in the second field order; determining a first duration according to the position interval and the field transmission rate of the message forwarding device; and determining the message forwarding time according to the first duration.
[0169] Optionally, determining the message forwarding time according to the first duration includes: determining variable-length fields in the first field order and the second field order; determining a second duration according to the first field length of the variable-length field in the first field order and the second field length of the variable-length field in the second field order; and determining the message forwarding time according to the first duration and the second duration.
[0170] Optionally, determining the message forwarding time according to the first duration includes: obtaining the message receiving rate and the message forwarding rate of the message forwarding device; determining a third duration according to the message receiving rate, the message forwarding rate, and the length of the target message; and determining the message forwarding time according to the first duration and the third duration.
[0171] Optionally, determining the message forwarding time according to the first duration and the third duration includes: if the message receiving rate is greater than the message forwarding rate, determining the message forwarding time according to the difference between the first duration and the third duration; if the message receiving rate is less than the message forwarding rate, determining the message forwarding time according to the sum of the first duration and the third duration.
[0172] Optionally, determining the target field includes: obtaining the second field order of the message receiving device; and if the first field order and the second field order are different, determining the first field in the different field part as the target field.
[0173] Optionally, the processor 1202 is further configured to perform the following operations: If the first field order is the same as the second field order, send multiple fields in the target message to the message receiving device according to the second field order.
[0174] Optionally, according to the message forwarding time, send multiple fields in the target message to the message receiving device, including: according to the message forwarding time, send multiple fields in the target message to the message receiving device in the second field order, where the multiple fields in the target message are received by the message forwarding device in the first field order.
[0175] It should be noted here that the above-mentioned message forwarding device provided by the present application can implement all the method steps corresponding to the message forwarding device in the above method embodiment, and can achieve the same technical effect. The same parts and beneficial effects as those in the method embodiment will not be specifically described in this embodiment.
[0176] It should be noted that the division of units in the embodiments of the present application is illustrative, only a logical function division, and there may be other division methods in actual implementation. In addition, in each embodiment of the present application, the functional units can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit. The above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
[0177] If the above integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a processor-readable storage medium. Based on such an understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor to execute all or part of the steps of the methods in the various embodiments of the present application. The foregoing storage medium includes: various media such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disc that can store program codes.
[0178] An embodiment of the present application provides a processor-readable storage medium. The processor-readable storage medium stores a computer program, and the computer program is used to cause a processor to execute the message forwarding method provided by the embodiment of the present application, so that the processor can implement all the method steps implemented by the message forwarding device in the above method embodiment, and can achieve the same technical effect. The same parts and beneficial effects as those in the method embodiment in this embodiment will not be specifically described herein again.
[0179] Among them, the processor-readable storage medium can be any available medium or data storage device that the processor can access, including but not limited to magnetic memories (such as floppy disks, hard disks, magnetic tapes, magneto-optical disks (MO), etc.), optical memories (such as CDs, DVDs, BDs, HVDs, etc.), and semiconductor memories (such as ROM, EPROM, EEPROM, non-volatile memories (NANDFLASH), solid state drives (SSD)).
[0180] An embodiment of the present application further provides a computer program product containing instructions. The computer program is stored in a storage medium. At least one processor can read the computer program from the storage medium. When at least one processor executes the computer program, it can implement all the method steps implemented by the message forwarding device in the above method embodiment, and can achieve the same technical effect. The same parts and beneficial effects as those in the method embodiment in this embodiment will not be specifically described herein again.
[0181] An embodiment of the present application further provides a communication system, including a message forwarding device and a message receiving device. Among them, the message forwarding device can execute all the steps in the above embodiment of the message forwarding method, and can achieve the same technical effect. The same parts and beneficial effects as those in the method embodiment in this embodiment will not be specifically described herein again.
[0182] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk memories and optical memories, etc.) containing computer-usable program code.
[0183] This application is described with reference to the signaling interaction schematic diagrams and / or block diagrams of methods, apparatuses, and computer program products according to embodiments of the present application. It should be understood that each process and / or block in the signaling interaction schematic diagrams and / or block diagrams, and the combination of processes and / or blocks in the signaling interaction schematic diagrams and / or block diagrams, can be implemented by computer-executable instructions. These computer-executable instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, such that the instructions executed by the processor of the computer or other programmable data processing devices generate a device for implementing the functions specified in one process or multiple processes and / or blocks Figure 1 in the signaling interaction schematic diagrams Figure 1 or multiple processes and / or blocks, or in one block or multiple blocks
[0184] These processor-executable instructions can also be stored in a processor-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, such that the instructions stored in the processor-readable memory generate a manufactured article including an instruction device that implements the functions specified in one process or multiple processes and / or blocks Figure 1 in the signaling interaction schematic diagrams Figure 1 or multiple processes and / or blocks, or in one block or multiple blocks
[0185] These processor-executable instructions can also be loaded onto a computer or other programmable data processing device, such that a series of operation steps are executed on the computer or other programmable device to generate a computer-implemented process, and thus the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one process or multiple processes and / or blocks Figure 1 in the signaling interaction schematic diagrams Figure 1 or multiple processes and / or blocks, or in one block or multiple blocks
[0186] Obviously, those skilled in the art can make various changes and modifications to this application without departing from the spirit and scope of this application. Thus, if these modifications and variations of this application fall within the scope of the claims of this application and their equivalent technologies, this application is also intended to include these changes and modifications
Claims
1. A message forwarding method, characterized in that, Applied to a packet forwarding device, the packet forwarding method includes: Determine a target field, where the target field is the first field in the different order part between the second field order and the first field order. The first field order is the field processing order of the target packet by the packet forwarding device, the second field order is the field processing order of the target packet by the packet receiving device, and the target packet includes multiple fields; Determine the packet forwarding time according to the position of the target field in the first field order and the position of the target field in the second field order; According to the packet forwarding time, send the multiple fields in the target packet to the packet receiving device in accordance with the second field order, where the multiple fields in the target packet are received by the packet forwarding device in accordance with the first field order.
2. The message forwarding method according to claim 1, wherein The step of determining the packet forwarding time according to the position of the target field in the first field order and the position of the target field in the second field order includes: Determine the position interval of the target field in the first field order and the second field order according to the position of the target field in the first field order and the position of the target field in the second field order; Determine a first duration according to the position interval and the field transmission rate of the packet forwarding device; Determine the packet forwarding time according to the first duration.
3. The message forwarding method according to claim 2, wherein The step of determining the packet forwarding time according to the first duration includes: Determine the variable-length fields in the first field order and the second field order; Determine a second duration according to the first field length of the variable-length field in the first field order and the second field length of the variable-length field in the second field order; Determine the packet forwarding time according to the first duration and the second duration.
4. The message forwarding method according to claim 2, wherein The step of determining the packet forwarding time according to the first duration includes: Obtain the packet receiving rate and the packet forwarding rate of the packet forwarding device; Determine a third duration according to the packet receiving rate, the packet forwarding rate, and the length of the target packet; Determine the packet forwarding time according to the first duration and the third duration.
5. The message forwarding method according to claim 4, wherein The step of determining the packet forwarding time according to the first duration and the third duration includes: If the packet receiving rate is greater than the packet forwarding rate, determine the packet forwarding time according to the difference between the first duration and the third duration; If the packet receiving rate is less than the packet forwarding rate, determine the packet forwarding time according to the sum of the first duration and the third duration.
6. The packet forwarding method according to any one of claims 1-5, characterized in that, The step of determining the target field includes: Obtain the second field order of the packet receiving device; If the first field order is different from the second field order, determine the first field in the different field part as the target field.
7. The message forwarding method according to claim 6, wherein It further includes: If the first field order is the same as the second field order, send the multiple fields in the target packet to the packet receiving device according to the second field order.
8. A message forwarding device, characterized in that, Applied to a packet forwarding device, the packet forwarding device includes: A determining module, configured to determine a target field, where the target field is the first field in the different order part between the second field order and the first field order, the first field order is the field processing order of a target message by a message forwarding device, the second field order is the field processing order of the target message by a message receiving device, the target message includes multiple fields, and determine a message forwarding time according to the position of the target field in the first field order and the position of the target field in the second field order; A sending module, configured to send the multiple fields in the target message to the message receiving device according to the message forwarding time and in accordance with the second field order, where the multiple fields in the target message are received by the message forwarding device in accordance with the first field order.
9. A packet forwarding device, characterized in that, It includes: A memory, configured to store a computer program; A transceiver, configured to send and receive data under the control of a processor; A processor, configured to read the computer program in the memory and perform the following operations: Determine a target field, where the target field is the first field in the different order part between the second field order and the first field order, the first field order is the field processing order of a target message by a message forwarding device, the second field order is the field processing order of the target message by a message receiving device, and the target message includes multiple fields; Determine a message forwarding time according to the position of the target field in the first field order and the position of the target field in the second field order; Send the multiple fields in the target message to the message receiving device according to the message forwarding time and in accordance with the second field order, where the multiple fields in the target message are received by the message forwarding device in accordance with the first field order.
10. The message forwarding device according to claim 9, characterized in that, The determining the message forwarding time according to the position of the target field in the first field order and the position of the target field in the second field order includes: Determine a position interval of the target field in the first field order and the second field order according to the position of the target field in the first field order and the position of the target field in the second field order; Determine a first duration according to the position interval and the field transmission rate of the message forwarding device; Determine the message forwarding time according to the first duration.
11. The message forwarding device according to claim 10, wherein The determining the message forwarding time according to the first duration includes: Determine variable-length fields in the first field order and the second field order; Determine a second duration according to a first field length of the variable-length field in the first field order and a second field length of the variable-length field in the second field order; Determine the message forwarding time according to the first duration and the second duration.
12. The message forwarding device according to claim 10, characterized in that, The determining the message forwarding time according to the first duration includes: Obtain a message receiving rate and a message forwarding rate of the message forwarding device; Determine a third duration according to the message receiving rate, the message forwarding rate, and the length of the target message; Determine the message forwarding time according to the first duration and the third duration.
13. The message forwarding device according to claim 12, wherein Determining the packet forwarding time according to the first duration and the third duration includes: If the packet reception rate is greater than the packet forwarding rate, determining the packet forwarding time according to the difference between the first duration and the third duration; If the packet reception rate is less than the packet forwarding rate, determining the packet forwarding time according to the sum of the first duration and the third duration.
14. The message forwarding device according to any one of claims 9-13, characterized in that, Determining the target field includes: Obtaining the second field order of the packet receiving device; If the first field order is different from the second field order, determining the first field of the different field part as the target field.
15. The message forwarding device according to claim 14, wherein The processor is further configured to perform the following operations: If the first field order is the same as the second field order, sending multiple fields in the target packet to the packet receiving device according to the second field order.
16. A processor-readable storage medium, characterized in that, The processor-readable storage medium stores a computer program, and the computer program is used to cause the processor to execute the packet forwarding method according to any one of claims 1-7.
17. A computer program product, characterized in that, Including: A computer program, which when executed by a processor implements the packet forwarding method according to any one of claims 1-7.
Citation Information
Patent Citations
Bus data transmission method and device, electronic equipment and storage medium
CN110048865A
Method and device for improving time delay determinacy
CN110876159A