Heterogeneous network interconnection communication method and device, electronic equipment and storage medium
Patent Information
- Application Number
- CN202411053538.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-01
- Publication Date
- 2024-11-15
- Estimated Expiration
- 2044-08-01
AI Technical Summary
Traditional network interconnection communication methods rely on fixed network tunnel modules and protocol conversion modules, which cannot meet the efficient communication needs in complex network environments. Especially in the transition from IPv4 to IPv6, data communication between heterogeneous network protocols is difficult.
By obtaining the original data packet information, determining the network communication type and five-tuple information, calculating the hash value, and dynamically selecting the conversion module according to the load status of the network tunnel module and the protocol conversion module, generating data packet information matching the target device protocol. , and update the module count value to realize heterogeneous network interconnection communication.
It improves the flexibility and scalability of heterogeneous network interconnection conversion configuration, enhances communication effect, can adapt to different network environments and communication needs, and avoids the limitations of fixed computing logic and conversion rules.
Smart Images

Figure CN118972469A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of cross-protocol transmission technology, and in particular to a heterogeneous network interconnection communication method and device, electronic equipment and storage medium. Background Art
[0002] Under the current development trend of IP network technology, the Internet with IPv4 as the core technology has achieved great success. However, with the rapid development of network technology, the exhaustion of IPv4 address resources and its inherent limitations cannot meet the needs of network development, which has also brought some problems, such as the shortage of existing IPv4 addresses, network security, service guarantee issues, etc. IPv6 can effectively improve these problems, and the upgrade and transition from IPv4 to IPv6 has become the trend of Internet development. In traditional networks, protocol data packets can only be transmitted in the same network protocol and communicate with devices under the same network protocol. Devices under different network protocols cannot communicate data.
[0003] Traditional network interconnection communication methods often rely on fixed network tunnel modules and protocol conversion modules, which use fixed calculation logic and conversion rules when processing data packets. However, with the continuous development of network technology and the diversification of communication needs, fixed calculation logic and conversion rules can no longer meet the needs of efficient communication in complex network environments. Summary of the invention
[0004] The main purpose of the embodiments of the present application is to propose a heterogeneous network interconnection communication method and device, electronic device and storage medium, aiming to improve the flexibility and scalability of heterogeneous network interconnection conversion configuration and improve the communication effect of heterogeneous networks.
[0005] To achieve the above-mentioned purpose, a first aspect of an embodiment of the present application proposes a heterogeneous network interconnection communication method, the method comprising:
[0006] Obtaining original data packet information sent from the first device to the second device;
[0007] Determine the network communication type, data packet length, and optional field type based on the original data packet information;
[0008] Extracting the five-tuple information of the original data packet information, and calculating the corresponding hash value according to the five-tuple information;
[0009] Obtaining a preset first count value of the network tunnel module and a second count value of the protocol conversion module;
[0010] When the network communication type is heterogeneous network communication, according to the first count value, the second count value, the packet length and at least one parameter of the optional field type, the network tunnel module or the protocol conversion module is selected to convert the original packet information to obtain target packet information matching the communication protocol of the second device;
[0011] According to the hash value, the first count value of the network tunnel module or the second count value of the protocol conversion module is updated.
[0012] In some embodiments, selecting the network tunnel module or the protocol conversion module to convert the original data packet information according to the first count value, the second count value, the data packet length, and at least one parameter of the optional field type to obtain target data packet information matching the communication protocol of the second device includes:
[0013] When the first count value is greater than or equal to a preset first programmable threshold, the original data packet information is converted by the protocol conversion module to obtain target data packet information matching the communication protocol of the second device;
[0014] When the second count value is greater than or equal to a preset second programmable threshold, the original data packet information is converted by the network tunnel module to obtain target data packet information matching the communication protocol of the second device;
[0015] When the first count value is less than the first programmable threshold and the second count value is less than the second programmable threshold, the network tunnel module or the protocol conversion module is selected according to the data packet length and the optional field type to convert the original data packet information to obtain target data packet information that matches the communication protocol of the second device.
[0016] In some embodiments, selecting the network tunnel module or the protocol conversion module to convert the original data packet information according to the data packet length and the optional field type includes:
[0017] When the length of the data packet is greater than a preset length threshold, and the optional field type includes an uncertain optional field, converting the original data packet information through the network tunnel module;
[0018] When the length of the data packet is less than or equal to the length threshold, and the optional sub-segment does not include an uncertain optional field, the original data packet information is converted by the protocol conversion module.
[0019] In some embodiments, converting the original data packet information through the network tunnel module to obtain target data packet information matching the communication protocol of the second device includes:
[0020] Determine mapping entry information according to a preset local relationship mapping table and header information of the original data packet information;
[0021] When the local relationship mapping table does not have a mapping entry matching the original data packet information, determining the mapping entry information according to a preset remote relationship mapping table and header information of the original data packet information;
[0022] According to the mapping entry information, the original data packet information is encapsulated and a header field is added to generate target data packet information matching the communication protocol of the second device; wherein the header field includes a target address and a tunnel identifier.
[0023] In some embodiments, converting the original data packet information by the protocol conversion module to obtain target data packet information matching the communication protocol of the second device includes:
[0024] Determine mapping entry information according to a preset local relationship mapping table and header information of the original data packet information;
[0025] When the local relationship mapping table does not have a mapping entry matching the original data packet information, determining the mapping entry information according to a preset remote relationship mapping table and header information of the original data packet information;
[0026] The header information of the original data packet information is updated according to the mapping entry information to generate target data packet information matching the communication protocol of the second device.
[0027] In some embodiments, after the step of obtaining target data packet information matching the communication protocol of the second device, the method further includes:
[0028] When the local relationship mapping table does not have a mapping entry matching the original data packet information, adding the mapping entry information obtained from the remote relationship mapping table to the local relationship mapping table;
[0029] The usage frequency of each mapping entry information in the local relationship mapping table is obtained at a preset first time interval, and the mapping entry with the lowest usage frequency in the local relationship mapping table is deleted.
[0030] In some embodiments, after the step of obtaining the original data packet information sent from the first device to the second device, the method further includes:
[0031] When the network communication type is homogeneous network communication, the original data packet information is used as the target data packet information; and the target data packet information is sent to the second device.
[0032] To achieve the above-mentioned purpose, a second aspect of an embodiment of the present application proposes a heterogeneous network interconnection communication device, the device comprising:
[0033] A first acquisition module, used to acquire original data packet information sent from the first device to the second device;
[0034] A determination module, used to determine the network communication type, the packet length, and the optional field type according to the original packet information;
[0035] A calculation module, used for extracting the five-tuple information of the original data packet information, and calculating the corresponding hash value according to the five-tuple information;
[0036] A second acquisition module, used to acquire a first count value of a preset network tunnel module and a second count value of a protocol conversion module;
[0037] a conversion module, configured to, when the network communication type is heterogeneous network communication, select the network tunnel module or the protocol conversion module to convert the original data packet information according to the first count value, the second count value, the data packet length and at least one parameter of the optional field type to obtain target data packet information matching the communication protocol of the second device;
[0038] An updating module is used to update the first counting value of the network tunnel module or the second counting value of the protocol conversion module according to the hash value.
[0039] To achieve the above-mentioned purpose, the third aspect of an embodiment of the present application proposes an electronic device, which includes a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the method described in the first aspect is implemented.
[0040] To achieve the above-mentioned purpose, the fourth aspect of an embodiment of the present application proposes a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method described in the first aspect is implemented.
[0041] The heterogeneous network interconnection communication method and device, electronic device and storage medium proposed in the present application capture the original data packet information sent from the first device to the second device, and then deeply analyze the original data packet information to determine its network communication type, data packet length and optional field type, and extract the five-tuple information of the original data packet information (usually including source IP address, target IP address, source port, target port and transport layer protocol), and based on these five-tuple information, the system will calculate the corresponding hash value. Query the preset first count value of the network tunnel module and the second count value of the protocol conversion module, the first count value and the second count value represent the load status of the corresponding module respectively. When it is determined that the current network communication type is heterogeneous network communication, it is determined which module to use to convert the original data packet information according to the first count value of the network tunnel module, the second count value of the protocol conversion module, the data packet length and the optional field type, with the goal of generating a target data packet information that fully matches the communication protocol of the second device. Finally, the system will update the count value of the network tunnel module or the protocol conversion module involved in the data packet conversion according to the previously calculated hash value. This update mechanism can help the system track the usage of each module so that it can be optimized or adjusted when necessary. In this communication method, by dynamically selecting a network tunnel module or a protocol conversion module according to key information such as network communication type, data packet length, and optional field type, the method can achieve flexible adaptation to different network environments and communication requirements, thereby improving the flexibility of communication. At the same time, the method does not rely on fixed calculation logic and conversion rules, so it can be easily expanded to adapt to new network protocols and communication requirements, thereby enhancing the scalability of the system and improving the communication effect of heterogeneous networks. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] Figure 1 It is a flow chart of a heterogeneous network interconnection communication method provided by an embodiment of the present application;
[0043] Figure 2 yes Figure 1 Flow chart of step S150 in FIG.
[0044] Figure 3 yes Figure 1 Flow chart of step S230 in FIG.
[0045] Figure 4 yes Figure 1 Flow chart of step S220 in FIG.
[0046] Figure 5 yes Figure 1 Flow chart of step S210 in FIG.
[0047] Figure 6 yes Figure 1The flowchart after step S150 in FIG.
[0048] Figure 7 yes Figure 1 The flowchart after step S110 in FIG.
[0049] Figure 8 It is an overall flow chart of the heterogeneous network interconnection communication method provided by the embodiment of the present application;
[0050] Fig. 9 yes Figure 8 Flowchart of the network tunnel module processing process;
[0051] Fig.10 yes Figure 8 Flow chart of the protocol conversion module processing process;
[0052] Fig.11 It is a structural schematic diagram of a heterogeneous network interconnection communication device provided in an embodiment of the present application;
[0053] Fig.12 It is a schematic diagram of the hardware structure of the electronic device provided in the embodiment of the present application. DETAILED DESCRIPTION
[0054] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0055] It should be noted that, although the functional modules are divided in the device schematic diagram and the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart. The terms "first", "second", etc. in the specification, claims and the above drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.
[0056] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.
[0057] First, some nouns involved in this application are analyzed:
[0058] IP address: It is a unified address format provided by the IP protocol. It assigns a logical address to each network and each host on the Internet to shield the difference in physical addresses. The IP protocol is a protocol designed for computer networks to communicate with each other. In the Internet, it is a set of rules that enable all computer networks connected to the Internet to communicate with each other, and stipulates the rules that computers should follow when communicating on the Internet. Computer systems produced by any manufacturer can be interconnected and interoperable with the Internet as long as they comply with the IP protocol. Network systems and equipment produced by various manufacturers, such as Ethernet and packet switching networks, cannot communicate with each other. The main reason for this is that the formats of the basic units of data they transmit (technically called "frames") are different. The IP protocol is actually a set of protocol software composed of software programs. It converts various "frames" into the "IP datagram" format. This conversion is one of the most important features of the Internet, enabling all kinds of computers to communicate with each other on the Internet, that is, it has the characteristic of "openness". It is precisely because of the IP protocol that the Internet has been able to rapidly develop into the world's largest and open computer communication network. Therefore, the IP protocol can also be called the "Internet Protocol".
[0059] IPv4 (Internet Protocol version 4): It is one of the core protocols of the Internet and defines the rules for data communication on a global scale. IPv4 uses 32-bit (4-byte) addresses, so there are only 4,294,967,296 (2^32) addresses in the address space. IPv4 addresses are usually expressed in dotted decimal form, that is, the four bytes are written separately in decimal, separated by a dot in the middle, such as "xxx.xxx.xxx.xxx" (where "x" is a number between 0 and 255). However, with the rapid development of network technology, the exhaustion of IPv4 address resources and its inherent limitations that cannot meet the needs of network development have also brought some problems, such as the shortage of existing IPv4 addresses and service guarantee issues. The limitations of the IPv4 protocol in its design are highlighted:
[0060] ①Limitations of IP address space
[0061] The number of bits in an IPv4 address is 32, and the number of available IP addresses is approximately 4.3 billion. The global public IPv4 addresses were allocated in February 2011. The proportions among countries are extremely unbalanced, and some countries occupy a considerable amount of address space.
[0062] ②The number of routing table entries maintained by the backbone router is too large
[0063] Due to the allocation planning problems in the early stage of IPv4 development, many IPv4 address blocks are not allocated continuously and cannot be effectively aggregated. At present, the global IPv4 BGP routing table is still growing. Even after CIDR aggregation (Classless Inter-Domain Routing), there are about 700,000 entries. The increasingly large routing table consumes more memory, which has a certain impact on equipment cost and forwarding efficiency.
[0064] ③Host terminal configuration in IPv4 network is complex
[0065] When connecting a host node to a network, it generally requires the guidance and help of professionals, and it is necessary to set the IP address, subnet mask, gateway address, etc. for the network node, but users prefer "plug and play".
[0066] ④ Lack of support for security
[0067] The TCP / IP protocol was originally designed for military networks, assuming that users were reliable, without considering network security issues. IPSec (Internet Protocol Security) used to ensure the security of IP data transmission is only an option of the IPv4 protocol, not an integral part of it.
[0068] ⑤ Lack of support for QoS (Quality of Service)
[0069] IPv4 networks provide best-effort services and do not provide quality of service guarantees, such as bandwidth, delay, bit error rate, and jitter. Therefore, IPv4 cannot meet the QoS requirements of the growing number of business types.
[0070] IPv6 (Internet Protocol version 6): It is the next generation IP protocol designed by the Internet Engineering Task Force (IETF) to replace IPv4. Compared with the traditional IPv4, the advantages of IPv6 technology are:
[0071] ①IPv6 has a 128-bit address structure, which can provide sufficient address space. It is said that it can assign an IP address to every grain of sand on the earth.
[0072] ② Hierarchical aggregation improves routing efficiency. IPv6 can provide a network prefix that is much larger than IPv4. The same organization can use only one prefix in its network. Hierarchical aggregation reduces the number of global routing table entries and improves forwarding efficiency.
[0073] ③ No need for network address translation NAT (Internet Address Translation, Network Address Translation), IP addresses are sufficient and can be allocated to all IoT devices in the world. No NAT is required, solving the problem of difficult tracing of NAT addresses.
[0074] ④No broadcast, the network stability is stronger and the QoS (Quality of Service) is more guaranteed.
[0075] ⑤The newly added flow label of IPv6 allows network users to make requirements on communication quality.
[0076] Dual stack technology: refers to running two network protocols such as IPv4 and IPv6 on network nodes at the same time, thus forming two independent networks in the IP network. If this network device is a routing device, then the device can access both the IPv4 network and the IPv6 network at the same time; if this network device is a terminal device, then it has both an IPv4 address and an IPv6 address, and has the ability to communicate through both protocols at the same time.
[0077] Network tunnel technology: It is based on the Generic Routing Encapsulation (GRE) protocol to create a network tunnel to achieve cross-protocol transmission, using one network protocol to transmit another network protocol, that is, encapsulating the data packets generated by other protocols in their own packets and then transmitting them in the network. Tunnel technology includes data encapsulation, transmission, and decapsulation processes. It is not necessary to upgrade all network devices to support the new protocol stack, only the edge devices need to implement dual stack and tunnel functions.
[0078] Protocol conversion technology: a cross-protocol transmission technology that directly converts a known network protocol into another known network protocol, mainly used for address conversion between IPv4 and IPv6 protocols.
[0079] In the existing technology, under the current development trend of IP network technology, the Internet with IPv4 as the core technology has achieved great success. However, with the rapid development of network technology, the exhaustion of IPv4 address resources and its inherent limitations cannot meet the needs of network development, which also brings some problems, such as the shortage of existing IPv4 addresses, network security, service guarantee problems, etc. IPv6 can effectively improve these problems, and the upgrade transition from IPv4 to IPv6 has become the trend of Internet development. In traditional networks, protocol data packets can only be transmitted in the same network protocol and communicate with devices under the same network protocol. Data communication cannot be carried out between devices under different network protocols.
[0080] Traditional network interconnection communication methods often rely on fixed network tunnel modules and protocol conversion modules, which use fixed calculation logic and conversion rules when processing data packets. However, with the continuous development of network technology and the diversification of communication needs, fixed calculation logic and conversion rules can no longer meet the needs of efficient communication in complex network environments.
[0081] Based on this, the embodiments of the present application provide a heterogeneous network interconnection communication method and device, an electronic device and a storage medium, aiming to improve the flexibility and scalability of the heterogeneous network interconnection conversion configuration and improve the communication effect of the heterogeneous network.
[0082] The heterogeneous network interconnection communication method and device, electronic device and storage medium provided in the embodiments of the present application are specifically illustrated through the following embodiments. First, the heterogeneous network interconnection communication method in the embodiments of the present application is described.
[0083] The heterogeneous network interconnection communication method provided in the embodiment of the present application can be applied to the terminal, can also be applied to the server side, and can also be software running in the terminal or the server side. In some embodiments, the terminal can be a smart phone, a tablet computer, a laptop computer, a desktop computer, etc.; the server side can be configured as an independent physical server, or a server cluster or distributed system composed of multiple physical servers, and can also be configured as a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms; the software can be an application that implements the heterogeneous network interconnection communication method, etc., but is not limited to the above forms.
[0084] It should be noted that in each specific implementation of the present application, when it comes to the need to perform relevant processing based on data related to user identity or characteristics such as user information, user behavior data, user historical data, and user location information, the user's permission or consent will be obtained first, and the collection, use, and processing of these data will comply with the relevant laws, regulations, and standards of the relevant countries and regions. In addition, when the embodiment of the present application needs to obtain the user's sensitive personal information, the user's separate permission or consent will be obtained through a pop-up window or by jumping to a confirmation page. After clearly obtaining the user's separate permission or consent, the necessary user-related data for the normal operation of the embodiment of the present application will be obtained.
[0085] Figure 1 is an optional flow chart of the heterogeneous network interconnection communication method provided in the embodiment of the present application. Figure 1 The method may include but is not limited to steps S110 to S160.
[0086] Step S110, obtaining original data packet information sent from the first device to the second device;
[0087] Step S120, determining the network communication type, data packet length, and optional field type based on the original data packet information;
[0088] Step S130, extracting the quintuple information of the original data packet information, and calculating the corresponding hash value according to the quintuple information;
[0089] Step S140, obtaining a preset first count value of the network tunnel module and a second count value of the protocol conversion module;
[0090] Step S150, when the network communication type is heterogeneous network communication, according to the first count value, the second count value, the packet length and at least one parameter of the optional field type, a network tunnel module or a protocol conversion module is selected to convert the original packet information to obtain target packet information matching the communication protocol of the second device;
[0091] Step S160: updating the first count value of the network tunnel module or the second count value of the protocol conversion module according to the hash value.
[0092] In step S110, the acquisition of original data packet information generally involves network layer operations and data packet capture, which are not specifically limited here.
[0093] In step S120, the network communication types here include homogeneous network communication and heterogeneous network communication. Homogeneous network communication refers to a communication method in which all nodes (such as computers, devices, etc.) have the same functions and characteristics in the network. In such a network, each node can perform the same operation, and the communication method between nodes is also the same. For example, the communication protocol of the first device and the second device is IPv4, then when the original data packet information sent by the first device to the second device, the network communication type corresponding to the original data packet information is homogeneous network communication. Heterogeneous network communication refers to a communication method in which nodes have different functions and characteristics in the network. The nodes in such a network may be produced by different manufacturers, run on different protocols, and support different functions or applications. Heterogeneous network communication allows different types of nodes to coexist in the network and communicate through specific mechanisms. For example, the communication protocol of the first device is IPv4, and the communication protocol of the second device is IPv6, then when the original data packet information sent by the first device to the second device, the network communication type corresponding to the original data packet information is heterogeneous network communication.
[0094] In step S130, the five-tuple information is an identifier of a network traffic, which can uniquely determine the source and destination of a network data packet, as well as the transmission protocol used, including the source IP address, source port, destination IP address, destination port and transport layer protocol.
[0095] Steps S110 to S160 shown in the embodiment of the present application capture the original data packet information sent from the first device to the second device, and then deeply analyze the original data packet information to determine its network communication type, data packet length and optional field type, and extract the five-tuple information of the original data packet information (usually including source IP address, target IP address, source port, target port and transport layer protocol), and based on these five-tuple information, the system will calculate the corresponding hash value. The first count value of the preset network tunnel module and the second count value of the protocol conversion module are queried, and the first count value and the second count value represent the load status of the corresponding module respectively. When it is determined that the current network communication type is heterogeneous network communication, the first count value of the network tunnel module, the second count value of the protocol conversion module, the data packet length and the optional field type are used to determine which module to use to convert the original data packet information, with the goal of generating a target data packet information that fully matches the communication protocol of the second device. Finally, the system will update the count value of the network tunnel module or the protocol conversion module involved in the data packet conversion according to the previously calculated hash value. This update mechanism can help the system track the usage of each module so that it can be optimized or adjusted when necessary. In this communication method, by dynamically selecting a network tunnel module or a protocol conversion module according to key information such as network communication type, data packet length, and optional field type, the method can achieve flexible adaptation to different network environments and communication requirements, thereby improving the flexibility of communication. At the same time, the method does not rely on fixed calculation logic and conversion rules, so it can be easily expanded to adapt to new network protocols and communication requirements, thereby enhancing the scalability of the system and improving the communication effect of heterogeneous networks.
[0096] See also Figure 2 In step S150, the following steps may be included but not limited to:
[0097] Step S210: when the first count value is greater than or equal to a preset first programmable threshold, the original data packet information is converted by the protocol conversion module to obtain target data packet information matching the communication protocol of the second device;
[0098] Step S220: when the second count value is greater than or equal to a preset second programmable threshold, the original data packet information is converted through the network tunnel module to obtain target data packet information matching the communication protocol of the second device;
[0099] Step S230: When the first count value is less than the first programmable threshold and the second count value is less than the second programmable threshold, select a network tunnel module or a protocol conversion module according to the packet length and the optional field type to convert the original packet information to obtain target packet information that matches the communication protocol of the second device.
[0100] In step S210 to step S230, the first programmable threshold and the second programmable threshold represent the maximum data packet size that can be processed by the network tunnel module and the protocol conversion module, respectively. When the first count value is greater than or equal to the preset first programmable threshold, it means that the traffic of the network tunnel module is abnormal, and the protocol conversion module is selected to convert the original data packet information. When the second count value is greater than or equal to the preset second threshold, it means that the traffic of the protocol conversion module is abnormal, and the network tunnel module is selected to convert the original data packet information. When the first count value is less than the first programmable threshold and the second count value is less than the second programmable threshold, it means that both the network tunnel module and the protocol conversion module can work normally, then according to the data packet length and the optional field type, it is determined that the network tunnel module or the protocol conversion module converts the original data packet information. In addition, since the thresholds are programmable, the administrator or the system can flexibly adjust these thresholds according to the network environment and application requirements, and can adapt to different network environments and application requirements, and provide more accurate traffic monitoring and anomaly detection. By monitoring whether the traffic of the network tunnel module and the protocol conversion module is abnormal through the first programmable threshold and the second programmable threshold, different processing strategies can be selected. This dynamic selection strategy can optimize the utilization of network resources and improve the flexibility and scalability of heterogeneous network interconnection conversion configuration.
[0101] See also Figure 3 In step S230, the following steps may be included but not limited to:
[0102] Step S310: when the length of the data packet is greater than a preset length threshold, and the optional field type includes an uncertain optional field, converting the original data packet information through a network tunnel module;
[0103] Step S320: When the length of the data packet is less than or equal to the length threshold, and the optional sub-segment does not include an uncertain optional field, the original data packet information is converted through the protocol conversion module.
[0104] In step S310 to step S320, in this embodiment, the length threshold is 1024. When the length of the data packet is greater than 1024, it is considered that the original data packet information is fragmented, and direct transmission may cause network congestion or efficiency problems. Selecting the network tunnel module for conversion can more effectively encapsulate and transmit large data packets, avoid network congestion, and optimize resource utilization. On the contrary, when the length of the data packet is small, selecting the protocol conversion module for conversion can process the data packet faster, reduce the conversion overhead, and improve processing efficiency. It should be noted that the preset length threshold can be determined by the user programmable. In addition, the uncertain optional field in the optional field type may mean that the data packet contains unclear information that is difficult to directly parse or convert. In this case, selecting the network tunnel module for conversion can ensure that the data packet maintains its original structure during transmission, avoiding the loss or incorrect parsing of this information during the protocol conversion process. When there is no uncertain optional field in the optional field type, selecting the protocol conversion module can ensure that the data packet is accurately converted to the format required by the target network, thereby improving the accuracy of data processing.
[0105] See also Figure 4 In step S220, the following steps may be included but not limited to:
[0106] Step S410: Determine mapping entry information according to the preset local relationship mapping table and the header information of the original data packet information;
[0107] Step S420: when the local relationship mapping table does not have a mapping entry that matches the original data packet information, determining the mapping entry information according to the preset remote relationship mapping table and the header information of the original data packet information;
[0108] Step S430: encapsulate the original data packet information according to the mapping entry information, and add a header field to generate target data packet information that matches the communication protocol of the second device; wherein the header field includes a target address and a tunnel identifier.
[0109] In step S410 and step S420, first, by searching the local relationship mapping table, the system can quickly determine whether there is a mapping entry that matches the original data packet information. If a matching mapping entry is found, the entry can be directly used for encapsulation processing, which reduces the time for querying the remote server or database and improves the conversion efficiency. At the same time, since the mapping entries are pre-defined and verified, the accuracy of the conversion can also be guaranteed by using these entries for conversion.
[0110] In step S430, during the encapsulation process, the system will add header fields, including the target address and the tunnel identifier, according to the mapping entry information. These header fields enable the target data packet to be correctly routed to the target network and transmitted through the tunnel. In one embodiment, for example, the IPv4 address of the first device is 10.1.1.3, the IPv6 address of the second device is 2001:db8::1, and the first device sends the original data packet information to the second device. The network tunnel module will encapsulate the original data packet information sent by the first device and add an IPv6 header to the outside of the original IPv4 data packet. This header contains the target IPv6 address (2001:db8::1) and other necessary tunnel information (such as the tunnel identifier).
[0111] See also Figure 5 In step S210, the following steps may be included but not limited to:
[0112] Step S510: Determine mapping entry information according to the preset local relationship mapping table and the header information of the original data packet information;
[0113] Step S520: when the local relationship mapping table does not have a mapping entry matching the original data packet information, determining the mapping entry information according to the preset remote relationship mapping table and the header information of the original data packet information;
[0114] Step S530: Update the header information of the original data packet information according to the mapping entry information, and generate target data packet information matching the communication protocol of the second device.
[0115] In step S510 to step S520, similar to step S410 to step S420 in the above embodiment, first, the system quickly determines whether there is a mapping entry that matches the original data packet information by searching the local relationship mapping table. If there is a match, the mapping entry can be directly used to rewrite the data packet header information, reducing the overhead of remote query and improving conversion efficiency. At the same time, since the mapping entries are predefined and verified, using them to rewrite the header information can also ensure the accuracy of the conversion.
[0116] In step S530, the header information of the original data packet information is rewritten, specifically, an IPv6 header is constructed, an IPv4 header is deleted, and a protocol field of a MAC header is updated, thereby forming new target data packet information.
[0117] See also Figure 6 After step S150, the method further includes but is not limited to the following steps:
[0118] Step S610: when the local relationship mapping table does not have a mapping entry that matches the original data packet information, the mapping entry information obtained from the remote relationship mapping table is added to the local relationship mapping table;
[0119] Step S620: obtaining the usage frequency of each mapping entry information in the local relationship mapping table at a preset first time interval, and deleting the mapping entry with the lowest usage frequency in the local relationship mapping table.
[0120] In step S610, after obtaining the mapping entry information from the remote relationship mapping table and adding it to the local relationship mapping table, the next time the system encounters the same original data packet information, it can directly obtain the mapping entry from the local table without querying the remote table again, thereby reducing the overhead of remote queries and improving the system's response speed and efficiency.
[0121] In step S620, by obtaining the usage frequency of each mapping entry information in the local relationship mapping table at a preset first time every interval, and deleting the lowest mapping entry according to the usage frequency, the system can continuously optimize the content of the local mapping table to make it more closely related to the current network environment and data traffic pattern, reduce unnecessary memory usage and computing overhead, and thus improve the overall performance of the system.
[0122] Regarding the mapping table, its matching domain and action domain parameter items can be programmed by the user in the data plane, which is the basis for the data plane to implement protocol processing. The data plane must know the source address and destination address of the original data when it is converted to the new network protocol. Please refer to the following table: Protocol conversion mapping table:
[0123]
[0124] The protocol conversion mapping table maintained by the programmable switch control plane consists of two parts: the Key matching domain and the Act i on action domain. The matching domain contains the data packet source port number, data packet source address, and destination address; the action domain contains the data packet destination port, protocol type, source address, and destination address.
[0125] The table type is the table name defined by the data plane, and the control plane sends flow table entries according to the table. The source port number indicates the port where the data packet enters the switch. The source address and destination address of the data packet before conversion in the match field are the addresses of the MAC layer. The destination port indicates the port where the data packet is forwarded out of the switch. The protocol type indicates the protocol type of the data packet after protocol conversion, where 0x0800 indicates IPv4 protocol and 0x86dd indicates IPv6 protocol. The source address and destination address of the action field are the source address and destination address after protocol conversion.
[0126] Communication scenario 1: As shown in the IPv4_Table table type in the protocol conversion mapping table above, it corresponds to the communication between host A in subnet 1 and host C in subnet 3. The source port number of the data packet entering the switch is 1, the source address is IPv4_src, and the destination address is IPv4_dst. The destination port number of the data packet leaving the switch is 6. The protocol type of the data packet after the processing module is 0x0800. The source address of the processed data packet is IPv4_src, and the destination address is IPv4_dst.
[0127] Communication scenario 2: As shown in the IPv6_Table type in the protocol conversion mapping table above, it corresponds to the communication between host B in subnet 2 and host D in subnet 4. The source port number of the data packet entering the switch is 2, the source address is IPv6_src, and the destination address is IPv6_dst. The destination port number of the data packet leaving the switch is 7. The protocol type of the data packet after the processing module is 0x08dd. The source address of the processed data packet is IPv6_src, and the destination address is IPv6_dst.
[0128] Communication scenario 3: As shown in the IPv4_6_Table table type in the protocol conversion mapping table above, it corresponds to the communication between host A in subnet 1 and host B in subnet 2. The source port number of the data packet entering the switch is 3, the source address is IPv4_src, and the destination address is IPv4_dst. The destination port number of the data packet leaving the switch is 8. The protocol type of the data packet after the processing module is 0x08dd. The source address of the processed data packet is IPv6_src, and the destination address is IPv6_dst.
[0129] Communication scenario 4: As shown in the IPv6_4_Table table type in the protocol conversion mapping table above, it corresponds to the communication between host D in subnet 4 and host C in subnet 3. The source port number of the data packet entering the switch is 4, the source address is IPv6_src, and the destination address is IPv6_dst. The destination port number of the data packet leaving the switch is 9. The protocol type of the data packet after the processing module is 0x0800. The source address of the processed data packet is IPv4_src, and the destination address is IPv4_dst.
[0130] See also Figure 7 After step S110, the heterogeneous network interconnection communication method provided by the present application may also include but is not limited to the following steps:
[0131] Step S710: when the network communication type is homogeneous network communication, the original data packet information is used as the target data packet information;
[0132] Step S720: Send the target data packet information to the second device.
[0133] In step S710, when the network communication type is identified as homogeneous network communication, that is, the sender's first device and the receiver's second device use the same network protocol and data format, the system can directly send the original data packet information as the target data packet information without any conversion, thereby simplifying the processing flow and improving communication efficiency.
[0134] The overall steps of this application are described in detail below.
[0135] See also Figure 8 In this application, the network communication type is set as homogeneous network communication as condition A, the data packet length is greater than the preset length threshold as condition B, and the optional field type has an uncertain optional field as condition C, that is, under the condition that the first count value is less than the first programmable threshold and the second count value is less than the second programmable threshold, when (! A) && (B|| C) == 1, that is, condition A is false and only one of condition B and condition C is true, the network tunnel module is executed to process the original data packet information. For the specific execution process of the network tunnel module, please refer to Fig. 9 ; When A||B||C==0, that is, condition A is false and both condition B and condition C are false, the protocol conversion module is executed to process the original data packet information. For the specific execution process of the protocol conversion module, please refer to Fig.10 .
[0136] Reference Figures 8 to 11 , the heterogeneous network interconnection communication method is specifically as follows:
[0137] (1) Parse the network data packets from the subnet and extract the five-tuple information of the protocol data packet, and use the five-tuple information as an operator to perform hash calculation to calculate the Hash value of the data packet, and maintain a statistical table of Hash count values of different data packets in real time;
[0138] (2) Based on the source address and destination address information of the data packet header extracted by the data packet preprocessing module, query the mapping relationship of the protocol conversion mapping table to determine whether the destination address of the data packet is to communicate with a subnet of the same type or to communicate with a heterogeneous subnet. If it is a homogeneous network communication, the process enters path 1 and directly enters the forwarding module to forward the data packet; if it is a heterogeneous network communication, continue to make conditional judgments and the process enters path 2 or path 3;
[0139] (3) The adaptive processing module periodically and dynamically monitors and counts the traffic information of the data packets entering path 2 and path 3, that is, it counts the hash values of different data packets after preprocessing. When the count values X2 and X3 are less than the threshold value V=10240 within a certain period of time, it indicates that the traffic is stable; when the count value X2 or X3 is greater than the user-programmable threshold value V=10240, it is judged that the traffic is abnormal;
[0140] (4) If the traffic is stable, choose to enter path 2 or path 3 according to the logical value of condition B||C. The details are as follows: set condition B, that is, whether there is fragmentation, calculate and determine whether the data packet length PL is greater than the maximum transmission unit MTU = 1024 threshold. The MTU is programmable by the user. If it is greater than the MTU domain value, condition B is true, otherwise it is false; set condition C, that is, whether there is an uncertain optional field in the data packet header. If it exists, condition C is true, otherwise it is false. When B||C is true, the process follows path 3 to enter the network tunnel module; when B||C is false, the process follows path 2 to enter the protocol conversion module;
[0141] (5) If the traffic is judged to be abnormal, the abnormal path traffic is judged. If it is found that there are a large number of data packets to be processed on path 3 within a certain period of time, that is, the hash count value X3 is greater than the threshold value V, then logical intervention is performed, and the transmission channel of path 3 is closed and the transmission channel of path 2 is opened after the current data packet is processed, so that the data packet can enter the protocol conversion module through the logical channel of path 2; If it is found that there are a large number of data packets to be processed on path 2 within a certain period of time, that is, the hash count value X2 is greater than the threshold value V, then logical intervention is performed, and the transmission channel of path 2 is closed and the transmission channel of path 3 is opened after the current data packet is processed, so that the data packet can enter the network tunnel module through the logical channel of path 3;
[0142] (6) If the data packet enters the programmable network tunnel module, first query the local cache mapping table to see if there is header information (source port number, source IP address, destination IP address) that matches the data packet. If the entry information is not found in the local cache mapping table, request the cross-protocol mapping entry of the data packet from the control plane, cache it in the local mapping table, and then perform tunnel transmission protocol header encapsulation; if the mapping entry information is found in the local mapping table, directly encapsulate the data packet's transmission protocol header field segment and insert the protocol type field of the MAC header of the corresponding protocol;
[0143] (7) If the data packet enters the programmable protocol conversion module, first query the mapping relationship table in the local cache to see if there is header information (source port number, source IP address, destination IP address) that matches the data packet. If the entry information is not found in the local cache relationship mapping table, request the control plane for the cross-protocol mapping entry of the data packet. The control plane sends the corresponding flow table entry according to the global protocol mapping table. The data plane performs corresponding operations according to the flow table sent by the control plane, including building the transmission protocol header and deleting the subnet protocol header, updating the protocol field of the MAC header, and caching the flow table content; if the entry information is found in the local cache relationship mapping table, perform related operations of building the transmission protocol header and deleting the subnet protocol header according to the relevant information, and update the protocol type field of the MAC header;
[0144] (8) Finally, the data packets processed by path 1, path 2 and path 3 enter the forwarding module for forwarding. The forwarding port forwards the data packets according to the corresponding destination port number in the local protocol conversion mapping table maintained by the data plane.
[0145] In the heterogeneous network interconnection communication method of the present application, a programmable protocol conversion mapping table is constructed on the control plane, a hash count value statistics table and a locally cached protocol conversion mapping table are maintained in real time on the data plane, and programmable technology is used to implement network tunnel and protocol conversion technology, so as to realize programmable heterogeneous network conversion function, and achieve the effect of flexible heterogeneous conversion configuration and strong scalability. And according to the logical relationship of network communication mode judgment, abnormal traffic monitoring, whether the data packet length PL is greater than the MTU threshold, and whether there is an uncertain optional field in the data packet header, the next step path is judged in the adaptive processing module whether to execute the network tunnel or protocol conversion, thereby improving the transmission efficiency and accuracy of heterogeneous network communication.
[0146] See also Fig.10 The embodiment of the present application further provides a heterogeneous network interconnection communication device 800, which can implement the above-mentioned heterogeneous network interconnection communication method, and the device includes:
[0147] A first acquisition module 810 is used to acquire original data packet information sent from the first device to the second device;
[0148] A determination module 820, for determining the network communication type, the packet length, and the optional field type according to the original packet information;
[0149] A calculation module 830 is used to extract the five-tuple information of the original data packet information and calculate the corresponding hash value according to the five-tuple information;
[0150] A second acquisition module 840, used to acquire a preset first count value of the network tunnel module and a second count value of the protocol conversion module;
[0151] The conversion module 850 is used to determine, when the network communication type is heterogeneous network communication, whether the network tunnel module or the protocol conversion module converts the original data packet information according to the first count value, the second count value, the data packet length and the optional field type, to obtain target data packet information matching the communication protocol of the second device;
[0152] The updating module 860 is used to update the first count value of the network tunnel module or the second count value of the protocol conversion module according to the hash value. The specific implementation of the heterogeneous network interconnection communication device is basically the same as the specific implementation of the heterogeneous network interconnection communication method described above, and will not be repeated here.
[0153] The embodiment of the present application also provides an electronic device, the electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the above heterogeneous network interconnection communication method when executing the computer program. The electronic device can be any intelligent terminal including a tablet computer, a car computer, etc.
[0154] See also Fig.12 , Fig.12 The hardware structure of an electronic device of another embodiment is illustrated, and the electronic device includes:
[0155] The processor 901 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present application;
[0156] The memory 902 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 902 can store an operating system and other application programs. When the technical solution provided in the embodiment of this specification is implemented by software or firmware, the relevant program code is stored in the memory 902, and the processor 901 calls and executes the heterogeneous network interconnection communication method of the embodiment of this application;
[0157] Input / output interface 903, used to implement information input and output;
[0158] Communication interface 904, used to realize communication interaction between the device and other devices, which can be realized through wired mode (such as USB, network cable, etc.) or wireless mode (such as mobile network, WI FI, Bluetooth, etc.);
[0159] A bus 905 that transmits information between the various components of the device (e.g., the processor 901, the memory 902, the input / output interface 903, and the communication interface 904);
[0160] The processor 901 , the memory 902 , the input / output interface 903 and the communication interface 904 are connected to each other in communication within the device via a bus 905 .
[0161] An embodiment of the present application also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the above-mentioned heterogeneous network interconnection communication method is implemented.
[0162] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely disposed relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0163] The heterogeneous network interconnection communication method, heterogeneous network interconnection communication device, electronic device and storage medium provided in the embodiment of the present application capture the original data packet information sent from the first device to the second device, and then deeply analyze the original data packet information to determine its network communication type, data packet length and optional field type, and extract the five-tuple information of the original data packet information (usually including source IP address, target IP address, source port, target port and transport layer protocol), and based on these five-tuple information, the system will calculate the corresponding hash value. Query the first count value of the preset network tunnel module and the second count value of the protocol conversion module, the first count value and the second count value represent the load status of the corresponding module respectively. When it is determined that the current network communication type is heterogeneous network communication, it is determined which module to use to convert the original data packet information according to the first count value of the network tunnel module, the second count value of the protocol conversion module, the data packet length and the optional field type, with the goal of generating a target data packet information that fully matches the communication protocol of the second device. Finally, the system will update the count value of the network tunnel module or the protocol conversion module involved in the data packet conversion according to the previously calculated hash value. This update mechanism can help the system track the usage of each module so that it can be optimized or adjusted when necessary. In this communication method, by dynamically selecting a network tunnel module or a protocol conversion module based on key information such as network communication type, packet length, and optional field type, the method can achieve flexible adaptation to different network environments and communication requirements, thereby improving the flexibility of communication. At the same time, the method does not rely on fixed computing logic and conversion rules, so it can be easily expanded to adapt to new network protocols and communication requirements, enhancing the scalability of the system and improving the communication effect of heterogeneous networks.
[0164] The embodiments described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
[0165] Those skilled in the art will appreciate that the technical solutions shown in the figures do not constitute a limitation on the embodiments of the present application, and may include more or fewer steps than shown in the figures, or a combination of certain steps, or different steps.
[0166] The device embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0167] Those skilled in the art will appreciate that all or some of the steps in the methods disclosed above, and the functional modules / units in the systems and devices may be implemented as software, firmware, hardware, or a suitable combination thereof.
[0168] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0169] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.
[0170] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the above units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0171] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0172] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0173] If the 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 computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially 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, and the computer software product is stored in a storage medium, including multiple instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), disk or optical disk and other media that can store programs.
[0174] The preferred embodiments of the present invention are described above with reference to the accompanying drawings, but the scope of the rights of the present invention is not limited thereto. Any modification, equivalent substitution and improvement made by a person skilled in the art without departing from the scope and essence of the present invention should be within the scope of the rights of the present invention.
Claims
1. A heterogeneous network interconnection communication method, characterized in that: The method comprises: Obtaining original data packet information sent from the first device to the second device; Determine the network communication type, data packet length, and optional field type based on the original data packet information; Extracting the five-tuple information of the original data packet information, and calculating the corresponding hash value according to the five-tuple information; Obtaining a preset first count value of the network tunnel module and a second count value of the protocol conversion module; When the network communication type is heterogeneous network communication, according to the first count value, the second count value, the packet length and at least one parameter of the optional field type, the network tunnel module or the protocol conversion module is selected to convert the original packet information to obtain target packet information matching the communication protocol of the second device; According to the hash value, the first count value of the network tunnel module or the second count value of the protocol conversion module is updated.
2. The heterogeneous network interconnection communication method according to claim 1, characterized in that: The selecting the network tunnel module or the protocol conversion module to convert the original data packet information according to the first count value, the second count value, the data packet length, and at least one parameter of the optional field type to obtain target data packet information matching the communication protocol of the second device includes: When the first count value is greater than or equal to a preset first programmable threshold, the original data packet information is converted by the protocol conversion module to obtain target data packet information matching the communication protocol of the second device; When the second count value is greater than or equal to a preset second programmable threshold, the original data packet information is converted by the network tunnel module to obtain target data packet information matching the communication protocol of the second device; When the first count value is less than the first programmable threshold and the second count value is less than the second programmable threshold, the network tunnel module or the protocol conversion module is selected according to the data packet length and the optional field type to convert the original data packet information to obtain target data packet information that matches the communication protocol of the second device.
3. The heterogeneous network interconnection communication method according to claim 2, characterized in that: The selecting the network tunnel module or the protocol conversion module to convert the original data packet information according to the data packet length and the optional field type includes: When the length of the data packet is greater than a preset length threshold, and the optional field type includes an uncertain optional field, converting the original data packet information through the network tunnel module; When the length of the data packet is less than or equal to the length threshold, and the optional sub-segment does not include an uncertain optional field, the original data packet information is converted by the protocol conversion module.
4. The heterogeneous network interconnection communication method according to claim 2, characterized in that: The converting the original data packet information through the network tunnel module to obtain target data packet information matching the communication protocol of the second device includes: Determine mapping entry information according to a preset local relationship mapping table and header information of the original data packet information; When the local relationship mapping table does not have a mapping entry matching the original data packet information, determining the mapping entry information according to a preset remote relationship mapping table and header information of the original data packet information; According to the mapping entry information, the original data packet information is encapsulated and a header field is added to generate target data packet information matching the communication protocol of the second device; wherein the header field includes a target address and a tunnel identifier.
5. The heterogeneous network interconnection communication method according to claim 2, characterized in that: The converting the original data packet information by the protocol conversion module to obtain target data packet information matching the communication protocol of the second device includes: Determine mapping entry information according to a preset local relationship mapping table and header information of the original data packet information; When the local relationship mapping table does not have a mapping entry matching the original data packet information, determining the mapping entry information according to a preset remote relationship mapping table and header information of the original data packet information; The header information of the original data packet information is updated according to the mapping entry information to generate target data packet information matching the communication protocol of the second device.
6. The heterogeneous network interconnection communication method according to claim 4 or 5, characterized in that: After the step of obtaining target data packet information matching the communication protocol of the second device, the method further includes: When the local relationship mapping table does not have a mapping entry matching the original data packet information, adding the mapping entry information obtained from the remote relationship mapping table to the local relationship mapping table; The usage frequency of each mapping entry information in the local relationship mapping table is obtained at a preset first time interval, and the mapping entry with the lowest usage frequency in the local relationship mapping table is deleted.
7. The heterogeneous network interconnection communication method according to claim 1, characterized in that: After the step of obtaining the original data packet information sent from the first device to the second device, the method further includes: When the network communication type is homogeneous network communication, the original data packet information is used as the target data packet information; The target data packet information is sent to the second device.
8. A heterogeneous network interconnection communication device, characterized in that: The device comprises: A first acquisition module, used to acquire original data packet information sent from the first device to the second device; A determination module, used to determine the network communication type, the packet length, and the optional field type according to the original packet information; A calculation module, used for extracting the five-tuple information of the original data packet information, and calculating the corresponding hash value according to the five-tuple information; A second acquisition module, used to acquire a first count value of a preset network tunnel module and a second count value of a protocol conversion module; a conversion module, configured to, when the network communication type is heterogeneous network communication, select the network tunnel module or the protocol conversion module to convert the original data packet information according to the first count value, the second count value, the data packet length and at least one parameter of the optional field type to obtain target data packet information matching the communication protocol of the second device; An updating module is used to update the first counting value of the network tunnel module or the second counting value of the protocol conversion module according to the hash value.
9. An electronic device, characterized in that: The electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the heterogeneous network interconnection communication method described in any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the heterogeneous network interconnection communication method described in any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Loading protocol packet data transmission method and system among heterogeneous networks
CN104639507A
Protocol conversion method of EtherCAT and IPv6 network
CN111212089A
Cross-protocol load balancing methods and systems
CN114938374A
Heterogeneous protocol conversion system and method
CN116760911A
Cited By
Heterogeneous communication protocol fusion management method and system
CN119788752A
Network system configuration method and network system
TWI933415B
