Data communication method and apparatus, and device and medium

By using the routing table entry with the smallest timestamp to update data forwarding in the wireless Internet module, the limited and timeout problems of LWIP routing table entry are solved, and the maintenance of TCP long connections and efficient utilization of routing table entry is realized, ensuring that the module can be used as a TCP/UDP server.

WO2025152515A1PCT designated stage expired Publication Date: 2025-07-24FIBOCOM WIRELESS
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/123922
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-01-16
Filing Date
2024-10-10
Publication Date
2025-07-24

AI Technical Summary

Technical Problem

In a private network environment, LWIP's routing table entries are limited and timeout mechanisms have, which leads to the inability to maintain long TCP connections, and the existing solutions cannot efficiently utilize routing table entries, resulting in modules being unable to be used as TCP/UDP servers.

Method used

By obtaining the target parameter information of the data to be forwarded, find out whether there is a matching first routing table entry in the current routing table. If it does not exist, the data forwarding is used to use the second routing table entry with the smallest timestamp, and update the routing table entry to avoid actively releasing the routing table entry.

Benefits of technology

It realizes maintaining long TCP connections in a private network environment and efficiently utilizes a limited number of routing table entries, so that the module can be used as a TCP/UDP server.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024123922_24072025_PF_FP_ABST
    Figure CN2024123922_24072025_PF_FP_ABST
Patent Text Reader

Abstract

Disclosed are a data communication method and apparatus, and a device and a medium. The data communication method is applied to a wireless Internet access module, and comprises: acquiring data to be forwarded, wherein the data to be forwarded is uplink data to be forwarded to a server by a micro-control unit or downlink data to be forwarded to the micro-control unit by the server; determining whether there is, in the current routing table, a first routing table entry matching the data to be forwarded; and if not, determining, from the current routing table, a second routing table entry having the minimum current usage timestamp, and using target parameter information of the data to be forwarded to update the second routing table entry, so as to use the updated second routing table entry to forward the data to be forwarded.
Need to check novelty before this filing date? Find Prior Art

Description

Data communication method, device, equipment and medium

[0001] Citation of Related Applications

[0002] This disclosure claims all rights and interests in the Chinese invention patent application with application number 202410062911.0, filed with the State Intellectual Property Office of the People's Republic of China on January 16, 2024, and entitled "Data Communication Methods, Devices, Equipment and Medium," and incorporates the entire contents thereof into this disclosure by reference.

[0003] field

[0004] The present disclosure generally relates to the field of communication technology, and more particularly to data communication methods, devices, equipment, and media.

[0005] background

[0006] Due to APN (Access Point Name) limitations, in some cases, the module's ECM (Ethernet Networking Control Model) / RNDIS (Remote Network Driver Interface Specification) and LWIP (Lightweight IP) need to share a CID (Context ID, used here to indicate the bearer line number). In this case, NAT (Network Address Translation) is required.

[0007] The current LWIP solution is to first search the NAT routing table for both upstream and downstream data. When the module receives downstream data, if a routing table entry is found, it sends it to ECM / RNDIS or LWIP based on the routing table entry. If no new routing table entry is created, the data is discarded. As a result, in a private network environment, the host computer using ECM cannot be used as a TCP (Transmission Control Protocol) / UDP (User Datagram Protocol) server. In addition, each routing table entry has a timeout period. If a message arrives, the timeout period is refreshed. If the timeout period expires, the current routing table entry is directly released, resulting in the inability to maintain a long TCP connection. Furthermore, because the number of routing table entries is predefined, if all entries are used up, communication will be impossible, and efficient utilization of routing table entries cannot be achieved.

[0008] Overview

[0009] In a first aspect, the present disclosure relates to a data communication method, which is applied to a wireless Internet access module and includes:

[0010] Acquire data to be forwarded; the data to be forwarded is uplink data to be forwarded by the micro control unit to the server or downlink data to be forwarded by the server to the micro control unit;

[0011] Determine whether there is a first routing table entry matching the data to be forwarded in the current routing table;

[0012] If not, determine the second routing table entry with the smallest current usage timestamp from the current routing table, and update the second routing table entry using the target parameter information of the data to be forwarded, so as to forward the data to be forwarded using the updated second routing table entry.

[0013] In some embodiments, after determining whether there is a first routing table entry matching the data to be forwarded in the current routing table, the method further includes:

[0014] If so, the data to be forwarded is forwarded using the first routing table entry, and the current usage timestamp of the first routing table entry is updated based on the current time.

[0015] In some embodiments, determining whether there is a first routing table entry in the current routing table that matches the data to be forwarded includes:

[0016] Determine target parameter information of the data to be forwarded; wherein the target parameter information includes an IP address and a port number; and

[0017] A search is performed to determine whether a first routing table entry matching the target parameter information exists in the current routing table.

[0018] In some embodiments, before determining the second routing table entry with the smallest currently used timestamp from the current routing table, the data communication method further comprises:

[0019] Determine whether there is an idle routing table entry in the current routing table;

[0020] If the idle routing table entry exists, updating the idle routing table entry using the target parameter information of the data to be forwarded, so as to forward the data to be forwarded using the updated idle routing table entry;

[0021] If the idle routing table entry does not exist, the step of determining the second routing table entry with the smallest currently used timestamp from the current routing table is performed.

[0022] In certain embodiments, the data communication method further comprises:

[0023] When a TCP data packet representing a termination or reset is obtained, the routing table entry corresponding to the TCP data packet is released from the current routing table.

[0024] In certain embodiments, the data communication method further comprises:

[0025] Record the connection status of each TCP connection between the micro control unit and the server; wherein each TCP connection corresponds to a routing table entry in the current routing table.

[0026] In some embodiments, determining the second routing table entry with the smallest currently used timestamp from the current routing table includes:

[0027] If there are multiple routing table entries with the smallest currently used timestamp, then obtaining the connection status of the TCP connection corresponding to each of the routing table entries with the smallest currently used timestamp to obtain the target TCP connection that has not been established; and

[0028] The routing table entry corresponding to the target TCP connection is determined as a second routing table entry for forwarding the data to be forwarded.

[0029] In a second aspect, the present disclosure relates to a wireless Internet access module, which includes:

[0030] A data acquisition interface configured to acquire data to be forwarded; the data to be forwarded is uplink data to be forwarded by the micro control unit to the server or downlink data to be forwarded by the server to the micro control unit;

[0031] A first routing table entry determining module, configured to determine whether there is a first routing table entry matching the data to be forwarded in the current routing table;

[0032] A second routing table entry determining module is configured to determine, if the second routing table entry does not exist, the second routing table entry with the smallest currently used timestamp from the current routing table; and

[0033] The data forwarding interface is configured to update the second routing table entry using the target parameter information of the data to be forwarded, so as to forward the data to be forwarded using the updated second routing table entry.

[0034] In a third aspect, the present disclosure relates to an electronic device, comprising:

[0035] a memory configured to store a computer program; and

[0036] The processor is configured to execute the computer program to implement the data communication method described in the present disclosure.

[0037] In a fourth aspect, the present disclosure relates to a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, the data communication method described in the present disclosure is implemented.

[0038] In certain embodiments, the data to be forwarded obtained by the wireless Internet module can be either uplink data to be forwarded by the microcontroller to the server or downlink data to be forwarded by the server to the microcontroller, that is, the wireless Internet module can complete the forwarding of uplink data or downlink data; further, after obtaining the data to be forwarded, the first routing table item that matches the data to be forwarded is searched in the current routing table. When there is no matching first routing table item in the current routing table, the present disclosure does not directly discard the data to be forwarded, but determines the second routing table item with the smallest current use timestamp from the current routing table to complete the forwarding of the data to be forwarded using the routing table item with the smallest current use timestamp. It should be noted that before using the second routing table item for data forwarding, the target parameter information of the data to be forwarded needs to be used to update the second routing table item. It is understandable that, since each time a TCP connection is established, a routing table item corresponding to the TCP connection is established, and the present disclosure does not actively release the routing table item. Only when there is no routing table item matching the data to be forwarded in the current routing table, the routing table item with the smallest current use timestamp is used as the new routing table item to complete the forwarding of the data to be forwarded. In this way, a long TCP connection can be maintained and a limited number of routing table entries can be efficiently utilized.

[0039] BRIEF DESCRIPTION OF THE DRAWINGS

[0040] In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the embodiments or the drawings required for use will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without any creative work.

[0041] FIG1 is a flow chart of a data communication method according to an embodiment of the present disclosure;

[0042] FIG2 is a flow chart of a specific data communication method according to an embodiment of the present disclosure;

[0043] FIG3 is a flowchart of uplink and downlink processing according to an embodiment of the present disclosure;

[0044] FIG4 is a schematic structural diagram of a data communication device according to an embodiment of the present disclosure; and

[0045] FIG5 is a structural diagram of an electronic device according to an embodiment of the present disclosure.

[0046] Details

[0047] The following will be combined with the accompanying drawings in the embodiments of the present disclosure to clearly and completely describe the technical solutions in the embodiments of the present disclosure. Obviously, the embodiments described are only part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments of the present disclosure, all other embodiments obtained by ordinary technicians in this field without making any creative efforts are within the scope of protection of the present disclosure.

[0048] The current LWIP solution uses a NAT routing table search for both upstream and downstream data. When the module receives downstream data, if a routing entry is found, it sends it to ECM / RNDIS or LWIP based on the routing entry. If no new routing entry is created, the data is discarded. This prevents the host computer using ECM from functioning as a TCP / UDP server in a private network environment. Furthermore, each routing entry has a timeout period. If a message arrives, the timeout period is refreshed. If the timeout period expires, the current routing entry is released, preventing TCP persistent connections from being maintained. Furthermore, since the number of routing entries is predefined, communication becomes impossible if all entries are used up, preventing efficient utilization of routing entries.

[0049] The embodiments of the present disclosure provide a data communication method, apparatus, device, and medium that can maintain a long TCP connection and achieve efficient utilization of routing table entries.

[0050] 1 , an embodiment of the present disclosure relates to a data communication method, which is applied to a wireless Internet access module. The method includes:

[0051] Step S11: Acquire data to be forwarded; the data to be forwarded is uplink data to be forwarded by the micro control unit to the server or downlink data to be forwarded by the server to the micro control unit;

[0052] Step S12: Determine whether there is a first routing table entry matching the data to be forwarded in the current routing table;

[0053] Step S13: If it does not exist, determine the second routing table entry with the smallest current usage timestamp from the current routing table, and update the second routing table entry using the target parameter information of the data to be forwarded, so as to forward the data to be forwarded using the updated second routing table entry.

[0054] In some embodiments, the data to be forwarded obtained by the wireless Internet access module can be either uplink data to be forwarded by the microcontroller unit (Microcontroller Unit) to the server, or downlink data to be forwarded by the server to the microcontroller unit, that is, the wireless Internet access module can complete both the forwarding of uplink data and the forwarding of downlink data.

[0055] In some embodiments, after the data to be forwarded is obtained, it is determined whether there is a first routing table entry matching the data to be forwarded in the current routing table. In other words, it is checked whether a routing table entry matching the current data to be forwarded has been established in the current routing table.

[0056] In certain embodiments, if there is no matching first routing table item in the current routing table, the present disclosure is not to directly discard the data to be forwarded, but to determine the second routing table item with the smallest current usage timestamp from the current routing table, so as to complete the forwarding of the data to be forwarded using the routing table item with the smallest current usage timestamp. It should be noted that before using the second routing table item to forward data, it is necessary to update the second routing table item using the target parameter information of the data to be forwarded. In this way, the host computer using ECM can also be used as a TCP / UDP server in a private network environment. It is understandable that, since each time a TCP connection is established, a routing table item corresponding to the TCP connection will be established, and the present disclosure will not actively release the routing table item. Only when there is no routing table item matching the current data to be forwarded in the current routing table, the routing table item with the smallest current usage timestamp will be used as a new routing table item to complete the forwarding of the data to be forwarded. In this way, the long connection of TCP can be maintained, and the efficient use of a limited number of routing table items can be achieved.

[0057] In certain embodiments, after determining whether there exists a first routing table item that matches the data to be forwarded in the current routing table, the data communication method further comprises: if so, forwarding the data to be forwarded using the first routing table item, and updating the currently used timestamp of the first routing table item based on the current time. That is, if there exists a first routing table item that matches the data to be forwarded in the current routing table, the first routing table item is directly used to forward the data to be forwarded, and the currently used timestamp of the first routing table item is updated based on the current time. It is understandable that, in the embodiment of the present disclosure, a timestamp is added to each routing table item. Once a certain routing table item is used for data forwarding, the timestamp is updated based on the current time. In certain embodiments, the timestamp is initialized to 0 at zero o'clock, and the timestamp can be updated in seconds thereafter. For example, if a certain routing table item completes data forwarding at 1 minute past zero o'clock, the timestamp is updated to 60.

[0058] In certain embodiments, the data communication method further includes: upon receiving a TCP data packet indicating termination or reset, releasing the routing table entry corresponding to the TCP data packet from the current routing table. That is, if the wireless Internet access module receives a TCP data packet indicating termination (FINish, i.e., a FIN packet) or a TCP data packet indicating reset (ReSeT, i.e., a RST packet), the relevant routing table entry is released.

[0059] In certain embodiments, the data to be forwarded obtained by the wireless Internet module can be either uplink data to be forwarded by the microcontroller to the server or downlink data to be forwarded by the server to the microcontroller, that is, the wireless Internet module can complete the forwarding of uplink data or downlink data; further, after obtaining the data to be forwarded, the first routing table item that matches the data to be forwarded is searched in the current routing table. When there is no matching first routing table item in the current routing table, the present disclosure does not directly discard the data to be forwarded, but determines the second routing table item with the smallest current use timestamp from the current routing table to complete the forwarding of the data to be forwarded using the routing table item with the smallest current use timestamp. It should be noted that before using the second routing table item for data forwarding, the target parameter information of the data to be forwarded needs to be used to update the second routing table item. It is understandable that, since each time a TCP connection is established, a routing table item corresponding to the TCP connection is established, and the present disclosure does not actively release the routing table item. Only when there is no routing table item matching the data to be forwarded in the current routing table, the routing table item with the smallest current use timestamp is used as the new routing table item to complete the forwarding of the data to be forwarded. In this way, a long TCP connection can be maintained and a limited number of routing table entries can be efficiently utilized.

[0060] 2 and 3 , an embodiment of the present disclosure relates to a specific data communication method. Compared with the previous embodiment, this embodiment further illustrates and optimizes the technical solution. The data communication method includes:

[0061] Step S21: Acquire data to be forwarded; the data to be forwarded is uplink data to be forwarded by the micro control unit to the server or downlink data to be forwarded by the server to the micro control unit;

[0062] Step S22: determining target parameter information of the data to be forwarded, wherein the target parameter information includes an IP address and a port number, and searching the current routing table for a first routing table entry that matches the target parameter information;

[0063] Step S23: If not, determining whether there is an idle routing table entry in the current routing table;

[0064] Step S24: if the idle routing table entry exists, updating the idle routing table entry using the target parameter information of the data to be forwarded, so as to forward the data to be forwarded using the updated idle routing table entry;

[0065] Step S25: If the idle routing table entry does not exist, determine the second routing table entry with the smallest current usage timestamp from the current routing table, and update the second routing table entry using the target parameter information of the data to be forwarded, so as to forward the data to be forwarded using the updated second routing table entry.

[0066] In certain embodiments, determine the target parameter information of data to be forwarded, target parameter information specifically refers to IP address and port number.It is understandable that each data packet has an IP address and port number, thereby can determine that the data to be forwarded specifically need to be sent to which position.In certain embodiments, search and whether there is the first routing table item that matches with the target parameter information in the current routing table, it is understandable that, if in historical forwarding data, there are the data identical with the IP address and port number of this data to be forwarded, so required routing table item is also identical, if therefore there is the first routing table item that matches with IP address and port number in the current routing table, then can directly use this first routing table item to carry out data forwarding.

[0067] In some embodiments, if the first routing table item that matches the target parameter information does not exist in the current routing table, it is determined whether there is an idle routing table item in the current routing table. It should be noted that the number of routing table items in the routing table is limited. For example, assuming there are 10 routing table items in total and 6 of them are currently in use, then 4 idle routing table items remain.

[0068] In some implementation schemes, if there are idle routing entries in the current routing table, the idle routing entries can be updated using the target parameter information of the data to be forwarded. In this way, the updated idle routing entries can forward the data to be forwarded.

[0069] In some embodiments, if there are no idle routing table entries in the current routing table, it means that all routing table entries in the current routing table have been used. Therefore, the second routing table entry with the smallest currently used timestamp is determined from the current routing table, and the second routing table entry is updated using the target parameter information of the data to be forwarded, so as to forward the data to be forwarded using the updated second routing table entry.

[0070] That is, since each time a routing table entry is used to forward data, the corresponding usage timestamp is updated. Therefore, when all routing table entries in the current routing table are used, the embodiment of the present disclosure determines the routing table entry that has not been used for the longest time and completes data forwarding by updating the corresponding parameters using the target parameter information of the data to be forwarded. It is understandable that since this routing table entry has not been updated for a long time, the corresponding timestamp is the smallest.

[0071] In certain embodiments, the data communication method further includes recording the connection status of each TCP connection between the microcontroller unit and the server, wherein each TCP connection corresponds to a routing table entry in the current routing table. In this embodiment, a routing table entry is created each time a TCP connection is established. For the TCP protocol, this embodiment records the connection status of each TCP connection.

[0072] In certain embodiments, the above-mentioned determination of the second routing table item with the smallest currently used timestamp from the current routing table includes: if there are multiple routing table items with the smallest currently used timestamp in the current routing table, then obtaining the connection status of the TCP connection corresponding to each routing table item with the smallest currently used timestamp to obtain an unestablished target TCP connection; determining the routing table item corresponding to the target TCP connection as the second routing table item for forwarding the data to be forwarded. That is, if there are multiple routing table items with the smallest currently used timestamp in the current routing table, then the routing table item corresponding to the TCP connection that has not completed the three-way handshake is preferentially used as the second routing table item. Therefore, the present disclosure determines the target TCP connection for which the TCP connection has not been established by recording the connection status of each TCP connection, and determines the routing table item corresponding to the target TCP connection as the second routing table item for forwarding the data to be forwarded.

[0073] In certain embodiments, for a more specific processing procedure of the above-mentioned step S21, reference may be made to the corresponding contents disclosed in the aforementioned embodiments, which will not be described in detail here.

[0074] In certain embodiments, each data packet has an IP address and port number, so that it is possible to determine which position the data to be forwarded specifically needs to be sent to. Therefore, if there is a first routing table item that matches the IP address and port number in the current routing table, the first routing table item can be directly used to forward data. If there is no first routing table item that matches the target parameter information in the current routing table, then first determine whether there is an idle routing table item in the current routing table. If so, the idle routing table item is updated using the target parameter information of the data to be forwarded. In this way, the updated idle routing table item can forward the data to be forwarded; if there is no idle routing table item, then determine from the current routing table that the second routing table item with the smallest current timestamp is used to complete data forwarding. Moreover, when the number of the routing table item with the smallest current timestamp is multiple, the routing table item corresponding to the TCP connection that has not completed the 3-way handshake is preferentially used as the second routing table item. In this way, the present disclosure can maintain the long connection of TCP and realize the efficient utilization of a limited number of routing table items.

[0075] As shown in FIG4 , an embodiment of the present disclosure relates to a wireless Internet access module, which includes:

[0076] The data acquisition interface 11 is configured to acquire data to be forwarded; the data to be forwarded is uplink data to be forwarded by the micro control unit to the server or downlink data to be forwarded by the server to the micro control unit;

[0077] A first routing table entry determining module 12 is configured to determine whether there is a first routing table entry matching the data to be forwarded in the current routing table;

[0078] A second routing table entry determining module 13 is configured to determine the second routing table entry with the smallest currently used timestamp from the current routing table if the second routing table entry does not exist;

[0079] The data forwarding interface 14 is configured to update the second routing table entry using the target parameter information of the data to be forwarded, so as to forward the data to be forwarded using the updated second routing table entry.

[0080] In certain embodiments, the data to be forwarded obtained by the wireless Internet module can be either uplink data to be forwarded by the microcontroller to the server or downlink data to be forwarded by the server to the microcontroller, that is, the wireless Internet module can complete the forwarding of uplink data or downlink data; further, after obtaining the data to be forwarded, the first routing table item that matches the data to be forwarded is searched in the current routing table. When there is no matching first routing table item in the current routing table, the present disclosure does not directly discard the data to be forwarded, but determines the second routing table item with the smallest current use timestamp from the current routing table to complete the forwarding of the data to be forwarded using the routing table item with the smallest current use timestamp. It should be noted that before using the second routing table item for data forwarding, the target parameter information of the data to be forwarded needs to be used to update the second routing table item. It is understandable that, since each time a TCP connection is established, a routing table item corresponding to the TCP connection is established, and the present disclosure does not actively release the routing table item. Only when there is no routing table item matching the data to be forwarded in the current routing table, the routing table item with the smallest current use timestamp is used as the new routing table item to complete the forwarding of the data to be forwarded. In this way, a long TCP connection can be maintained and a limited number of routing table entries can be efficiently utilized.

[0081] Since the embodiments of the device part correspond to the above embodiments, the embodiments of the device part please refer to the description of the embodiments of the method part, and will not be repeated here.

[0082] Figure 5 is a schematic diagram of the structure of an electronic device provided in one embodiment of the present disclosure. The electronic device includes: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 is configured to store a computer program, which is loaded and executed by the processor 21 to implement the data communication method described in the present disclosure.

[0083] In certain embodiments, the power supply 23 is configured to provide operating voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and external devices, and the communication protocol it follows is any communication protocol that can be applied to the technical solution of the present disclosure, and is not specifically limited here; the input and output interface 25 is configured to obtain external input data or output data to the outside world, and its interface type can be selected according to specific application needs and is not specifically limited here.

[0084] In some embodiments, the processor 21 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 21 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), or PLA (Programmable Logic Array). The processor 21 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 21 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 21 may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.

[0085] In some embodiments, the memory 22 serves as a carrier for resource storage, which may be a read-only memory, a random access memory, a disk, or an optical disk, etc. The resources stored thereon include an operating system 221, a computer program 222, and data 223, etc. The storage method may be temporary storage or permanent storage.

[0086] In certain embodiments, an operating system 221 is used to manage and control the hardware devices and computer programs 222 on the electronic device 20, enabling the processor 21 to calculate and process the massive amount of data 223 in the memory 22. The operating system 221 may be Windows, Unix, Linux, or the like. In addition to including computer programs capable of implementing the data communication method performed by the electronic device 20 as disclosed in any of the aforementioned embodiments, the computer programs 222 may further include computer programs capable of performing other specific tasks. Data 223 may include data received by the electronic device from external devices, as well as data collected by its own input / output interface 25.

[0087] An embodiment of the present disclosure further provides a computer-readable storage medium, wherein the storage medium stores a computer program. When the computer program is loaded and executed by a processor, the data communication method described in the present disclosure is implemented.

[0088] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from the other embodiments. Reference can be made to the descriptions of the identical or similar parts between the various embodiments. For the devices disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the descriptions are relatively simple, and the relevant parts can be referred to the descriptions of the methods.

[0089] Those skilled in the art may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the above description has generally described the composition and steps of each example according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this disclosure.

[0090] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), internal memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, a hard disk, a removable disk, a compact disc read-only memory (CD-ROM), or any other form of storage medium known in the art.

[0091] Finally, it should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article, or device comprising the element.

[0092] The above is a detailed introduction to a data communication method, device, equipment and storage medium provided by the present disclosure. Specific examples are used herein to illustrate the principles and implementation methods of the present disclosure. The description of the above embodiments is only used to help understand the method and core ideas of the present disclosure. At the same time, for those skilled in the art, according to the ideas of the present disclosure, there may be changes in the specific implementation methods and application scopes. In summary, the contents of this specification should not be understood as limiting the present disclosure.

Claims

1. A data communication method, applied to a wireless Internet access module, comprising: Obtaining data to be forwarded; The data to be forwarded is uplink data that a microcontroller unit needs to forward to a server or downlink data that the server needs to forward to the microcontroller unit; Determining whether there is a first routing table entry in the current routing table that matches the data to be forwarded; If not, determining a second routing table entry with the smallest current usage timestamp from the current routing table, and updating the second routing table entry with the target parameter information of the data to be forwarded, so as to forward the data to be forwarded using the updated second routing table entry.

2. The data communication method according to claim 1, wherein after determining whether there is a first routing table entry in the current routing table that matches the data to be forwarded, the data communication method further comprises: If there is, forwarding the data to be forwarded using the first routing table entry, and updating the current usage timestamp of the first routing table entry based on the current time.

3. The data communication method according to claim 1 or 2, wherein determining whether there is a first routing table entry in the current routing table that matches the data to be forwarded comprises: Determining the target parameter information of the data to be forwarded; wherein the target parameter information includes an IP address and a port number; and Searching whether there is a first routing table entry in the current routing table that matches the target parameter information.

4. The data communication method according to any one of claims 1 to 3, wherein before determining the second routing table entry with the smallest current usage timestamp from the current routing table, the data communication method further comprises: Determining whether there is an idle routing table entry in the current routing table; If there is an idle routing table entry, updating the idle routing table entry with the target parameter information of the data to be forwarded, so as to forward the data to be forwarded using the updated idle routing table entry; If there is no idle routing table entry, performing the step of determining the second routing table entry with the smallest current usage timestamp from the current routing table.

5. The data communication method according to any one of claims 1 to 4, wherein the data communication method further comprises: When a TCP data packet for indicating termination or reset is obtained, releasing the routing table entry corresponding to the TCP data packet from the current routing table.

6. The data communication method according to any one of claims 1 to 5, wherein the data communication method further comprises: Recording the connection status of each TCP connection between the microcontroller unit and the server; wherein each TCP connection corresponds to a routing table entry in the current routing table.

7. The data communication method according to any one of claims 1 to 6, wherein determining the second routing table entry with the smallest current usage timestamp from the current routing table comprises: If the number of routing table entries with the smallest current usage timestamp in the current routing table is multiple, obtaining the connection status of the TCP connections corresponding to each of the routing table entries with the smallest current usage timestamp, so as to obtain a target TCP connection that is not established yet; And Determine the routing table entry corresponding to the target TCP connection as the second routing table entry for forwarding the data to be forwarded.

8. A wireless Internet access module, comprising: A data acquisition interface configured to acquire data to be forwarded; The data to be forwarded is uplink data that a microcontroller unit is to forward to a server or downlink data that the server is to forward to the microcontroller unit; A first routing table entry determination module configured to determine whether there is a first routing table entry in the current routing table that matches the data to be forwarded; A second routing table entry determination module configured to, if not, determine from the current routing table the second routing table entry with the smallest current usage timestamp; And A data forwarding interface configured to update the second routing table entry with the target parameter information of the data to be forwarded, so as to forward the data to be forwarded by using the updated second routing table entry.

9. An electronic device, comprising: A memory configured to store a computer program; And A processor configured to execute the computer program to implement the data communication method according to any one of claims 1 to 7.

10. A computer-readable storage medium for storing a computer program; wherein, The computer program, when executed by the processor, implements the data communication method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Satellite network route updating method and device

    CN115913332A

  • Routing data processing method, gateway component, server, medium and system

    CN116032824A

  • Data processing method, data transmission method and related equipment

    CN116325708A

  • Data communication method, device, equipment and medium

    CN117880914A