Management method of network adapter, network adapter and electronic equipment
By introducing a USB extender and SIM card slot into the network adapter, multiple preset communication links and network access points are used to provide independent network connections for multiple terminal devices, thus solving the cost of single-device networking in the existing technology. It solves the problem of mutual interference in data transmission and realizes efficient and independent multi-device networking.
Patent Information
- Application Number
- CN202410799167.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-20
- Publication Date
- 2024-09-17
AI Technical Summary
Existing network adapters can only provide network communication for a single terminal device, which results in high costs and mutual interference in data transmission when it is necessary to provide network communication for multiple terminal devices at the same time, affecting the quality of the network.
By introducing a USB extender and SIM card slot into the network adapter, multiple preset communication links and network access points are used to provide independent network connections for multiple terminal devices, and terminal devices and communications are managed through token packet information. Link binding and release ensure data transmission independence.
A network adapter is implemented to provide external network communication for multiple terminal devices, reducing device networking costs, avoiding mutual interference in data transmission, and ensuring networking quality.
Smart Images

Figure CN118659957A
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of network adapters, and more specifically to a management method for a network adapter, a network adapter, an electronic device and a computer-readable storage medium. Background Art
[0002] A network adapter (also known as a Dongle) is a convenient network connection solution that connects a device to a wireless network or accesses the Internet through a cellular network. This small device is usually plugged into the USB port of a device, such as a laptop, tablet, or desktop computer, to provide instant network connectivity. Dongles are designed to be lightweight and portable, making them ideal for users who often need to work in different locations.
[0003] In the related art, a dongle can usually only provide network communication for a single terminal device (such as a mobile phone, computer, tablet computer, etc.). When it is necessary to provide network communication for multiple terminal devices at the same time, multiple dongles need to be used separately, which is costly. Summary of the invention
[0004] The present invention is proposed in consideration of the above problems. According to one aspect of the present invention, a method for managing a network adapter is provided, wherein the network adapter includes a USB expander; the USB expander has multiple USB interfaces for connecting to a terminal device; the method includes: upon receiving a dial-up request message sent by a terminal device, determining first target port information, the first target port information being the port information of the USB interface connected to the terminal device; binding the first target port information to the link information of any unoccupied preset communication link among multiple preset communication links, so that the terminal device establishes dial-up communication via the corresponding preset communication link; wherein the number of preset communication links is the same as the number of USB interfaces.
[0005] Exemplarily, when a dial-up request message is received from a terminal device, the first target port information is determined, including: determining the first target port information based on at least one set of token packet information currently received, wherein each set of token packet information includes port information of a USB interface connected to a corresponding terminal device.
[0006] Exemplarily, determining the first target port information based on at least one set of token packet information currently received includes: when multiple preset communication links are not occupied, determining that the port information included in each set of token packet information in at least one set of token packet information currently received is the first target port information.
[0007] Exemplarily, after binding the first target port information with the link information of any one unoccupied preset communication link among a plurality of preset communication links, the method further includes: storing the first target port information and the link information of the preset communication link bound to the first target port information in a list file; determining the first target port information based on at least one set of token packet information currently received, including: for each set of token packet information in at least one set of token packet information, comparing the port information included in the set of token packet information with the port information stored in the list file to determine whether the list file includes the port information included in the set of token packet information; when the port information included in the set of token packet information is not included in the list file, determining that the port information included in the set of token packet information is the first target port information.
[0008] Exemplarily, the method also includes: when it is detected that any dial-up communication is disconnected, determining the second target port information, the second target port information is the USB interface corresponding to the disconnected dial-up communication, and deleting the second target port information and the link information of the preset communication link bound to the second target port information from the list file.
[0009] Exemplarily, when it is detected that any dial-up communication is disconnected, the second target port information is determined, including: when it is detected that any dial-up communication is disconnected, the port information included in each token packet information received within a preset time period is compared with the port information stored in the list file to determine the second target port information, wherein the second target port information is the port information stored in the list file except for the port information included in each token packet information received within the preset time period.
[0010] Exemplarily, the network adapter also includes a SIM card slot; the method also includes: when detecting that the SIM card is inserted into the SIM card slot, obtaining identification code information of the SIM card; based on the identification code information, determining the operator corresponding to the SIM card; based on the operator corresponding to the SIM card, setting multiple different network access points, the number of network access points is the same as the number of USB interfaces; generating preset communication links corresponding to the multiple network access points one by one.
[0011] According to another aspect of the present invention, a network adapter is provided, which includes a SIM card slot, a data module and a USB expander; the SIM card slot is connected to the data module, and the network port of the USB expander is connected to the data module; the USB expander has multiple USB interfaces for connecting terminal devices; the data module is used to execute the above-mentioned management method.
[0012] According to another aspect of the present invention, there is provided an electronic device, including a processor and a memory, wherein a computer program is stored in the memory, and the processor is used to execute the computer program to implement the management method as described above.
[0013] According to another aspect of the present invention, a computer-readable storage medium is provided, storing a computer program / instruction, and when the computer program / instruction is executed by a processor, the management method as described above is implemented.
[0014] The above technical solution can bind the port information (i.e., the first target port information) corresponding to the terminal device that sent the dial-up request information with the link information of any unoccupied preset communication link among the multiple preset communication links each time the dial-up request information is received from the terminal device, so that the terminal device can establish dial-up communication via the corresponding preset communication link. Thus, the solution can use one network adapter to provide external network communication for multiple terminal devices (i.e., share the network with multiple terminal devices), which helps to reduce the cost of device networking, and multiple terminal devices can perform dial-up communication through multiple independent preset communication links, and the data transmission is independent of each other, which can avoid mutual interference and ensure the quality of networking.
[0015] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented according to the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] The above and other purposes, features and advantages of the present invention will become more apparent by describing the embodiments of the present invention in more detail in conjunction with the accompanying drawings. The accompanying drawings are used to provide a further understanding of the embodiments of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings, the same reference numerals generally represent the same components or steps.
[0017] Figure 1 A schematic flow chart showing a method for managing a network adapter according to an embodiment of the present invention;
[0018] Figure 2 A schematic diagram showing a terminal device establishing dial-up communication according to an embodiment of the present invention;
[0019] Figure 3 A schematic block diagram of a network adapter according to an embodiment of the present invention is shown;
[0020] Figure 4 A schematic flow chart showing a network adapter executing the above management method according to a specific embodiment of the present invention;
[0021] Figure 5 A schematic block diagram of an electronic device according to an embodiment of the present invention is shown. DETAILED DESCRIPTION
[0022] In order to make the purpose, technical scheme and advantages of the present invention more obvious, the exemplary embodiments according to the present invention will be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments of the present invention, and it should be understood that the present invention is not limited to the exemplary embodiments described herein. Based on the embodiments of the present invention described in the present invention, all other embodiments obtained by those skilled in the art without creative work should fall within the protection scope of the present invention.
[0023] A network adapter (which may be referred to as a Dongle) is a convenient network connection solution that can connect a device to a wireless network or access the Internet through a cellular network. For example, a 4G Dongle can connect a device to a 4G wireless network. The Dongle involved in this article is not limited to the above-mentioned 4G Dongle, but may also be an existing or future developed Dongle that supports other networks. As described above, in the related art, a Dongle can usually only provide network communication for a single terminal device. When it is necessary to provide network communication for multiple terminal devices at the same time, multiple Dongles need to be used separately, which increases the cost of device networking. In view of this, the present invention provides a network adapter management method, a network adapter, an electronic device, and a computer-readable storage medium. The method can provide network communication for multiple terminal devices through a network adapter, thereby helping to reduce the cost of device networking.
[0024] According to one aspect of the present invention, a method for managing a network adapter is provided. The network adapter includes a USB expander; the USB expander has multiple USB interfaces for connecting to terminal devices. The USB expander can be connected to a module (such as a data module described below) for implementing the management method of the present invention through a network interface.
[0025] The number of USB interfaces of the USB hub can be selected according to actual needs, for example, the number of USB interfaces can be 4. Of course, the number of USB interfaces can also be more or less than 4, and the present invention does not limit the number of USB interfaces.
[0026] In the solution of this article, the USB interface is used to connect the terminal device. In other words, when using the network adapter described in this article, the user can connect the terminal device to be networked to any USB interface to provide network communication for the terminal device through the network adapter.
[0027] Figure 1 FIG. 1 is a schematic flow chart showing a method for managing a network adapter according to an embodiment of the present invention. Figure 1 As shown, the method 100 may include the following steps S110 and S120.
[0028] In step S110, when the dialing request information sent by the terminal device is received, the first target port information is determined, and the first target port information is the port information of the USB interface connected to the terminal device.
[0029] As described above, the USB expander has multiple USB interfaces for connecting terminal devices. After a terminal device is connected to one of the USB interfaces, the terminal device can send a dial-up request message, and the dial-up request message can be input into the module for implementing the management method of the present invention through the corresponding USB interface and the USB expander. In some embodiments, after the terminal device is connected to one of the USB interfaces, it can initiate NDIS dial-up and send the dial-up request message to the module for implementing the management method of the present invention through the USBhub.
[0030] In an example of the present invention, upon receiving the dialing request information sent by the terminal device, the port information of the USB interface connected to the terminal device can be first determined. For example, the first target port information can be determined based on the token packet currently received. For another example, the interface status of multiple USB interfaces can be monitored in real time to determine the USB interface connected to the terminal device, and further determine the first target port information. In this article, the port information of the USB interface can be the port number of the USB interface.
[0031] Optionally, there may be multiple dial-up request messages. In this case, the first target port information corresponding to each dial-up request message may be determined in sequence, and the following step S120 may be executed in sequence, so that multiple terminal devices may establish dial-up communications respectively.
[0032] In step S120, the first target port information is bound to the link information of any unoccupied preset communication link among multiple preset communication links, so that the terminal device establishes dial-up communication via the corresponding preset communication link; wherein the number of preset communication links is the same as the number of USB interfaces.
[0033] In this article, the multiple preset communication links are multiple pre-generated, mutually independent communication links, and the communication links have different IP addresses respectively.
[0034] After determining the first target port information, the first target port information can be bound to the link information of the unoccupied preset communication link, so that the terminal device can perform dial-up communication (i.e., communicate with the external network) via the preset communication link. For example, the first target port information can be hub port1, the number of preset communication links can be 4, and the link information of the 4 preset communication links are cid1, cid2, cid3 and cid4 respectively. In this embodiment, hubport1 can be bound to cid1, so that the terminal device connected to hub port1 can communicate with the external network through cid1.
[0035] It can be understood that the unoccupied preset communication link represents a preset communication link that is not bound to the port information of the USB interface. For example, in the above-mentioned embodiment where hub port1 is bound to cid1, after hub port1 is bound to cid1, the link information corresponding to each of the unoccupied preset communication links is cid2, cid3 and cid4. In this case, after other terminal devices are connected to the network adapter via the USB interface and send a dial-up request message, the link information of any one of the preset communication links among cid2, cid3 and cid4 can be bound to the port information of the USB interface corresponding to the newly added terminal device. For example, the port information of the USB interface corresponding to the newly added terminal device can be hub port2, and hub port2 can be bound to any one of cid2, cid3 and cid4. For example, hub port2 can be bound to cid2. Therefore, in this embodiment, cid1, cid2, cid3 and cid4 can be used to provide external network communication for four terminal devices (i.e., dial-up Internet access is established for the four terminal devices).
[0036] In the above technical solution, each time a dial-up request message is received from a terminal device, the port information (i.e., the first target port information) corresponding to the terminal device that sent the dial-up request message can be bound to the link information of any unoccupied preset communication link among multiple preset communication links, so that the terminal device can establish dial-up communication via the corresponding preset communication link. Thus, the solution can use one network adapter to provide external network communication for multiple terminal devices (i.e., share the network with multiple terminal devices), which helps to reduce the cost of device networking, and multiple terminal devices can perform dial-up communication through multiple independent preset communication links, and the data transmission is independent of each other, which can avoid mutual interference and ensure the quality of networking.
[0037] Exemplarily, step S110, when receiving the dial-up request information sent by the terminal device, determines the first target port information, including: determining the first target port information based on at least one set of token packet information currently received, wherein each set of token packet information includes the port information of the USB interface connected to the corresponding terminal device.
[0038] As described above, each group of token packet information includes the port information of the USB interface connected to the corresponding terminal device. In some embodiments, the token packet may include CRC-5, ET, E, S, hub port, SC, hub address, and PID. Among them, CRC-5 represents a cyclic redundancy check. ET (Endpoint type) represents the transmission type of the current endpoint. E represents the transmission direction in block transmission, interrupt transmission, and control transmission. S (speed) represents the speed of the interrupt or control transaction. When S is 1, it is low speed. When S is 0, it is full speed. The hub port is the port number of the target center for the full-speed / low-speed transaction, that is, the port number of the corresponding hub (that is, the port information in this article). When SC (start / complete) is 0, it represents the SSPLIT of the SPLIT transmission transaction. When SC (start / complete) is 1, it represents the CSPLIT of the SPLIT transmission transaction. The hub address is the device address of the hub that supports the specified full-speed / low-speed device, which is used for full-speed / low-speed transactions. Bits 0 to 3 in the PID are the packet type of the packet identification field, and bits 4 to 7 are the check complement of the packet type field.
[0039] It is understood that when a terminal device communicates with a network adapter, it usually uses a "token packet" -
[0040] The transmission mechanism of "data packet"-"handshake packet" specifies the device address of the destination or source of the data packet in the token packet. The handshake packet indicates whether the transmission is successful or not. In other words, each terminal device connected to the network adapter will send a token packet to the module in the network adapter used to implement the management method of the present invention. Therefore, when receiving the dial-up request information sent by the terminal device, the first target port information can be determined based on at least one set of token packet information currently received.
[0041] Optionally, the at least one group of token packet information currently received may be token packet information received within a first preset period of time after receiving the dial-up request information sent by the terminal device. The first preset period of time may be set according to actual needs and will not be described in detail. It can be understood that when the number of the currently connected terminal devices (including terminal devices that have established dial-up communication and terminal devices that have not established dial-up communication, and the terminal devices that have not established dial-up communication can be called newly added terminal devices, that is, terminal devices that send dial-up request information) is multiple, one or more groups of token packet information may be received within the first preset period of time. In some embodiments, the first target port information may be determined based on the token packet information sent by the newly added terminal device in these token packet information. That is, when at least one group of token packet information is received, the token packet information sent by the newly added terminal device in at least one group of token packet information is first determined, and then the first target port information is determined based on the token packet information. In other embodiments, after receiving at least one group of token packet information, the port information corresponding to each group of token packet information may be first determined, and then the port information may be compared with the port information corresponding to the terminal device that has established dial-up communication, thereby determining the first target port information.
[0042] In the above technical solution, the first target port information can be determined based on at least one set of token packet information currently received. This method of determining the first target port information using the token packet information can ensure the accuracy of the determined first target port information, thereby helping to ensure the correct execution of subsequent steps and ensuring that the newly added terminal device can be quickly connected to the network.
[0043] Exemplarily, determining the first target port information based on at least one set of token packet information currently received includes: when multiple preset communication links are not occupied, determining that the port information included in each set of token packet information in at least one set of token packet information currently received is the first target port information.
[0044] Optionally, before determining the first target port information based on at least one set of token packet information currently received, the method may further include: determining the occupancy status of multiple preset communication links. In this embodiment, the occupancy status of multiple preset communication links can be first determined, that is, whether the link information of each preset communication link in the multiple preset communication links is bound to the port information. It can be understood that when multiple preset communication links are not occupied, it means that at least one set of token packet information currently received is issued by a newly added terminal device. Therefore, it can be directly determined that the port information included in each set of token packet information in at least one set of token packet information currently received is the first target port information.
[0045] According to the above technical solution, when multiple preset communication links are not occupied, it can be directly determined that the port information included in each group of token packet information in at least one group of token packet information currently received is the first target port information, without the need for other comparison operations, thereby helping to improve the networking efficiency of the device.
[0046] Exemplarily, in step S120, after binding the first target port information with the link information of any unoccupied preset communication link among a plurality of preset communication links, the method further includes: storing the first target port information and the link information of the preset communication link bound to the first target port information in a list file; determining the first target port information based on at least one set of token packet information currently received, including: for each set of token packet information in at least one set of token packet information, comparing the port information included in the set of token packet information with the port information stored in the list file to determine whether the list file includes the port information included in the set of token packet information; when the port information included in the set of token packet information is not included in the list file, determining that the port information included in the set of token packet information is the first target port information.
[0047] In the solution of this example, after step S120 is executed, the first target port information and the link information of the preset communication link bound to the first target port information can be stored in a list file. The list file can be called hub_port.LST. For example, in the above embodiment where hub port1 is bound to cid1, after hub port1 is bound to cid1, it can be stored in a list file. For example, "hub port1--cid1" can be stored in hub_port.LST.
[0048] In the scheme of this example, after receiving at least one group of token packet information, the port information included in the group of token packet information can be compared with the port information stored in the list file to determine whether the list file includes the port information included in the group of token packet information. As described above, after each execution of step S120, the first target port information and the link information of the preset communication link bound to the first target port information are stored in the list file. In other words, the port information corresponding to the historical terminal device (historical port information) is stored in the list file. When a new terminal device appears, at least one group of port information corresponding to at least one group of token packet information can be compared with the historical port information to query the port information of the USB interface connected to the new terminal device, that is, the first target port information.
[0049] The above scheme can quickly and accurately determine the first target port information by comparing the port information included in the token packet information with the port information stored in the list file, and the scheme helps to provide an accurate basis for subsequent steps. In addition, it can be understood that the terminal equipment (i.e., the historical terminal equipment) that has established dial-up communication may also send token packet information. In the scheme of this example, by comparing the port information included in the token packet information with the port information stored in the list file, it is also possible to avoid repeated binding of the USB interface that has already bound the communication link, thereby improving management efficiency and management effect.
[0050] Optionally, after determining the first target port information, the method may further include: determining a currently unoccupied preset communication link. In some embodiments, the occupancy status of each preset communication link may be queried separately to determine the currently unoccupied preset communication link. In other embodiments, the unoccupied preset communication link may be determined based on the preset communication links recorded in the list file, wherein the preset communication link whose link information is not recorded in the list file among the multiple preset communication links is the unoccupied preset communication link. This solution helps to accurately determine the unoccupied preset communication link, thereby helping to avoid repeated binding.
[0051] Exemplarily, the method also includes: when it is detected that any dial-up communication is disconnected, determining the second target port information, the second target port information is the USB interface corresponding to the disconnected dial-up communication, and deleting the second target port information and the link information of the preset communication link bound to the second target port information from the list file.
[0052] It is understandable that when a connected terminal device is unplugged from a corresponding USB interface, the dial-up communication corresponding to the terminal device is disconnected. In some embodiments, the interface states of multiple USB interfaces can be monitored in real time to determine whether a connected terminal device is unplugged from a corresponding USB interface, and then determine whether the dial-up communication is disconnected.
[0053] In the solution of this example, when it is detected that any dial-up communication is disconnected, the second target port information can be determined. For example, in the above-mentioned embodiment of real-time monitoring of the interface status of multiple USB interfaces, the port information corresponding to the USB interface whose status has changed (from having a terminal device inserted to having no terminal device inserted) can be directly determined as the second target port information. Of course, the second target port information can also be determined based on the token packet information. This solution is described in detail below and will not be repeated here.
[0054] After determining the second target port information, the second target port information and the link information of the preset communication link bound to the second target port information can be deleted from the list file. For example, in the above embodiment where hub port1 is bound to cid1, "hub port1--cid1" is stored in hub_port.LST. When the terminal device connected to hub port1 is unplugged, the dial-up communication is disconnected. In this case, "hub port1--cid1" can be deleted from hub_port.LST.
[0055] The above technical solution can ensure the accuracy of the list file by deleting the second target port information and link information corresponding to the disconnected dial-up communication from the list file, and can release the preset communication link so that the preset communication link can be used for dial-up communication of other newly added terminal devices, thereby ensuring the rational use of communication resources.
[0056] Exemplarily, when it is detected that any dial-up communication is disconnected, the second target port information is determined, including: when it is detected that any dial-up communication is disconnected, the port information included in each token packet information received within a preset time period (which can be called a second preset time period for easy distinction) is compared with the port information stored in the list file to determine the second target port information, wherein the second target port information is the port information stored in the list file except for the port information included in each token packet information received within the preset time period.
[0057] Optionally, the second preset period can be set as needed. For example, the second preset period can be in the range of [3s, 10s]. In a specific embodiment, the second preset period can be 5s.
[0058] In the scheme of this example, the second target port information is the port information stored in the list file except for the port information included in the token packet information received within the second preset time period. It can be understood that the port information included in the token packet information received within the second preset time period represents the port information corresponding to the terminal device that is still maintaining dial-up communication. When the dial-up communication is disconnected, the corresponding terminal device no longer sends the token packet information. Therefore, by comparing the port information included in the token packet information received within the second preset time period with the port information stored in the list file, the port information corresponding to the disconnection of the dial-up communication, that is, the second target port information, can be determined.
[0059] According to the above technical solution, by comparing the port information included in each token packet information received within the second preset time period with the port information stored in the list file, the second target port information can be quickly and accurately determined, thereby providing a more accurate basis for subsequent steps.
[0060] Exemplarily, the method may further include: clearing the list file after the network adapter is powered on.
[0061] It can be understood that the power supply of the network adapter is provided by the terminal device connected thereto. When each USB interface in the network adapter is not connected to a terminal device, the network adapter is in a shutdown state. When any USB interface in the network adapter is connected to a terminal device, the network adapter is turned on, and the module in the network adapter for implementing the management method of the present invention starts to work. Therefore, after the last terminal device connected to the network adapter is unplugged, the power supply of the network adapter disappears, and the module in the network adapter for implementing the management method of the present invention stops working, thereby making it impossible to clear the port information corresponding to the last terminal device in the list file and the link information of the preset communication link. In the scheme of this example, after the module for implementing the management method of the present invention starts to work, the list file is first cleared, thereby preventing the residual information in the list file from interfering with the implementation of this management method, which helps to improve the utilization efficiency of communication resources.
[0062] Exemplarily, the method may further include: after the network adapter is powered on, enabling the NDIS protocol. In this exemplary solution, after the network adapter is powered on, a module in the network adapter for implementing the management method of the present invention is powered on and operated, and at this time, a program in the module may be run to enable the NDIS protocol.
[0063] Exemplarily, the network adapter also includes a SIM card slot; the method also includes: when detecting that the SIM card is inserted into the SIM card slot, obtaining identification code information of the SIM card; based on the identification code information, determining the operator corresponding to the SIM card; based on the operator corresponding to the SIM card, setting multiple different network access points, the number of network access points is the same as the number of USB interfaces; generating preset communication links corresponding to the multiple network access points one by one.
[0064] In the solution of this example, after inserting the SIM card into the SIM card slot, the identification code information ICCID of the SIM card can be obtained, and the operator corresponding to the SIM card (such as China Unicom, China Telecom, China Mobile, etc.) can be determined according to the ICCID. After the operator is determined, multiple network access points (i.e., APN access points) corresponding to the operator can be set, and multiple preset communication links corresponding to the multiple network access points are generated.
[0065] In some embodiments, after generating multiple preset communication links, the multiple preset communication links can be activated simultaneously, and the IP addresses corresponding to the multiple preset communication links can be obtained. It can be understood that since the multiple APN access points are different, the multiple preset communication links are independent of each other.
[0066] The above technical solution can generate multiple independent preset communication links after the SIM card is inserted. Therefore, multiple independent preset communication links can be used to share the network with multiple terminal devices at the same time, reducing the networking cost; and the multiple preset communication links are independent of each other, which helps to ensure the network quality.
[0067] Figure 2 FIG. 2 is a schematic diagram showing a terminal device establishing dial-up communication according to an embodiment of the present invention. Figure 2 As shown, the module in the network adapter for implementing the management method of the present invention is a data module. After the SIM card is inserted into the SIM card slot, the data module can configure n APN access points in sequence and generate preset communication links corresponding to the n APN access points one by one. The n APNs correspond to n access points in the real network respectively. After the terminal device is inserted into the USB interface, the terminal device can initiate NDIS dialing to send dial-up request information. The data module can bind the interface information of the USB interface corresponding to the terminal device with the link information of any unoccupied preset communication link by executing steps S110 and S120, so that the terminal device can access the real network via the APN access point corresponding to the preset communication link, so that the terminal device can access the Internet. Figure 1 In the illustrated embodiment, terminal device 1 is connected to the first USB port (i.e., the first USB interface), and accesses the real network access point 1 through the first APN configuration in the data module; terminal device 2 is connected to the second USB port (i.e., the second USB interface), and accesses the real network access point 2 through the second APN configuration in the data module...terminal device n is connected to the nth USB port (i.e., the nth USB interface), and accesses the real network access point n through the nth APN configuration in the data module.
[0068] According to another aspect of the present invention, a network adapter is provided. Figure 3 FIG. 2 shows a schematic block diagram of a network adapter according to an embodiment of the present invention. Figure 3 As shown, the network adapter 300 includes a SIM card slot 310, a data module 320 and a USB expander 330; the SIM card slot 310 is connected to the data module 320, and the network port of the USB expander 330 is connected to the data module 320; the USB expander 330 has multiple USB interfaces for connecting terminal devices; the data module 320 is used to execute the above-mentioned management method.
[0069] In some embodiments, the network port of the USB expander 330 can be connected to the USB interface of the data module 320 .
[0070] exist Figure 3In the illustrated embodiment, there are four USB interfaces, including USB1, USB2, USB3 and USB4, and the four USB interfaces are connected to terminal device 1, terminal device 2, terminal device 3 and terminal device 4 respectively. Figure 3 The number of USB interfaces shown is only an example, and the present invention does not specifically limit the number of USB interfaces.
[0071] Figure 4 FIG. 1 is a schematic flow chart showing a network adapter according to a specific embodiment of the present invention executing the above management method. In this embodiment, the number of USB interfaces is 4. Figure 4 As shown, the hub monitors the plugging and unplugging of USB port devices (i.e., monitors the plugging and unplugging of each USB interface of the USB hub). When the USB plugging and unplugging is detected, if a terminal device (which can be referred to as a terminal) is inserted into the USB interface, the terminal device can initiate NDIS dialing and send a dialing request message to the data module through the USB hub. When the first terminal device is inserted into the USB interface, the data module is powered on to identify the operator corresponding to the SIM card, and sets 4 different network access points according to the operator, and generates a preset communication link corresponding to the 4 network access points. When the data module receives the dialing request information, the interface information of the USB interface corresponding to the terminal device (i.e., the hub port information) can be determined, and the hub port information can be stored in a list file. The data module can bind the hub port information to the link information of any unoccupied preset communication link (i.e., the data module binds the communication link), so that the terminal can access the Internet through the communication link. When a terminal is unplugged from the USB interface, the data module can update the hub port information in the list file and remove the corresponding bound communication link (i.e., delete the corresponding bound communication link from the list file), thereby releasing the communication link so that it can be used to provide a network for other terminal devices. The implementation method of each step in this example has been described in detail above, and for the sake of brevity, it will not be repeated here.
[0072] According to yet another aspect of the embodiments of the present invention, an electronic device is provided. Figure 5 FIG. 2 shows a schematic block diagram of an electronic device according to an embodiment of the present invention. Figure 5 As shown, the electronic device 500 includes: a processor 510 and a memory 520. The memory 520 stores a computer program, and the processor 510 is used to execute the computer program to implement the above method.
[0073] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is also provided. The storage medium stores a computer program / instruction, and the computer program / instruction implements the above method when executed by a processor. The storage medium may include, for example, a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a portable compact disk read-only memory (CD-ROM), a USB memory, or any combination of the above storage media. The computer-readable storage medium may be any combination of one or more computer-readable storage media.
[0074] A person skilled in the art can easily understand the implementation structure, working principle and beneficial effects of the network adapter, the electronic device and the computer-readable storage medium by reading the above-mentioned management method of the network adapter.
[0075] Although example embodiments have been described herein with reference to the accompanying drawings, it should be understood that the above example embodiments are merely exemplary and are not intended to limit the scope of the present invention thereto. Various changes and modifications may be made therein by one of ordinary skill in the art without departing from the scope and spirit of the present invention. All such changes and modifications are intended to be included within the scope of the present invention as required by the appended claims.
[0076] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0077] In the several embodiments provided by the present invention, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed.
[0078] In the description provided herein, a large number of specific details are described. However, it is understood that embodiments of the present invention can be practiced without these specific details. In some instances, well-known methods, structures and techniques are not shown in detail so as not to obscure the understanding of this description.
[0079] Similarly, it should be understood that in order to streamline the present invention and help understand one or more of the various inventive aspects, in the description of the exemplary embodiments of the present invention, the various features of the present invention are sometimes grouped together into a single embodiment, figure, or description thereof. However, the method of the present invention should not be interpreted as reflecting the following intention: the claimed invention requires more features than the features explicitly stated in each claim. More specifically, as reflected in the corresponding claims, the inventive point is that the corresponding technical problem can be solved with less than all the features of a single disclosed embodiment. Therefore, the claims following the specific embodiment are hereby expressly incorporated into the specific embodiment, wherein each claim itself serves as a separate embodiment of the present invention.
[0080] It will be understood by those skilled in the art that, except for mutually exclusive features, all features disclosed in this specification (including the accompanying claims, abstracts and drawings) and all processes or units of any method or device disclosed in this specification may be combined in any combination. Unless otherwise expressly stated, each feature disclosed in this specification (including the accompanying claims, abstracts and drawings) may be replaced by an alternative feature that provides the same, equivalent or similar purpose.
[0081] In addition, those skilled in the art will appreciate that, although some embodiments described herein include certain features included in other embodiments but not other features, the combination of features of different embodiments is meant to be within the scope of the present invention and form different embodiments. For example, in the claims, any one of the claimed embodiments may be used in any combination.
[0082] The various component embodiments of the present invention can be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. It should be understood by those skilled in the art that a microprocessor or digital signal processor (DSP) can be used in practice to implement some or all functions of some modules in a network adapter or electronic device according to an embodiment of the present invention. The present invention can also be implemented as a device program (e.g., a computer program and a computer program product) for executing part or all of the methods described herein. Such a program implementing the present invention can be stored on a computer-readable medium, or can have the form of one or more signals. Such a signal can be downloaded from an Internet website, or provided on a carrier signal, or provided in any other form.
[0083] It should be noted that the above embodiments illustrate the present invention rather than limit it, and that those skilled in the art may devise alternative embodiments without departing from the scope of the appended claims. In the claims, any reference symbol between brackets shall not be construed as a limitation on the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "one" or "an" preceding an element does not exclude the presence of a plurality of such elements. The present invention may be implemented by means of hardware comprising a number of different elements and by means of a suitably programmed computer. In a unit claim enumerating a number of devices, several of these devices may be embodied by the same hardware item. The use of the words first, second, and third, etc., does not indicate any order. These words may be interpreted as names.
[0084] The above is only a specific embodiment of the present invention or an explanation of a specific embodiment. The protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. The protection scope of the present invention shall be based on the protection scope of the claims.
Claims
1. A method for managing a network adapter, characterized in that: The network adapter includes a USB expander; The USB expander has multiple USB interfaces for connecting to terminal devices; Methods include: When receiving the dialing request information sent by the terminal device, determining the first target port information, where the first target port information is the port information of the USB interface connected to the terminal device; Binding the first target port information with link information of any unoccupied preset communication link among a plurality of preset communication links, so that the terminal device establishes dial-up communication via the corresponding preset communication link; Wherein, the number of the preset communication links is the same as the number of the USB interfaces.
2. The management method according to claim 1, characterized in that: The step of determining the first target port information upon receiving the dialing request information sent by the terminal device comprises: The first target port information is determined based on at least one set of token packet information currently received, wherein each set of token packet information includes port information of a USB interface connected to a corresponding terminal device.
3. The management method according to claim 2, characterized in that: The determining of the first target port information based on at least one set of token packet information currently received comprises: When the plurality of preset communication links are not occupied, it is determined that the port information included in each group of token packet information in at least one group of token packet information currently received is the first target port information.
4. The management method according to claim 2, characterized in that: After binding the first target port information with link information of any unoccupied preset communication link among the plurality of preset communication links, the method further includes: storing the first target port information and the link information of the preset communication link bound to the first target port information in a list file; The determining of the first target port information based on at least one set of token packet information currently received comprises: For each set of token packet information in at least one set of token packet information, Comparing the port information included in the group of token packet information with the port information stored in the list file to determine whether the list file includes the port information included in the group of token packet information; When the port information included in the group of the token packet information is not included in the list file, it is determined that the port information included in the group of the token packet information is the first target port information.
5. The management method according to claim 4, characterized in that: The method further comprises: When it is detected that any dial-up communication is disconnected, second target port information is determined, where the second target port information is a USB interface corresponding to the disconnected dial-up communication. The second target port information and the link information of the preset communication link bound to the second target port information are deleted from the list file.
6. The management method according to claim 5, characterized in that: The method of determining the second target port information when any dial-up communication disconnection is detected includes: When it is detected that any dial-up communication is disconnected, the port information included in each token packet information received within a preset time period is compared with the port information stored in the list file to determine the second target port information, wherein the second target port information is the port information stored in the list file except for the port information included in each token packet information received within the preset time period.
7. The management method according to any one of claims 1 to 6, characterized in that: The network adapter also includes a SIM card slot; the method also includes: When detecting that the SIM card is inserted into the SIM card slot, obtaining the identification code information of the SIM card; Determine the operator corresponding to the SIM card based on the identification code information; Based on the operator corresponding to the SIM card, a plurality of different network access points are set, and the number of the network access points is the same as the number of the USB interfaces; Generate the preset communication links corresponding to the plurality of network access points one by one.
8. A network adapter, characterized in that: The network adapter includes a SIM card slot, a data module and a USB expander; the SIM card slot is connected to the data module, and the network port of the USB expander is connected to the data module; the USB expander has multiple USB interfaces for connecting terminal devices; the data module is used to execute the management method described in any one of claims 1-7.
9. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the memory stores a computer program, and the processor is used to execute the computer program to implement the management method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: A computer program / instruction is stored, and when the computer program / instruction is executed by a processor, the management method according to any one of claims 1 to 7 is implemented.
Citation Information
Cited By
Distributed signal processing method, system and device for multiple USB devices and medium
CN121151401A
