Communication method, routing device, and storage medium

By obtaining the connection status between the routing device and the upper-layer network device, selecting the appropriate network working mode and forwarding data packets, the problem that the routing device cannot effectively expand the network coverage range is solved, and communication efficiency and quality are improved.

WO2025066931A1PCT designated stage expired Publication Date: 2025-04-03ZTE CORP
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/118708
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-09-28
Filing Date
2024-09-13
Publication Date
2025-04-03

AI Technical Summary

Technical Problem

When existing routing devices face environmental interference and network conflicts, they are unable to effectively expand network coverage, resulting in a decline in communication efficiency and quality.

Method used

By obtaining the connection status with the upper-layer network device, select the most suitable network operating mode (such as wired bridge or wireless operating mode), and forwarding data packets based on this mode to expand network coverage and improve communication quality.

Benefits of technology

It realizes the expansion of network coverage of routing equipment, improves the communication efficiency and quality between terminal devices, and can adapt to different network environments more flexibly.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024118708_03042025_PF_FP_ABST
    Figure CN2024118708_03042025_PF_FP_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of communications, and provides a communication method, an electronic device, and a storage medium. The method comprises: acquiring a state of connection with an upper-layer network device; on the basis of the state of connection, selecting a target working mode matching the state of connection, wherein the target working mode is one of a plurality of network working modes; and on the basis of the target working mode, forwarding an acquired data message to the upper-layer network device.
Need to check novelty before this filing date? Find Prior Art

Description

Communication method, routing device and storage medium

[0001] CROSS-REFERENCE TO RELATED APPLICATIONS

[0002] This application claims priority to Chinese patent application CN 202311291909.2, entitled “Communication Method, Routing Device and Storage Medium,” filed on September 28, 2023, the entire contents of which are incorporated herein by reference. Technical Field

[0003] The present application relates to the field of communication technology, and in particular to a communication method, a routing device, and a storage medium. Background Art

[0004] With the development of communication networks, terminal devices can access communication networks at any time. However, when terminal devices access communication networks through routing devices, they usually use a single connection method for communication. Due to environmental factors (such as excessive interference caused by numerous obstacles) and conflicts between different levels of networks, routing devices are unable to effectively expand their network coverage, reducing the communication efficiency and quality between devices.

[0005] Summary of the Invention

[0006] The present application provides a communication method, a routing device, and a storage medium.

[0007] An embodiment of the present application provides a communication method, including: obtaining the connection status between an upper-layer network device; based on the connection status, selecting a target operating mode that matches the connection status, the target operating mode being one of multiple network operating modes; based on the target operating mode, forwarding the obtained data message to the upper-layer network device.

[0008] An embodiment of the present application provides a routing device, including: one or more processors; a memory on which one or more programs are stored. When the one or more programs are executed by the one or more processors, the one or more processors implement any one of the communication methods in the embodiments of the present application.

[0009] An embodiment of the present application provides a readable storage medium, which stores a computer program. When the computer program is executed by a processor, any one of the communication methods in the embodiments of the present application is implemented.

[0010] With respect to the above embodiments and other aspects of the present application and their implementation, further description is provided in the accompanying drawings, detailed description and claims. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] FIG1 is a schematic flow chart showing a communication method according to an embodiment of the present application.

[0012] FIG2 shows a block diagram of a routing device according to an embodiment of the present application.

[0013] FIG3 shows a block diagram of a communication system according to an embodiment of the present application.

[0014] FIG4 is a schematic flow chart showing a working method of a communication system according to an embodiment of the present application.

[0015] FIG5 is a schematic flow chart showing a method for detecting a connection status according to an embodiment of the present application.

[0016] FIG6 shows a schematic diagram of determining the availability of each working mode in the wireless working mode according to an embodiment of the present application.

[0017] FIG7 shows a block diagram of a computing device according to an embodiment of the present application. DETAILED DESCRIPTION

[0018] To make the purpose, technical solutions and advantages of this application more clear, the embodiments of this application will be described in detail below with reference to the accompanying drawings. It should be noted that, unless there is a conflict, the embodiments and features in the embodiments of this application can be combined with each other in any way.

[0019] With the popularization of smart home devices, home networks can not only meet the communication needs of home terminals in home scenarios, but also interconnect with home terminal devices through the Internet to better meet user needs.

[0020] In order to better meet the effective coverage requirements of home networks or wireless networks in public places, a network is usually established based on a one-mother-multiple-child approach, with the mother device responsible for routing control and each child device responsible for wired or wireless connection with each terminal.

[0021] However, each sub-device must interact with the Internet through the parent device, increasing the data processing pressure on the parent device. In addition, the parent device must be protected against abnormal attacks on the Internet. That is, a single connection method (i.e., parent-child connection) is used for communication. Due to environmental factors (such as excessive interference caused by many obstacles) and conflicts between networks at all levels, the routing device cannot effectively expand its network coverage, reducing the communication efficiency and quality between devices.

[0022] The present application provides a communication method, an electronic device, and a storage medium to solve the above problems.

[0023] Figure 1 shows a flow chart of a communication method according to an embodiment of the present application. The communication method can be applied to a routing device that has wired or wireless access capabilities.

[0024] As shown in FIG1 , the communication method according to an embodiment of the present application includes but is not limited to the following steps S101 to S103 .

[0025] In step S101, the connection status with the upper-layer network device is obtained.

[0026] In step S102, according to the connection status, a target operating mode matching the connection status is selected.

[0027] The target working mode is one of multiple network working modes.

[0028] In step S103, based on the target working mode, the acquired data message is forwarded to the upper-layer network device.

[0029] A data message is a message sent by one or more terminals to a routing device.

[0030] In this embodiment, by obtaining the connection status with the upper-layer network device and selecting the target working mode that matches the connection status, the network working mode that best suits the current network environment can be flexibly selected as the target working mode according to different connection states, and the network connection method can be expanded through multiple network working modes, thereby expanding the network coverage of the routing device; further, based on the target working mode, the data message of the terminal obtained is forwarded to the upper-layer network device to improve the communication quality with the upper-layer network device, so that the terminal connected to the routing device can obtain better communication services and improve communication efficiency.

[0031] In some exemplary embodiments, based on the connection status, selecting a target operating mode that matches the connection status (i.e., step S102) includes: based on the connection status, selecting the network operating mode with the highest priority allowed by the connection status from multiple network operating modes as the target operating mode.

[0032] By screening a variety of different network working modes, the network working mode with the highest priority allowed by the connection status can be selected as the target working mode. The network working mode that is most suitable for the current network environment can be flexibly selected as the target working mode. The network connection method can be expanded through multiple network working modes, thereby expanding the network coverage of the routing device.

[0033] In some exemplary embodiments, the connection status includes a wired connection status or a wireless connection status, the multiple network working modes include a wired bridging working mode or a wireless working mode, and the priority of the wired bridging working mode is higher than the priority of the wireless working mode.

[0034] In some exemplary embodiments, when the connection status is determined to be a wired connection status and the upper-layer network device is able to provide network services, the wired bridging working mode is selected as the target working mode; or when the connection status is determined to be a wireless connection status, the wireless working mode is selected as the target working mode.

[0035] When a network connection request sent by a terminal is received, the connection status between it and an upper-layer network device (for example, an upper-layer routing device and / or an upper-layer data server, etc.) can be detected through a routing device. When it is determined that the connection status is a wired connection status, it is determined whether the upper-layer network device can provide network services normally. When it is determined that the upper-layer network device can provide network services normally, it can be determined that the wired bridging working mode can be selected as the target working mode; otherwise, it is determined that the connection status of the routing device is not a wired connection state.

[0036] Furthermore, the routing device will also detect the strength of the various wireless communication signals it receives to determine whether the routing device is wirelessly connected to other devices. If the connection state is determined to be a wireless connection state, the wireless working mode is selected as the target working mode.

[0037] The terminal and the routing device communicate in a wired working mode or a wireless working mode.

[0038] By detecting the connection status obtained, the working mode with the highest priority allowed by the connection status is flexibly selected from multiple network working modes, that is, the network working mode that is most suitable for the current network environment, as the target working mode, so as to expand the network connection method through multiple network working modes, thereby expanding the network coverage of the routing device.

[0039] In some exemplary embodiments, when the wired bridging working mode is selected as the target working mode, based on the target working mode, forwarding the obtained data packet to the upper-layer network device (i.e., step S103) includes: using the network address of the upper-layer network device obtained through the wired bridging working mode as the gateway address; based on the network interface layer protocol, using the gateway address to forward the obtained data packet to the upper-layer network device.

[0040] Through the network interface layer protocol, the routing device can transmit the data packets it obtains (for example, the upload service data packets of the terminal when performing data upload services) from the network layer of the routing device to the network layer of the upper-layer network device corresponding to the routing device. This process can be implemented through the software driver of the network card or a dedicated chip.

[0041] For example, the network interface layer protocol can be used to implement data link layer operations such as adding message headers and sending assembled data messages through physical media, thereby reducing the data processing pressure at the data link layer and eliminating the need for Network Address Translation (NAT), which can ensure address accuracy and improve data processing efficiency.

[0042] In some exemplary embodiments, when it is determined that the wireless working mode is selected as the target working mode, before forwarding the obtained data packet to the upper-layer network device based on the target working mode (i.e., step S103), the method also includes: using the network address of the upper-layer network device obtained through the wireless working mode as the management address of the current device.

[0043] The management address is used to configure parameters for the current device. This management address is not used as the exit address for network communication between terminals. It is only used for terminals to configure parameters for the current routing device, which is different from the network address configuration in the router cascade.

[0044] For example, the network address of router A is in the 192 network segment, and the network address of router B is in the 193 network segment. At this time, router A and router B are connected, that is, the connection method between router A and router B is a connection method based on wired bridging, which enables different terminals under router A to communicate with multiple terminals under router B in different network segments, and router A can use the network address of router B as its management address.

[0045] In the conventional router cascade method, router A and router B are two devices in the same network segment (for example, both are 192 network segments). The cascade method can only increase the number of ports, but cannot achieve the function of terminals in different network segments communicating with each other as in this application. In this application, by using the network address of the upper-layer network device obtained in the wireless working mode as the management address of the current device (i.e., the routing device), it is possible to facilitate the management of the routing device. At the same time, it can also enable terminals in multiple network segments to communicate with each other, thereby improving the communication efficiency between each terminal.

[0046] In some exemplary embodiments, the target operating mode is the operating mode with the highest priority among the first wireless operating mode, the second wireless operating mode, and the third operating mode included in the wireless operating mode.

[0047] The wireless working mode includes at least two of a first wireless working mode, a second wireless working mode and a third working mode. For example, the first wireless working mode is a wireless relay working mode, the second wireless working mode is a wireless bridging working mode, and the third wireless working mode is a mobile communication working mode.

[0048] The step of selecting the wireless working mode as the target working mode may include: selecting the wireless working mode with the highest priority allowed by the connection state from the wireless relay working mode, the wireless bridging working mode and the mobile communication working mode as the target working mode.

[0049] By selecting the wireless working mode with the highest priority allowed by the connection status as the target working mode, the target working mode can be made to fit the currently detected connection status to the greatest extent, so that the routing device can work in the optimal target working mode, thereby improving the working efficiency of the routing device.

[0050] In some exemplary embodiments, before the step of selecting the wireless working mode as the target working mode, the method further includes: determining the priority of each working mode in the wireless working mode based on the acquired characteristic information of the data message sent by the terminal.

[0051] The characteristic information of a data packet includes at least one of transmission reliability, transmission delay, and transmission bandwidth. For example, the signal-to-noise ratio and transmission error rate are used to measure data transmission reliability, while transmission delay (e.g., a delay of 20 milliseconds or 30 milliseconds for the receiver to receive data from the transmitter) is used to measure transmission delay. The transmission bandwidth can be determined based on actual user needs, for example, 20 megabits per second (Mbps).

[0052] By using characteristic information of multiple dimensions of data messages to determine the priority of each working mode in the wireless working mode in a hierarchical manner, the priority of each working mode in the wireless working mode (for example, wireless relay working mode, wireless bridging working mode, mobile communication working mode, etc.) can be quantified, and the advantages and disadvantages of each working mode can be measured more accurately, so that the routing device can work in the optimal working mode and improve the working efficiency of the routing device.

[0053] In some exemplary embodiments, the priority of the wireless relay working mode is higher than the priority of the wireless bridging working mode and the mobile communication working mode.

[0054] When it is determined that the connection state is a wireless connection state, the step of selecting the wireless working mode as the target working mode includes: repeatedly initiating an access request to the upper-layer network device within a preset time period; in response to a successful access response fed back by the upper-layer network device, determining that the wireless relay working mode is available, and selecting the wireless relay working mode as the target working mode; when it is determined that the number of times the access request is initiated exceeds a preset number threshold, and / or the upper-layer network device does not feed back a successful access response, determining that the wireless relay working mode is unavailable, and selecting the wireless bridging working mode or the mobile communication working mode as the target working mode.

[0055] The preset duration is a pre-set duration allowed for sending access requests (for example, 1 minute, 2 minutes, etc.). By repeatedly sending access requests to the upper-layer network device within the preset duration until the upper-layer network device feeds back a successful access response, it can be determined that a wireless communication connection is successfully established between the routing device and the upper-layer network device. At this time, the wireless relay working mode can be used as the target working mode.

[0056] When the number of access requests initiated exceeds a preset threshold, and / or the upper-layer network device does not feedback a successful access response, it can be known that the upper-layer network device cannot establish a wireless communication connection with the current routing device. In this case, the wireless bridging working mode can be selected as the target working mode, that is, the Ethernet port of the bridge is connected to a hub or switch in the local area network, wherein the signal transmission port of the current routing device is connected to the Ethernet port of the bridge via a cable and / or an antenna, thereby realizing the expansion of the communication network, so that the current routing device can send the data message of the terminal it obtains to the data transmission network through the wireless bridging working mode, and then other terminals can obtain the data message through the data transmission network.

[0057] Alternatively, the mobile communication working mode is selected as the target working mode, that is, the routing device transmits the acquired terminal data message to other terminals through its own mobile communication network, thereby providing network services for the terminals.

[0058] In different application scenarios, using the above-mentioned working modes with different priority levels as the corresponding target working modes can enable the routing equipment to quickly adapt to the network environment in each application scenario, which can not only expand the coverage of the communication network, but also provide communication services to each terminal connected to it in a timely manner, thereby improving communication efficiency.

[0059] In some exemplary embodiments, before selecting the target working mode that matches the connection state (ie, step S102), the method further includes: initially configuring network parameters in the wireless working mode and allocating a network address to at least one terminal that is connected.

[0060] The network parameters include the name of the routing device and / or the network address of the routing device, and the password of the routing device.

[0061] For example, the terminal obtains the network address of the routing device and uses the network address of the routing device as the management address of the routing device. By logging in to the management address, the device management page of the routing device is opened, and the network parameters of the routing device are configured accordingly according to actual usage requirements, so that the routing device can work in the network environment required by the terminal.

[0062] Furthermore, to facilitate communication, the routing device can assign a corresponding network address to each terminal connected thereto to form a local area network (for example, a home network, etc.), thereby communicating with multiple terminals based on the local network and improving communication efficiency.

[0063] The following describes in detail the device according to the embodiment of the present application with reference to the accompanying drawings.

[0064] FIG2 is a block diagram showing a routing device according to an embodiment of the present application. As shown in FIG2 , the routing device 200 includes but is not limited to an acquisition module 201 , a selection module 202 , and a communication module 203 .

[0065] The acquisition module 201 is configured to acquire the connection status with the upper-layer network device.

[0066] The selection module 202 is configured to select a target operating mode that matches the connection state according to the connection state.

[0067] The target working mode is one of multiple network working modes.

[0068] The communication module 203 is configured to forward the acquired data message to the upper-layer network device based on the target working mode.

[0069] A data message is a message sent by one or more terminals to a routing device.

[0070] It should be noted that the routing device 200 in this embodiment can implement any communication method in the embodiments of this application.

[0071] According to the routing device of the embodiment of the present application, the connection status between the device and the upper network layer is obtained through the acquisition module, and the target working mode that matches the connection status is selected using the selection module. The network working mode that best suits the current network environment can be flexibly selected as the target working mode according to different connection states, and the network connection method is expanded through multiple network working modes, thereby expanding the network coverage of the routing device. Furthermore, based on the target working mode, the communication module is used to forward the acquired terminal data message to the upper network layer to improve the communication quality with the upper network layer, so that the terminal connected to the routing device can obtain better communication services and improve communication efficiency.

[0072] Figure 3 shows a block diagram of a communication system according to an embodiment of the present application. The communication system can be a communication system in a home local area network covered by a wireless local area network, or a communication system including wireless network coverage in a mobile public network communication scenario. The communication system can have good network scalability for different application scenarios.

[0073] As shown in Figure 3, the communication system includes but is not limited to: a first router 311, a second router 312 and multiple terminals (for example, a first terminal 321 (for example, a smartphone), a second terminal 322 (for example, a tablet computer), a third terminal 323 (for example, a personal computer (PC)), etc.).

[0074] The first router 311 is used to connect to the Internet 330 to facilitate multi-terminal communication through the Internet 330 .

[0075] The second router 312 can be connected to the first router 311 via a wired bridge, or it can be connected to the first router 311 or a server in the internet 330 via a wireless connection, thereby providing communication services to each terminal connected to the second router 312 and expanding the network coverage of the second router 312. In addition, based on the connection status it detects, the second router 312 can adaptively select the network operating mode with the highest priority allowed by the connection status from among multiple network operating modes as its target operating mode, so that each terminal can more conveniently obtain the network communication services it needs through the second router 312.

[0076] FIG4 is a schematic flow chart showing a working method of a communication system according to an embodiment of the present application.

[0077] As shown in FIG4 , the working method of the communication system according to an embodiment of the present application includes but is not limited to the following steps S401 to S404 .

[0078] In step S401, the second router 312 performs initial configuration on network parameters in the wireless working mode and allocates a network address to at least one terminal that accesses the network.

[0079] The network parameters include a user name (eg, the name or network address of the first router 311 ) and a password, and message synchronization can be performed based on a short-range communication protocol (eg, a WIFI standard protocol).

[0080] In some embodiments, the user can open the device management page of the second router 312 (for example, open the device management page of the second router 312 through an application on the terminal) and configure the corresponding parameters of the second router 312 according to the user's actual needs; or synchronize the parameter configuration of a pre-selected WIFI network.

[0081] The second router 312 may also function as an independent router to assign a network address (eg, an Internet Protocol (IP) address, etc.) to at least one connected terminal.

[0082] In step S402 , the second router 312 detects the connection status with the upper-layer network device in response to the network connection request sent by the terminal.

[0083] The terminal may be any one of the first terminal 321, the second terminal 322, and the third terminal 323. The terminal communicates with the second router 312 in a wired working mode or a wireless working mode.

[0084] The upper-layer network device can be the first router 311 or a server or other device in the Internet 330; in other words, the second router 312 can be connected to the Internet 330 through the first router 311, and the second router 312 can also be directly connected to the server or other device in the Internet 330.

[0085] The second router 312 first detects the network cable insertion status. If a network cable is inserted into the Ethernet port, it starts to detect whether the device connected to the Ethernet port can provide network services. If no network cable is inserted into the Ethernet port or it is detected that the device connected to the Ethernet port cannot provide network services, it is determined that the connection status is not a wired connection status and further detection of the wireless connection status is required.

[0086] For example, the second router 312 detects different types of wireless communication signals that can be received (for example, signals sent by wireless relay routing (such as the first router 311) , wireless bridging signals, or mobile communication signals, etc.), and thereby determines whether the second router 312 is in a wireless connection state based on the strength of the received signal.

[0087] In step S403 , the second router 312 selects a network operating mode with the highest priority allowed by the connection status as a target operating mode from among the multiple network operating modes according to the connection status between the second router 312 and the upper-layer network device.

[0088] The multiple network working modes include a wired bridging working mode and a wireless working mode. The wireless working mode includes at least two of a wireless relay working mode, a wireless bridging working mode and a mobile communication working mode.

[0089] In some embodiments, the priority of the wired bridging working mode is higher than that of the wireless working mode; in the wireless working mode, the priority of each working mode in the wireless working mode can be determined by obtaining characteristic information of the data message sent by the terminal.

[0090] The characteristic information of the data message includes at least one of transmission reliability information (such as signal-to-noise ratio, transmission error rate, etc.), transmission delay information, and transmission bandwidth information.

[0091] If the connection state is determined to be a wired connection and the upper-layer network device is able to provide network services, the wired bridge operating mode is selected as the target operating mode. Using the wired bridge operating mode as the target operating mode can ensure that the communication signals between devices are not affected by environmental factors, thereby improving communication quality.

[0092] When it is determined that the connection state is a wireless connection state, the wireless working mode is selected as the target working mode. Then, the second router 312 uses the network address of the upper-layer network device (such as the first router 311) obtained through the wireless working mode as the management address of the second router 312, wherein the management address is used for the terminal to configure parameters of the second router 312. For example, the private IP address of the first router 311 is used as the management address of the second router 312, so that the device management page can be opened through the management address to perform corresponding parameter configuration and modification operations.

[0093] In step S404, the second router 312 forwards the acquired data message to the upper-layer network device based on the target working mode.

[0094] When the target working mode is the wired bridging working mode, the second router 312 will use the network address of the upper network device obtained through the wired bridging working mode as the gateway address; based on the network interface layer protocol, the gateway address will be used to forward the obtained terminal data message to the upper network device.

[0095] It should be noted that the traditional Internet layer protocol uses NAT to convert the logical IP address of the second router 312 into a physical address, and then transmits the data to be transmitted to the network adapter of the first router 311 through the physical address. The above process requires NAT, which is cumbersome to handle. In the present application, the network interface layer protocol can support the second router 312 to transmit the data message of the terminal it obtains from the network layer of the second router 312 to the network layer of the first router 311. This process can be implemented through the software driver of the network card or through a dedicated chip, so that the data link layer operations such as adding a message header and sending the assembled data message through the physical medium are implemented through the network interface layer protocol, which reduces the data processing pressure of the data link layer and does not need to perform NAT, can ensure the accuracy of the address, and improve the data processing efficiency.

[0096] When the target working mode is the wireless working mode, the second router 312 uses the network address of the upper-layer network device (eg, the first router 311 ) obtained through the wireless working mode as the management address of the second router 312 .

[0097] It should be noted that the management address is not used as an exit address for each terminal to perform network communication, but is only used for the terminal to configure parameters of the second router 312, which is different from the network address configuration in the router cascade.

[0098] For example, the network address of router A is in the 192 network segment, and the network address of router B is in the 193 network segment. At this time, router A and router B are connected, that is, the connection method between router A and router B is a connection method based on wired bridging, which enables different terminals under router A to communicate with multiple terminals under router B in different network segments, and router A can use the network address of router B as its management address.

[0099] In the conventional router cascading method, router A and router B are two devices in the same network segment (for example, both are 192 network segments). The cascading method can only increase the number of ports, but cannot achieve the function of terminals in different network segments communicating with each other as in this application.

[0100] In this embodiment, the second router 312 obtains the connection status between it and the upper-layer network device, and according to the connection status, selects the network working mode with the highest priority allowed by the connection status from multiple network working modes as the target working mode. For example, in the wired connection state, the wired bridging working mode is preferentially selected as the target working mode; in the wireless connection state, the working mode with the highest priority among the wireless relay working mode, the wireless bridging working mode and the mobile communication working mode is preferentially selected as the target working mode. In this way, according to different connection states, the working mode with the highest priority allowed by the connection status can be flexibly selected from multiple network working modes. The working mode, that is, the network working mode that best suits the current network environment, is used as the target working mode, wherein the network working mode is a mode for connecting the terminal to the upper-layer network device through the current device, so that the network connection method can be expanded through multiple network working modes, thereby expanding the network coverage of the routing device; further, based on the target working mode, communication is carried out with the upper-layer network device to improve the communication quality between the upper-layer network device and the upper-layer network device, so that the terminal connected to the routing device can obtain better communication services. For example, it can effectively overcome interference problems caused by environmental factors, improve the efficiency of data forwarding, reduce subnet conflicts, etc., and improve communication efficiency. In addition, in the process of selecting the target working mode, the appropriate target working mode can be adaptively selected without manual intervention by the user, so as to facilitate communication based on the target formula mode, which greatly improves the user experience.

[0101] In some embodiments, the second router 312 may detect the connection status with the upper-layer network device in response to the network connection request sent by the terminal in the manner shown in FIG. 5 (ie, step S402 ).

[0102] FIG5 is a schematic flow chart showing a method for detecting a connection status according to an embodiment of the present application.

[0103] As shown in FIG. 5 , the connection status detection method may be applied to the second router 312 , and the method includes but is not limited to the following steps S501 to S506 .

[0104] In step S501, a network connection request sent by a terminal is received.

[0105] The terminal communicates with the second router 312 in a wired working mode or a wireless working mode.

[0106] In step S502, it is detected whether there is a network cable connection between the upper layer network device and the upper layer network device.

[0107] The second router 312 detects whether a network cable is plugged into an Ethernet port (e.g., a wide area network (WAN) port, a local area network (LAN) port, etc.) when it is powered on. If a network cable is connected, the process proceeds to step S503; otherwise, the process proceeds to step S506.

[0108] The upper-layer network device includes an upper-layer routing device and / or an upper-layer data server.

[0109] In step S503, a connection request is sent to an upper-layer network device.

[0110] The connection request is used to attempt to connect to an upper-layer network device to determine whether the upper-layer network device can normally provide network services. For example, the upper-layer network device uses a Layer 2 protocol packet forwarding mechanism through the second router 312 to provide network services to various terminals (e.g., the first terminal 321, the second terminal 322, the third terminal 323, etc.). The connection request may request the network service identifier (e.g., the network address, etc.) of the upper-layer network device.

[0111] In step S504, it is determined whether the connection with the upper layer network device is successful.

[0112] When the second router 312 can obtain the network service identifier of the first router 311 (such as the network address of the first router 311), or when the second router 312 can obtain the network service identifier of the server in the Internet 330, it can be determined that the second router 312 is successfully connected to the upper-layer network device.

[0113] For example, the second router 312 can detect its connectivity with the upper network device by trying to connect to the other party's network address using the ping command. If the ping is successful, it is determined that the second router 312 is successfully connected to the upper network device; otherwise, it is determined that the connection fails.

[0114] If it is determined that the connection with the upper-layer network device is successful (for example, a connection response fed back by the upper-layer network device is received), step S505 is executed; otherwise, step S506 is executed.

[0115] In step S505 , it is determined that the connection state between the second router 312 and the upper-layer network device is a wired connection state.

[0116] At this time, you can select the wired bridge working mode as the target working mode.

[0117] After switching to wired bridge mode, the second router 312 and the devices accessed through the Ethernet port (for example, each terminal) are all under the same wired bridge based on the second network layer, and all data packets between the devices are transmitted using a data forwarding method based on the switch principle.

[0118] In step S506 , it is determined that the connection state between the second router 312 and the upper-layer network device is a wireless connection state.

[0119] At this time, the wireless working mode can be selected as the target working mode. For example, the second router 312 attempts to connect to a WIFI network.

[0120] It should be noted that when the second router 312 is in wireless working mode, the second router 312 forwards data packets for each terminal connected to it based on the second layer protocol data packet forwarding mechanism (for example, a data forwarding mechanism based on the network interface layer protocol), without the need for network address conversion (i.e., NAT processing), thereby reducing data processing errors caused by network address conversion and improving data processing efficiency and accuracy.

[0121] In some embodiments, the wireless working mode includes: at least two of: wireless relay working mode, wireless bridging working mode and mobile communication working mode, wherein the priority of the wireless relay working mode is higher than the priority of the wireless bridging working mode and the mobile communication working mode.

[0122] 6 , the second router 312 selects the network operating mode with the highest priority allowed by the connection status as the target operating mode from multiple network operating modes according to the connection status between the second router 312 and the upper-layer network device (ie, step S403 ).

[0123] FIG6 shows a schematic diagram of determining the availability of each working mode in the wireless working mode according to an embodiment of the present application.

[0124] As shown in FIG6 , the method for determining the availability of each wireless working mode is applied to the second router 312 , and the method includes but is not limited to the following steps S601 to S606 .

[0125] In step S601, a timer is started.

[0126] The timing duration in the timer is a preset duration (for example, 5 seconds, 10 seconds, etc.).

[0127] In step S602, an access request is initiated to an upper-layer network device.

[0128] It should be noted that before initiating an access request to an upper-layer network device (for example, the first router 311, a server in the Internet 330, and other devices), the second router 312 needs to obtain the network parameters of the upper-layer network device, or manually set the second router 312 through the user terminal to obtain the network parameters of the upper-layer network device, so as to add the relevant network parameters of the upper-layer network device (for example, the network address, etc.) in the access request.

[0129] It should be noted that after executing step S602, step S603 may be executed, or step S605 may be executed simultaneously.

[0130] In step S603, it is determined whether a successful access response fed back by the upper-layer network device is received.

[0131] If it is determined that a successful access response fed back by the upper-layer network device is received, step S604 is executed; otherwise, step S605 is executed.

[0132] In step S604, it is determined that the wireless relay operating mode is available, and the wireless relay operating mode is selected as the target operating mode.

[0133] In step S605, it is determined whether the timer has timed out, or whether the number of access requests initiated exceeds a preset threshold.

[0134] If it is determined that the timer has timed out and / or the number of access requests initiated exceeds the preset threshold, step S606 is executed; otherwise, the process returns to step S602.

[0135] Step S606 , determining that the wireless relay working mode is unavailable, and selecting the wireless bridging working mode or the mobile communication working mode as the target working mode.

[0136] It should be understood that the present application is not limited to the specific configurations and processes described in the above embodiments and illustrated in the figures. For the sake of convenience and brevity, detailed descriptions of known methods are omitted here. The specific working processes of the systems, modules, and units described above can be referred to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0137] FIG7 shows a block diagram of a computing device according to an embodiment of the present application.

[0138] As shown in Figure 7, computing device 700 includes an input device 701, an input interface 702, a central processing unit 703, a memory 704, an output interface 705, and an output device 706. Input interface 702, central processing unit 703, memory 704, and output interface 705 are interconnected via a bus 707. Input device 701 and output device 706 are connected to bus 707 via input interface 702 and output interface 705, respectively, and are further connected to other components of computing device 700.

[0139] Specifically, the input device 701 receives input information from the outside and transmits the input information to the central processing unit 703 through the input interface 702; the central processing unit 703 processes the input information based on the computer-executable instructions stored in the memory 704 to generate output information, stores the output information temporarily or permanently in the memory 704, and then transmits the output information to the output device 706 through the output interface 705; the output device 706 outputs the output information to the outside of the computing device 700 for user use.

[0140] In one embodiment, the computing device 700 shown in FIG. 7 may be implemented as an electronic device, which may include: a memory configured to store a program; and a processor configured to run the program stored in the memory to execute the communication method described in the above embodiment.

[0141] In one embodiment, the computing device 700 shown in FIG7 may be implemented as a communication system, which may include: a memory configured to store a program; and a processor configured to run the program stored in the memory to execute the communication method described in the above embodiment.

[0142] The foregoing is merely an exemplary embodiment of the present application and is not intended to limit the scope of protection of the present application. Generally speaking, various embodiments of the present application can be implemented in hardware or dedicated circuits, software, logic, or any combination thereof. For example, some aspects can be implemented in hardware, while other aspects can be implemented in firmware or software that can be executed by a controller, microprocessor, or other computing device, although the present application is not limited thereto.

[0143] Embodiments of the present application may be implemented by a processor executing computer program instructions, for example, in a processor entity, or by hardware, or by a combination of software and hardware. The computer program instructions may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages.

[0144] The block diagram of any logical flow in the accompanying drawings of the present application can represent program steps, or can represent interconnected logical circuits, modules and functions, or can represent a combination of program steps and logical circuits, modules and functions. The computer program can be stored on a memory. The memory can have any type suitable for the local technical environment and can be implemented using any suitable data storage technology, such as but not limited to read-only memory (ROM), random access memory (RAM), optical storage device and system (digital versatile disc DVD or CD optical disc) etc. The computer readable medium may include non-transient storage media. The processor can be any type suitable for the local technical environment, such as but not limited to a general-purpose computer, a special-purpose computer, a microprocessor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a programmable logic device (FPGA) and a processor based on a multi-core processor architecture.

[0145] The above description of exemplary embodiments of the present application has been provided by way of exemplary and non-limiting examples. However, various modifications and adaptations of the above embodiments will be apparent to those skilled in the art, when considered in conjunction with the accompanying drawings and the appended claims, without departing from the scope of the present application. Therefore, the proper scope of the present application will be determined by reference to the appended claims.

Claims

1. A communication method, comprising: Get the connection status with the upper-layer network device; According to the connection state, selecting a target operating mode that matches the connection state, the target operating mode being one of a plurality of network operating modes; Based on the target working mode, the acquired data message is forwarded to the upper-layer network device.

2. The method according to claim 1, wherein: According to the connection state, selecting a target working mode matching the connection state includes: According to the connection status, a network operating mode with the highest priority allowed by the connection status is selected from the multiple network operating modes as the target operating mode.

3. The method according to claim 2, wherein: The connection state includes a wired connection state or a wireless connection state, the multiple network working modes include a wired bridging working mode or a wireless working mode, the priority of the wired bridging working mode is higher than the priority of the wireless working mode, Selecting the network working mode with the highest priority allowed by the connection state from the multiple network working modes as the target working mode includes: When it is determined that the connection state is the wired connection state and the upper-layer network device is capable of providing network services, selecting the wired bridging working mode as the target working mode; When it is determined that the connection state is the wireless connection state, the wireless working mode is selected as the target working mode.

4. The method according to claim 3, wherein: In the case where the wired bridging working mode is selected as the target working mode, forwarding the acquired data message to the upper-layer network device based on the target working mode includes: The network of the upper layer network device obtained through the wired bridging working mode The network address is used as the gateway address; Based on the network interface layer protocol, the data message is forwarded to the upper layer network device using the gateway address.

5. The method according to claim 3, wherein: In the case where it is determined to select the wireless working mode as the target working mode, before forwarding the acquired data message to the upper-layer network device based on the target working mode, the method further includes: The network address of the upper-layer network device obtained through the wireless working mode is used as the management address of the current device, The management address is used to configure parameters of the current device.

6. The method according to claim 3, wherein: When it is determined that the connection state is the wireless connection state, the target working state is the working mode with the highest priority among the first wireless working mode, the second wireless working mode and the third working mode included in the wireless working mode.

7. The method according to claim 6, wherein: When it is determined that the connection state is the wireless connection state, before selecting the wireless working mode as the target working mode, the method further includes: Determine the priority level of each working mode in the wireless working mode according to the acquired characteristic information of the data message sent by the terminal, The characteristic information of the data message includes at least one of transmission reliability information, transmission delay information, and transmission bandwidth information.

8. The method according to any one of claims 3 to 7, wherein: Before selecting the target operating mode matching the connection state, the method further includes: Initial configuration is performed on the network parameters in the wireless working mode, and a network address is allocated to at least one terminal that accesses the network.

9. A routing device, comprising: one or more processors; A memory having one or more programs stored thereon, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the communication method as claimed in any one of claims 1 to 8.

10. A readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the communication method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Method and device for switching working mode

    CN104683248A

  • Physical address acquisition method and apparatus, and readable medium

    CN108833607A

  • Message forwarding method and device, electronic equipment and storage medium

    CN114374666A

  • Method and apparatus for selecting forwarding modes

    US20050246431A1