CN117201296A - Multi-network card management method and device, intelligent gateway and storage medium - Google Patents

Multi-network card management method and device, intelligent gateway and storage medium Download PDF

Info

Publication number
CN117201296A
CN117201296A CN202311147322.4A CN202311147322A CN117201296A CN 117201296 A CN117201296 A CN 117201296A CN 202311147322 A CN202311147322 A CN 202311147322A CN 117201296 A CN117201296 A CN 117201296A
Authority
CN
China
Prior art keywords
network card
intelligent gateway
configuration
network
target
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311147322.4A
Other languages
Chinese (zh)
Inventor
叶正强
赵春生
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Lifesmart Technology Co ltd
Original Assignee
Hangzhou Lifesmart Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou Lifesmart Technology Co ltd filed Critical Hangzhou Lifesmart Technology Co ltd
Priority to CN202311147322.4A priority Critical patent/CN117201296A/en
Publication of CN117201296A publication Critical patent/CN117201296A/en
Pending legal-status Critical Current

Links

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention relates to the technical field of intelligent gateways, and discloses a multi-network card management method, a device, an intelligent gateway and a storage medium, wherein the method comprises the following steps: acquiring the installation requirement of the network card; screening an alternative network card set from the network card list based on the network card installation requirement; reading network card configuration items of each network card to be installed in the alternative network card set; based on the network card configuration item, the target network card to be installed is determined from the alternative network card set, and the target network card to be installed is installed to the intelligent gateway. The network card and the network card function required by the client network environment can be flexibly selected and configured, and the universality of the intelligent gateway is enhanced. The intelligent gateway can perform IP distribution and data routing through network card configuration, so that the requirement of diversity scene arrangement of clients is met, and the scene arrangement and use cost of the clients are reduced.

Description

Multi-network card management method and device, intelligent gateway and storage medium
Technical Field
The invention relates to the technical field of intelligent gateways, in particular to a multi-network card management method and device, an intelligent gateway and a storage medium.
Background
Since the global network scenario is not in a unified state nowadays, and various network routing products derived in the network development process exist in various living environments of users, various network environments exist, one or more network conditions of a WiFi network, an ethernet network, a cellular network (5G, 4G, 3G, 2G) and the like exist, and if the WiFi network and the ethernet network exist, the WiFi network and the ethernet network can only be used by an intranet but cannot communicate with an extranet server. The intelligent gateway capable of supporting multiple network cards is generated, and the scheme of the existing manufacturer mainly integrates only multiple network cards, and can select the network card of the currently used intelligent gateway for externally connecting service according to a keep-alive mechanism and priority configuration.
In the related art, the type and the drive of the network card of the intelligent gateway are basically fixed after production, and the factory also needs to produce the intelligent gateway supporting different types of network cards according to the requirements of clients, so that the production cost is increased. In the intelligent scene arrangement environment, the intelligent gateway needs to be matched with other WiFi or Ethernet intelligent equipment for use, and the intelligent gateway can only be solved by adding a router, so that the use cost is increased.
Disclosure of Invention
In view of this, the present invention provides a method, an apparatus, an intelligent gateway and a storage medium for managing multiple network cards, so as to solve the problem of increased use cost of a production machine caused by lack of intelligent gateways supporting different types of network cards.
In a first aspect, the present invention provides a multi-network card management method, applied to an intelligent gateway, where the method includes:
acquiring the installation requirement of the network card;
screening an alternative network card set from a network card list based on the network card installation requirement;
reading network card configuration items of each network card to be installed in the alternative network card set;
and determining a target network card to be installed from the candidate network card set based on the network card configuration item, and installing the target network card to be installed to the intelligent gateway.
In the invention, the network card is enabled by responding to the installation instruction corresponding to the installation requirement of the user through the intelligent gateway, and the network card is made into the accessory which can be simply assembled by the user, so that a set of main boards of the intelligent gateway can be fixedly produced, the intelligent gateway is suitable for the installation of different types of network cards, manufacturers do not need to produce different main boards, and the production cost of the manufacturers is reduced; meanwhile, the intelligent gateway can be configured to perform data routing, so that intelligent equipment in the scene is linked to an external network server, and the use cost of the whole intelligent scene layout of the client is reduced. The intelligent gateway can flexibly detach and replace the network card by dynamically loading the multi-network card driver, so that the production and maintenance cost is reduced. The network card and the network card function required by the client network environment can be flexibly selected and configured, and the universality of the intelligent gateway is enhanced. The intelligent gateway can perform IP distribution and data routing through network card configuration, so that the requirement of diversity scene arrangement of clients is met, and the scene arrangement and use cost of the clients are reduced.
In an alternative embodiment, the network card configuration item includes: general configuration and special configuration:
the general configuration includes: network card enabling configuration items, priority configuration items and keep-alive detection configuration items;
the special configuration is the special configuration of the network card to be installed;
based on the network card configuration item, determining the target network card to be installed from the candidate network card set comprises:
enabling each network card to be installed based on the network card enabling configuration item, pushing each network card to be installed into a network card list area for background operation;
responding to the configuration command, and storing network card configuration items of each network card to be installed into a network card list area;
determining the installation priority of each network card to be installed based on the priority configuration item and the keep-alive detection configuration item;
and determining the network card to be installed with the highest installation priority as a target network card to be installed.
In the mode, by configuring each parameter of each enabled network card, the adaptation of various network cards can be realized, the data route between the network cards is communicated, and the connection of the intelligent equipment connected to the intelligent gateway to the external network server is realized.
In an alternative embodiment, the installing the target network card to be installed to the intelligent gateway includes:
Based on the special configuration corresponding to the target network card to be installed, loading the driver of the target network card to be installed, and starting the functional module of the target network card to be installed to finish the installation of the target network card to be installed.
In the mode, the corresponding network card driver and the operation module are loaded through the special configuration corresponding to the target network card to be installed, so that the target network card is installed in the intelligent gateway, and the target network card can be normally used in the intelligent gateway and can be communicated with an external server.
In an alternative embodiment, before acquiring the network card list, the method further includes:
acquiring network card configuration items of all network cards;
and saving the network card configuration items of each network card to a configuration save area to obtain a network card list.
In the mode, the network card configuration items of the network card are stored in the configuration storage area of the intelligent gateway, so that the follow-up intelligent gateway can conveniently install and switch the network card by utilizing the network card configuration items.
In an alternative embodiment, the method further comprises:
and in response to the network card switching instruction, the installation priority of the network card currently installed on the intelligent network card is adjusted downwards, and the step of determining the target network card to be installed from the alternative network card set based on the network card configuration item is returned.
In the mode, when the current network card cannot meet the requirements, the priority of the network card is adjusted, and the network card is switched, so that the intelligent gateway can provide optimal data communication which meets the requirements of users.
In an alternative embodiment, the method further comprises:
and responding to the network card unloading instruction, stopping the function module of the network card currently installed on the intelligent gateway, unloading the drive of the network card, and powering off the network card.
In the mode, when the network card fails or is not used any more, the network card is unloaded, so that the operation load of the intelligent gateway is reduced, a user can conveniently select a new network card to load, and the use experience of the user is improved.
In a second aspect, the present invention provides a multi-network card management apparatus, including:
the list acquisition module is used for acquiring the network card installation requirement;
the network card set screening module is used for screening the alternative network card set from the network card list based on the network card installation requirement;
the configuration item reading module is used for reading network card configuration items of the network cards to be installed in the alternative network card collection;
the network card installation module is used for determining a target network card to be installed from the alternative network card set based on the network card configuration item and installing the target network card to be installed to the intelligent gateway.
In a third aspect, the present invention provides an intelligent gateway, comprising: the system comprises a memory and a processor, wherein the memory and the processor are in communication connection, the memory stores computer instructions, and the processor executes the computer instructions, so that the multi-network card management method of the first aspect or any corresponding implementation mode is executed.
In an alternative embodiment, the intelligent gateway includes: the intelligent gateway comprises an intelligent gateway main board, wherein a plurality of hardware interfaces are exposed on the intelligent gateway main board, and the main board is physically connected with a network card hardware interface exposed by a network card to be installed through the hardware interfaces.
In the mode, by setting the hardware interfaces adapted to different network cards, the different network cards can be ensured to be installed on the intelligent gateway in hardware, and a router is not required to be added when the different network cards are switched, so that the use cost is reduced.
In a fourth aspect, the present invention provides a computer readable storage medium having stored thereon computer instructions for causing a computer to execute the multi-network card management method of the first aspect or any of the embodiments corresponding thereto.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are needed in the description of the embodiments or the prior art will be briefly described, and it is obvious that the drawings in the description below are some embodiments of the present invention, and other drawings can be obtained according to the drawings without inventive effort for a person skilled in the art.
Fig. 1 is a flow chart of a multi-network card management method according to an embodiment of the invention;
fig. 2 is a schematic diagram of data routing for an intelligent gateway according to an embodiment of the present invention.
Fig. 3 is a schematic diagram of a multi-network card management software framework of an intelligent gateway according to an embodiment of the present invention.
FIG. 4 is a flow chart of another multi-network card management method according to an embodiment of the invention;
FIG. 5 is a flow chart of a method for managing a plurality of network cards according to an embodiment of the present invention;
fig. 6 is a block diagram of a multi-network card management apparatus according to an embodiment of the present invention;
fig. 7 is a schematic hardware structure of an intelligent gateway according to an embodiment of the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments of the present invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
In the related art, the type and the drive of the network card of the intelligent gateway are basically fixed after production, and the factory also needs to produce the intelligent gateway supporting different types of network cards according to the requirements of clients, so that the production cost is increased. In the intelligent scene arrangement environment, the intelligent gateway needs to be matched with other WiFi or Ethernet intelligent equipment for use, and the intelligent gateway can only be solved by adding a router, so that the use cost is increased.
In order to solve the above-mentioned problems, in the embodiments of the present application, a multi-network card management method is provided for an intelligent gateway, and it should be noted that an execution body of the multi-network card management method may be a multi-network card management device, and the device may be implemented in a manner of software, hardware or a combination of software and hardware to form part or all of the intelligent gateway, where the intelligent gateway may be a terminal, a client, or a server, and the server may be a server or a server cluster formed by multiple servers. In the following method embodiments, the execution subject is an intelligent gateway as an example.
The intelligent gateway in this embodiment is suitable for intelligent scenes with various network environment requirements, and the intelligent gateway needs to be matched with other WiFi or ethernet intelligent devices for use. According to the multi-network card management method provided by the application, the network card is enabled by the intelligent gateway in response to the installation instruction corresponding to the installation requirement of the user, and the network card is made into the accessory which can be simply assembled by the user, so that one set of main board of the intelligent gateway can be fixedly produced, the multi-network card management method is suitable for the installation of different network cards, manufacturers do not need to produce different main boards, and the production cost of the manufacturers is reduced; meanwhile, the intelligent gateway can be configured to perform data routing, so that intelligent equipment in the scene is linked to an external network server, and the use cost of the whole intelligent scene layout of the client is reduced.
According to an embodiment of the present invention, there is provided a multi-network card management method embodiment, it should be noted that the steps illustrated in the flowchart of the drawings may be performed in a computer system such as a set of computer executable instructions, and that although a logical order is illustrated in the flowchart, in some cases, the steps illustrated or described may be performed in an order different from that herein.
In this embodiment, a multi-network card management method is provided, which may be used in the above mobile terminal, such as an intelligent gateway, and fig. 1 is a flowchart of a multi-network card management method according to an embodiment of the present invention, as shown in fig. 1, where the flowchart includes the following steps:
step S101, obtaining the installation requirement of the network card.
In an example, the network card installation requirement determines how to configure according to the network environment and the use requirement of the actual application, and may be included in an installation instruction sent by the user through an app application in a computer device such as a mobile phone, a tablet computer, or an installation instruction sent from a cloud platform.
Step S102, based on the network card installation requirement, the alternative network card set is screened from the network card list.
In an example, the network card list includes task threads that each enable network card corresponds to instantiation.
Step S103, reading network card configuration items of each network card to be installed in the alternative network card set.
In one example, the configuration functions of each network card are handled by the network card task thread.
Step S104, determining a target network card to be installed from the alternative network card set based on the network card configuration item, and installing the target network card to be installed to the intelligent gateway.
In an example, according to the configuration, enabling and loading the new network card into the network card list area, completing the installation of the target network card to be installed.
In an implementation scenario, taking a WiFi network card and an ethernet network card connected to an intelligent gateway as an example, fig. 2 is a schematic diagram of data routing of the intelligent gateway according to an embodiment of the present invention. As shown in fig. 2, the intelligent gateway is respectively linked with a WiFi network card and an ethernet network card, the WiFi network card allocates IP for WiFi devices such as a WiFi device 1 to a WiFi device 3 which are connected, the WiFi device sends data to the WiFi network card, the ethernet network card allocates IP for ethernet devices such as an ethernet device 1 to an ethernet device 3 which are connected, and the ethernet device sends data to the ethernet network card; transmitting data to an intelligent gateway through a WiFi network card and an Ethernet network card, forwarding the data to a data routing target network card by the intelligent gateway, transmitting the data to a target address linked with the hanging device by the target network card, and transmitting the data to target equipment of the target address; the target device of the target address returns the data to the target network card, the target network card returns the data to the intelligent gateway, the intelligent gateway forwards the data back to the WiFi network card and the Ethernet network card, and the WiFi network card and the Ethernet network card respectively return to the corresponding WiFi device and Ethernet device, so that the data routing is realized.
Specifically, (1) the network card data route is only the ethernet network card and the WiFi network card can be used as the initiating network card of the data route, because they can be configured into a mode of assigning IP to the connected intelligent device, the IP of the cellular network is determined by the SIM card server, and the intelligent gateway itself does not have a function of assigning IP to the cellular network device.
(2) The Ethernet network card is configured to serve as a routing device or the WiFi network card is configured to be in an AP mode, so that the network card can distribute IP addresses to other connected intelligent devices;
(3) After the Ethernet network card or the WiFi network card is configured with the data routing target network card, the data received by the Ethernet network card or the WiFi network card can be forwarded to the target network card, then the target network card sends the data to the server, the server sends the returned data to the target network card, and the target network card forwards the received data back to the initiating network card and finally the data is transmitted to the equipment accessed to the network card.
In another implementation scenario, fig. 3 is a schematic diagram of a multi-network card management software framework of an intelligent gateway according to an embodiment of the present invention. As shown in fig. 3, after the intelligent gateway is powered on and started, initializing a main task thread, reading the network card configuration of the network card to be installed, and storing the network card configuration into a configuration storage area of the intelligent network card; enabling the network cards according to the network card configuration, taking the network cards such as the network card 1 to the network card 4 as the instantiated network card task threads 1 to 4, inserting the network cards into a network card list area and operating in a background mode; the main task thread runs in the background and waits for receiving a configuration command; after receiving a configuration command issued by an App or a cloud platform, the intelligent gateway stores the configuration of the target network card according to the configuration command and updates the network card list area according to the target network card; based on the updated network card list area, carrying out operations such as new addition and removal on the network card according to configuration, configuring the network card function according to configuration items, and correspondingly changing the network card list area.
Specifically, the software blocks in the multi-network card management method of the intelligent gateway are divided into a task area, a configuration storage area, a network card list area and a configuration interface area.
The intelligent gateway is powered on to start a main task example thread, reads configuration storage area configuration, inserts the running network card into a network card list area according to configuration enabling and loading each network card driver, each enabling network card instantiates a network card task thread, the network card task thread processes each network card self configuration function, and the main task thread runs in the background.
The App transmits the updated network card configuration to a main task thread through a configuration interface, the main task thread stores the configuration in a configuration storage area, and enables and loads a new network card to a network card list area according to the configuration, or eliminates and unloads the existing network card from the network card list area, or updates the network card configuration of the network card task thread in the network card list area, thereby updating the network card function in real time.
According to the multi-network card management method provided by the embodiment, the network card is enabled by responding to the installation instruction corresponding to the installation requirement of the user through the intelligent gateway, and the network card is made into the accessory which can be simply assembled by the user, so that one set of main board of the intelligent gateway can be fixedly produced, the multi-network card management method is suitable for the installation of different types of network cards, manufacturers do not need to produce different main boards, and the production cost of the manufacturers is reduced; meanwhile, the intelligent gateway can be configured to perform data routing, so that intelligent equipment in the scene is linked to an external network server, and the use cost of the whole intelligent scene layout of the client is reduced. The intelligent gateway can flexibly detach and replace the network card by dynamically loading the multi-network card driver, so that the production and maintenance cost is reduced. The network card and the network card function required by the client network environment can be flexibly selected and configured, and the universality of the intelligent gateway is enhanced. The intelligent gateway can perform IP distribution and data routing through network card configuration, so that the requirement of diversity scene arrangement of clients is met, and the scene arrangement and use cost of the clients are reduced.
In this embodiment, a multi-network card management method is provided, which may be used in the above mobile terminal, such as an intelligent gateway, and fig. 4 is a flowchart of another multi-network card management method according to an embodiment of the present invention, as shown in fig. 4, where the flowchart includes the following steps:
step S401, obtaining network card configuration items of all network cards.
Step S402, the network card configuration item of each network card is stored in a configuration storage area to obtain a network card list.
In the mode, the network card configuration items of the network card are stored in the configuration storage area of the intelligent gateway, so that the follow-up intelligent gateway can conveniently install and switch the network card by utilizing the network card configuration items.
Step S403, obtaining the network card installation requirement. Please refer to step S101 in the embodiment shown in fig. 1 in detail, which is not described herein.
Step S404, based on the network card installation requirement, the alternative network card set is screened from the network card list. Please refer to step S102 in the embodiment shown in fig. 1 in detail, which is not described herein.
Step S405, reading network card configuration items of each network card to be installed in the alternative network card set. Please refer to step S103 in the embodiment shown in fig. 1 in detail, which is not described herein.
Step S406, based on the network card configuration item, determining a target network card to be installed from the alternative network card set, and installing the target network card to be installed to the intelligent gateway.
Specifically, the network card configuration item includes: general configuration and special configuration: the general configuration includes: network card enabling configuration items, priority configuration items and keep-alive detection configuration items; the special configuration is the special configuration of the network card itself to be installed.
In an example, in the network card management method of the intelligent gateway, the software block is divided into a task area, a configuration storage area, a network card list area and a configuration interface area, and for the software configuration, the software configuration is further divided into a general configuration and a special configuration of each network card type, wherein the general configuration comprises network card enabling, network card type, driving IC, priority, MTU value, whether keep-alive detection and ICMP message keep-alive detection address. For switching of different network cards, the switching is mainly determined according to network card configuration issued to the intelligent gateway by an App application or a cloud service, and mainly focuses on the functions of network card enabling, priority, whether keep-alive detection and ICMP message keep-alive detection addresses.
The network card is generally configured as follows:
type of network card: including ethernet, wiFi, cellular networks (5G, 4G, 3G, 2G);
drive IC: the intelligent gateway is used for identifying the drive chip of the current network card type and identifying and loading the drive chip;
priority level: determining which network card is used for establishing the external network communication connection of the intelligent gateway according to the priority;
MTU: setting a maximum transmission unit of the network card, and determining the size of each data packet of the network card;
and (3) detecting whether to keep alive: determining whether the network card detects the configured keep-alive detection address;
ICMP message keep-alive detection address: and sending the target address of the ICMP message for keep-alive detection.
The keep-alive detection is matched with the priority, the current priority of the network card failing to keep-alive detection is reduced, and the network card failing to keep-alive detection is still arranged according to the configuration priority for external communication.
The specific configuration of the network card is described as follows:
the special configuration of the Ethernet card comprises: network card MAC address, dynamic IP configuration, static IP configuration, whether to be a routing device (distributing IP of other connected Ethernet devices), and a data routing target network card;
the special configuration of the WiFi network card comprises the following steps: wiFi working mode (as AP mode or STA mode), encryption type, hot spot name, hot spot password, 5G WiFi hot spot, and data routing target network card;
the special configuration of the cellular network comprises: 5G/4G/3G/2G function selection, configuration of respective SIM cards corresponding to the selection of 5G/4G/3G/2G.
The data routing target network card can select various network cards including a cellular network (5G, 4G, 3G, 2G) network card, a WiFi network card and an Ethernet network card.
The step S406 includes:
step S4061, enabling each network card to be installed based on the network card enabling configuration item, pushing each network card to be installed into the network card list area for background operation.
Step S4062, responding to the configuration command, and storing the network card configuration items of each network card to be installed in the network card list area.
Step S4063, determining the installation priority of each network card to be installed based on the priority configuration item and the keep-alive detection configuration item.
And step S4064, determining the network card to be installed with the highest installation priority as a target network card to be installed.
In an example, the process of installing the functions configured according to the network card enabling, the priority, whether to keep-alive detection and the ICMP message keep-alive detection address includes:
firstly, a network card enabling configuration item is a key for determining whether the network card is loaded and used, if the network card enabling configuration item of the appointed network card is set to be no, the appointed network card is in a power-off state and waits for hardware to be pulled out or is reset to be yes, meanwhile, the network cards with the highest priority in the normal operation network cards with the highest priority in the other network card enabling configuration items are set to be responsible for cloud communication, and the network cards with the other priorities continue to operate in respective local area network networks and communicate;
Secondly, the priority configuration item is a configuration item for determining which network card is used for communicating with a cloud server from among all network cards which are enabled and have normal external communication, and the network card with the highest priority is responsible for data interaction and command communication between the intelligent gateway and the cloud server;
thirdly, if keep-alive detection is performed, if the keep-alive detection address of the ICMP message is used together with the keep-alive detection configuration item and the keep-alive detection address configuration item of the ICMP message, if the keep-alive detection is set to be yes, the keep-alive detection addresses of the ICMP message need to be configured, the keep-alive detection addresses of the ICMP message are used for detecting whether network cards in all enabled network cards can normally communicate with a cloud (external network) server, if the network cards with high enabled priority are detected to be unable to normally communicate with the cloud server, the priority of the network card with abnormal communication is temporarily reduced, and the communication right of the cloud service is given to other network cards capable of normally communicating, so that the communication between the intelligent gateway and the cloud server can be kept normal. When the network card with abnormal communication is detected to be recovered to be normal, recovering the priority configured by the normal priority configuration item, and re-adding the priority into a network card list which is determined by the priority configuration item to communicate with a cloud (external network) server.
Therefore, the network card enabling and priority configuration is set by a user, which network cards are used and the respective network card priorities are determined, and which network card is responsible for communicating with the cloud server is determined; if the configuration items of keep-alive detection and ICMP message keep-alive detection are kept, and after the configuration items are opened by a user, the temporary priority of the network card for communication with the cloud server is adjusted according to the detection result. And meanwhile, the local area network communication of the respective network card is maintained.
In the mode, by configuring each parameter of each enabled network card, the adaptation of various network cards can be realized, the data route between the network cards is communicated, and the connection of the intelligent equipment connected to the intelligent gateway to the external network server is realized.
Step S4065, loading the driver of the target network card to be installed based on the special configuration corresponding to the target network card to be installed, and starting the functional module operated by the target network card to be installed so as to complete the installation of the target network card to be installed.
In an example, when the network card hardware access is completed, an App application sends a corresponding configuration command designating the network card to the intelligent gateway, thereby triggering the intelligent gateway to enable the currently designated network card, loading a designated network card driver, and starting a functional module to be operated by the corresponding network card according to software configuration. These are the loading process of a network card hardware.
Different kinds of network cards have different configurations, and the special configuration of the network card comprises: the special configuration of the Ethernet card comprises: network card MAC address, dynamic IP configuration, static IP configuration, whether to be a routing device (distributing IP of other connected Ethernet devices), and a data routing target network card; the special configuration of the WiFi network card comprises the following steps: wiFi working mode (as AP mode or STA mode), encryption type, hot spot name, hot spot password, 5G WiFi hot spot, and data routing target network card; the special configuration of the cellular network comprises: 5G/4G/3G/2G function selection, configuration of respective SIM cards corresponding to the selection of 5G/4G/3G/2G. The data routing target network card can select various network cards including a cellular network (5G, 4G, 3G, 2G) network card, a WiFi network card and an Ethernet network card.
In the mode, the corresponding network card driver and the operation module are loaded through the special configuration corresponding to the target network card to be installed, so that the target network card is installed in the intelligent gateway, and the target network card can be normally used in the intelligent gateway and can be communicated with an external server.
According to the multi-network card management method provided by the embodiment, each enabled network card parameter is configured, so that the adaptation of various network cards can be realized, the data between the network cards is routed, and the connection of intelligent equipment connected to an intelligent gateway to an external network server is realized. The corresponding network card driver and the operation module are loaded through the special configuration corresponding to the target network card to be installed, so that the target network card is installed in the intelligent gateway, and the target network card can be normally used in the intelligent gateway and can be communicated with an external server. By storing the network card configuration items of the network card in the configuration storage area of the intelligent gateway, the follow-up intelligent gateway can conveniently install and switch the network card by utilizing the network card configuration items.
In this embodiment, a multi-network card management method is provided, which may be used in the above mobile terminal, such as an intelligent gateway, and fig. 5 is a flowchart of another multi-network card management method according to an embodiment of the present invention, as shown in fig. 5, where the flowchart includes the following steps:
step S501, obtaining the network card installation requirement. Please refer to the steps S401 to S403 in the embodiment shown in fig. 4 in detail, which is not described herein.
Step S502, based on the network card installation requirement, the alternative network card set is screened from the network card list. Please refer to step S404 in the embodiment shown in fig. 4 in detail, which is not described herein.
Step S503, reading network card configuration items of each network card to be installed in the alternative network card set. Please refer to step S405 in the embodiment shown in fig. 4 in detail, which is not described herein.
Step S504, based on the network card configuration item, determining a target network card to be installed from the alternative network card set, and installing the target network card to be installed to the intelligent gateway.
Specifically, after the step S504, the multi-network card management method further includes:
in step S505, in response to the network card switching instruction, the installation priority of the network card currently installed on the intelligent gateway is adjusted downward, and the step of determining the target network card to be installed from the candidate network card set based on the network card configuration item is returned.
In an example, the switching of the network card decides how to configure according to the network environment and the use requirement of the actual application. The intelligent gateway performs switching and function use on the network card as follows:
in the example 1, the application requirement of the user is that the intelligent gateway uses the 4G cellular network card to connect to the cloud server, the WiFi network card establishes a WiFi hotspot local area network and performs data routing to access other IP devices (for example, a camera, after performing data routing, a video stream of the camera can be transferred to the 4G cellular network card to upload to the cloud server), and the Ethernet network card is connected to the local area network to perform local management operation. Then, according to this requirement, after the hardware access of the 4G cellular network card and the WiFi network card is completed, the 4G cellular network card, the WiFi network card and the ethernet network card with the own network card are enabled, the 4G cellular network card is configured to have the highest priority, the ethernet network card is configured to have the dynamic IP and the second priority, the WiFi network card is configured to have the AP mode and set the encryption type, the hot spot name and the hot spot password, and the data routing target network card of the WiFi network card is configured to be the 4G cellular network card. Thereby, the application requirements of the user can be achieved.
In the example 2, the application requirement of the user is that the intelligent gateway uses the WiFi network card to connect with the environment WiFi hotspot and connect with the cloud server, and the 4G cellular network card is used as a standby network card when the WiFi network is abnormal, so that the intelligent gateway cannot be disconnected with the cloud server to cause offline. According to the requirement, after the hardware access of the 4G cellular network card and the WiFi network card is completed, the 4G cellular network card is enabled, the WiFi network card is enabled, the self-contained Ethernet network card is closed, then the WiFi network card is configured to have the highest priority, the encryption type, the hotspot name and the hotspot password of the WiFi hotspot of the environment to which the WiFi network card is connected are configured, the keep-alive detection is opened, the ICMP message keep-alive detection address is set as the cloud server address, and then the 4G cellular network card is configured to have the second priority. Therefore, when the WiFi is in normal communication, the WiFi network card is responsible for communication with the cloud server, and when the WiFi network card is detected that the WiFi network card cannot normally communicate with the cloud server, the priority of the WiFi network card is temporarily reduced, and the communication right of the cloud server is given to the 4G cellular network card with the second priority, so that the communication between the intelligent gateway and the cloud server can be continuously kept in normal communication and data interaction. And after the communication of the WiFi network card is recovered to be normal, recovering the priority configured by the normal priority configuration item, and recovering the communication right with the cloud server.
The switching and the function use of the network card are to adjust and configure according to the actual demands of clients or inform technical support staff of the demands, and perform configuration switching and use under the planning guidance of the technical support staff. In this way, the diversified demands of users can be satisfied without increasing the kinds of intelligent gateways of the device manufacturer. The motherboard of the intelligent gateway is separated from each network card module, thereby reducing the design and manufacturing costs of device manufacturers, and the firmware branches of the intelligent gateway, thereby reducing the maintenance costs of device firmware.
In the mode, when the current network card cannot meet the requirements, the priority of the network card is adjusted, and the network card is switched, so that the intelligent gateway can provide optimal data communication which meets the requirements of users.
And step S506, responding to the network card unloading instruction, stopping the function module of the network card operation currently installed on the intelligent gateway, unloading the drive of the network card, and powering off the network card.
In an example, an App application sends a specified network card closing command to an intelligent gateway, so that the intelligent gateway is triggered to stop a functional module for running the specified network card, a specified network card driver is unloaded, the specified network card is powered off, then a cover plate can be detached for the intelligent gateway of the closed shell, a network card accessory is pulled out and is installed back to the cover plate, and the network card accessory can be pulled out directly for the gateway with an exposed hardware interface. The operation realizes the detachable loadability of each network card.
In the mode, when the network card fails or is not used any more, the network card is unloaded, so that the operation load of the intelligent gateway is reduced, a user can conveniently select a new network card to load, and the use experience of the user is improved.
According to the multi-network card management method provided by the embodiment, when the current network card cannot meet the requirements, the priority of the network card is adjusted, and the network card is switched, so that the intelligent gateway can provide optimal data communication which meets the requirements of users. When the network card fails or is not used any more, the network card is unloaded, so that the operation load of the intelligent gateway is reduced, a user can conveniently select a new network card to load, and the use experience of the user is improved.
In this embodiment, a multi-network card management device is further provided, and the device is used to implement the foregoing embodiments and preferred embodiments, and is not described in detail. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. While the means described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware, is also possible and contemplated.
The present embodiment provides a multi-network card management apparatus, as shown in fig. 6, including:
A list obtaining module 601, configured to obtain a network card installation requirement; please refer to step S101 in the embodiment shown in fig. 1 in detail, which is not described herein.
The network card set screening module 602 is configured to screen an alternative network card set from the network card list based on the network card installation requirement; please refer to step S102 in the embodiment shown in fig. 1 in detail, which is not described herein.
The configuration item reading module 603 is configured to read a network card configuration item of each network card to be installed in the alternative network card set; please refer to step S103 in the embodiment shown in fig. 1 in detail, which is not described herein.
The network card installation module 604 is configured to determine a target network card to be installed from the candidate network card set based on the network card configuration item, and install the target network card to be installed to the intelligent gateway; please refer to step S104 in the embodiment shown in fig. 1 in detail, which is not described herein.
In some alternative embodiments, the network card configuration item includes: general configuration and special configuration: the general configuration includes: network card enabling configuration items, priority configuration items and keep-alive detection configuration items; the special configuration is the special configuration of the network card itself to be installed.
The network card installation module 604 includes:
the network card enabling unit is used for enabling each network card to be installed based on the network card enabling configuration items and pushing each network card to be installed into the network card list area for background operation.
And the configuration item storage unit is used for responding to the configuration command and storing the network card configuration items of the network cards to be installed in the network card list area.
The priority determining unit is used for determining the installation priority of each network card to be installed based on the priority configuration item and the keep-alive detection configuration item.
And the target network card determining unit is used for determining the network card to be installed with the highest installation priority as the target network card to be installed.
In some alternative embodiments, the network card installation module 604 includes:
the network card loading unit is used for loading the driver of the target network card to be installed based on the special configuration corresponding to the target network card to be installed, and starting the functional module operated by the target network card to be installed so as to complete the installation of the target network card to be installed.
In some alternative embodiments, the multi-network card management apparatus further includes:
the configuration item acquisition unit is used for acquiring network card configuration items of all network cards.
The configuration item storage unit is used for storing the network card configuration item of each network card into the configuration storage area to obtain a network card list.
In some alternative embodiments, the multi-network card management apparatus further includes:
the network card switching unit is used for responding to the network card switching instruction, carrying out down regulation on the installation priority of the network card currently installed on the intelligent network card, and returning to the step of determining the target network card to be installed from the alternative network card set based on the network card configuration item.
In some alternative embodiments, the multi-network card management apparatus further includes:
the network card uninstallation unit is used for responding to the network card uninstallation instruction, stopping the function module of the network card running currently installed on the intelligent gateway, uninstalling the drive of the network card and powering off the network card.
Further functional descriptions of the above respective modules and units are the same as those of the above corresponding embodiments, and are not repeated here.
The multi-network card management device in this embodiment is presented in the form of functional units, where the units refer to ASIC (Application Specific Integrated Circuit ) circuits, processors and memories executing one or more software or fixed programs, and/or other devices that can provide the above-described functions.
The embodiment of the invention also provides an intelligent gateway which is provided with the multi-network card management device shown in the figure 6.
Referring to fig. 7, fig. 7 is a schematic structural diagram of an intelligent gateway according to an alternative embodiment of the present invention, as shown in fig. 7, the intelligent gateway includes: one or more processors 10, memory 20, and interfaces for connecting the various components, including high-speed interfaces and low-speed interfaces. The various components are communicatively coupled to each other using different buses and may be mounted on a common motherboard or in other manners as desired. The processor may process instructions executing within the intelligent gateway, including instructions stored in or on memory to display graphical information of the GUI on an external input/output device, such as a display device coupled to the interface. In some alternative embodiments, multiple processors and/or multiple buses may be used, if desired, along with multiple memories and multiple memories. Also, multiple intelligent gateways may be connected, with individual devices providing part of the necessary operations (e.g., as a server array, a set of blade servers, or a multiprocessor system). One processor 10 is illustrated in fig. 7.
The processor 10 may be a central processor, a network processor, or a combination thereof. The processor 10 may further include a hardware chip, among others. The hardware chip may be an application specific integrated circuit, a programmable logic device, or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general-purpose array logic, or any combination thereof.
Wherein the memory 20 stores instructions executable by the at least one processor 10 to cause the at least one processor 10 to perform the methods shown in implementing the above embodiments.
The memory 20 may include a storage program area that may store an operating system, at least one application program required for functions, and a storage data area; the storage data area may store data created according to the use of the smart gateway, etc. In addition, the memory 20 may include high-speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid-state storage device. In some alternative embodiments, memory 20 may optionally include memory located remotely from processor 10, which may be connected to the intelligent gateway through a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
Memory 20 may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as flash memory, hard disk, or solid state disk; the memory 20 may also comprise a combination of the above types of memories.
The intelligent gateway also includes a communication interface 30 for the intelligent gateway to communicate with other devices or communication networks.
In an embodiment of the present invention, an intelligent gateway includes: the intelligent gateway comprises an intelligent gateway main board, wherein a plurality of hardware interfaces are exposed on the intelligent gateway main board, and the main board is physically connected with a network card hardware interface exposed by a network card to be installed through the hardware interfaces.
In an example, except the default ethernet network card is assembled to the intelligent gateway, other network cards are made into the accessory form that can be assembled simply by the user, so that after the user completes the matching, the intelligent gateway of the closed shell can be disassembled and the accessory of the network card is inserted, and after the intelligent gateway is inserted, the accessory of the network card is installed back to the cover plate, and the gateway with the exposed hardware interface can be directly inserted. Meanwhile, wiFi network cards, cellular (5G, 4G, 3G, 2G), more Ethernet network cards and other network cards are made into accessories which can be simply assembled by a user in a hardware interface mode of USB, UART, SDIO, the user enables the network cards through an App application, relevant configuration of the assembled network cards is configured, and the intelligent gateway automatically loads a driver according to the configuration, so that network card equipment is activated. The intelligent gateway is connected with the Ethernet network card and the WiFi network card through hardware protocols, a hardware interface (USB, UART, SDIO and the like) is exposed on the intelligent gateway main board, a hardware interface (USB, UART, SDIO and the like) is also exposed on the network card module board, and then the intelligent gateway, the Ethernet network card and the WiFi network card are connected together in a physical connection mode of the hardware interface. The number of exposed hardware interfaces of the intelligent gateway is generally 3-5 because of the limitation of the individual size of the intelligent gateway in the industry.
Physical connection of the ethernet network card, the WiFi network card and the intelligent gateway is exemplified:
the intelligent gateway main board in the embodiment (1) is provided with an Ethernet network card based on the GMAC hardware interface, and the SDIO WiFi network card is connected to an SDIO hardware interface of the intelligent gateway through the SDIO interface, so that the intelligent gateway is provided with the Ethernet network card and a WiFi network card;
the USB WiFi network card in the embodiment (2) is connected to one USB hardware interface of the intelligent gateway through a USB interface, and the SDIO WiFi network card is connected to one SDIO hardware interface of the intelligent gateway through an SDIO interface, so that the intelligent gateway has 2 WiFi network cards;
the intelligent gateway main board in the example (3) is provided with an ethernet network card based on the GMAC hardware interface, and the 1 USB ethernet network card is connected to one USB hardware interface of the intelligent gateway through the USB interface, so that the intelligent gateway has 2 ethernet network cards.
Wherein the respective functions include: the Ethernet card can realize the functions of accessing a local area network through a network cable, accessing an external cloud Internet through a network cable, constructing a local area network based on the gateway Ethernet card, constructing a data route based on the gateway Ethernet card and the like according to configuration. The WiFi network card can realize the functions of accessing a local area network through wireless, accessing an external cloud internet through wireless, constructing a WiFi hotspot local area network based on the WiFi network card, constructing a data route based on the WiFi network card and the like according to configuration.
According to the intelligent gateway provided by the embodiment of the invention, the hardware interfaces adapted to different network cards are arranged, so that different network cards can be installed on the intelligent gateway on hardware, a router is not required to be added when the different network cards are switched, and the use cost is reduced. Each network card has detachable loading property. The switching and the function use of the network card are to adjust and configure according to the actual demands of clients or inform technical support staff of the demands, and perform configuration switching and use under the planning guidance of the technical support staff. In this way, the diversified demands of users can be satisfied without increasing the kinds of intelligent gateways of the device manufacturer. The motherboard of the intelligent gateway is separated from each network card module, thereby reducing the design and manufacturing costs of device manufacturers, and the firmware branches of the intelligent gateway, thereby reducing the maintenance costs of device firmware.
The embodiments of the present invention also provide a computer readable storage medium, and the method according to the embodiments of the present invention described above may be implemented in hardware, firmware, or as a computer code which may be recorded on a storage medium, or as original stored in a remote storage medium or a non-transitory machine readable storage medium downloaded through a network and to be stored in a local storage medium, so that the method described herein may be stored on such software process on a storage medium using a general purpose computer, a special purpose processor, or programmable or special purpose hardware. The storage medium can be a magnetic disk, an optical disk, a read-only memory, a random access memory, a flash memory, a hard disk, a solid state disk or the like; further, the storage medium may also comprise a combination of memories of the kind described above. It will be appreciated that a computer, processor, microprocessor controller or programmable hardware includes a storage element that can store or receive software or computer code that, when accessed and executed by the computer, processor or hardware, implements the methods illustrated by the above embodiments.
Although embodiments of the present invention have been described in connection with the accompanying drawings, various modifications and variations may be made by those skilled in the art without departing from the spirit and scope of the invention, and such modifications and variations fall within the scope of the invention as defined by the appended claims.

Claims (10)

1. The multi-network card management method is applied to an intelligent gateway and is characterized by comprising the following steps:
acquiring the installation requirement of the network card;
screening an alternative network card set from a network card list based on the network card installation requirement;
reading network card configuration items of each network card to be installed in the alternative network card set;
and determining a target network card to be installed from the alternative network card set based on the network card configuration item, and installing the target network card to be installed to an intelligent gateway.
2. The method of claim 1, wherein the network card configuration item comprises: general configuration and special configuration:
the generic configuration includes: network card enabling configuration items, priority configuration items and keep-alive detection configuration items;
the special configuration is the special configuration of the network card to be installed;
the determining, based on the network card configuration item, a target network card to be installed from the candidate network card set includes:
Enabling each network card to be installed based on the network card enabling configuration item, pushing each network card to be installed into a network card list area for background operation;
responding to the configuration command, and storing network card configuration items of the network cards to be installed into the network card list area;
determining the installation priority of each network card to be installed based on the priority configuration item and the keep-alive detection configuration item;
and determining the network card to be installed with the highest installation priority as a target network card to be installed.
3. The method of claim 2, wherein the installing the target network card to be installed to an intelligent gateway comprises:
and loading a driver of the target network card to be installed based on the special configuration corresponding to the target network card to be installed, and starting a functional module operated by the target network card to be installed so as to finish the installation of the target network card to be installed.
4. The method of claim 2, wherein prior to the obtaining the list of network cards, the method further comprises:
acquiring network card configuration items of all network cards;
and saving the network card configuration items of each network card to a configuration save area to obtain the network card list.
5. The method according to claim 1, wherein the method further comprises:
And in response to the network card switching instruction, the installation priority of the network card currently installed on the intelligent network card is adjusted downwards, and the step of determining the target network card to be installed from the alternative network card set based on the network card configuration item is returned.
6. The method according to any one of claims 1-5, further comprising:
and responding to the network card unloading instruction, stopping the function module of the network card currently installed on the intelligent gateway, unloading the drive of the network card, and powering off the network card.
7. A multi-network card management device, the device comprising:
the list acquisition module is used for acquiring the network card installation requirement;
the network card set screening module is used for screening the alternative network card set from the network card list based on the network card installation requirement;
the configuration item reading module is used for reading the network card configuration items of the network cards to be installed in the alternative network card set;
and the network card installation module is used for determining a target network card to be installed from the alternative network card set based on the network card configuration item and installing the target network card to be installed to the intelligent gateway.
8. An intelligent gateway, comprising:
a memory and a processor, the memory and the processor being communicatively connected to each other, the memory having stored therein computer instructions, the processor executing the computer instructions to perform the multi-network card management method of any one of claims 1 to 6.
9. The intelligent gateway of claim 8, wherein the intelligent gateway comprises: the intelligent gateway comprises an intelligent gateway main board, wherein a plurality of hardware interfaces are exposed on the intelligent gateway main board, and the main board is physically connected with a network card hardware interface exposed by a network card to be installed through the hardware interfaces.
10. A computer-readable storage medium having stored thereon computer instructions for causing a computer to perform the multi-network card management method of any one of claims 1 to 5.
CN202311147322.4A 2023-09-06 2023-09-06 Multi-network card management method and device, intelligent gateway and storage medium Pending CN117201296A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311147322.4A CN117201296A (en) 2023-09-06 2023-09-06 Multi-network card management method and device, intelligent gateway and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311147322.4A CN117201296A (en) 2023-09-06 2023-09-06 Multi-network card management method and device, intelligent gateway and storage medium

Publications (1)

Publication Number Publication Date
CN117201296A true CN117201296A (en) 2023-12-08

Family

ID=89002884

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311147322.4A Pending CN117201296A (en) 2023-09-06 2023-09-06 Multi-network card management method and device, intelligent gateway and storage medium

Country Status (1)

Country Link
CN (1) CN117201296A (en)

Similar Documents

Publication Publication Date Title
CN111245898B (en) Network equipment online method, device, server and storage medium
US20210136147A1 (en) Methods, systems and computer readable media for self-replicating cluster appliances
CN112506617B (en) Mirror image updating method and device for side car containers in Kubernetes cluster
CN108983938A (en) It can operating system, computer implemented method and medium when standby power failure
CN109587005B (en) Connection detection method and device, computer equipment and readable storage medium
CN101170423A (en) A service-oriented service cluster deployment method
US20130295909A1 (en) System And Method For Providing Customer Support Using A Location-Aware Portable Device
CN112783646A (en) Stateful application containerization deployment method and device
CN102184158A (en) Daughter board with two-stage FPGA chip and collocation method of two-stage FPGA chip
US7245904B2 (en) Reconfiguration of programmable components in an electronic apparatus
CN104793998B (en) Terminal system resource management method and device
CN115357198B (en) Mounting method and device of storage volume, storage medium and electronic equipment
CN102707976B (en) ATCA (advanced telecom computing architecture) system and method for managing firmware versions by ATCA system
CN115514667A (en) Access service processing method, system, device, electronic equipment and storage medium
CN114710549B (en) Dynamic management method, system and service node for network card in container platform
CN107526584B (en) Data access method and device
CN101616430B (en) Management method of gateway software version and home gateway
CN104158709A (en) Optical module identification method and port extender
CN117201296A (en) Multi-network card management method and device, intelligent gateway and storage medium
CN112130953A (en) Application deployment method for Windows Hyper-V virtualization
CN111835902A (en) Device testing method and device, electronic device and storage medium
JP2015099547A (en) Software update method, software update apparatus, software update program, and software update system
CN115268951A (en) Installation method, device, equipment and storage medium of operating system
CN116506286A (en) Method and device for configuring overtime election time of open virtual network cluster
CN100386726C (en) Method and system for renewing long-distance operation and control of computer platform system programe

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination