Heterogeneous network interconnection communication method and apparatus, electronic device, and storage medium

By dynamically selecting a network tunnel module or a protocol conversion module, and generating data packet information that matches the target device's protocol based on the quintuple information and count value, the flexibility and scalability issues in heterogeneous network communication are solved, and efficient heterogeneous network interconnection is achieved.

CN118972469BActive Publication Date: 2025-11-04PENG CHENG LAB
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411053538.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-01
Publication Date
2025-11-04
Estimated Expiration
2044-08-01

AI Technical Summary

Technical Problem

Existing network interconnection and communication methods rely on fixed network tunnel modules and protocol conversion modules, which cannot meet the needs of efficient communication in complex network environments, especially during the transition from IPv4 to IPv6, when heterogeneous network devices cannot communicate effectively.

Method used

By obtaining the five-tuple information of the original data packet, calculating the hash value, and dynamically selecting the conversion module based on the count values ​​of the network tunnel module and the protocol conversion module, the data packet length, and the optional field types, data packet information matching the target device protocol is generated, and the module count value is updated to optimize resource utilization.

Benefits of technology

It enables flexible adaptation and efficient communication in heterogeneous network environments, improves communication flexibility and system scalability, and adapts to new network protocols and communication requirements.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118972469B_ABST
    Figure CN118972469B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a heterogeneous network interconnection communication method and device, electronic equipment and storage medium. The method comprises: obtaining original data packet information; determining network communication type, data packet length and optional field type according to the original data packet information; extracting quintuple information of the original data packet information and calculating the corresponding hash value; obtaining a first count value of a preset network tunnel module and a second count value of a protocol conversion module; when the network communication type is heterogeneous network communication, 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 the optional field type, and obtaining target data packet information; and 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. The embodiments of the present application can improve the flexibility and expandability of the heterogeneous network interconnection conversion configuration, and improve the communication effect of the heterogeneous network.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of cross-protocol transmission, and particularly relates to a heterogeneous network interconnection communication method and device, electronic equipment and storage medium. BACKGROUND

[0002] Under the current development trend of IP network technology, Internet based on IPv4 as the core technology has achieved great success, but 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 scarcity of existing IPv4 addresses, network security, service guarantee and so on. IPv6 can effectively improve these problems, and the upgrade transition from IPv4 to IPv6 has become the trend of Internet development. In the traditional network, protocol data packets can only be transmitted in the same network protocol, and the devices under the same network protocol can communicate, but the devices under different network protocols cannot communicate.

[0003] The traditional network interconnection communication method often depends on fixed network tunnel modules and protocol conversion modules, which adopt fixed computing logic and conversion rules when processing data packets. However, with the continuous development of network technology and the diversification of communication needs, the fixed computing logic and conversion rules have been unable to meet the efficient communication needs in complex network environment. SUMMARY

[0004] The main purpose of the embodiments of the present application is to provide a heterogeneous network interconnection communication method and device, electronic equipment and storage medium, which aims to improve the flexibility and expandability of heterogeneous network interconnection conversion configuration, and improve the communication effect of heterogeneous network.

[0005] To achieve the above purpose, the first aspect of the embodiments of the present application provides a heterogeneous network interconnection communication method, which comprises:

[0006] Obtaining original data packet information sent from a first device to a second device;

[0007] According to the original data packet information, determining the network communication type, the data packet length, and the optional field type;

[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 first count value of a preset network tunnel module and a second count value of a protocol conversion module;

[0010] When the network communication type is heterogeneous network communication, the network tunnel module or the protocol conversion module is selected according to at least one of the first count value, the second count value, the data packet length and the optional field type to convert the original data packet information, so as to obtain target data 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, the selection of the network tunnel module or the protocol conversion module to convert the original data packet information according to at least one of 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 comprises:

[0013] When the first count value is greater than or equal to a preset first programmable threshold, the protocol conversion module is used to convert the original data packet information, so as 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 network tunnel module is used to convert the original data packet information, so as 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, so as to obtain target data packet information matching the communication protocol of the second device.

[0016] In some embodiments, the selection of the network tunnel module or the protocol conversion module according to the data packet length and the optional field type to convert the original data packet information comprises:

[0017] When the data packet length is greater than a preset length threshold, and the optional field type includes an uncertain optional field, the network tunnel module is used to convert the original data packet information.

[0018] When the data packet length is less than or equal to the length threshold, and the optional sub-section does not include an uncertain optional field, the protocol conversion module is used to convert the original data packet information.

[0019] In some embodiments, the converting the original data packet information by the network tunneling module to obtain target data packet information matching the communication protocol of the second device comprises:

[0020] According to the preset local relationship mapping table and the header information of the original data packet information, mapping entry information is determined;

[0021] When the local relationship mapping table does not have a mapping entry matching the original data packet information, according to the preset remote relationship mapping table and the header information of the original data packet information, the mapping entry information is determined;

[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, 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 comprises:

[0024] According to the preset local relationship mapping table and the header information of the original data packet information, mapping entry information is determined;

[0025] When the local relationship mapping table does not have a mapping entry matching the original data packet information, according to the preset remote relationship mapping table and the header information of the original data packet information, the mapping entry information is determined;

[0026] According to the mapping entry information, the header information of the original data packet information is updated 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 comprises:

[0028] When the local relationship mapping table does not have a mapping entry matching the original data packet information, the mapping entry information obtained from the remote relationship mapping table is added to the local relationship mapping table;

[0029] Every interval of a preset first time, the use frequency of each mapping entry information in the local relationship mapping table is obtained, and the mapping entry with the lowest use frequency in the local relationship mapping table is deleted.

[0030] In some embodiments, after the step of obtaining original data packet information sent from the first device to the second device, the method further comprises:

[0031] When the network communication type is homogeneous network communication, the original data packet information is taken as the target data packet information; and the target data packet information is sent to the second device.

[0032] To achieve the above object, a second aspect of the embodiment of the present application provides a heterogeneous network interconnection communication device, which comprises:

[0033] A first obtaining module is configured to obtain original data packet information sent from a first device to a second device;

[0034] A determining module is configured to determine a network communication type, a data packet length and an optional field type according to the original data packet information;

[0035] A calculating module is configured to extract five-tuple information of the original data packet information, and calculate a corresponding hash value according to the five-tuple information;

[0036] A second obtaining module is configured to obtain a first count value of a network tunnel module and a second count value of a protocol conversion module;

[0037] A conversion module is 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 at least one parameter of the first count value, the second count value, the data packet length and the optional field type, so as to obtain target data packet information matching a communication protocol of the second device;

[0038] An updating module is configured 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.

[0039] To achieve the above object, a third aspect of the embodiment of the present application provides an electronic device, which comprises a memory and a processor, the memory stores a computer program, and the processor implements the method of the first aspect when executing the computer program.

[0040] To achieve the above object, a fourth aspect of the embodiment of the present application provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the method of the first aspect.

[0041] The heterogeneous network interconnection communication method and device, electronic equipment and storage medium provided by the present application capture the original data packet information sent from the first device to the second device, then perform deep analysis on the original data packet information to determine its network communication type, data packet length and optional field type, and also extract the quintuple information (usually including source IP address, target IP address, source port, target port and transmission layer protocol) of the original data packet information, and based on these quintuple information, the system calculates 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 respectively represent the load status of the corresponding module. When it is determined that the current network communication type is heterogeneous network communication, then 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, it is decided which module is used to convert the original data packet information, and the target is to generate a target data packet information completely matching the communication protocol of the second device. Finally, the system updates the count value of the network tunnel module or the protocol conversion module participating in the data packet conversion according to the hash value calculated before. This updating mechanism can help the system to track the use of each module, so as to optimize or adjust when needed. In this communication method, by dynamically selecting the network tunnel module or the protocol conversion module according to the key information such as network communication type, data packet length and optional field type, this method can realize flexible adaptation to different network environments and communication demands, and improve the flexibility of communication. At the same time, this method does not depend on fixed calculation logic and conversion rules, so it can be easily extended to adapt to new network protocols and communication demands, and enhances the expansibility of the system, and improves the communication effect of heterogeneous network. BRIEF DESCRIPTION OF DRAWINGS

[0042] Figure 1 is a flowchart of the heterogeneous network interconnection communication method provided by the present application;

[0043] Figure 2 is a flowchart of step S150 in Figure 1 ;

[0044] Figure 3 is a flowchart of step S230 in Figure 1 ;

[0045] Figure 4 is a flowchart of step S220 in Figure 1 ;

[0046] Figure 5 is a flowchart of step S210 in Figure 1 ;

[0047] Figure 6 is a flowchart of step S210 in Figure 1the flow chart after step S150 in

[0048] Figure 7 is Figure 1 the flow chart after step S110 in

[0049] Figure 8 is the overall flow chart of the heterogeneous network interconnection communication method provided by the embodiments of the present application;

[0050] Figure 9 is Figure 8 the flow chart of the network tunnel module processing process in

[0051] Figure 10 is Figure 8 the flow chart of the protocol conversion module processing process in

[0052] Figure 11 is the structural schematic diagram of the heterogeneous network interconnection communication device provided by the embodiments of the present application;

[0053] Figure 12 is the hardware structural schematic diagram of the electronic device provided by the embodiments of the present application. DETAILED DESCRIPTION

[0054] In order to make the objects, technical solutions and advantages of the present application clearer, the present application will be further described in detail below with reference to the 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 flow chart, in some cases, the steps shown or described can be executed in a manner different from the module division in the device or the order in the flow chart. The terms "first", "second", etc. in the specification and claims and the above drawings are used to distinguish similar objects, and do not necessarily describe a specific order or sequence.

[0056] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which the present application belongs. The terms used herein are only for the purpose of describing the embodiments of the present application, and are not intended to limit the present application.

[0057] First, the terms involved in the present application are analyzed:

[0058] IP address: IP protocol provides a unified address format, which allocates a logical address for each network and each host on the Internet, so as to shield the difference of physical address. IP protocol is designed for the mutual connection and communication of computer network. In the Internet, it is a set of rules that can realize the mutual communication of all computer networks connected to the network, which stipulates the rules that computers should follow when communicating on the Internet. Any computer system produced by a manufacturer can be interconnected with the Internet as long as it follows the IP protocol. Network systems and equipment produced by various manufacturers, such as Ethernet and packet switching network, cannot be interconnected with each other, and the main reason is that the basic units (technically called "frames") of the data they transmit are different. IP protocol is actually a set of protocol software composed of software programs, which converts various different "frames" into "IP datagram" format. This conversion is one of the most important features of the Internet, which enables all kinds of computers to realize intercommunication on the Internet, that is, to have the "openness" feature. Because of the IP protocol, the Internet has developed rapidly into the world's largest and open computer communication network. Therefore, IP protocol can also be called "Internet protocol".

[0059] IPv4(Internet Protocol version 4, Internet Protocol version 4): one of the core protocols of the Internet, which defines the rules for data communication in the global scope. 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 represented in dotted decimal form, that is, four bytes are separated by decimal and separated by dots, such as "xxx.xxx.xxx.xxx" (where "x" is a number between 0 and 255). However, with the rapid development of network technology, the depletion of IPv4 address resources, and the inherent limitations that cannot meet the needs of network development, some problems have also arisen, such as the scarcity of existing IPv4 addresses, service guarantee problems, etc. The limitations of IPv4 protocol in design have become prominent:

[0060] ①The limitation of IP address space

[0061] IPv4 has 32-bit address, and the number of available IP addresses is about 4.3 billion. Global public IPv4 addresses have been allocated in February 2011, and the proportion of each country is extremely uneven, with some countries occupying a considerable amount of address space.

[0062] ②The number of routing table entries maintained by backbone routers is too large

[0063] Due to the allocation planning in the early development of IPv4, many IPv4 address blocks are not continuous and cannot be aggregated effectively. At present, the global IPv4 BGP routing table is still growing, and even after CIDR aggregation (Classless Inter-Domain Routing), there are still about 700,000 entries. The increasingly large routing table consumes more memory, which has a certain impact on device cost and forwarding efficiency.

[0064] ③Host terminal configuration is complex in IPv4 network

[0065] When connecting host nodes to the network, professional guidance and assistance are generally required, and the network node needs to be set with IP address, subnet mask, gateway address, etc., while users prefer "plug and play".

[0066] ④Lack of security support

[0067] TCP / IP protocol was originally designed for military networks, assuming that users are reliable and not considering network security issues. IPSec (Internet Protocol Security) used to ensure the security of IP data transmission is only an optional item of IPv4 protocol and not a component of it.

[0068] ⑤Lack of QoS support

[0069] IPv4 network provides best-effort service and does not provide quality of service guarantees such as bandwidth, latency, error rate, and jitter. Therefore, IPv4 cannot meet the growing demand for QoS for various types of services.

[0070] IPv6 (Internet Protocol version 6): The Internet Engineering Task Force (IETF) designed the next generation IP protocol 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 to be able to allocate an IP address for every grain of sand on earth.

[0072] ②Hierarchical aggregation improves routing efficiency. IPv6 can provide much larger network prefixes than IPv4, and the same organization can use only one prefix in its network. Hierarchical aggregation makes the number of global routing table entries very small, and the forwarding efficiency is higher.

[0073] ③No need for network address translation (Internet Address Translation, network address translation), IP address is enough, can be allocated to all the Internet of Things devices around the world, no need for NAT, solve the problem of NAT address tracing.

[0074] ④No broadcast, the stability of the network is stronger QOS (Quality of Service, service quality) is more secure.

[0075] ⑤IPv6 added flow label, can allow network users to make requirements on the quality of communication.

[0076] Dual stack technology: refers to the network node running two network protocols such as IPv4 and IPv6 protocols at the same time, so as to form two independent networks in the IP network. If this network device is a routing device, the device can access IPv4 network and IPv6 network at the same time; if this network device is a terminal device, it has both IPv4 address and IPv6 address, and has the ability to communicate through the two protocols.

[0077] Network tunneling technology: is based on general routing encapsulation (GRE) protocol to create network tunnel to realize cross protocol transmission, that is, to transmit another network protocol in one network protocol, that is, to encapsulate the data packet generated by other protocols in its own packet, and then transmit it in the network. Tunneling technology includes data encapsulation, transmission, and decapsulation. Instead of upgrading all network devices to support new protocol stack, only the edge devices need to implement dual stack and tunneling function.

[0078] Protocol conversion technology: a kind of cross protocol transmission technology which converts a known network protocol directly into another known network protocol, mainly applied to the address conversion between IPv4 and IPv6 protocols.

[0079] In the prior art, under the current IP network technology development trend, Internet based on IPv4 core technology has achieved great success, but with the rapid development of network technology, the depletion of IPv4 address resources, and its inherent limitations cannot meet the needs of network development, which also brings some problems, such as the scarcity of existing IPv4 address, network security, service guarantee problem, etc. IPv6 can effectively improve these problems, and the upgrade transition from IPv4 to IPv6 has become the trend of Internet development. In the traditional network, protocol data packet can only be transmitted in the same network protocol, and the devices under the same network protocol can communicate, and the devices under different network protocols cannot communicate.

[0080] Traditional network interconnection communication methods often rely on fixed network tunnel modules and protocol conversion modules, which use fixed computing logic and conversion rules when processing data packets. However, with the continuous development of network technology and the diversification of communication needs, fixed computing logic and conversion rules have been unable to meet the efficient communication needs 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 heterogeneous network interconnection conversion configuration, and improve the communication effect of heterogeneous network.

[0082] The heterogeneous network interconnection communication method and device, the electronic device and the storage medium provided by the embodiments of the present application are specifically explained 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 by the embodiments of the present application can be applied in a terminal, can be applied in a server end, and can also be software running in a terminal or a server end. In some embodiments, the terminal can be a smart phone, a tablet computer, a notebook computer, a desktop computer, etc.; the server end can be configured as an independent physical server, can be configured as a server cluster or a distributed system composed of multiple physical servers, can also be configured as a cloud server providing basic cloud computing services such as cloud service, cloud database, cloud computing, cloud function, cloud storage, network service, cloud communication, middleware service, domain name service, security service, CDN, and big data and artificial intelligence platform; and 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 embodiment of the present application, when it is necessary to process relevant data related to the identity or characteristics of the user according to 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 relevant laws, regulations and standards of relevant countries and regions. In addition, when the embodiments of the present application need to obtain sensitive personal information of the user, the separate permission or separate consent of the user will be obtained through a pop-up window or a jump to a confirmation page, and after obtaining the separate permission or separate consent of the user, the necessary user-related data for the normal operation of the embodiments of the present application will be obtained.

[0085] Figure 1 is an optional flowchart of the heterogeneous network interconnection communication method provided by the embodiments of the present application, Figure 1 The method in can 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 network communication type, data packet length, and optional field type according to the original data packet information;

[0088] Step S130, extracting five-tuple information of the original data packet information, and calculating a corresponding hash value according to the five-tuple information;

[0089] Step S140, obtaining a first count value of a network tunnel module and a second count value of a protocol conversion module;

[0090] Step S150, when the network communication type is heterogeneous network communication, selecting the network tunnel module or the protocol conversion module to convert the original data packet information according to at least one of 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;

[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 obtaining of the original data packet information usually involves network layer operation and packet capture, which is not specifically limited here.

[0093] In step S120, the network communication type herein includes homogeneous network communication and heterogeneous network communication. Homogeneous network communication refers to a communication mode in which all nodes (such as computers, devices, etc.) in the network have the same functions and characteristics. In such a network, each node can perform the same operation, and the communication mode between nodes is also the same. For example, if the communication protocol of the first device and the second device is IPv4, then the network communication type corresponding to the original data packet information sent from the first device to the second device is homogeneous network communication. Heterogeneous network communication refers to a communication mode in which nodes have different functions and characteristics in the network. 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, if the communication protocol of the first device is IPv4 and the communication protocol of the second device is IPv6, then the network communication type corresponding to the original data packet information sent from the first device to the second device is heterogeneous network communication.

[0094] In step S130, the quintuple information is an identifier of a network traffic, which can uniquely determine the source and destination of a network packet, as well as the transmission protocol used, including the source IP address, source port, destination IP address, destination port and transmission layer protocol.

[0095] The steps S110 to S160 shown in the embodiments of the present application capture the original packet information sent from the first device to the second device, then perform deep analysis on the original packet information to determine the network communication type, packet length and optional field type, and also extract the quintuple information of the original packet information (usually including the source IP address, target IP address, source port, target port and transmission layer protocol), and based on these quintuple information, the system calculates 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 respectively represent the load status of the corresponding module. When it is determined that the current network communication type is heterogeneous network communication, then according to the first count value of the network tunnel module, the second count value of the protocol conversion module, the packet length and the optional field type, it is decided which module is used to convert the original packet information, and the target is to generate a target packet information completely matching the communication protocol of the second device. Finally, the system updates the count value of the network tunnel module or the protocol conversion module involved in the packet conversion according to the hash value calculated before. This updating mechanism can help the system to track the usage of each module, so as to optimize or adjust when needed. In this communication method, by dynamically selecting the network tunnel module or the protocol conversion module according to the key information such as network communication type, packet length and optional field type, this method can realize flexible adaptation to different network environments and communication demands, and improve the flexibility of communication. At the same time, this method does not depend on fixed calculation logic and conversion rules, so it can be easily extended to adapt to new network protocols and communication demands, and enhances the expansibility of the system, and improves the communication effect of heterogeneous network.

[0096] Please refer to Figure 2 In step S150, the following steps can be included but are not limited to:

[0097] Step S210: when the first count value is greater than or equal to the preset first programmable threshold value, the original packet information is converted through the protocol conversion module to obtain target packet information matching the communication protocol of the second device;

[0098] Step S220: when the second count value is greater than or equal to the preset second programmable threshold value, the original packet information is converted through the network tunnel module to obtain target 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 value and the second count value is less than the second programmable threshold value, 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 matching the communication protocol of the second device.

[0100] In steps S210 to S230, the first programmable threshold value and the second programmable threshold value respectively represent the maximum data packet size that the network tunnel module and the protocol conversion module can process. When the first count value is greater than or equal to the preset first programmable threshold value, it indicates 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 value, it indicates 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 value and the second count value is less than the second programmable threshold value, it indicates that the network tunnel module and the protocol conversion module can work normally, and the network tunnel module or the protocol conversion module is determined according to the data packet length and the optional field type to convert the original data packet information. In addition, since the threshold values are programmable, the administrator or the system can flexibly adjust these threshold values according to the network environment and application requirements, which can adapt to different network environments and application requirements, and provide more accurate traffic monitoring and abnormal detection. According to the monitoring of whether the traffic of the network tunnel module and the protocol conversion module is abnormal through the first programmable threshold value and the second programmable threshold value, different processing strategies can be selected, and the dynamic selection strategy can optimize the utilization of network resources and improve the flexibility and scalability of the heterogeneous network interconnection conversion configuration.

[0101] Please refer to Figure 3 In step S230, the following steps can be included but are not limited to:

[0102] Step S310: When the data packet length is greater than the preset length threshold value, and the optional field type includes an uncertain optional field, the original data packet information is converted through the network tunnel module;

[0103] Step S320: When the data packet length is less than or equal to the length threshold value, and the optional sub-section does not include an uncertain optional field, the original data packet information is converted through the protocol conversion module.

[0104] In steps S310-S320, in this embodiment, the length threshold is 1024, when the data packet length is greater than 1024, it is considered that the original data packet information exists fragmentation, direct transmission may cause network congestion or efficiency problems, select the network tunnel module for conversion, can more effectively encapsulate and transmit large data packets, avoid network congestion, optimize resource utilization. On the contrary, when the data packet length is small, select the protocol conversion module for conversion can faster processing data packets, reduce the conversion overhead, improve processing efficiency. It should be noted that the preset length threshold can be programmable determined by the user. In addition, the uncertain optional field in the optional field type may mean that the data packet contains ambiguous, difficult to directly parse or convert information, in this case, select the network tunnel module for conversion can ensure that the data packet maintains its original structure during transmission, avoid losing or error parsing these information in the protocol conversion process. When there is no uncertain optional field in the optional field type, select the protocol conversion module can ensure that the data packet is accurately converted to the format required by the target network, improve the accuracy of data processing.

[0105] Please refer to Figure 4 In step S220, the following steps can be included but not limited to:

[0106] Step S410: according to the preset local relationship mapping table and the header information of the original data packet information, determine the mapping entry information;

[0107] Step S420: when the local relationship mapping table does not exist the mapping entry matched with the original data packet information, according to the preset remote relationship mapping table and the header information of the original data packet information, determine the mapping entry information;

[0108] Step S430: according to the mapping entry information, encapsulate the original data packet information, and add the header field to generate the target data packet information matched with the communication protocol of the second device; wherein the header field includes the target address and the tunnel identifier.

[0109] In steps S410 and S420, first, by looking up the local relationship mapping table, the system can quickly determine whether there is a mapping entry matched with the original data packet information. If the matching mapping entry is found, the encapsulation processing can be directly performed using the entry, which reduces the time for querying the remote server or database and improves the conversion efficiency. At the same time, since the mapping entry is predefined and verified, using these entries for conversion can also ensure the accuracy of the conversion.

[0110] In step S430, during the encapsulation process, the system adds header fields according to the mapping entry information, including the target address and the tunnel identifier. These header fields enable the target data packet to be routed correctly to the target network and transmitted through the tunnel. In an 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, the first device sends the original data packet information to the second device, and the network tunnel module encapsulates the original data packet information sent by the first device, adds an IPv6 header outside the original IPv4 data packet, and the header contains the target IPv6 address (2001:db8::1) and other necessary tunnel information (such as the tunnel identifier).

[0111] Referring to Figure 5 In step S210, the following steps can be included but are not limited thereto:

[0112] Step S510: determining the 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: updating the header information of the original data packet information according to the mapping entry information to generate target data packet information matching the communication protocol of the second device.

[0115] In steps S510 to S520, similar to steps S410 to S420 in the above embodiment, first, the system quickly determines whether there is a mapping entry matching the original data packet information by searching the local relationship mapping table. If there is a matching entry, the mapping entry can be directly used to rewrite the data packet header information, reducing the overhead of remote query and improving the 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, so as to form new target data packet information.

[0117] Referring to Figure 6 After step S150, the following steps can be included but are not limited thereto:

[0118] Step S610: When the local relationship mapping table does not have a mapping entry matching the original data packet information, add the mapping entry information obtained from the remote relationship mapping table to the local relationship mapping table.

[0119] Step S620: Obtain the use frequency of each mapping entry information in the local relationship mapping table every interval of a preset first time, and delete the mapping entry with the lowest use 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 same original data packet information is encountered, the system can directly obtain the mapping entry from the local table without the need to query the remote table again, reducing the overhead of remote query and improving the response speed and efficiency of the system.

[0121] In step S620, by obtaining the use frequency of each mapping entry information in the local relationship mapping table every interval of a preset first time, and deleting the lowest mapping entry according to the use frequency, the system can continuously optimize the content of the local mapping table, making it more close to the current network environment and data flow mode, reducing unnecessary memory occupation and computing overhead, thereby improving the overall performance of the system.

[0122] Regarding the mapping table, the matching field and action field parameter items can be programmed by the user in the data plane, and are 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 converting to the corresponding source address and destination address of 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 is composed of Key matching field and Action action field, wherein the matching field includes data packet source port number, data packet source address, and destination address; and the action field includes data packet destination port, protocol type, source address, and destination address.

[0125] Table is the table name defined by the data plane, and the control plane issues flow table items according to the table; the source port number indicates the port through which the data packet enters the switch; the matching field conversion of the source address and destination address of the data packet is the address of the mac layer; the destination port indicates the port through which the data packet exits the switch; the protocol type indicates the protocol type of the data packet after protocol conversion, wherein 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 the IPv4_Table table type in the protocol conversion mapping table in the above table, corresponding to the communication between host A in subnet 1 and host C in subnet 3, the source port number of the data packet into 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 out of 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 the IPv6_Table table type in the protocol conversion mapping table in the above table, corresponding to the communication between host B in subnet 2 and host D in subnet 4, the source port number of the data packet into 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 out of 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 the IPv4_6_Table table type in the protocol conversion mapping table in the above table, corresponding to the communication between host A in subnet 1 and host B in subnet 2, the source port number of the data packet into 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 out of 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 the IPv6_4_Table table type in the protocol conversion mapping table in the above table, corresponding to the communication between host D in subnet 4 and host C in subnet 3, the source port number of the data packet into 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 out of 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] Please refer to Figure 7 After step S110, the heterogeneous network interconnection communication method provided by the application can further 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 taken as the target data packet information;

[0132] Step S720: sending the target data packet information to the second device.

[0133] In step S710, when it is identified that the network communication type is homogeneous network communication, i.e., the first device of the sender and the second device of the receiver 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, which simplifies the processing flow and improves the communication efficiency.

[0134] The step flow of the whole application is described in detail below.

[0135] Please refer to Figure 8 In the application, the network communication type being homogeneous network communication is set as condition A, the data packet length being greater than the preset length threshold is set as condition B, and the optional field type being uncertain optional field is set 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, i.e., condition A is false and only one of conditions B and C is true, the network tunnel module processes the original data packet information. For the execution process of the network tunnel module, please refer to Figure 9 ; when A||B||C==0, i.e., condition A is false and conditions B and C are both false, the protocol conversion module processes the original data packet information. For the execution process of the protocol conversion module, please refer to Figure 10 .

[0136] Please refer to Figures 8 to 11 , the heterogeneous network interconnection communication method specifically comprises:

[0137] (1) Analyzing the network data packet from the subnet and extracting the quintuple information of the protocol data packet, and performing hash calculation on the quintuple information as an operator to calculate the Hash value of the data packet, and maintaining a Hash count value statistical table of different data packets in real time;

[0138] (2) According to the data packet header source address and destination address information extracted by the data packet preprocessing module, the mapping relationship of the protocol conversion mapping table is queried, and it is judged whether the destination address of the data packet is out of the subnet and communicates with the same type of subnet or out of the subnet and communicates with the heterogeneous subnet. If it is homogeneous network communication, the flow enters path 1 and directly enters the forwarding module for data packet forwarding; if it is heterogeneous network communication, the condition judgment is continued, and the flow enters path 2 or path 3;

[0139] (3) The adaptive processing module periodically and dynamically monitors and counts the data packet flow information entering path 2 and path 3, i.e., counts the Hash values of different data packets after preprocessing, when the count values X2 and X3 are less than the threshold V=10240 in a certain time period, it indicates that the flow is stable; when the count value X2 or X3 is greater than the user programmable threshold V=10240, it is judged that the flow is abnormal;

[0140] (4) If the traffic is stable, then choose path 2 or path 3 according to the logical value of condition B||C. Specifically, set condition B, i.e. whether there is a fragment, calculate and determine whether the packet length PL is greater than the maximum transmission unit MTU = 1024 threshold, and 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, i.e. whether the packet header has an uncertain optional field. If it exists, condition C is true, otherwise it is false. When B||C is true, the flow goes to path 3 to enter the network tunnel module. When B||C is false, the flow goes to path 2 to enter the protocol conversion module.

[0141] (5) If the traffic is abnormal, then perform abnormal path traffic judgment. If it is found that path 3 has a large number of data packets to be processed continuously in a certain period of time, i.e. the Hash count value X3 is greater than the threshold V, then perform logical intervention, close the transmission channel of path 3 after the current data packet processing is completed, and open the transmission channel of path 2, so that the data packet goes through path 2 logical channel to enter the protocol conversion module. If it is found that path 2 has a large number of data packets to be processed continuously in a certain period of time, i.e. the Hash count value X2 is greater than the threshold V, then perform logical intervention, close the transmission channel of path 2 after the current data packet processing is completed, and open the transmission channel of path 3, so that the data packet goes through path 3 logical channel to enter the network tunnel module.

[0142] (6) If the data packet enters the programmable network tunnel module, first query whether the local cached mapping relationship table has the header information (source port number, source IP address, destination IP address) of the data packet. If the entry information is not found in the local cached relationship 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 perform data packet transmission protocol header domain segment encapsulation on the data packet, 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 whether the local cached mapping relationship table has the header information (source port number, source IP address, destination IP address) of the data packet. If the entry information is not found in the local cached relationship mapping table, request the cross-protocol mapping entry of the data packet from the control plane, the control plane issues the corresponding flow table entry according to the global protocol mapping table, and the data plane performs the corresponding operation according to the flow table issued by the control plane, including building the transmission protocol header and deleting the related operations of 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 cached relationship mapping table, perform the related operations of building the transmission protocol header and deleting the subnet protocol header according to the related information, and update the protocol type field of the MAC header.

[0144] (8)Finally, the data packet processed through path 1, path 2 and path 3 enters the forwarding module for forwarding, and the forwarding port is forwarded 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 in the control plane, a Hash count value statistical table and a locally cached protocol conversion mapping table are maintained in real time in the data plane, and the programmable technology is used to realize the network tunnel and protocol conversion technology, so as to realize the programmable heterogeneous network conversion function, and achieve the effects of flexible heterogeneous conversion configuration and strong expandability. And according to the logical relationship of the network communication mode judgment, the abnormal flow monitoring, whether the data packet length PL is greater than the MTU threshold value, and whether the data packet header has an uncertain optional field, etc., it is judged in the adaptive processing module whether to execute network tunnel or protocol conversion in the next step, so as to improve the transmission efficiency and accuracy of the heterogeneous network communication.

[0146] Please refer to Figure 10 The embodiment of the present application also provides a heterogeneous network interconnection communication device 800, which can realize the above-mentioned heterogeneous network interconnection communication method, and the device comprises:

[0147] The first acquisition module 810 is configured to acquire original data packet information sent from a first device to a second device;

[0148] The determination module 820 is configured to determine the network communication type, the data packet length and the optional field type according to the original data packet information;

[0149] The calculation module 830 is configured 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] The second acquisition module 840 is configured to acquire a first count value of a network tunnel module and a second count value of a protocol conversion module;

[0151] The conversion module 850 is configured to determine the network tunnel module or the protocol conversion module to convert the original data packet information to obtain target data packet information matched with the communication protocol of the second device, when the network communication type is the heterogeneous network communication, according to the first count value, the second count value, the data packet length and the optional field type;

[0152] The update module 860 is configured 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 embodiment of the above-mentioned heterogeneous network interconnection communication method, and will not be repeated here.

[0153] The embodiment of the present application further provides an electronic device, which comprises a memory and a processor, the memory stores a computer program, and the processor implements the heterogeneous network interconnection communication method when executing the computer program. The electronic device can be any intelligent terminal, such as a tablet computer or a vehicle-mounted computer.

[0154] Please refer to Figure 12 , Figure 12 The hardware structure of the electronic device of another embodiment is illustrated, and the electronic device comprises:

[0155] The processor 901 can be implemented in the form of a general-purpose CPU (Central Processing Unit), a microprocessor, an ASIC (Application Specific Integrated Circuit), or one or more integrated circuits, and is used to execute related programs to implement the technical solutions provided by the embodiments of the present application.

[0156] The memory 902 can be implemented in the form of a ROM (Read Only Memory), a static storage device, a dynamic storage device, or a RAM (Random Access Memory). The memory 902 can store an operating system and other application programs. When the technical solutions provided by the embodiments of the present application are implemented by software or firmware, the related program codes are stored in the memory 902 and are called and executed by the processor 901 to implement the heterogeneous network interconnection communication method of the embodiments of the present application.

[0157] The input / output interface 903 is used to realize information input and output.

[0158] The communication interface 904 is used to realize the communication interaction between the device and other devices, and can realize communication through a wired manner (for example, a USB, a network cable, etc.) or a wireless manner (for example, a mobile network, a WI-FI, Bluetooth, etc.).

[0159] The bus 905 is used to transmit information between various components (for example, the processor 901, the memory 902, the input / output interface 903, and the communication interface 904) of the device.

[0160] The processor 901, the memory 902, the input / output interface 903, and the communication interface 904 are connected to each other through the bus 905 to realize communication connection between them in the device.

[0161] The embodiment of the present application also provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the heterogeneous network interconnection communication method.

[0162] The memory, as a non-transitory computer readable storage medium, can be used to store non-transitory software programs and non-transitory computer executable programs. In addition, the memory can include a high-speed random access memory, and can also include a non-transitory memory, such as at least one magnetic disk storage device, a flash memory device, or other non-transitory solid-state memory device. In some embodiments, the memory can optionally include a memory remotely arranged relative to the processor, and these remote memories can be connected to the processor through 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 a combination thereof.

[0163] The heterogeneous network interconnection communication method, the heterogeneous network interconnection communication device, the electronic equipment and the storage medium provided by the embodiment of the present application capture the original data packet information sent from the first device to the second device, then perform deep analysis on the original data packet information to determine the network communication type, the data packet length and the optional field type, and also extract the five-tuple information (usually including the source IP address, the target IP address, the source port, the target port and the transport layer protocol) of the original data packet information, and based on the five-tuple information, the system calculates 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 respectively represent the load status of the corresponding module. When it is determined that the current network communication type is heterogeneous network communication, then 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, it is determined which module is used to convert the original data packet information, and the target is to generate a target data packet information completely matching the communication protocol of the second device. Finally, the system updates the count value of the network tunnel module or the protocol conversion module participating in the data packet conversion according to the hash value calculated before. This updating mechanism can help the system to track the usage of each module, so as to optimize or adjust when needed. In the communication method, by dynamically selecting the network tunnel module or the protocol conversion module according to the key information such as the network communication type, the data packet length and the optional field type, the method can realize flexible adaptation to different network environments and communication demands, and improve the flexibility of communication. At the same time, the method does not depend on fixed calculation logic and conversion rules, so it can be easily extended to adapt to new network protocols and communication demands, and enhances the expansibility of the system, and improves the communication effect of the heterogeneous network.

[0164] The embodiments described in the specification are for more clearly illustrating the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided by the embodiments of the present application. Those skilled in the art can know that, with the evolution of technology and the appearance of new application scenarios, the technical solutions provided by the embodiments of the present application are also applicable to similar technical problems.

[0165] Those skilled in the art can understand that the technical solutions shown in the figures do not constitute a limitation on the embodiments of the present application, and can include more or fewer steps than shown in the figures, or combine certain steps, or different steps.

[0166] The device embodiments described above are only schematic, and the units described as separate components can or can not be physically separate, i.e., can be located in one place, or can be distributed on multiple network units. Part or all of the modules can be selected according to actual needs to achieve the purpose of the embodiments of the present application.

[0167] Those skilled in the art can understand that all or some of the steps in the above disclosed method, the functional modules / units in the system and the device can be implemented as software, firmware, hardware and their appropriate combinations.

[0168] The terms "first", "second", "third", "fourth" and the like (if any) in the specification and above-described drawings of the present application are used to distinguish similar objects, and do not necessarily have to be used to describe a specific order or sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device including a series of steps or units does not have to be limited to those steps or units clearly listed, but can include other steps or units not clearly listed or inherent to these processes, methods, products or devices.

[0169] It should be understood that, in the application, "at least one" refers to one or more, and "multiple" refers to two or more. "And / or" is used to describe the association relationship of the associated objects, which means that there can be three relationships, for example, "A and / or B" can represent three cases of only A, only B, and A and B existing at the same time, wherein A and B can be singular or plural. The character " / " generally represents an "or" relationship between the associated objects before and after it. "At least one of the following" or similar expressions means any combination of these items, including any combination of single or multiple items. For example, at least one of a, b or c can represent a, b, c, "a and b", "a and c", "b and c", or "a and b and c", wherein a, b, and c can be single or multiple.

[0170] In several embodiments provided in the 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, and actual implementation can have another division manner, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the displayed or discussed mutual ones can be indirect coupling or communication connection through some interfaces, devices or units, and can be electrical, mechanical or other forms.

[0171] The units described above as separate components can or can not be physically separated, and the components shown as units can or can not be physical units, that is, they can be located in one place, or can be distributed on multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the embodiment scheme.

[0172] In addition, the functional units in each embodiment of the application can be integrated in one processing unit, or each unit can be physically present separately, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of a software functional unit.

[0173] The integrated unit, if implemented in the form of a software function unit and sold or used as an independent product, can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application, essentially or in other words, the part that contributes to the prior art or the whole or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium, and includes multiple instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods of the various embodiments of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various program storage media.

[0174] The preferred embodiments of the embodiments of the present application are described above with reference to the accompanying drawings, and are not limited to the scope of the embodiments of the present application. Any modifications, equivalent replacements and improvements made by those skilled in the art without departing from the scope and essence of the embodiments of the present application shall be within the scope of the embodiments of the present application.

Claims

1. A heterogeneous network interconnection communication method, characterized in that, The method includes: Obtain the raw data packet information sent from the first device to the second device; Based on the original data packet information, determine the network communication type, data packet length, and optional field types; Extract the five-tuple information from the original data packet information, and calculate the corresponding hash value based on the five-tuple information; Obtain the first count value of the preset network tunnel module and the second count value of the protocol conversion module; When the network communication type is heterogeneous network communication, the network tunnel module or protocol conversion module is selected to convert the original data packet information according to at least one parameter among the first count value, the second count value, the data packet length and the optional field type, so as to obtain target data packet information that matches the communication protocol of the second device. Update the first count value of the network tunnel module or the second count value of the protocol conversion module based on the hash value; The step of selecting the network tunnel module or protocol conversion module to convert the original data packet information based on at least one parameter among the first count value, the second count value, the data packet length, and the optional field type to obtain target data packet information that matches 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 that matches the communication protocol of the second device; When the second count value is greater than or equal to the preset second programmable threshold, the original data packet information is converted by the network tunnel module to obtain target data packet information that matches 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 to convert the original data packet information according to the data packet length and the optional field type, so as to obtain target data packet information that matches the communication protocol of the second device.

2. The heterogeneous network interconnection communication method according to claim 1, characterized in that, The step of selecting the network tunnel module or protocol conversion module to convert the original data packet information based on the data packet length and the optional field type includes: When the length of the data packet exceeds a preset length threshold, and the optional field type includes uncertain optional fields, the original data packet information is converted by the network tunnel module. When the length of the data packet is less than or equal to the length threshold, and the optional field type does not include uncertain optional fields, the original data packet information is converted by the protocol conversion module.

3. The heterogeneous network interconnection communication method according to claim 1, characterized in that, The step of converting the original data packet information through the network tunnel module to obtain target data packet information that matches the communication protocol of the second device includes: Based on the preset local relationship mapping table and the header information of the original data packet, the mapping entry information is determined; When the local relationship mapping table does not have a mapping entry that matches the original data packet information, the mapping entry information is determined according to the preset remote relationship mapping table and the header information of the original data packet information; Based on the mapping entry information, the original data packet information is encapsulated and a header field is added to generate target data packet information that matches the communication protocol of the second device; wherein, the header field includes the target address and the tunnel identifier.

4. The heterogeneous network interconnection communication method according to claim 1, characterized in that, The step of converting the original data packet information through the protocol conversion module to obtain target data packet information that matches the communication protocol of the second device includes: Based on the preset local relationship mapping table and the header information of the original data packet, the mapping entry information is determined; When the local relationship mapping table does not have a mapping entry that matches the original data packet information, the mapping entry information is determined according to the preset remote relationship mapping table and the header information of the original data packet information; Based on the mapping entry information, the header information of the original data packet information is updated to generate target data packet information that matches the communication protocol of the second device.

5. The heterogeneous network interconnection communication method according to claim 3 or 4, characterized in that, After the step of obtaining target data packet information that matches the communication protocol of the second device, the method further includes: If the local relation mapping table does not have a mapping entry that matches the original data packet information, the mapping entry information obtained from the remote relation mapping table will be added to the local relation mapping table. At preset intervals, the usage frequency of each mapping entry in the local relationship mapping table is obtained, and the mapping entry with the lowest usage frequency in the local relationship mapping table is deleted.

6. The heterogeneous network interconnection communication method according to claim 1, characterized in that, After the step of obtaining the raw 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.

7. A heterogeneous network interconnection communication device, characterized in that, The device includes: The first acquisition module is used to acquire raw data packet information sent from the first device to the second device; The determination module is used to determine the network communication type, data packet length, and optional field types based on the original data packet information. The calculation module is used to extract the five-tuple information of the original data packet information and calculate the corresponding hash value based on the five-tuple information; The second acquisition module is used to acquire the first count value of the preset network tunnel module and the second count value of the protocol conversion module; The conversion module is used 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 at least one parameter among the first count value, the second count value, the data packet length and the optional field type, so as to obtain target data packet information that matches the communication protocol of the second device. An update module 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; Specifically, the conversion module is used for: 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 that matches 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 that matches 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 to convert the original data packet information according to the data packet length and the optional field type, so as to obtain target data packet information that matches the communication protocol of the second device.

8. An electronic device, characterized in that, The electronic device includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the heterogeneous network interconnection communication method according to any one of claims 1 to 6.

9. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the heterogeneous network interconnection communication method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Loading protocol packet data transmission method and system among heterogeneous networks

    CN104639507A

  • Heterogeneous protocol conversion system and method

    CN116760911A