Message processing method and device, equipment, storage medium and vehicle
By querying the MTU information table and sharding according to the maximum link, the problem of packets being sharded multiple times in forwarding of different nodes is solved, processing and transmission efficiency is improved, and system resource occupation is reduced.
Patent Information
- Application Number
- CN202310524562.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-10
- Publication Date
- 2024-11-12
AI Technical Summary
In the prior art, due to different MTUs in the forwarding process of different nodes, multiple shards are caused, which affects the forwarding efficiency, increases system resource occupation and processing delay, and reduces transmission efficiency.
By obtaining the source IP address and destination IP address of the target message, query the MTU information table to obtain the maximum link MTU, and shard the link maximum MTU when the message length is greater than the MTU, reducing the number of shards and optimizing the report Text transmission.
Improve message processing efficiency, reduce system resource usage, and improve transmission efficiency. By reducing the number of shards and the number of sub-messages, it directly transmits sub-messages that do not need to be sharded.
Smart Images

Figure CN118945160A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of communication technology, and in particular, relates to a message processing method, device, equipment, storage medium and vehicle. Background Art
[0002] In the communication process of the existing network, the message needs to pass through different nodes from the source Internet Protocol (IP) address to the destination IP address. If the maximum transmission unit (MTU) of different nodes on the entire path is different, the same message may be fragmented multiple times during the forwarding process of different nodes, which seriously affects the forwarding efficiency. In addition, since each fragment needs to occupy the processor resources of the node and an additional IP message header needs to be added, the effective load is reduced. Furthermore, when the message is reassembled, the large number of fragments will increase the system processing burden and the message processing delay.
[0003] For ease of understanding, a specific example is given. The method for processing a message in the prior art may be as follows.
[0004] like Figure 1 As shown, the MTU of node 11 is 2000, the MTU of node 12 is 1600, the MTU of node 13 is 1500, and the MTU of node 14 is 1800. In this way, when a message is transmitted from node 11 to node 14, if the message length is greater than 2000, the message will be fragmented into 2000 pieces at node 11. When a message with a message length of 2000 arrives at node 12, since the local MTU of node 12 is 1600, it is necessary to fragment the message with a message length of 2000 into two messages with a length of 1600 and 400. Similarly, at node 13, the message with a message length of 1600 needs to be fragmented again. In this way, in the prior art, a message needs to be fragmented multiple times when passing through different nodes, and each fragment needs to occupy the processor resources of the node. At the same time, each fragment needs to add an additional IP message header, resulting in a reduction in effective load. In addition, when node 14 performs message reassembly, the increase in the number of fragments increases the processing burden of the system and the processing delay of the message.
[0005] In summary, the message processing efficiency in the prior art is low, and the system resources occupied by message processing are relatively large, which in turn leads to low message transmission efficiency. Summary of the invention
[0006] The embodiments of the present application provide a message processing method, apparatus, device, storage medium and vehicle, which can improve the message processing efficiency, reduce the system resources occupied by the message, and improve the message transmission efficiency.
[0007] In a first aspect, an embodiment of the present application provides a message processing method, the method comprising:
[0008] Obtain the target source IP address and target destination IP address corresponding to the target message;
[0009] Querying an MTU information table, the MTU information table including a plurality of information entries, the information entries including a correspondence between a source IP address, a destination IP address, and a link maximum MTU, the link maximum MTU being a maximum MTU that a message can pass through when transmitted from the source IP address to the destination IP address;
[0010] In a case where there is a first information entry corresponding to the target destination IP address in the MTU information table, obtaining a target link maximum MTU from the first information entry;
[0011] When the message length corresponding to the target message is greater than the maximum MTU of the target link, fragment the target message according to the maximum MTU of the target link to obtain multiple sub-messages;
[0012] Send the multiple sub-messages to the target destination IP address.
[0013] In a possible implementation manner, after querying the MTU information table, the method further includes:
[0014] If the target destination IP address does not exist in the MTU information table, create a second information entry corresponding to the target destination IP address in the MTU information table;
[0015] Add the target source IP address and the preset MTU to the second information entry;
[0016] Detecting the maximum MTU of the first link between the target source IP address and the target destination IP address based on the preset MTU;
[0017] The maximum MTU of the first link is determined as the maximum MTU that a message can pass through when transmitted from the target source IP address to the target destination IP address.
[0018] In a possible implementation manner, after adding the target source IP address and the preset MTU to the second information entry, the method further includes:
[0019] A use status identifier indicating that the second information item is in use and an information addition identifier indicating that the second information item is automatically added by the system are added to the second information item.
[0020] In a possible implementation manner, the information entry further includes a usage status identifier, and after obtaining the maximum MTU of the target link from the first information entry, the method further includes:
[0021] The use status identifier in the first information entry is updated to an identifier indicating that the first information entry is being used.
[0022] In a possible implementation manner, before querying the MTU information table, the method further includes:
[0023] Monitoring a target parameter, wherein the target parameter includes any one of time and system parameters;
[0024] In the case where the target parameter satisfies a preset condition, detecting the maximum MTU of the second link between the first source IP address and the first destination IP address, wherein the target parameter satisfies the preset condition including any one of the time reaching the preset time and the system parameter being lower than a preset threshold, the first source IP address is any one of the multiple source IP addresses, and the first destination IP address is a destination IP address corresponding to the first source IP address among the multiple destination IP addresses;
[0025] The link maximum MTU corresponding to both the first source IP address and the first destination IP address in the MTU information table is replaced with the second link maximum MTU.
[0026] In a possible implementation, the information entry further includes an information addition identifier, and the detecting the maximum MTU of the second link between the first source IP address and the first destination IP address when the target parameter satisfies a preset condition includes:
[0027] When the target parameter satisfies a preset condition, obtaining a third information entry corresponding to the first destination IP address;
[0028] When the information addition flag in the third information entry indicates that the third information entry is automatically added by the system, the maximum MTU of the second link between the first source IP address and the first destination IP address is detected.
[0029] In a possible implementation manner, before querying the MTU information table, the method further includes:
[0030] When the information entry is not used within a preset time period, the information entry is deleted from the MTU information table.
[0031] In a possible implementation manner, the information entry further includes a use status flag and an information addition flag, and when the information entry is not used within a preset time period, deleting the information entry from the MTU information table includes:
[0032] When the information entry has not been used within a preset time period, obtaining a use status flag and an information addition flag in the information entry;
[0033] When the use status flag indicates that the information entry is in use, and the information addition flag indicates that the information entry is automatically added by the system, converting the use status flag into a flag indicating that the information entry has not been used within a preset time period;
[0034] When the use status flag indicates that the information entry has not been used within a preset time period, and the information addition flag indicates that the information entry is automatically added by the system, the information entry is deleted from the MTU information table.
[0035] In a possible implementation manner, the information entry further includes an information addition identifier, and the method further includes:
[0036] When the first identifier conversion command is obtained, the information adding identifier is converted from automatically added by the representation system to manually added by the representation user;
[0037] When the second identifier conversion command is obtained, the information adding identifier is converted from the identifier representing manual addition by the user to the identifier representing automatic addition by the system.
[0038] In a second aspect, an embodiment of the present application provides a message processing device, the device comprising:
[0039] A first acquisition module is used to acquire a target source IP address and a target destination IP address corresponding to a target message;
[0040] A query module, used to query an MTU information table, wherein the MTU information table includes multiple information entries, wherein the information entries include a correspondence between a source IP address, a destination IP address, and a link maximum MTU, wherein the link maximum MTU is a maximum MTU that a message can pass through when transmitted from the source IP address to the destination IP address;
[0041] A second acquisition module, configured to acquire a target link maximum MTU from a first information entry corresponding to the target destination IP address when there is a first information entry in the MTU information table;
[0042] A fragmentation module, used for fragmenting the target message according to the maximum MTU of the target link to obtain multiple sub-messages when the message length corresponding to the target message is greater than the maximum MTU of the target link;
[0043] A sending module is used to send the multiple sub-messages to the target destination IP address.
[0044] In a third aspect, an embodiment of the present application provides an electronic device, the electronic device comprising: a processor and a memory storing computer program instructions;
[0045] When the processor executes the computer program instructions, the processor implements any possible implementation method of the first aspect described above.
[0046] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having computer program instructions stored thereon, which, when executed by a processor, implements a method in any possible implementation method of the first aspect described above.
[0047] In a fifth aspect, an embodiment of the present application provides a vehicle, the vehicle comprising at least one of the following:
[0048] A message processing device as in any one of the embodiments of the second aspect;
[0049] An electronic device as in any one of the embodiments of the third aspect;
[0050] A computer-readable storage medium as in any embodiment of the fourth aspect.
[0051] In the message processing method, device, equipment, storage medium and vehicle of the embodiment of the present application, since the maximum MTU of the link is the maximum MTU that the message can pass through when it is transmitted from the source IP address to the destination IP address, as long as the message length is not greater than the maximum MTU of the link, the message can be transmitted from the source IP address to the destination IP address without fragmentation. In addition, since the MTU information table includes multiple information entries, the information entry includes the corresponding relationship between the source IP address, the destination IP address and the maximum MTU of the link, therefore, by querying the MTU information table, when there is a target source IP address and its corresponding target destination IP address in the MTU information table, the target link maximum MTU is obtained from the first information entry corresponding to the target destination IP address, and when the message length corresponding to the target message is greater than the maximum MTU of the target link, the target message is fragmented according to the maximum MTU of the target link to obtain multiple sub-messages, so that the target message only needs to be fragmented once to obtain multiple sub-messages whose message lengths are not greater than the maximum MTU of the target link, which can improve the processing efficiency of the message. Since the target message is fragmented according to the maximum MTU of the target link, the number of sub-messages can be reduced, and the system resources occupied by the message can be reduced. Since the lengths of the multiple sub-messages are not greater than the maximum MTU of the target link, by sending multiple sub-messages to the target destination IP address, the multiple sub-messages can be directly transmitted to the target destination IP address without fragmentation, thereby improving the transmission efficiency of the message. In this way, through the embodiments of the present application, the processing efficiency of the message can be improved, the system resources occupied by the message can be reduced, and the transmission efficiency of the message can be improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] In order to more clearly illustrate the technical solution of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0053] Figure 1 It is a schematic diagram of a message forwarding node provided in an embodiment of the present application;
[0054] Figure 2 It is a flowchart of a message processing method provided in an embodiment of the present application;
[0055] Figure 3 This is a flow chart of an MTU detection service provided by an embodiment of the present application;
[0056] Figure 4 This is a flow chart of another MTU detection service provided by an embodiment of the present application;
[0057] Figure 5It is a flowchart of another message processing method provided in an embodiment of the present application;
[0058] Figure 6 It is a structural schematic diagram of a message processing device provided in an embodiment of the present application;
[0059] Figure 7 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0060] In order to more clearly understand the above-mentioned purposes, features and advantages of the present application, the scheme of the present application will be further described below. It should be noted that the embodiments of the present application and the features in the embodiments can be combined with each other without conflict.
[0061] In the following description, many specific details are set forth to facilitate a full understanding of the present application, but the present application may also be implemented in other ways different from those described herein; obviously, the embodiments in the specification are only part of the embodiments of the present application, rather than all of the embodiments.
[0062] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the term "comprises" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0063] As described in the background technology section, in order to solve the problems of the prior art, the embodiments of the present application provide a message processing method, apparatus, device, storage medium and vehicle.
[0064] The following first introduces the message processing method provided in the embodiment of the present application.
[0065] Figure 2 FIG. 1 is a flow chart of a message processing method provided by an embodiment of the present application. Figure 2 As shown, the message processing method provided in the embodiment of the present application includes the following steps:
[0066] S210, obtaining a target source IP address and a target destination IP address corresponding to the target message;
[0067] S220, querying the MTU information table, the MTU information table includes multiple information entries, the information entries include the correspondence between the source IP address, the destination IP address and the maximum MTU of the link, the maximum MTU of the link is the maximum MTU that a message can pass through when it is transmitted from the source IP address to the destination IP address;
[0068] S230, when there is a first information entry corresponding to the target destination IP address in the MTU information table, obtain the target link maximum MTU from the first information entry;
[0069] S240, when the message length corresponding to the target message is greater than the maximum MTU of the target link, fragment the target message according to the maximum MTU of the target link to obtain multiple sub-messages;
[0070] S250: Send multiple sub-messages to the target destination IP address.
[0071] In the message processing method of the embodiment of the present application, since the maximum MTU of the link is the maximum MTU that the message can pass through when it is transmitted from the source IP address to the destination IP address, as long as the message length is not greater than the maximum MTU of the link, the message can be transmitted from the source IP address to the destination IP address without fragmentation. In addition, since the MTU information table includes multiple information entries, the information entry includes the corresponding relationship between the source IP address, the destination IP address and the maximum MTU of the link, therefore, by querying the MTU information table, when there is a target source IP address and its corresponding target destination IP address in the MTU information table, the maximum MTU of the target link is obtained from the first information entry corresponding to the target destination IP address, and when the message length corresponding to the target message is greater than the maximum MTU of the target link, the target message is fragmented according to the maximum MTU of the target link to obtain multiple sub-messages, so that the target message only needs to be fragmented once to obtain multiple sub-messages whose message lengths are not greater than the maximum MTU of the target link, which can improve the processing efficiency of the message. Since the target message is fragmented according to the maximum MTU of the target link, the number of sub-messages can be reduced, and the system resources occupied by the message can be reduced. Since the lengths of the multiple sub-messages are not greater than the maximum MTU of the target link, by sending multiple sub-messages to the target destination IP address, the multiple sub-messages can be directly transmitted to the target destination IP address without fragmentation, thereby improving the transmission efficiency of the message. In this way, through the embodiments of the present application, the processing efficiency of the message can be improved, the system resources occupied by the message can be reduced, and the transmission efficiency of the message can be improved.
[0072] The specific implementation methods of the above steps are introduced below.
[0073] In some embodiments, in S210, the user can send a target message from the target source IP address to the target destination IP address by calling an interface. The interface can be, for example, a send interface. In the process of the user calling the interface to send the target message from the target source IP address to the target destination IP address, the target destination IP address can be searched. If the search is successful, the target source IP address and the target destination IP address can communicate with each other, and then the target source IP address and the target destination IP address corresponding to the target message can be obtained.
[0074] In some embodiments, in S220, the MTU information table may include a correspondence between the source IP address, the destination IP address, and the maximum MTU of the link. Among them, one MTU information table may include one source IP address or multiple source IP addresses. When one source IP address is included in an MTU information table, since there is a one-to-one correspondence between the MTU information table and the source IP address, the source IP address may not be reflected in the MTU information table.
[0075] Specifically, the MTU information table may include multiple information entries, and the correspondence between the source IP address, the destination IP address, and the maximum MTU of the link may be stored in the form of information entries. In addition to the source IP address, the destination IP address, and the maximum MTU of the link, each information entry may also include the system default maximum MTU, the use status identifier, and the information addition identifier. Among them, the system default maximum MTU may be consistent with the system interface. The maximum MTU of the link may not be greater than the system default maximum MTU. In addition, the use status identifier may include 0 and 1. Among them, 0 may indicate that the information entry has not been used for more than a preset time, and 1 may indicate that the information entry is being used, that is, the information entry has been used within a preset time. Furthermore, the information addition identifier may include 0 and 1. Among them, 0 may indicate that the information entry is automatically added by the system, and 1 may indicate that the information entry is manually added by the user and is manually maintained by the user. That is, if the information addition identifier in the information entry is 1, it indicates that the information entry is manually configured by the user through the management interface, and in the subsequent update and deletion process of the MTU information table, the information entry cannot be automatically updated or deleted.
[0076] Based on this, if the destination IP address is recorded as DstIP, the system default maximum MTU is recorded as MaxMTU, the link maximum MTU is recorded as LinkMTU, the usage status flag is recorded as Hit, and the information addition flag is recorded as Static, then when a source IP address is included in the MTU information table, the MTU information table can be shown in Table 1.
[0077] Table 1
[0078] Serial number DstIP MaxMTU LinkMTU Hit Static 1 / / / / / 2 / / / / / …… …… …… …… …… …… n / / / / /
[0079] In addition, the maximum MTU of the link between the source IP address and the destination IP address can be the maximum MTU that the message can pass through when it is transmitted from the source IP address to the destination IP address. In other words, if the message length is greater than the maximum MTU of the link, the message cannot be transmitted from the source IP address to the destination IP address without fragmentation. If the message length is not greater than the maximum MTU of the link, the message can be transmitted from the source IP address to the destination IP address without fragmentation.
[0080] To better understand the maximum link MTU, let's take a specific example. For example, if a message needs to pass through three nodes to be transmitted from the source IP address to the destination IP address, among which the MTU of node A is 2000, the MTU of node B is 1600, and the MTU of node C is 1500, then the maximum link MTU can be 1500.
[0081] As an example, since the information stored in the MTU information table is limited, there may be an information entry corresponding to the target destination IP address in the MTU information table, or there may not be an information entry corresponding to the target destination IP address. Therefore, after obtaining the target source IP address and the target destination IP address, the MTU information table can be queried to determine whether there is an information entry corresponding to the target destination IP address in the MTU information table. Specifically, the query method can be to first calculate the Hash value through DstIP, and then search the MTU information table through the Hash value.
[0082] In some embodiments, in S230, the first information item may include a correspondence between a target source IP address, a target destination IP address, and a target link maximum MTU. The target link maximum MTU may be the maximum MTU that a target message can pass through when transmitted from the target source IP address to the target destination IP address.
[0083] In this way, when there is a first information entry corresponding to the target destination IP address in the MTU information table, the target link maximum MTU is directly obtained from the first information entry, thereby improving the efficiency of obtaining the target link maximum MTU.
[0084] Based on this, in order to ensure the timeliness of the MTU information table, in some embodiments, after the above S230, the following steps may also be included:
[0085] The use status identifier in the first information item is updated to an identifier indicating that the first information item is being used.
[0086] Here, as described above, the flag indicating that the first information entry is in use may be 1. Since the maximum MTU of the target link is obtained from the first information entry, that is, the first information entry has just been used, the Hit in the first information entry may be set to 1. Before obtaining the maximum MTU of the target link, if the Hit in the first information entry is 0, 0 may be modified to 1. If the Hit in the first information entry is 1, no modification is required.
[0087] In this way, by updating the Hit in the first information entry to 1 after obtaining the maximum MTU of the target link, it is possible to ensure that the information in the first information entry is the latest information, thereby ensuring the timeliness of the MTU information table.
[0088] Based on this, in order to continuously improve the MTU information table and thereby improve the efficiency of subsequent acquisition of the maximum MTU of the link, in some embodiments, after the above S220, the following may also be included:
[0089] If the target destination IP address does not exist in the MTU information table, create a second information entry corresponding to the target destination IP address in the MTU information table;
[0090] Add the target source IP address and the preset MTU to the second information entry;
[0091] Detect the maximum MTU of the first link between the target source IP address and the target destination IP address based on the preset MTU;
[0092] The maximum MTU of the first link is determined as the maximum MTU that a message can pass through when transmitted from the target source IP address to the target destination IP address.
[0093] Here, the preset MTU may be a pre-set default MTU. The preset MTU may be, for example, zero, the system default maximum MTU, or other non-zero values, which are not limited here. The maximum MTU of the first link may be the maximum MTU that the target message can pass through when it is transmitted from the target source IP address to the target destination IP address. The maximum MTU of the first link may be the same as the maximum MTU of the target link. In addition, since routing changes may cause MTU changes, the maximum MTU of the first link may be different from the maximum MTU of the target link, which are not limited here.
[0094] As an example, the specific process of obtaining the maximum MTU of the first link may be to first obtain the preset MTU, and then obtain the maximum MTU of the first link based on the preset MTU detection. That is, the maximum MTU of the first link can be obtained through the MTU detection service detection. Without loss of generality, the maximum MTU of the link between the source IP address and the destination IP address can be obtained through the MTU detection service detection.
[0095] As an example, the MTU detection service can be implemented by sending an Internet Control Message Protocol (ICMP) request message with a specific message length from the source IP address to the destination IP address. Specifically, the initiating node can send an ICMP request message with a specific message length to the destination node, wherein the ICMP request message is marked as not allowing fragmentation. On this basis, if the initiating node can receive the ICMP reply message sent by the destination node, the specific message length can be temporarily determined as the maximum MTU of the link. If the initiating node cannot receive the ICMP reply message sent by the destination node, the specific message length can be adjusted, and the above steps are repeated until the initiating node receives the ICMP reply message, and then the specific message length is determined as the maximum MTU of the link. Among them, the initiating node can be the node corresponding to the source IP address, and the destination node can be the node corresponding to the destination IP address.
[0096] As a more specific example, Figure 3 As shown, if the MTU of the intermediate node is less than L1 and greater than or equal to L2. If the ICMP request message is not fragmented, if the initiating node sends an ICMP request message with a length of L1 to the destination node, the initiating node will not receive an ICMP reply message. Based on this, it can be determined that the maximum MTU of the link is less than L1. In order to obtain the maximum MTU of the link, L1 can be reduced to L2. If the initiating node sends an ICMP request message with a length of L2 to the destination node, the initiating node can receive an ICMP reply message. Based on this, L2 can be determined as the maximum MTU of the link.
[0097] However, in actual situations, during the MTU detection service, some network nodes may not receive ICMP responses due to the implementation of security policies such as firewall configuration. At this time, the MTU detection method using ICMP messages will cause the MTU detection to fail. Therefore, in order to ensure the normal operation of the MTU detection service, detection programs, i.e., echo service programs, can be deployed on the initiating node and the destination node respectively, so that the initiating node can send a detection request to the destination node, and the destination node can send a detection response corresponding to the detection request to the initiating node. In this way, the maximum MTU of the link between the source IP address and the destination IP address is detected by the detection program instead of the ICMP message, which can ensure the normal operation of the MTU detection service.
[0098] Based on this, in some embodiments, in order to improve the efficiency of the MTU detection service while ensuring the normal operation of the MTU detection service, the above-mentioned detection of the maximum MTU of the link between the source IP address and the destination IP address through the detection program may specifically include:
[0099] Sending a probe request from the source IP address to the destination IP address, where the probe request includes a probe message having a first message length, where the first message length is no greater than a system default maximum MTU;
[0100] In the case that the source IP address does not receive a probe response corresponding to the probe request, the first message length is reduced by a binary search, and the probe request is sent from the source IP address to the destination IP address again until the source IP address receives a probe response, thereby obtaining a probe message having a second message length;
[0101] The second message length is determined as the maximum MTU of the link.
[0102] Here, the system default maximum MTU may be consistent with the system interface. The first message length may be any value between zero and the system default maximum MTU. Since the second message length is less than the first message length, the second message length is not greater than the system default maximum MTU, that is, the link maximum MTU is not greater than the system default maximum MTU.
[0103] As an example, the initiating node may send a probe request to the destination node, and mark the probe message in the probe request as not allowing fragmentation. On this basis, if the initiating node can receive the probe response sent by the destination node, the first message length may be temporarily determined as the maximum MTU of the link. If the initiating node cannot receive the probe response sent by the destination node, the first message length may be reduced by binary search, and the above steps may be repeated until the initiating node receives the probe response. If the initiating node receives the probe response, the length of the probe message corresponding to the probe response may be recorded as the second message length, and the second message length may be determined as the maximum MTU of the link. Among them, the initiating node may be the node corresponding to the source IP address, and the destination node may be the node corresponding to the destination IP address.
[0104] As a more specific example, Figure 4 As shown, the request sent by the initiating node to the destination node can specifically be a probe request. If the MTU of the intermediate node is less than L1 and greater than or equal to L2. Then, if the probe message is not fragmented, if the initiating node sends a message with a length of L1 to the destination node, the initiating node will not receive a probe response. Based on this, it can be determined that the maximum MTU of the link is less than L1. In order to obtain the maximum MTU of the link, L1 can be reduced to L2. If the initiating node sends a message with a length of L2 to the destination node, the initiating node can receive a probe response. Based on this, L2 can be determined as the maximum MTU of the link.
[0105] In this way, by reducing the length of the first message in a binary search manner, the efficiency of the MTU detection service can be improved while ensuring the normal operation of the MTU detection service.
[0106] Since the first message length is reduced to the second message length by binary search, the second message length may be smaller than the actual maximum MTU of the link. That is, if the source IP address can receive the detection response corresponding to the second message length, if the second message length is increased, the source IP address may still be able to receive the detection response. Therefore, in order to improve the accuracy of the maximum MTU of the link, in some embodiments, after determining the second message length as the maximum MTU of the link, the following may also be included:
[0107] Increasing the second message length by binary search, and returning to execute sending a probe request from the source IP address to the destination IP address until the number of probe responses received by the source IP address reaches a preset number, thereby obtaining a probe message with a third message length;
[0108] The third message length is determined as the maximum MTU of the link.
[0109] Here, since the source IP address receives a probe response corresponding to the probe message with the third message length, and does not receive a probe response corresponding to the probe message with the first message length, the third message length is smaller than the first message length. Therefore, the third message length is not greater than the system default maximum MTU, that is, the link maximum MTU is not greater than the system default maximum MTU.
[0110] As an example, after increasing the second message length by binary search, the source IP address may receive a probe response corresponding to the probe request, or may not receive a probe response corresponding to the probe request. If the second message length is increased to a fourth message length, and the source IP address receives a probe response corresponding to the probe message having the fourth message length, the number of times the source IP address receives a probe response can be recorded once, and the fourth message length can continue to be increased by binary search, and the probe request can continue to be sent from the source IP address to the destination IP address.
[0111] If the second message length is increased to the fourth message length, and the source IP address does not receive a probe response corresponding to the probe message with the fourth message length, then the fourth message length is greater than the actual maximum MTU of the link. In this way, the fourth message length can be reduced to the fifth message length by binary search, and then a probe request is sent from the source IP address to the destination IP address, and the message length in the probe message in the probe request is the fifth message length. If the source IP address can receive a probe response corresponding to the probe message with the fifth message length, the number of times the source IP address receives the probe response can be recorded once, and the fifth message length can continue to be increased by binary search, and the probe request can continue to be sent from the source IP address to the destination IP address. Repeat the above steps until the number of times the source IP address receives the probe response reaches a preset number, the length of the probe message corresponding to this probe response is recorded as the third message length, and the third message length is determined as the maximum MTU of the link.
[0112] To give a specific example, if the maximum MTU of the link has been determined to be LinkMTU0 between 0 and 1 / 2MaxMTU, a binary search can be continued between LinkMTU0 and 1 / 2MaxMTU to determine LinkMTU1, where LinkMTU1 can represent that the number of times the source IP address receives a probe response is 1.
[0113] In this way, when the number of detection responses received at the source IP address reaches a preset number, the third message length is determined as the maximum MTU of the link, so that the accuracy of the maximum MTU of the link can be improved.
[0114] Based on this, in order to improve the detection efficiency of the maximum MTU of the link, in some embodiments, before sending the detection request from the source IP address to the destination IP address, the following may also be included:
[0115] Obtain the preset MTU corresponding to both the target source IP address and the target destination IP address from the MTU information table;
[0116] When the preset MTU is zero, the system default maximum MTU is determined as the first message length;
[0117] When the preset MTU is non-zero, the preset MTU is determined as the first message length.
[0118] Here, if the preset MTU is zero, MaxMTU can be determined as the first message length first. If MaxMTU is not the maximum MTU of the link, the first message length can be reduced by binary search. Specifically, a binary search can be performed between 1 / 2MaxMTU and MaxMTU. If there is no maximum MTU of the link between 1 / 2MaxMTU and MaxMTU, a binary search can continue between 0 and 1 / 2MaxMTU. If the above process cannot determine the maximum MTU of the link, the preset MTU in the MTU information table can remain unchanged. If the above process can determine the maximum MTU of the link, the preset MTU in the MTU information table can be replaced with the maximum MTU of the link determined above.
[0119] If the preset MTU is non-zero, the preset MTU can be first determined as the first message length. The preset MTU can be LinkMTU. Based on this, if the source IP address does not receive a detection response corresponding to the LinkMTU, the first message length can be reduced by a binary search. Specifically, a binary search can be performed between LinkMTU and MaxMTU. On the other hand, if the source IP address receives a detection response corresponding to the LinkMTU, the first message length can be increased by a binary search. Specifically, a binary search can be performed between 1 / 2LinkMTU and LinkMTU. If the maximum MTU of the link still cannot be determined, a binary search can be performed between 0 and 1 / 2LinkMTU. Similarly, if the above process cannot determine the maximum MTU of the link, the preset MTU in the MTU information table may remain unchanged. If the above process can determine the maximum MTU of the link, the preset MTU in the MTU information table can be replaced with the maximum MTU of the link determined above.
[0120] In this way, by performing a binary search based on the preset MTU value, the detection range of the maximum MTU of the link can be reduced, thereby improving the detection efficiency of the maximum MTU of the link.
[0121] Based on this, in order to further improve the MTU information table, in some embodiments, after adding the target source IP address and the preset MTU to the second information entry, the following may also be included:
[0122] A use status identifier indicating that the second information item is in use and an information addition identifier indicating that the second information item is automatically added by the system are added to the second information item.
[0123] Here, as described above, the use status flag indicating that the second information entry is in use may be 1, and the information addition flag indicating that the second information entry is automatically added by the system may be 0. Therefore, after adding the target source IP address and the preset MTU to the second information entry, the Hit in the second information entry may be set to 1, and the Static in the second information entry may be set to 0. In this way, the MTU information table can be further improved.
[0124] Since the MTU may change due to a change in the network routing, in order to ensure the validity and timeliness of the maximum MTU of the link in the MTU information table, in some embodiments, the following may also be included:
[0125] Monitor target parameters, which include any one of time and system parameters;
[0126] When the target parameter satisfies a preset condition, detecting the maximum MTU of the second link between the first source IP address and the first destination IP address, the target parameter satisfies the preset condition including that the time reaches a preset time and the system parameter is lower than any one of a preset threshold, the first source IP address is any one of a plurality of source IP addresses, and the first destination IP address is a destination IP address corresponding to the first source IP address among the plurality of destination IP addresses;
[0127] The link maximum MTU corresponding to both the first source IP address and the first destination IP address in the MTU information table is replaced with the second link maximum MTU.
[0128] Here, the second link maximum MTU may be the maximum MTU that a message can pass through when it is transmitted from the first source IP address to the first destination IP address. System parameters may include CPU utilization and interface bandwidth. When both the CPU utilization and the network interface load are lower than a preset threshold, an MTU detection service may be performed. In addition, an MTU detection service may be performed periodically by detecting a timeout timer.
[0129] Based on this, if the time reaches the preset time, the MTU detection service can be performed. If the system parameter is lower than the preset threshold, the MTU detection service can also be performed. Alternatively, the MTU detection service can be performed when the time reaches the preset time and the system parameter is lower than the preset threshold. There is no limitation here.
[0130] In this way, by re-detecting the link MTU when the target parameters meet the preset conditions, the second link maximum MTU is obtained, and the link maximum MTU corresponding to the first source IP address and the first destination IP address in the MTU information table is replaced with the second link maximum MTU, the validity and timeliness of the link maximum MTU in the MTU information table can be guaranteed.
[0131] Based on this, in order to ensure the reliability of the MTU information table, in some embodiments, when the target parameter meets the preset condition, detecting the maximum MTU of the second link between the first source IP address and the first destination IP address may specifically include:
[0132] When the target parameter satisfies the preset condition, obtaining a third information entry corresponding to the first destination IP address;
[0133] When the information addition flag in the third information entry indicates that the third information entry is automatically added by the system, the maximum MTU of the second link between the first source IP address and the first destination IP address is detected.
[0134] Here, if Static in the third information entry is 0, that is, the third information entry is automatically added by the system, the link maximum MTU in the third information entry can be automatically updated. If Static in the third information entry is 1, that is, the third information entry is manually added by the user, the link maximum MTU of the third information entry cannot be automatically updated, but the link maximum MTU of the third information entry can be manually updated by the user.
[0135] In addition, it should be noted that even if Static in the third information entry is 0, the user can manually update the third information entry. In addition, the system default maximum MTU in the third information entry can be manually updated by the user.
[0136] In this way, by controlling the authority to automatically update the MTU information table, the reliability of the MTU information table can be guaranteed.
[0137] Based on this, in order to ensure the practicality of the MTU information table and save system memory, in some embodiments, the following may also be included:
[0138] If the information entry is not used within a preset time period, the information entry is deleted from the MTU information table.
[0139] Here, the usage of information items in the MTU information table can be monitored by the table entry aging timer. If an information item has not been used within a preset time period, it can be determined that the information item is an expired information item, and then the information item is deleted from the MTU information table.
[0140] In this way, by deleting expired information entries, the practicality of the MTU information table can be guaranteed and system memory can be saved.
[0141] Based on this, in order to further ensure the reliability of the MTU information table, in some embodiments, when the information entry is not used within a preset time, deleting the information entry from the MTU information table may specifically include:
[0142] When the information entry has not been used within a preset time period, obtaining a usage status indicator and an information addition indicator in the information entry;
[0143] When the use status flag indicates that the information entry is in use, and the information addition flag indicates that the information entry is automatically added by the system, the use status flag is converted to an flag indicating that the information entry has not been used within a preset time period;
[0144] When the use status flag indicates that the information entry has not been used within a preset time period, and the information addition flag indicates that the information entry is automatically added by the system, the information entry is deleted from the MTU information table.
[0145] Here, if the information is not used within the preset time, Hit can be changed from 1 to 0. If Static and Hit in the information entry are both 0, the information entry can be deleted from the MTU information table. In other words, if the information entry is automatically added by the system and has expired, it can be automatically deleted by the system.
[0146] In addition, the information entry with Static being 1 can be manually deleted by the user through the management interface. The information entry manually deleted by the user can be an information entry manually added by the user or an information entry automatically added by the system, which is not limited here.
[0147] In this way, by controlling the authority to automatically delete the MTU information table, the reliability of the MTU information table can be further guaranteed.
[0148] Based on this, in order to ensure the practicality and flexibility of the MTU information table, in some embodiments, it may also include:
[0149] In case of obtaining the first identification conversion command, converting the information adding identification from automatically adding by the characterization system to manually adding by the characterization user;
[0150] When the second identifier conversion command is obtained, the information adding identifier is converted from the identifier representing manual addition by the user to the identifier representing automatic addition by the system.
[0151] Here, the first identification conversion command may be a to static command, and the second identification conversion command may be a to dynamic command. As an example, a user may convert one or more information items with Static value 0 to information items with Static value 1 by executing the to static command. As another example, a user may convert one or more information items with Static value 1 to information items with Static value 0 by executing the to dynamic command.
[0152] In this way, by adding identifiers to the information for conversion, the practicality and flexibility of the MTU information table can be guaranteed.
[0153] In some embodiments, in S240, if the message length corresponding to the target message is greater than the maximum MTU of the target link, the target message may be fragmented to obtain multiple sub-messages. The message length of each sub-message may not be greater than the maximum MTU of the target link. Furthermore, if the target message is fragmented into n sub-messages, the message length of n-1 sub-messages may be the maximum MTU of the target link.
[0154] In some embodiments, in S250, after obtaining the multiple sub-messages, the multiple sub-messages may be sent to the target destination IP address. During the transmission of the multiple sub-messages, the multiple sub-messages may not be fragmented.
[0155] In order to better describe the entire solution, some specific examples are given based on the above embodiments.
[0156] For example, Figure 5 As shown, on the one hand, the user can configure the aging timer, the timeout detection strategy and the timeout detection timer through the user interface. After the configuration is completed, the MTU information table can be maintained by starting the timeout detection timer and the aging timer.
[0157] On the other hand, the user can send packets through the user interface, that is, send the target message. During the packet sending process, the destination route corresponding to the target message, that is, the destination IP address, can be found. If the destination IP address can be found, it is possible to query whether there is an information entry corresponding to the destination IP address in the MTU information table. If there is an information entry corresponding to the destination IP address in the MTU information table, the maximum MTU of the link can be obtained, and the target message can be fragmented and sent according to the maximum MTU of the link. If there is no information entry corresponding to the destination IP address in the MTU information table, the MTU detection service can be started to obtain the maximum MTU of the link, and then the information entry corresponding to the destination IP address can be added to the MTU information table.
[0158] Therefore, by querying the maximum MTU of the link corresponding to the destination IP address in the MTU information table, the target message can be fragmented and sent according to the maximum MTU of the link when the message length corresponding to the target message is greater than the maximum MTU of the link. Since the target message only needs to be fragmented once, the message processing efficiency can be improved. By maintaining the MTU information table, the timeliness and effectiveness of the maximum MTU of the link can be guaranteed, thereby improving the transmission efficiency of the message.
[0159] Based on the message processing method provided in the above embodiment, the present application also provides a specific implementation of a message processing device. Please refer to the following embodiment.
[0160] like Figure 6 As shown, the message processing device 600 provided in the embodiment of the present application includes the following modules:
[0161] A first acquisition module 610 is used to acquire a target source IP address and a target destination IP address corresponding to a target message;
[0162] A query module 620 is used to query an MTU information table, where the MTU information table includes multiple information items, each of which includes a correspondence between a source IP address, a destination IP address, and a link maximum MTU, where the link maximum MTU is the maximum MTU that a message can pass through when transmitted from the source IP address to the destination IP address;
[0163] The second acquisition module 630 is configured to acquire the maximum MTU of the target link from the first information entry when there is a first information entry corresponding to the target destination IP address in the MTU information table;
[0164] A fragmentation module 640 is used to fragment the target message according to the maximum MTU of the target link to obtain multiple sub-messages when the message length corresponding to the target message is greater than the maximum MTU of the target link;
[0165] The sending module 650 is used to send multiple sub-messages to the target destination IP address.
[0166] The message processing device 600 is described in detail below, as follows:
[0167] In some embodiments, the message processing device 600 may further include:
[0168] An establishing module, configured to establish, after querying the MTU information table, a second information entry corresponding to the target destination IP address in the MTU information table if the target destination IP address does not exist in the MTU information table;
[0169] A first adding module, used for adding the target source IP address and the preset MTU to the second information entry;
[0170] A first detection module, used to detect a maximum MTU of a first link between a target source IP address and a target destination IP address based on a preset MTU;
[0171] The first updating module is used to determine the maximum MTU of the first link as the maximum MTU that a message can pass through when transmitted from a target source IP address to a target destination IP address.
[0172] In some embodiments, the message processing device 600 may further include:
[0173] The second adding module is used to add a use status identifier representing that the second information entry is in use and an information addition identifier representing that the second information entry is automatically added by the system to the second information entry after adding the target source IP address and the preset MTU to the second information entry.
[0174] In some embodiments, the information item may further include a usage status identifier. Based on this, the message processing device 600 may further include:
[0175] The second updating module is used to update the use status identifier in the first information entry to an identifier indicating that the first information entry is in use after acquiring the maximum MTU of the target link from the first information entry.
[0176] In some embodiments, the message processing device 600 may further include:
[0177] A monitoring module, used to monitor target parameters, including any one of time and system parameters;
[0178] A second detection module is used to detect the maximum MTU of the second link between the first source IP address and the first destination IP address when the target parameter meets the preset condition, the target parameter meets the preset condition including any one of the time reaching the preset time and the system parameter being lower than the preset threshold, the first source IP address is any one of the multiple source IP addresses, and the first destination IP address is a destination IP address corresponding to the first source IP address among the multiple destination IP addresses;
[0179] The third updating module is used to replace the link maximum MTU corresponding to the first source IP address and the first destination IP address in the MTU information table with the second link maximum MTU.
[0180] In some embodiments, the information entry may further include an information addition identifier. Based on this, the second detection module may specifically include:
[0181] A first acquisition submodule, used to acquire a third information entry corresponding to the first destination IP address when the target parameter meets a preset condition;
[0182] The detection submodule is used to detect the maximum MTU of the second link between the first source IP address and the first destination IP address when the information addition identifier in the third information entry indicates that the third information entry is automatically added by the system.
[0183] In some embodiments, the message processing device 600 may further include:
[0184] The deleting module is used to delete the information entry from the MTU information table when the information entry is not used within a preset time period.
[0185] In some embodiments, the information entry further includes a usage status flag and an information addition flag. Based on this, the deletion module may specifically include:
[0186] The second acquisition submodule is used to acquire the use status mark and the information addition mark in the information entry when the information entry has not been used within a preset time period;
[0187] A conversion submodule is used to convert the usage status flag to a flag indicating that the information entry is not used within a preset time period when the usage status flag indicates that the information entry is in use and the information addition flag indicates that the information entry is automatically added by the system;
[0188] The deletion submodule is used to delete the information entry from the MTU information table when the use status flag indicates that the information entry has not been used within a preset time period and the information addition flag indicates that the information entry is automatically added by the system.
[0189] In some embodiments, the information entry further includes an information addition identifier. Based on this, the message processing device 600 may further include:
[0190] A first conversion module is used to convert the information adding identifier from automatically added by the representation system to manually added by the representation user when a first identifier conversion command is obtained;
[0191] The second conversion module is used to convert the information adding identifier from indicating manual addition by the user to indicating automatic addition by the system when a second identifier conversion command is obtained.
[0192] In the message processing device of the embodiment of the present application, since the maximum MTU of the link is the maximum MTU that the message can pass through when it is transmitted from the source IP address to the destination IP address, as long as the message length is not greater than the maximum MTU of the link, the message can be transmitted from the source IP address to the destination IP address without fragmentation. In addition, since the MTU information table includes multiple information entries, the information entry includes the corresponding relationship between the source IP address, the destination IP address and the maximum MTU of the link, therefore, by querying the MTU information table, when there is a target source IP address and its corresponding target destination IP address in the MTU information table, the target link maximum MTU is obtained from the first information entry corresponding to the target destination IP address, and when the message length corresponding to the target message is greater than the maximum MTU of the target link, the target message is fragmented according to the maximum MTU of the target link to obtain multiple sub-messages, so that the target message only needs to be fragmented once to obtain multiple sub-messages whose message lengths are not greater than the maximum MTU of the target link, which can improve the processing efficiency of the message. Since the target message is fragmented according to the maximum MTU of the target link, the number of sub-messages can be reduced, and the system resources occupied by the message can be reduced. Since the lengths of the multiple sub-messages are not greater than the maximum MTU of the target link, by sending multiple sub-messages to the target destination IP address, the multiple sub-messages can be directly transmitted to the target destination IP address without fragmentation, thereby improving the transmission efficiency of the message. In this way, through the embodiments of the present application, the processing efficiency of the message can be improved, the system resources occupied by the message can be reduced, and the transmission efficiency of the message can be improved.
[0193] Based on the message processing method provided in the above embodiment, the embodiment of the present application also provides a specific implementation of the electronic device. Figure 7 A schematic diagram of an electronic device 700 provided in an embodiment of the present application is shown.
[0194] The electronic device 700 may include a processor 710 and a memory 720 storing computer program instructions.
[0195] Specifically, the processor 710 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.
[0196] The memory 720 may include a large capacity memory for data or instructions. By way of example and not limitation, the memory 720 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive or a combination of two or more of these. In appropriate cases, the memory 720 may include a removable or non-removable (or fixed) medium. In appropriate cases, the memory 720 may be inside or outside the integrated gateway disaster recovery device. In a specific embodiment, the memory 720 is a non-volatile solid-state memory.
[0197] The memory may include a read-only memory (ROM), a random access memory (RAM), a magnetic disk storage medium device, an optical storage medium device, a flash memory device, an electrical, optical or other physical / tangible memory storage device. Thus, typically, the memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., a memory device) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the method according to the first aspect of the present application.
[0198] The processor 710 implements any one of the message processing methods in the above embodiments by reading and executing computer program instructions stored in the memory 720.
[0199] In one example, the electronic device 700 may further include a communication interface 730 and a bus 740. Figure 7 As shown, the processor 710, the memory 720, and the communication interface 730 are connected via a bus 740 and communicate with each other.
[0200] The communication interface 730 is mainly used to implement communication between various modules, devices, units and / or equipment in the embodiments of the present application.
[0201] Bus 740 includes hardware, software or both, and the parts of electronic equipment are coupled to each other.For example, but not limitation, bus may include accelerated graphics port (AGP) or other graphics bus, enhanced industrial standard architecture (EISA) bus, front side bus (FSB), hypertransport (HT) interconnection, industrial standard architecture (ISA) bus, infinite bandwidth interconnection, low pin count (LPC) bus, memory bus, micro channel architecture (MCA) bus, peripheral component interconnection (PCI) bus, PCI-Express (PCI-X) bus, serial advanced technology attachment (SATA) bus, video electronics standard association local (VLB) bus or other suitable bus or two or more of these combinations. In appropriate cases, bus 740 may include one or more buses. Although the present application embodiment describes and shows a specific bus, the application considers any suitable bus or interconnection.
[0202] Exemplarily, the electronic device 700 may be a mobile phone, a tablet computer, a laptop computer, a PDA, an in-vehicle electronic device, an ultra-mobile personal computer (UMPC), a netbook, or a personal digital assistant (PDA).
[0203] The electronic device can execute the message processing method in the embodiment of the present application, thereby realizing the combination Figures 2 to 6 The invention describes a message processing method and device.
[0204] In addition, in combination with the message processing method in the above embodiment, the embodiment of the present application can provide a computer-readable storage medium for implementation. The computer-readable storage medium stores computer program instructions; when the computer program instructions are executed by a processor, any one of the message processing methods in the above embodiment is implemented.
[0205] In addition, the embodiment of the present application further provides a vehicle, which may include at least one of the following:
[0206] A message processing device as in any one of the embodiments of the second aspect;
[0207] An electronic device as in any one of the embodiments of the third aspect;
[0208] The computer-readable storage medium in any one of the embodiments of the fourth aspect will not be described in detail here.
[0209] It should be clear that the present application is not limited to the specific configuration and processing described above and shown in the figures. For the sake of simplicity, a detailed description of the known method is omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present application is not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications and additions, or change the order between the steps after understanding the spirit of the present application.
[0210] The functional blocks shown in the above-described block diagram can be implemented as hardware, software, firmware or a combination thereof. When implemented in hardware, it can be, for example, an electronic circuit, an application specific integrated circuit (ASIC), appropriate firmware, a plug-in, a function card, etc. When implemented in software, the elements of the present application are programs or code segments that are used to perform the required tasks. The program or code segment can be stored in a machine-readable medium, or transmitted on a transmission medium or a communication link by a data signal carried in a carrier wave. "Machine-readable medium" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, optical fiber media, radio frequency (RF) links, etc. The code segment can be downloaded via a computer network such as the Internet, an intranet, etc.
[0211] It should also be noted that the exemplary embodiments mentioned in this application describe some methods or systems based on a series of steps or devices. However, this application is not limited to the order of the above steps, that is, the steps can be performed in the order mentioned in the embodiment, or in a different order from the embodiment, or several steps can be performed simultaneously.
[0212] The above reference is according to the method of the embodiment of the present application, the flow chart of the device (system) and the computer program product and / or the block diagram described various aspects of the present application.It should be understood that each square box in the flow chart and / or the block diagram and the combination of each square box in the flow chart and / or the block diagram can be realized by computer program instructions.These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer or other programmable data processing device to produce a machine so that these instructions executed by the processor of the computer or other programmable data processing device enable the realization of the function / action specified in one or more square boxes of the flow chart and / or the block diagram.Such a processor can be but is not limited to a general-purpose processor, a special-purpose processor, a special application processor or a field programmable logic circuit.It can also be understood that each square box in the block diagram and / or the flow chart and the combination of the square boxes in the block diagram and / or the flow chart can also be realized by the dedicated hardware that performs the specified function or action, or can be realized by the combination of dedicated hardware and computer instructions.
[0213] The above is only a specific implementation of the present application. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working processes of the systems, modules and units described above can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here. It should be understood that the protection scope of the present application is not limited to this. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in this application, and these modifications or replacements should be included in the protection scope of this application.
Claims
1. A message processing method, characterized in that: include: Obtain the target source IP address and target destination IP address corresponding to the target message; Querying an MTU information table, the MTU information table including a plurality of information entries, the information entries including a correspondence between a source IP address, a destination IP address, and a link maximum MTU, the link maximum MTU being a maximum MTU that a message can pass through when transmitted from the source IP address to the destination IP address; In a case where there is a first information entry corresponding to the target destination IP address in the MTU information table, obtaining a target link maximum MTU from the first information entry; When the message length corresponding to the target message is greater than the maximum MTU of the target link, fragment the target message according to the maximum MTU of the target link to obtain multiple sub-messages; Send the multiple sub-messages to the target destination IP address.
2. The method according to claim 1, characterized in that After querying the MTU information table, the method further includes: If the target destination IP address does not exist in the MTU information table, create a second information entry corresponding to the target destination IP address in the MTU information table; Add the target source IP address and the preset MTU to the second information entry; Detecting the maximum MTU of the first link between the target source IP address and the target destination IP address based on the preset MTU; The maximum MTU of the first link is determined as the maximum MTU that a message can pass through when transmitted from the target source IP address to the target destination IP address.
3. The method according to claim 2, characterized in that After adding the target source IP address and the preset MTU to the second information entry, the method further includes: A use status identifier indicating that the second information item is in use and an information addition identifier indicating that the second information item is automatically added by the system are added to the second information item.
4. The method according to claim 1, characterized in that: The information entry further includes a usage status identifier. After obtaining the maximum MTU of the target link from the first information entry, the method further includes: The use status identifier in the first information entry is updated to an identifier indicating that the first information entry is being used.
5. The method according to claim 1, characterized in that Before querying the MTU information table, the method further includes: Monitoring a target parameter, wherein the target parameter includes any one of time and system parameters; In the case where the target parameter satisfies a preset condition, detecting the maximum MTU of the second link between the first source IP address and the first destination IP address, wherein the target parameter satisfies the preset condition including any one of the time reaching the preset time and the system parameter being lower than a preset threshold, the first source IP address is any one of the multiple source IP addresses, and the first destination IP address is a destination IP address corresponding to the first source IP address among the multiple destination IP addresses; The link maximum MTU corresponding to both the first source IP address and the first destination IP address in the MTU information table is replaced with the second link maximum MTU.
6. The method according to claim 5, characterized in that The information entry also includes an information adding flag, and the detecting the maximum MTU of the second link between the first source IP address and the first destination IP address when the target parameter meets the preset condition includes: When the target parameter satisfies a preset condition, obtaining a third information entry corresponding to the first destination IP address; When the information addition flag in the third information entry indicates that the third information entry is automatically added by the system, the maximum MTU of the second link between the first source IP address and the first destination IP address is detected.
7. The method according to claim 1, characterized in that Before querying the MTU information table, the method further includes: When the information entry is not used within a preset time period, the information entry is deleted from the MTU information table.
8. The method according to claim 7, characterized in that The information entry further includes a use status flag and an information addition flag, and when the information entry is not used within a preset time period, deleting the information entry from the MTU information table includes: When the information entry has not been used within a preset time period, obtaining a use status flag and an information addition flag in the information entry; When the use status flag indicates that the information entry is in use, and the information addition flag indicates that the information entry is automatically added by the system, converting the use status flag into a flag indicating that the information entry has not been used within a preset time period; When the use status flag indicates that the information entry has not been used within a preset time period, and the information addition flag indicates that the information entry is automatically added by the system, the information entry is deleted from the MTU information table.
9. The method according to claim 1, characterized in that: The information entry also includes an information addition identifier, and the method further includes: When the first identifier conversion command is obtained, the information adding identifier is converted from automatically added by the representation system to manually added by the representation user; When the second identifier conversion command is obtained, the information adding identifier is converted from the identifier representing manual addition by the user to the identifier representing automatic addition by the system.
10. A message processing device, characterized in that: The device comprises: A first acquisition module is used to acquire a target source IP address and a target destination IP address corresponding to a target message; A query module, used to query an MTU information table, wherein the MTU information table includes multiple information entries, wherein the information entries include a correspondence between a source IP address, a destination IP address, and a link maximum MTU, wherein the link maximum MTU is a maximum MTU that a message can pass through when transmitted from the source IP address to the destination IP address; A second acquisition module, configured to acquire a target link maximum MTU from a first information entry corresponding to the target destination IP address when there is a first information entry in the MTU information table; A fragmentation module, used for fragmenting the target message according to the maximum MTU of the target link to obtain multiple sub-messages when the message length corresponding to the target message is greater than the maximum MTU of the target link; A sending module is used to send the multiple sub-messages to the target destination IP address.
11. An electronic device, characterized in that: The electronic device comprises: a processor and a memory storing computer program instructions; When the processor executes the computer program instructions, the message processing method according to any one of claims 1 to 9 is implemented.
12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer program instructions, and when the computer program instructions are executed by a processor, the message processing method according to any one of claims 1 to 9 is implemented.
13. A vehicle, characterized in that: Include at least one of the following: The message processing device as claimed in claim 10; The electronic device as claimed in claim 11; The computer readable storage medium of claim 12.
