Communication method and apparatus for dual network interface card terminal, and electronic device
Through the method of automatically selecting the advantageous frequency bands by dual network card terminals, the problem of small indoor coverage of traditional Wi-Fi terminals is solved, and stable data transmission in large-scale Wi-Fi coverage scenarios is achieved, improving user experience.
Patent Information
- Application Number
- PCT/CN2024/141863
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-12-29
- Filing Date
- 2024-12-24
- Publication Date
- 2025-07-03
AI Technical Summary
Traditional Wi-Fi terminals have a small coverage in indoor environments, resulting in poor user experience in large-scale Wi-Fi coverage scenarios, especially in warehouses, supermarkets and other scenarios.
Using dual network card terminals, by calculating the network link quality of the 2.4G/5G frequency band and Sub1G frequency band, the advantageous frequency band is automatically selected as the main network and the backup network to ensure the continuous and stable transmission of important data.
It realizes automatic selection of the best frequency band in different wireless environments, ensures the stable transmission of important data, and improves the user experience in large-scale Wi-Fi coverage scenarios.
Smart Images

Figure CN2024141863_03072025_PF_FP_ABST
Abstract
Description
Communication method, device and electronic equipment for dual network card terminal Technical Field
[0001] The present invention relates to the technical field of wireless communications, and in particular to a communication method, device and electronic equipment for a dual-network card terminal. Background Art
[0002] Wi-Fi is a set of market-oriented technical standards promoted by the Wi-Fi Alliance based on the IEEE Std 802.11 protocol suite. The 802.11 protocol suite includes many types of protocols, defining technical standards for different frequency bands, bandwidths, and applications. For example, Wi-Fi 6 includes HT20 / HT40 for the 2.4 GHz band and HT20 / HT40 / HT80 / HT160 for the 5 GHz band. Wi-Fi transmission characteristics are determined by the properties of radio waves. Given the same transmit power, the lower the terminal's wireless frequency band, the longer the wavelength, and the greater the diffraction resistance, the wider the indoor wireless coverage. For example, under the same transmit power and interference-free conditions, the indoor coverage of Wi-Fi 2.4 GHz is higher than that of 5 GHz.
[0003] Due to the aforementioned radio wave characteristics, local regulatory restrictions, and interference conditions in various wireless environments, the indoor coverage range of a single Wi-Fi 2.4G / 5G AP (Access Point) should not exceed a radius of 15 meters. To address Wi-Fi coverage limitations, wireless network product manufacturers have introduced Mesh networks or AP+AC networking, which require a large number of APs to achieve complete wireless coverage. Once the APs are networked in this manner, STAs (Stations) must support wireless roaming. Currently, many products support 2.4G / 5G Wi-Fi APs and STAs, and many APs support dual-band steering, meaning the AP guides the STA to select the frequency band to use. Many APs and STAs also support the IEEE 802.11kvr protocol, enabling seamless roaming as defined by the standard.
[0004] While standards and protocols such as dual-band guidance and 802.11kvr optimize Wi-Fi roaming, actual wireless technologies cannot guarantee perfect packet loss during roaming. When STAs roam between APs, they can experience varying degrees of packet loss and disconnection due to various reasons (such as wireless interference and software bugs). Given the same coverage area and the same number of APs, the more times a STA roams, the greater the number of packet losses and disconnections. These packet losses and disconnections can severely reduce work efficiency in certain applications, such as inventory management in warehouses.
[0005] It can be seen that although traditional Wi-Fi terminals support 2.4G / 5G frequency bands and are very common in home and commercial scenarios, the frequency band characteristics of traditional Wi-Fi terminals result in limited coverage in indoor environments. For scenarios that require large-scale Wi-Fi coverage, such as warehouses, supermarkets, and restaurants, the user experience is poor. Summary of the Invention
[0006] The technical problem to be solved by the present invention is to provide a communication method, device and electronic equipment for a dual-network card terminal, which can select and switch the main network and backup network according to the quality of the wireless network link, automatically select the advantageous frequency band for communication, and ensure the continuous and stable transmission of important data.
[0007] To solve the above technical problems, in a first aspect, the present invention provides a communication method for a dual-network card terminal, comprising: calculating the network link quality of a first network and the network link quality of a second network, wherein the first network is a wireless network accessed by the first network card, and the second network is a wireless network accessed by the second network card, and the network link quality includes a signal strength indication; comparing the network link quality of the first network with the network link quality of the second network, and taking the network with better network link quality as the target network; switching the target network to the main network and the other network as the backup network, wherein the main network is a network used for data transmission.
[0008] Optionally, the first network card is used to connect to a wireless access point in the 2.4G / 5G frequency band, and the second network card is used to connect to a wireless access point in the Sub1G frequency band.
[0009] Optionally, the first network is a network with the best network link quality selected by the first network card in each scanning result, and the second network is a network with the best network link quality selected by the second network card in each scanning result.
[0010] Optionally, before calculating the network link quality of the first network and the network link quality of the second network, the method further includes: scanning and connecting the first network and the second network.
[0011] Optionally, scanning and connecting the first network and the second network includes: if the interface of the first network and the interface of the second network have been associated with a wireless access point, then the first network card and the second network card are respectively connected to the networks corresponding to the associated wireless access points.
[0012] Optionally, scanning and connecting the first network and the second network includes: if the interface of the first network and the interface of the second network have not been associated with a wireless access point, then using the two networks corresponding to the wireless access point selected by the user as the networks accessed by the first network card and the second network card respectively.
[0013] Optionally, before scanning and connecting the first network and the second network, the method further includes: initializing the network interfaces of the first network card and the second network card, and creating a client manager, a wireless scanner, and a network selector.
[0014] Optionally, switching the target network to the primary network includes: acquiring a client manager of the target network, and the client manager completing the connection of the target network.
[0015] Optionally, the method further includes: if a network selection instruction input by a user is received, using the network selected by the user as the primary network.
[0016] Optionally, if an instruction is received that the user does not select the first network and the second network at the same time, the network selected by the user is used as the primary network.
[0017] Optionally, if the network selected by the user is a network with the same frequency band as the current primary network, the current connection with the primary network is disconnected and the new network is reconnected.
[0018] Optionally, if the network selected by the user is different from the current primary network, the network selected by the user is used as the primary network, and the primary network and the backup network are switched during the next scan.
[0019] Optionally, the network link quality also includes estimated bandwidth and estimated channel occupancy. The step of obtaining the network link quality of the first network and the network link quality of the second network also includes: assigning different weights to the signal strength indication, the estimated bandwidth and the estimated channel occupancy, calculating a comprehensive score of the signal strength indication, the estimated bandwidth and the estimated channel occupancy, and using the comprehensive score as an evaluation indicator of the network link quality.
[0020] In a second aspect, the present invention provides a communication device for a dual network card terminal, comprising: a calculation module for calculating the network link quality of a first network and the network link quality of a second network, wherein the first network is a wireless network accessed by the first network card, and the second network is a wireless network accessed by the second network card, and the network link quality includes a signal strength indication; a comparison module for comparing the network link quality of the first network with the network link quality of the second network, and taking the network with better network link quality as the target network; a switching module for switching the target network to the main network and the other network as the backup network, wherein the main network is a network used for data transmission.
[0021] In a third aspect, the present invention provides an electronic device comprising: a processor and a memory, wherein the memory stores programs or instructions that can be run on the processor, and when the programs or instructions are executed by the processor, the steps of the communication method of the dual network card terminal as described in the first aspect are implemented.
[0022] In a fourth aspect, the present invention provides a readable storage medium storing a program or instruction, which, when executed by a processor, implements the steps of the communication method for a dual network card terminal as described in the first aspect.
[0023] Compared with the existing technology, the present invention has the following advantages: first, the network link quality of the first network and the network link quality of the second network are calculated, and then the network link quality of the first network and the network link quality of the second network are compared, and the network with better network link quality is used as the target network. Finally, the target network is switched to the main network and the other network is used as the backup network. Therefore, the main network and the backup network can be selected and switched according to the wireless network link quality, and the advantageous frequency band communication is automatically selected to ensure the continuous and stable transmission effect of important data.
[0024] Summary of the Figures
[0025] The above and other features, properties and advantages of the present invention will become more apparent through the following description in conjunction with the accompanying drawings and embodiments, in which:
[0026] 1 is a schematic flow chart of a communication method for a dual network card terminal according to an embodiment of the present invention;
[0027] FIG2 is a schematic diagram of a physical interface of a network card according to an embodiment of the present invention;
[0028] FIG3 is a schematic diagram of a network interface of a communication system according to an embodiment of the present invention;
[0029] FIG4 is a schematic diagram of wireless association in a network communication system according to an embodiment of the present invention;
[0030] FIG5 is a network topology structure 1 in the present invention;
[0031] FIG6 is a second network topology structure in the present invention;
[0032] FIG7 is a third network topology structure in the present invention;
[0033] FIG8 is a schematic diagram of relative values of signal levels in different frequency bands according to an embodiment of the present invention;
[0034] 9 is a schematic structural diagram of a communication device of a dual network card terminal according to an embodiment of the present invention;
[0035] FIG10 is a schematic diagram of an electronic device according to an embodiment of the present invention.
[0036] Preferred embodiments of the present invention
[0037] The present invention is further described below in conjunction with specific implementation methods and accompanying drawings. More details are set forth in the following description to facilitate a full understanding of the present invention. However, the present invention can obviously be implemented in a variety of other ways different from the description. Those skilled in the art can make similar generalizations and deductions based on actual application situations without violating the connotation of the present invention. Therefore, the scope of protection of the present invention should not be limited by the content of this specific implementation method.
[0038] For example, a description later in the specification of a first feature being formed above or on a second feature may include an embodiment in which the first and second features are directly connected, or an embodiment in which an additional feature is formed between the first and second features, thereby eliminating the need for a direct connection between the first and second features. Furthermore, when a first element is described as being connected to or coupled to a second element, the description includes embodiments in which the first and second elements are directly connected or coupled to each other, as well as embodiments in which the first and second elements are indirectly connected or coupled to each other using one or more other intervening elements.
[0039] Although the present invention is disclosed above with reference to preferred embodiments, this is not intended to limit the present invention. Any person skilled in the art may make possible changes and modifications without departing from the spirit and scope of the present invention. Therefore, any modifications, equivalent variations, and modifications made to the above embodiments in accordance with the technical essence of the present invention without departing from the content of the technical solution of the present invention shall fall within the scope of protection defined by the claims of the present invention.
[0040] Figure 1 is a flow chart of a communication method for a dual network card terminal according to an embodiment of the present invention. Referring to Figure 1, method 100 includes: S110, calculating the network link quality of a first network and the network link quality of a second network, wherein the first network is a wireless network accessed by a first network card, and the second network is a wireless network accessed by a second network card, and the network link quality includes a signal strength indication; S120, comparing the network link quality of the first network with the network link quality of the second network, and taking the network with better network link quality as the target network; S130, switching the target network to a primary network and the other network as a backup network, wherein the primary network is a network used for data transmission.
[0041] In one example, the first network card is used to connect to a wireless access point in a 2.4G / 5G frequency band, and the second network card is used to connect to a wireless access point in a Sub1G frequency band.
[0042] From the perspective of the network itself, the dual-network card (WLAN network card) terminal in this embodiment has tri-band Wi-Fi, namely, including the 2.4G band, the 5G band, and the Sub1G band. However, in 2.4G Wi-Fi and 5G Wi-Fi, there are already implementation methods and related products for switching between 2.4G Wi-Fi and 5G Wi-Fi. Switching between 2.4G Wi-Fi and 5G Wi-Fi can be completed within the same chip. Therefore, this embodiment treats 2.4G Wi-Fi and 5G Wi-Fi as a single network. The method in this embodiment is to achieve switching between the 2.4G / 5G network and the Sub1G network. Its principle is that the networks connected to the two network cards remain associated, and only the routing of the data traffic is switched.
[0043] In this embodiment, the terminal has dual network cards. The physical interfaces of the network cards are shown in Figure 2. 2.4G / 5G Wi-Fi capabilities are provided by one chip solution, and Sub1G (11ah) Wi-Fi capabilities are provided by another chip solution. Each solution then communicates with the CPU according to its own interface requirements. The network interface of the communication system is shown in Figure 3. In the terminal's communication system, after loading the drivers of each network card, the corresponding network interfaces wlan0 and wlan1 are created. The process netd that manages the network in the system communicates with the network driver through the Netlink (inter-process communication) interface.
[0044] Figure 3 is a schematic diagram of the network interface of the communication system in one embodiment of the present invention. Referring to Figure 3, the 2.4G / 5G network card (first network card) on the terminal can be called STA1, which can be associated with an AP that supports 2.4G / 5G. The Sub1G network card (second network card) on the terminal can be called STA2, which can be associated with a MiniAP that supports Sub1G. The network device form of the MiniAP that supports Sub1G is similar to the AP of a traditional Wi-Fi. It is a second-layer network device. The MiniAP can be used as a pure AP device through an Ethernet access gateway to provide hotspot services in the Sub1G frequency band for Sub1G terminals. At this time, the terminal obtains an IP address from the gateway, and the MiniAP can also act as a DHCP Server to assign an IP address to the terminal. The Sub1G terminal communicates wirelessly and accesses the network through the Sub1G frequency band of the MiniAP.
[0045] The coverage range of a 2.4G / 5G AP is much smaller than that of a MiniAP. At the current terminal location, both STA1 and STA2 can associate with the AP for their respective frequency bands. In this case, STA1's 2.4G / 5G signal is weak, while STA2's Sub1G link, while low in bandwidth, maintains low-speed communication quality (e.g., good signal strength, low packet loss, and minimal latency). In this network environment, the wireless terminal automatically switches network communication routing from STA1, which has a weak signal and high packet loss, to STA2, which has a lower-speed, stable Sub1G link, based on link quality.
[0046] Since there are multiple wireless chip solutions and multiple frequency bands, it is necessary to consider network selection and switching issues. To this end, we first explain how to implement several network topologies.
[0047] As shown in Figure 5, if two STAs obtain IP addresses from different gateways, their IP addresses will be on different network segments. In this case, both links can access the Internet simultaneously. The terminal's wlan0 and wlan1 obtain IP addresses from different gateways. This topology doesn't provide link backup or bandwidth addition for LAN applications. However, it can enable data for certain apps with low throughput requirements but stable communication links to be forwarded over the sub1G link, while other app data is forwarded over the 2.4G / 5G link.
[0048] As shown in Figure 6, two STAs obtain IP addresses from the same gateway in primary / backup link mode, with the primary link providing Internet access. The terminal uses the primary / backup link concept, whichever link has better quality becomes the primary link. Terminal application data traffic is forwarded along the primary link, while the backup link remains connected and monitors its own link quality. During a link switchover, the network interface for data routing is switched, but because both STAs use the same gateway, the default route remains unchanged.
[0049] As shown in Figure 7, a virtual network card (vNIC) is created at the MAC layer, and two STAs are bound to it. Link switching is performed within the vNIC, and IP addresses are obtained from the same gateway, maintaining the same IP address after a link switch. After the terminal uses the vNIC, although both STAs are associated with the target AP, only one vNIC processes packets destined for the terminal protocol stack. Forwarded packets are controlled by active / standby switching between the vNICs, controlling which physical NIC the packets are sent to. This allows upper-layer apps to see only one NIC and one route. Even if a link switch occurs during mobility, the app remains unaware of the link loss and maintains the TCP connection. Other network topologies can be derived from the three above and are not detailed here.
[0050] These physical structures and network interface structures are the foundation for implementing the communication method of this embodiment. Based on this, the method of this embodiment requires integrating a 2.4G / 5G Wi-Fi chip and a Sub1G chip into the terminal. This results in dual WLAN network cards in the entire system. To provide a better user experience, the network link quality of 2.4G / 5G Wi-Fi is compared with that of Sub1G Wi-Fi. The network with the better link quality is selected as the target network, which is then switched to the primary network. The other network is then used as the backup network. This ensures that both 2.4G / 5G Wi-Fi and Sub1G Wi-Fi are associated with their respective APs, and the primary and backup networks are switched based on the wireless network link quality.
[0051] In one example, the first network is the network with the best link quality selected by the first network card in each scan result, and the second network is the network with the best link quality selected by the second network card in each scan result. For example, if the first network is a 2.4G / 5G frequency band network and the second network is a Sub1G frequency band network, the dual-STA terminal selects a network based on the user selection priority of the 2.4G / 5G and Sub1G frequency bands. After determining the user selection priority, the saved networks scanned for 2.4G / 5G and Sub1G are scored and automatically selected.
[0052] Specifically, the network managers for the 2.4G / 5G and Sub1G band networks each consider signal strength, interference, bandwidth and speed, security, and load balancing when selecting the best-quality AP for connection. This ensures a stable, fast, and secure connection for the terminal. For example, the network manager checks the signal strength of each AP and selects the one with the strongest signal. A stronger signal indicates better communication quality between the terminal and the AP. This indicates that the 2.4G / 5G network already has the best link quality among the networks in that band, and similarly, the Sub1G network also has the best link quality. The network manager then compares the link quality of the 2.4G / 5G network with that of the Sub1G network, selecting the network with the better link quality as the target network. This ensures that the best network is selected as the primary network.
[0053] In one example, before calculating the network link quality of the first network and the network link quality of the second network, the process further includes scanning and connecting to the first network and the second network. Through scanning, the terminal can identify surrounding wireless networks and list available networks for connection, helping the terminal select the correct network for connection and avoid connecting to unsecured networks or networks with poor signal strength.
[0054] In one example, if the interface of the first network and the interface of the second network have been associated with a wireless access point, the first network card and the second network card are respectively connected to the network corresponding to the associated wireless access point. If the interface of the first network and the interface of the second network have not been associated with a wireless access point, the two networks corresponding to the wireless access point selected by the user are respectively used as the networks connected to by the first network card and the second network card.
[0055] In one example, before scanning and connecting to the first network and the second network, the network interfaces of the first network card and the second network card are initialized, and a client manager, a wireless scanner, and a network selector are created.
[0056] The client manager manages and controls terminals connected to the network, ensuring secure and reliable network operation. The wireless scanner searches for and evaluates the surrounding wireless network environment, while the network selector formulates connection policies based on these evaluations and ensures that terminals connect to the optimal network.
[0057] In one example, switching the target network to the primary network includes obtaining a client manager for the target network, and the client manager completing a connection to the target network. Specifically, in this embodiment, if the client manager is in a connected state, the target network can be promptly switched to the primary network. If the client manager of the target network is disconnected, the client manager of the target network is connected before switching the target network to the primary network.
[0058] In one example, if a user inputs a network selection command, the selected network is used as the primary network. For example, if a user enters a network scan result list page and selects a target wireless access point, the system automatically selects an interface with the corresponding frequency band for management based on the target wireless access point, and then uses that network as the primary network to complete data transmission.
[0059] In one example, if the user does not select both the first and second networks at the same time, the network selected by the user will be used as the primary network. For example, if the first network is a 2.4G / 5G frequency band network and the second network is a Sub1G frequency band network, if the user only selects a 2.4G / 5G frequency band network, the 2.4G / 5G frequency band network will be used; if the user only selects a Sub1G frequency band network, the Sub1G frequency band network will be used. The network selected by the user will prevail.
[0060] In one example, if the network selected by the user is a network with the same frequency band as the current primary network, the current connection with the primary network is disconnected and the new network is reconnected.
[0061] In this embodiment, Dual STA selects the best network from each scan result. If the backup network is not better than the current primary network, no network switching occurs. If the link quality of the backup network is better than the current network, a primary / backup network switching occurs. The network selected by the user is the same frequency band as the current primary network. Specifically, this means that the network with the selected SSID and the primary network are both 2.4G / 5G or Sub1G. In this case, the user may have selected a different SSID in the same frequency band, meaning that the user has changed the SSID, and therefore needs to disconnect from the current primary network and reconnect to the new network.
[0062] For example, if the first network is a 2.4G / 5G band network and the second network is a Sub1G band network, if you are currently connected to a 2.4G / 5G band network (primary network) and the user selects another 2.4G / 5G band network, the system will disconnect the connected 2.4G / 5G band network and reconnect to the other 2.4G / 5G band network. Similarly, if you are currently connected to a Sub1G band network (primary network) and the user selects another Sub1G band network, the system will disconnect the connected Sub1G band network and reconnect to the other Sub1G band network.
[0063] In one example, if the network selected by the user is different from the current primary network, the network selected by the user is used as the primary network, and the primary network and the backup network are switched during the next scan.
[0064] For example, let's take the example of the first network being a 2.4G / 5G band network and the second network being a Sub1G band network. If you are currently connected to a 2.4G / 5G band network (primary network) and the user selects a Sub1G band network, the system will maintain the 2.4G / 5G band network while connecting to the Sub1G band network, and will switch between the primary and backup networks during the next network scan. Similarly, if you are currently connected to a Sub1G band network (primary network) and the user selects a 2.4G / 5G band network, the system will maintain the Sub1G band network while connecting to the 2.4G / 5G band network, and will switch between the primary and backup networks during the next network scan.
[0065] In one example, the network link quality may also include estimated bandwidth and estimated channel occupancy. In the step of obtaining the network link quality of the first network and the network link quality of the second network, different weights are assigned to the signal strength indication, estimated bandwidth, and estimated channel occupancy, and a comprehensive score of the signal strength indication, estimated bandwidth, and estimated channel occupancy is calculated, and the comprehensive score is used as an evaluation indicator of the network link quality.
[0066] In this embodiment, the purpose of dual-STA link selection is to select the appropriate frequency band and bandwidth for different scenarios. For example, when the 2.4G / 5G signal is strong, high throughput can be achieved by selecting 2.4G / 5G as the primary network. When the 2.4G / 5G signal is weak or packet loss is severe, the low-speed, low-bandwidth, high-receiver-sensitivity Sub1G band is selected as the primary network to ensure stable transmission of important application connections. Based on these principles, a comprehensive score of the RSSI (signal strength indicator) of 2.4G / 5G and Sub1G, estimated bandwidth, and estimated channel occupancy can be calculated to obtain the optimal network selection result.
[0067] Figure 8 is a schematic diagram of relative signal levels in different frequency bands according to an embodiment of the present invention. Table 1 provides a corresponding table. Referring to Figure 8 and Table 1, because the signal is negative, the Sub1G RSSI values for Excellent, Good, Medium, and Poor are lower than those for 2.4G / 5G. This means that even with a weaker Sub1G RSSI value, it still maintains a lower packet loss rate. For example, a Sub1G RSSI of -80 is considered a Good signal, while a 2.4G RSSI of -73 is considered a Medium signal. Although the Sub1G RSSI value at -80 is lower than the 2.4G RSSI value at -73, the Sub1G packet loss rate is also lower than the 2.4G RSSI. Therefore, if the primary network's signal level is lower than Good, and the backup network has a Good signal, a master-backup switchover is performed. If the primary network's signal level is higher than Good, no switchover is required.
[0068] Table 1 Relative values of signal levels in different frequency bands
[0069] Sometimes, when the weights of other influencing factors are low or the differences are not significant, the influencing factors that have the greatest impact on network link quality can be directly compared. This can reduce the complexity of the calculation and ensure the accuracy of the results.
[0070] The communication method for a dual-NIC terminal provided in this embodiment first calculates the network link quality of the first network and the network link quality of the second network, then compares the network link quality of the first network with the network link quality of the second network, selects the network with better network link quality as the target network, and finally switches the target network to the primary network and the other network as the backup network. Therefore, the primary network and the backup network can be selected and switched based on the wireless network link quality, and the advantageous frequency band can be automatically selected for communication, thereby ensuring the continuous and stable transmission of important data.
[0071] Figure 9 is a structural diagram of a communication device of a dual network card terminal according to an embodiment of the present invention. Referring to Figure 9, the device 900 mainly includes: a calculation module 901, which is used to calculate the network link quality of the first network and the network link quality of the second network, wherein the first network is a wireless network accessed by the first network card, and the second network is a wireless network accessed by the second network card, and the network link quality includes a signal strength indication; a comparison module 902, which is used to compare the network link quality of the first network with the network link quality of the second network, and use the network with better network link quality as the target network; a switching module 903, which is used to switch the target network to the main network and the other network as the backup network, wherein the main network is a network used for data transmission.
[0072] In one example, the first network card is used to connect to a wireless access point in a 2.4G / 5G frequency band, and the second network card is used to connect to a wireless access point in a Sub1G frequency band.
[0073] In one example, the first network is the network with the best network link quality selected by the first network card in each scanning result, and the second network is the network with the best network link quality selected by the second network card in each scanning result.
[0074] In one example, the apparatus 900 may further include a network connection module, which includes a wireless scanner, a network selector, and a client manager. The wireless scanner is configured to obtain network parameters of the first network and the second network; the network selector calculates network link quality and selects the best network between the first network and the second network; and the client manager completes the connection between the first network and the second network.
[0075] In one example, scanning and connecting the first network and the second network includes: if the interface of the first network and the interface of the second network have been associated with a wireless access point, then the first network card and the second network card are respectively connected to the networks corresponding to the associated wireless access points.
[0076] In one example, scanning and connecting the first network and the second network includes: if the interface of the first network and the interface of the second network have not been associated with a wireless access point, using the two networks corresponding to the wireless access point selected by the user as the networks accessed by the first network card and the second network card respectively.
[0077] In one example, the apparatus 900 further includes an initialization module, which is configured to initialize the network interfaces of the first network card and the second network card, and create a client manager, a wireless scanner, and a network selector before scanning and connecting to the first network and the second network.
[0078] In one example, switching the target network to the primary network includes: obtaining a client manager of the target network, and the client manager completing a connection to the target network.
[0079] In one example, the apparatus 900 further includes an instruction response module, and the instruction response module is configured to use the network selected by the user as the primary network if a network selection instruction input by the user is received.
[0080] In one example, if an instruction is received that the user does not select the first network and the second network at the same time, the network selected by the user is used as the primary network.
[0081] In one example, if the network selected by the user is a network with the same frequency band as the current primary network, the current connection with the primary network is disconnected and the new network is reconnected.
[0082] In one example, if the network selected by the user is different from the current primary network, the network selected by the user is used as the primary network, and the primary network and the backup network are switched during the next scan.
[0083] In one example, the network link quality may also include estimated bandwidth and estimated channel occupancy. In the process of obtaining the network link quality of the first network and the network link quality of the second network, different weights are assigned to the signal strength indication, estimated bandwidth, and estimated channel occupancy, and a comprehensive score of the signal strength indication, estimated bandwidth, and estimated channel occupancy is calculated, and the comprehensive score is used as an evaluation indicator of the network link quality.
[0084] The details of other operations performed by each module in this embodiment can be referred to the aforementioned embodiments and will not be elaborated here.
[0085] The communication device of the dual-NIC terminal provided in this embodiment first calculates the network link quality of the first network and the network link quality of the second network, then compares the network link quality of the first network with the network link quality of the second network, selects the network with better network link quality as the target network, and finally switches the target network to the primary network and the other network as the backup network. Therefore, the primary network and the backup network can be selected and switched based on the wireless network link quality, and the advantageous frequency band is automatically selected for communication, thereby ensuring the continuous and stable transmission of important data.
[0086] The communication device of a dual network card terminal in the embodiments of the present application can be a device, or a component, integrated circuit, or chip in the terminal. The communication device of a dual network card terminal in the embodiments of the present application can be a device having an operating system. The operating system can be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiments of the present application.
[0087] The present application also provides an electronic device, comprising: a memory for storing programs or instructions executable by a processor; and a processor for executing the above programs or instructions to implement the various processes of the above-mentioned dual network card terminal communication method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0088] Figure 10 is a schematic diagram of an electronic device according to an embodiment of the present invention. The electronic device 1000 may include an internal communication bus 1001, a processor 1002, a read-only memory (ROM) 1003, a random access memory (RAM) 1004, and a communication port 1005. When used on a personal computer, the electronic device 1000 may also include a hard disk 1006. The internal communication bus 1001 can implement data communication between the components of the electronic device 1000. The processor 1002 can make judgments and issue prompts. In some embodiments, the processor 1002 can be composed of one or more processors. The communication port 1005 can implement data communication between the electronic device 1000 and the outside world. In some embodiments, the electronic device 1000 can send and receive information and data from the network through the communication port 1005. The electronic device 1000 may also include various forms of program storage units and data storage units, such as a hard disk 1006, a read-only memory (ROM) 1003, and a random access memory (RAM) 1004, capable of storing various data files used for computer processing and / or communication, as well as possible programs or instructions executed by the processor 1002. The results of the processing by the processor 1002 are transmitted to the user device via the communication port 1005 and displayed on the user interface.
[0089] The aforementioned communication method for a dual network card terminal may be implemented as a computer program, stored in the hard disk 1006 , and recorded in the processor 1002 for execution to implement any communication method for a dual network card terminal in this application.
[0090] An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the various processes of the communication method embodiment of the above-mentioned dual network card terminal are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0091] A computer-readable medium may include a propagated data signal embodying computer program code, for example, in baseband or as part of a carrier wave. The propagated signal may be in a variety of forms, including electromagnetic, optical, etc., or a suitable combination thereof. A computer-readable medium may be any computer-readable medium other than a computer-readable storage medium that can be connected to an instruction execution system, apparatus, or device to communicate, propagate, or transmit the program for use. The program code on the computer-readable medium may be transmitted via any suitable medium, including radio, cable, fiber optic cable, radio frequency signal, or similar medium, or any combination of the above.
[0092] While the basic concepts have been described above, it will be apparent to those skilled in the art that the above disclosure is provided for illustrative purposes only and does not constitute a limitation of the present invention. Although not explicitly stated herein, those skilled in the art may make various modifications, improvements, and revisions to the present invention. Such modifications, improvements, and revisions are suggested in the present invention and remain within the spirit and scope of the exemplary embodiments of the present invention.
Claims
1. A communication method for a dual-network card terminal, characterized in that, including: calculating the network link quality of the first network and the network link quality of the second network, where the first network is a wireless network accessed by a first network card, and the second network is a wireless network accessed by a second network card, and the network link quality includes a signal strength indication; comparing the network link quality of the first network with the network link quality of the second network, and using the network with better network link quality as the target network; switching the target network to the primary network, and using the other network as the standby network, where the primary network is the network used for data transmission.
2. The communication method of the dual-network card terminal according to claim 1, characterized in that The first network card is used to connect to a wireless access point in the 2.4G / 5G frequency band, and the second network card is used to connect to a wireless access point in the Sub1G frequency band.
3. The communication method of the dual-network card terminal according to claim 1, wherein, The first network is the network with the best network link quality selected by the first network card in each scan result, and the second network is the network with the best network link quality selected by the second network card in each scan result.
4. The communication method of the dual-network card terminal according to claim 1, wherein, Before calculating the network link quality of the first network and the network link quality of the second network, it further includes: scanning and connecting the first network and the second network.
5. The communication method of the dual-network card terminal according to claim 4, characterized in that, Scanning and connecting the first network and the second network includes: if the interfaces of the first network and the second network have been associated with a wireless access point, the first network card and the second network card are respectively connected to the networks corresponding to the associated wireless access points.
6. The communication method of the dual-network card terminal according to claim 4, wherein Scanning and connecting the first network and the second network includes: if the interfaces of the first network and the second network have not been associated with a wireless access point, the two networks corresponding to the wireless access points selected by the user are respectively used as the networks accessed by the first network card and the second network card.
7. The communication method of the dual-network card terminal according to any one of claims 4 to 6, characterized in that Before scanning and connecting the first network and the second network, it further includes: initializing the network interfaces of the first network card and the second network card, and creating a client manager, a wireless scanner, and a network selector.
8. The communication method of the dual-network card terminal according to claim 7, wherein Switching the target network to the primary network includes: obtaining the client manager of the target network, and the client manager completes the connection of the target network.
9. The communication method of the dual-network card terminal according to claim 1, wherein It further includes: if a network selection instruction input by the user is received, using the network selected by the user as the primary network.
10. The communication method of the dual-network card terminal according to claim 9, characterized in that, if an instruction that the user does not select both the first network and the second network at the same time is received, using the network selected by the user as the primary network.
11. The communication method of the dual-network card terminal according to claim 9, characterized in that, if the network selected by the user is a network in the same frequency band as the current primary network, disconnecting the current connection of the primary network and reconnecting to a new network.
12. The communication method of the dual-network card terminal according to claim 9, characterized in that, if the network selected by the user is different from the current primary network, using the network selected by the user as the primary network, and performing the switching between the primary network and the standby network during the next scan.
13. The communication method of the dual-network card terminal according to claim 1, characterized in that, The network link quality further includes an estimated bandwidth and an estimated channel occupancy rate. In the step of obtaining the network link quality of the first network and the network link quality of the second network, it further includes: assigning different weights to the signal strength indication, the estimated bandwidth, and the estimated channel occupancy rate, calculating a comprehensive score of the signal strength indication, the estimated bandwidth, and the estimated channel occupancy rate, and using the comprehensive score as an evaluation index of the network link quality.
14. A communication device for a dual-network card terminal, characterized in that, including: A calculation module, configured to calculate the network link quality of a first network and the network link quality of a second network, where the first network is a wireless network accessed by a first network card, the second network is a wireless network accessed by a second network card, and the network link quality includes a signal strength indication; A comparison module, configured to compare the network link quality of the first network with the network link quality of the second network, and use the network with better network link quality as the target network; A switching module, configured to switch the target network to the main network, and use the other network as the standby network, where the main network is the network used for data transmission.
15. An electronic device, characterized in that, Comprising: A processor and a memory, where the memory stores a program or instruction that can run on the processor, and when the program or instruction is executed by the processor, the steps of the communication method of the dual-network card terminal according to any one of claims 1-13 are implemented.
16. A readable storage medium, characterized in that, A program or instruction is stored on the readable storage medium, and when the program or instruction is executed by the processor, the steps of the communication method of the dual-network card terminal according to any one of claims 1-13 are implemented.
Citation Information
Patent Citations
Network switching method of terminal and terminal equipment
CN101668322A
Method and apparatus for handover using active link and standby link
KR1020160091782A
Techniques for handling data stall in WLAN
US20170245190A1
Network handover method, terminal device, and access point device
US20230337091A1
Cited By
Cloud desktop virtual network equipment and network card straight-through on-demand hybrid forwarding method
CN120750833A