WO2019071800A1 - Electronic device and network sharing method and device - Google Patents

Electronic device and network sharing method and device Download PDF

Info

Publication number
WO2019071800A1
WO2019071800A1 PCT/CN2017/116078 CN2017116078W WO2019071800A1 WO 2019071800 A1 WO2019071800 A1 WO 2019071800A1 CN 2017116078 W CN2017116078 W CN 2017116078W WO 2019071800 A1 WO2019071800 A1 WO 2019071800A1
Authority
WO
WIPO (PCT)
Prior art keywords
network
module
control module
external network
external
Prior art date
Application number
PCT/CN2017/116078
Other languages
French (fr)
Chinese (zh)
Inventor
邱伟波
杨起源
陈锡剑
Original Assignee
广州视源电子科技股份有限公司
广州视睿电子科技有限公司
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 广州视源电子科技股份有限公司, 广州视睿电子科技有限公司 filed Critical 广州视源电子科技股份有限公司
Publication of WO2019071800A1 publication Critical patent/WO2019071800A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/02Details
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/0813Configuration setting characterised by the conditions triggering a change of settings
    • H04L41/0816Configuration setting characterised by the conditions triggering a change of settings the condition being an adaptation, e.g. in response to network events
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0876Network utilisation, e.g. volume of load or congestion level
    • H04L43/0894Packet rate
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/50Address allocation
    • H04L61/5007Internet protocol [IP] addresses
    • H04L61/5014Internet protocol [IP] addresses using dynamic host configuration protocol [DHCP] or bootstrap protocol [BOOTP]

Definitions

  • the present invention relates to the field of network sharing technologies, and in particular, to an electronic device, a network sharing method, and a device.
  • a network card is integrated on each motherboard. However, each system needs to access the network through the corresponding network card. If it is a wired network, the Android operating system needs to be connected to a network cable. If you use the Windows operating system, you need to connect another network cable (or replace the network cable interface). Use inconvenient questions.
  • the present invention provides an electronic device, a network sharing method, and a device, and aims to solve the problem that an external network cable can only connect one operating system in a dual-system electronic device.
  • An electronic device includes: a network expansion module, a first control module equipped with a first operating system, and a second control module equipped with a second operating system, where the network expansion module includes a first interface and a second interface, The first control module includes a first network card module and a third network card module, and the second control module includes a second network card module;
  • the first network card module is configured to connect to the first interface, and when the third network card module is connected to the external network, the first control module is configured to start a network sharing and a dynamic host configuration protocol DHCP service, by using the first The network card module generates a shared network;
  • the second network card module is configured to connect to the second interface
  • the second control module is configured to access the shared network by using the second network card module and the network expansion module.
  • the second control module further includes a fourth network card module, the fourth network card module is configured to connect to an external network, and the second network card module is configured to generate a shared network.
  • the first control module is configured to use the first external network and the second external network.
  • the network performance is compared, and it is judged based on the comparison result whether the network sharing function is reconfigured.
  • the relationship between network performance and whether to reconfigure the network sharing function includes:
  • the network sharing function is initiated by the first control module
  • the network sharing function is initiated by the second control module.
  • the fourth network card module when the fourth network card module is connected to the external network, if the first control module has generated a shared network, the second control module is configured to access the external network by using the fourth network card module. Or accessing the shared network through the second network card module.
  • the third network card module and the fourth network card module are configured to send, when accessing or disconnecting from the external network, change information for notifying that the network connection changes to the first control module;
  • the first control module is configured to determine, according to the change information, whether to reconfigure the network sharing function.
  • the first control module is configured to update network connection state information according to the change information
  • the first control module is configured to start a network sharing function when only the first control module accesses the external network in the updated network connection status information;
  • the first control module is configured to send a notification that initiates the network sharing function to the second control module
  • the second The control module is configured to start a network sharing function according to the startup notification information.
  • the invention also discloses a network sharing method applied to the above electronic device, comprising the following steps:
  • the control module that controls the NIC module starts the network sharing function.
  • the method further includes:
  • the current NIC module accesses the first external network and the other NIC module accesses the second external network, compare the network performance of the first external network with the second external network, and determine whether to reconfigure the network according to the comparison result. Sharing function
  • the relationship between network performance and whether to reconfigure the network sharing function includes:
  • the network sharing function is initiated by the first control module
  • the network sharing function is initiated by the second control module.
  • the invention also discloses a network sharing device, comprising:
  • a judging module configured to determine whether only one NIC module is currently connected to the external network when detecting the change information that informs the external network of access or disconnection;
  • the sharing module is configured to control the network sharing function of the control module where the NIC module is located if only one NIC module is currently connected to the external network.
  • the network expansion module is added to the electronic device, and the first control module and the second control module are respectively connected to the network expansion module.
  • the first control module accesses the external network through the third network card module
  • the first control module The network sharing and the dynamic host configuration protocol DHCP service are started, and the shared network is generated by the first network card module; the second control module accesses the shared network through the second network card module and the network expansion module, so that when a control module accesses the external network,
  • the network sharing function By enabling the network sharing function, other control modules of the electronic device can communicate with the Internet through the shared network.
  • FIG. 1 is a schematic structural diagram of an electronic device according to an exemplary embodiment of the present invention.
  • FIG. 2 is a schematic structural diagram of an electronic device according to an exemplary embodiment of the present invention.
  • FIG. 3 is a flowchart of a network sharing method according to an exemplary embodiment of the present invention.
  • FIG. 4 is a flowchart of a network sharing method according to an exemplary embodiment of the present invention.
  • FIG. 5 is a logic block diagram of a network sharing apparatus according to an exemplary embodiment of the present invention.
  • first, second, third, etc. may be used to describe various information in the present invention, such information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other.
  • first information may also be referred to as the second information without departing from the scope of the invention.
  • second information may also be referred to as the first information.
  • word "if” as used herein may be interpreted as "when” or "when” or "in response to determination.”
  • the network cable needs to be connected to a network cable (or the interface for replacing the network cable) to use the Windows operating system, which results in inconvenient use.
  • the present invention provides a solution for network sharing within an electronic device.
  • a schematic structural diagram of an electronic device according to an embodiment is shown in FIG.
  • the electronic device 100 includes a network expansion module 110, a first control module 120, and a second control module 130.
  • the network extension module 110 includes a first interface 111 and a second interface 112.
  • the first control module 120 is equipped with a first operating system
  • the second control module 130 is equipped with a second operating system.
  • the first operating system and the second operating system may be the same or different.
  • one is a Windows operating system.
  • Another is the Android operating system, or both are windows
  • the operating system or the Android operating system, etc., the present invention does not limit the type of the operating system.
  • the first control module 120 includes a first network card module 121 and a third network card module 122
  • the second control module 130 includes a second network card module 131.
  • the functions of the network card module include: 1. Encapsulating the data of the control module into frames, and transmitting the data to the network through a network cable (wired network) or electromagnetic waves (wireless network); 2. receiving frames transmitted by other devices on the network, and The frames are reassembled into data and sent to the control module in which they are located.
  • the third network card module 122 is configured to connect to an external network.
  • the third network card module 122 has an RJ45 interface.
  • the third network card module 122 can access the wired network, and the third network card module 122 can be a USB.
  • - PHY chip, etc., the USB-PHY chip mainly converts the signal of the RJ45 into a USB signal; of course, the third network card module 122 capable of accessing the wireless network can also be used, and the third network card module 122 can be a wireless network card, etc., or
  • the third network card module 122 that can be connected to the wired network or the wireless network is not limited by the present invention.
  • the first network card module 120 is connected to the first interface 111
  • the second network card module 131 is connected to the second interface 112
  • the first network card module 120 and the second network card module 131 are capable of data communication through the network expansion module 110.
  • the network expansion module 110 can be a switch, a router, a hub, etc.
  • the first network card module 121 can be an Ethernet-PHY chip or the like.
  • the Ethernet-PHY chip can convert the network signal into a signal transmitted by the RJ45 and input it to the switch.
  • the second network card module 131 can be a USB-PHY chip or the like, and can access the network output by the switch to the second control module 130. Therefore, when the first control module 120 accesses the network, the second control module 130 can also access the network. .
  • the first control module 120 starts the network sharing and the dynamic host configuration protocol (DHCP) service, and generates the shared network through the first network card module 121.
  • the second control module 130 passes the second network card module 131.
  • the network extension module 110 accesses the shared network.
  • DHCP Dynamic Host Configuration Protocol
  • the DHCP-enabled control module can automatically assign IP addresses, masks, and default gateways to other control modules. Therefore, after the first control module 120 starts the network sharing function, the second control module 130 can access the shared network for network communication.
  • the second network card module 131 encapsulates the data into a frame, and then sends the data frame to the network expansion module 110, and the network expansion module 110 forwards the data frame to the first control module. 120.
  • the first control module 120 sends the data frame to the network again.
  • the process of sending the data returned from the network to the second control module 130 is: the third network card module 122 receives the data frame returned from the network, and the data is received.
  • the frame is sent to the network extension module 110 through the first network card module 120.
  • the network extension module 110 forwards the data frame to the second network card module 131, and the second network card module 131 reassembles the frames into data for use by the second control module 131.
  • control module first control module 120
  • other control modules eg, the second control module 130
  • the first control module 120 and the second control module 130 can be connected to the network.
  • the second network module 232 can be connected to the external network in the second control module 230. Therefore, the electronic device 200 can also access the external network through the fourth network card module 232, and the second control module 230 activates the network sharing function.
  • the second shared network module 231 is configured to generate a shared network, so that the first control module 220 accesses the shared network through the first network card module 221 and the network expansion module 210.
  • the first control module 220 can access the external network through the third network card module 222
  • the second control module 230 can access the external network through the fourth network card module 232, so that the network sharing function does not need to be started, the first control module 220 and The second control module 230 is in direct data communication with the external network.
  • the external network accessed by the third network card module 222 and the fourth network card module 232 is the same, for example, a 20M network provided by the same router, but may also be different, for example, one accessing a 20M network.
  • the other access is a 100M network. Therefore, in order to improve network utilization, when the third network card module 222 and the fourth network card module 232 are both connected to the external network, the performance of the external network is compared to determine whether to re-establish Configure network sharing features, and more.
  • the second external network is accessed by the third network card module 222, and the second external network is used as the second external network.
  • the first control module 220 performs network performance on the first external network and the second external network. Comparing, determining whether to reconfigure the network sharing function according to the comparison result, for example, when the bandwidth of the first external network is greater than the bandwidth of the second external network, the network sharing function is initiated by the first control module 220; when the bandwidth of the first external network is less than When the bandwidth of the second external network is reached, the network sharing function is initiated by the second control module 230.
  • the user can also set other rules.
  • the control module that accesses the external network directly communicates with the external network, or starts the network sharing function by using a control module with a small external network bandwidth.
  • the third network card module 222 and the fourth network card module 232 have a certain time difference when accessing the external network. For example, the third network card module 222 is first inserted into the network cable, and then the fourth network card module 232 is connected to the network cable.
  • the NIC module 232 is connected to the external network
  • the first control module 220 has generated the shared network
  • the second control module 230 has accessed the shared network
  • the second control module 230 can access the external network through the fourth NIC module 232 for network communication.
  • the second network card module 231 can also access the shared network for network communication.
  • the second control module 230 accesses the shared network through the network expansion module 210 having the switch function, and the network expansion module 210 stores the MAC (Media Access Control) address of the control module (network card module) connected thereto, and records The interface corresponding to the MAC address, so that the data frame can be accurately forwarded; the number of IP addresses occupied by the electronic device 200 can be reduced externally; For example, when the IP address of the first control module 220 is 110.110.10.0, if the IP address of the first control module 220 is 110.110.10.0, the second control module 230 directly performs network communication through the external network.
  • MAC Media Access Control
  • the control module 230 needs to occupy the IP address 110.110.20.0, so that the local area network cannot access other electronic devices because the IP address is insufficient; but when the second control module 230 performs network communication through the shared network, the second control module 230 may occupy the IP address.
  • the LAN can be connected to an electronic device.
  • the second control module 230 directly performs network communication through the external network to improve communication reliability and reduce network delay.
  • the network expansion module 210 may also be a module having a routing function or a hub function, etc., which is not limited by the present invention.
  • the third network card module 222 and the fourth network card module 232 can both access the external network, and the first control module 220 and the second control module 230 can start the network sharing function, improve network stability and avoid based on unified management.
  • an embodiment of the present invention provides a method for unified management of configuring a network sharing function, for example, unified management by the first control module 220.
  • the third network card module 222 and the fourth network card module 232 When the third network card module 222 and the fourth network card module 232 are connected to or disconnected from the external network, the third network card module 222 and the fourth network card module 232 can generate change information for notifying that the network connection has changed, and change the information to the first control module 220.
  • a control module 220 can know that the electronic device 200 is connected to the external network, and can further determine whether to reconfigure the network sharing function or the like according to the change information.
  • the first control module 220 and the second control module 230 can communicate via a communication bus in the electronic device 200.
  • the first control module 220 can update the network connection status information according to the change information.
  • the first control module 220 can record the status of each module accessing the external network (including the change) through the network connection status table, and the electronic device 200 is not connected.
  • the network connection status table when entering the external network is as shown in Table 1; the network connection status table when the first control module 220 is connected to the external network is as shown in Table 2; when the second control module 230 is connected to the external network.
  • the network connection status table is as shown in Table 3; the network connection status table when the first control module 220 is disconnected from the external network is as shown in Table 4 below;
  • 0 indicates that the external network is not connected
  • 1 indicates that the external network is connected
  • (0-->)1 indicates that the external network has not been connected to the external network
  • (1-->)0 indicates that the external network is accessed. The network becomes unconnected to the external network.
  • the first control module 220 accesses the external network in the updated network connection status information (network connection status table 2), the first control module 220 starts the network sharing function; when the updated network connection status information (table 4)
  • the first control module 220 may send a notification to initiate the network sharing function to the second control module 230, and the second control module 230 initiates the network sharing according to the startup notification information.
  • the control module in the electronic device 200 is not limited to two, and may have any number. The manner of adding the control module to the network and sharing the network is similar; the number of interfaces of the network expansion module 210 can be set as needed, of course, Other devices that need to access the Internet can be connected to the shared network through the network extension module 210.
  • the present invention also proposes a method for network sharing, as shown in FIG. 3, including the following steps:
  • the method further includes:
  • the current NIC module accesses the first external network and the other NIC module accesses the second external network, Comparing the network performance of an external network with the second external network, and determining whether to reconfigure the network sharing function according to the comparison result;
  • the relationship between network performance and whether to reconfigure the network sharing function includes:
  • the network sharing function is initiated by the first control module
  • the network sharing function is initiated by the second control module.
  • step S410 Detecting the change information of the external network access or disconnection, updating the network connection status table according to the change information, and counting the number of network card modules currently accessing the external network; when the number of network card modules accessing the external network is 0 Go to step S420; when the number of network card modules accessing the external network is 1, go to step S430; when the number of network card modules accessing the external network is greater than 1, go to step S440;
  • the network sharing function is not enabled; at this time, an external network that was originally accessed may be disconnected; of course, after the electronic device is started and before being connected to the external network, the network sharing function is not turned on;
  • S430 The network sharing function is started by the network card module currently accessing the external network; there may be a network card module connected to the external network; or the external network may be disconnected from other network card modules, and only one network card module is connected to the external network.
  • the internet ;
  • step S440 determining whether to reconfigure the network sharing function; if not, proceeding to step S450; if yes, proceeding to step S460;
  • the network sharing function is not reconfigured; for example, if a network card module has previously accessed the external network and started the network sharing function, the current network sharing status may not be changed to avoid other modules being caused by switching network connections.
  • the function is unstable; the control module that accesses the external network later performs network communication through the external network or the shared network, which is not limited by the present invention;
  • S470 The network sharing function is started by the network card module with the best performance of the accessed external network; thereby improving the network utilization of the electronic device.
  • the present invention also provides an embodiment of a network sharing device.
  • a network sharing apparatus 500 includes:
  • the determining module 510 is configured to determine, when the change information of the external network access or disconnection is detected, whether only one network card module is currently connected to the external network;
  • the sharing module 520 is configured to control a network sharing function of the control module where the network card module is located if only one network card module is currently connected to the external network.
  • the device embodiment since it basically corresponds to the method embodiment, reference may be made to the partial description of the method embodiment.
  • the device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, ie may be located A place, or it can be distributed to multiple network units. Some or all of the modules may be selected according to actual needs to achieve the objectives of the solution of the present invention. Those of ordinary skill in the art can understand and implement without any creative effort.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Environmental & Geological Engineering (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Small-Scale Networks (AREA)

Abstract

An electronic device (100) and a network sharing method and device (500), the electronic device (100) comprising a network expansion module (110). A first control module (120) and a second control module (130) are connected to the network expansion module (110) respectively; when the first control module (120) accesses an external network by means of a third network card module (122), the first control module (120) starts network sharing and dynamic host configuration protocol (DHCP) service and generates a shared network by means of a first network card module (121); the second control module (130) accesses the shared network by means of a second network card module (131) and the network expansion module (110). Therefore, after the control module accesses the external network, a network sharing function is enabled, so that other control modules of the electronic device (100) may communicate with the Internet by means of the shared network.

Description

电子设备、网络共享方法及装置Electronic device, network sharing method and device 技术领域Technical field
本发明涉及网络共享技术领域,尤其涉及一种电子设备、网络共享方法及装置。The present invention relates to the field of network sharing technologies, and in particular, to an electronic device, a network sharing method, and a device.
背景技术Background technique
不同系统都有各自的优点,基于软件兼容、使用不同的系统等需求,越来越多的用户为电子设备安装双系统,厂商也积极研制生产具有双系统的电子设备,特别是两个系统能够同时运行的电子设备,以吸引更多用户。而要使两个系统能够同时运行,目前采用的方法主要是使用两个主板,每个主板安装一个系统,由于每个系统拥有一个独立的中央处理器(Central Processing Unit,CPU),从而两个系统能够同时运行。Different systems have their own advantages. Based on the requirements of software compatibility and different systems, more and more users install dual systems for electronic devices. Manufacturers also actively develop and produce electronic devices with dual systems, especially the two systems. Simultaneously run electronic devices to attract more users. To enable the two systems to run at the same time, the current method is mainly to use two motherboards, one for each motherboard, because each system has a separate Central Processing Unit (CPU), so that two The system can run at the same time.
以目前常见的具有windows操作系统和Android操作系统的双系统电子设备为例,为了使两个系统都能上网,每个主板上都集成有网卡。然而每个系统均需要通过对应的网卡才能接入网络,如果是有线网络,使用Android操作系统需要接一根网线,使用windows操作系统需要再接一根网线(或更换网线的接口),从而存在使用不便利的问题。Taking the two-system electronic devices with the Windows operating system and the Android operating system as an example, in order to enable both systems to access the Internet, a network card is integrated on each motherboard. However, each system needs to access the network through the corresponding network card. If it is a wired network, the Android operating system needs to be connected to a network cable. If you use the Windows operating system, you need to connect another network cable (or replace the network cable interface). Use inconvenient questions.
发明内容Summary of the invention
有鉴于此,本发明提供一种电子设备、网络共享方法及装置,旨在解决目前外接一根网线只能使双系统电子设备中的一个操作系统连网的问题。In view of this, the present invention provides an electronic device, a network sharing method, and a device, and aims to solve the problem that an external network cable can only connect one operating system in a dual-system electronic device.
具体地,本发明是通过如下技术方案实现的:Specifically, the present invention is achieved by the following technical solutions:
一种电子设备,包括:网络扩展模块、搭载有第一操作系统的第一控制模块、搭载有第二操作系统的第二控制模块,所述网络扩展模块包括第一接口和第二接口,所述第一控制模块包含第一网卡模块和第三网卡模块,所述第二控制模块包含第二网卡模块;An electronic device includes: a network expansion module, a first control module equipped with a first operating system, and a second control module equipped with a second operating system, where the network expansion module includes a first interface and a second interface, The first control module includes a first network card module and a third network card module, and the second control module includes a second network card module;
所述第一网卡模块用于连接第一接口,当所述第三网卡模块接入外部网络时,所述第一控制模块用于启动网络共享及动态主机配置协议DHCP服务,通过所述第一网卡模块生成共享网络; The first network card module is configured to connect to the first interface, and when the third network card module is connected to the external network, the first control module is configured to start a network sharing and a dynamic host configuration protocol DHCP service, by using the first The network card module generates a shared network;
所述第二网卡模块用于连接第二接口,所述第二控制模块用于通过所述第二网卡模块、网络扩展模块接入共享网络。The second network card module is configured to connect to the second interface, and the second control module is configured to access the shared network by using the second network card module and the network expansion module.
一个实施例中,所述第二控制模块还包括第四网卡模块,所述第四网卡模块用于连接外部网络,所述第二网卡模块用于生成共享网络。In an embodiment, the second control module further includes a fourth network card module, the fourth network card module is configured to connect to an external network, and the second network card module is configured to generate a shared network.
一个实施例中,当所述第三网卡模块接入第一外部网络,且第四网卡模块接入第二外部网络时,所述第一控制模块用于对第一外部网络与第二外部网络的网络性能进行比较,根据比较结果判断是否重新配置网络共享功能。In an embodiment, when the third network card module is connected to the first external network, and the fourth network card module is connected to the second external network, the first control module is configured to use the first external network and the second external network. The network performance is compared, and it is judged based on the comparison result whether the network sharing function is reconfigured.
一个实施例中,网络性能与是否重新配置网络共享功能的关系包括:In one embodiment, the relationship between network performance and whether to reconfigure the network sharing function includes:
当第一外部网络的带宽大于第二外部网络的带宽时,由所述第一控制模块启动网络共享功能;When the bandwidth of the first external network is greater than the bandwidth of the second external network, the network sharing function is initiated by the first control module;
当第一外部网络的带宽小于第二外部网络的带宽时,由所述第二控制模块启动网络共享功能。When the bandwidth of the first external network is smaller than the bandwidth of the second external network, the network sharing function is initiated by the second control module.
一个实施例中,当所述第四网卡模块接入外部网络时,若所述第一控制模块已生成共享网络,则所述第二控制模块用于通过所述第四网卡模块接入外部网络,或通过所述第二网卡模块接入共享网络。In an embodiment, when the fourth network card module is connected to the external network, if the first control module has generated a shared network, the second control module is configured to access the external network by using the fourth network card module. Or accessing the shared network through the second network card module.
一个实施例中,所述第三网卡模块和第四网卡模块用于在接入或断开与外部网络的连接时,发送用于通知网络连接发生变化的变更信息至所述第一控制模块;In an embodiment, the third network card module and the fourth network card module are configured to send, when accessing or disconnecting from the external network, change information for notifying that the network connection changes to the first control module;
所述第一控制模块用于根据变更信息判断是否重新配置网络共享功能。The first control module is configured to determine, according to the change information, whether to reconfigure the network sharing function.
一个实施例中,所述第一控制模块用于根据所述变更信息更新网络连接状态信息;In an embodiment, the first control module is configured to update network connection state information according to the change information;
当更新后的网络连接状态信息中仅第一控制模块接入外部网络时,所述第一控制模块用于启动网络共享功能;The first control module is configured to start a network sharing function when only the first control module accesses the external network in the updated network connection status information;
当更新后的网络连接状态信息中仅第二控制模块接入外部网络时,所述第一控制模块用于发送通知启动网络共享功能的启动通知信息至所述第二控制模块,所述第二控制模块用于根据所述启动通知信息启动网络共享功能。When the second control module accesses the external network in the updated network connection status information, the first control module is configured to send a notification that initiates the network sharing function to the second control module, the second The control module is configured to start a network sharing function according to the startup notification information.
本发明还公开了一种应用于上述电子设备中的网络共享方法,包括以下步骤:The invention also discloses a network sharing method applied to the above electronic device, comprising the following steps:
当检测到通知外部网络接入或断开的变更信息时,判断当前是否仅一个网卡模块接入外部网络; When it is detected that the external network access or disconnection is notified, it is determined whether only one NIC module is currently connected to the external network;
若当前仅一个网卡模块接入外部网络,则控制该网卡模块所在的控制模块启动网络共享功能。If only one NIC module is currently connected to the external network, the control module that controls the NIC module starts the network sharing function.
一个实施例中,所述判断当前是否仅一个网卡模块接入外部网络的步骤之后,还包括:In an embodiment, after the step of determining whether only one network card module is currently connected to the external network, the method further includes:
若当前一个网卡模块接入第一外部网络,另一网卡模块接入第二外部网络,则对所述第一外部网络与第二外部网络的网络性能进行比较,根据比较结果判断是否重新配置网络共享功能;If the current NIC module accesses the first external network and the other NIC module accesses the second external network, compare the network performance of the first external network with the second external network, and determine whether to reconfigure the network according to the comparison result. Sharing function
其中,网络性能与是否重新配置网络共享功能的关系包括:Among them, the relationship between network performance and whether to reconfigure the network sharing function includes:
当第一外部网络的带宽大于第二外部网络的带宽时,由所述第一控制模块启动网络共享功能;When the bandwidth of the first external network is greater than the bandwidth of the second external network, the network sharing function is initiated by the first control module;
当第一外部网络的带宽小于第二外部网络的带宽时,由所述第二控制模块启动网络共享功能。When the bandwidth of the first external network is smaller than the bandwidth of the second external network, the network sharing function is initiated by the second control module.
本发明还公开了一种网络共享装置,包括:The invention also discloses a network sharing device, comprising:
判断模块,用于当检测到通知外部网络接入或断开的变更信息时,判断当前是否仅一个网卡模块接入外部网络;a judging module, configured to determine whether only one NIC module is currently connected to the external network when detecting the change information that informs the external network of access or disconnection;
共享模块,用于若当前仅一个网卡模块接入外部网络,则控制该网卡模块所在的控制模块启动网络共享功能。The sharing module is configured to control the network sharing function of the control module where the NIC module is located if only one NIC module is currently connected to the external network.
本发明在电子设备中增加了网络扩展模块,第一控制模块和第二控制模块分别与网络扩展模块连接,当第一控制模块通过第三网卡模块接入外部网络时,所述第一控制模块启动网络共享及动态主机配置协议DHCP服务,通过第一网卡模块生成共享网络;第二控制模块通过第二网卡模块、网络扩展模块接入共享网络,从而,当一个控制模块接入外部网络后,通过开启网络共享功能,电子设备的其它控制模块能够通过共享网络与互联网通信。The network expansion module is added to the electronic device, and the first control module and the second control module are respectively connected to the network expansion module. When the first control module accesses the external network through the third network card module, the first control module The network sharing and the dynamic host configuration protocol DHCP service are started, and the shared network is generated by the first network card module; the second control module accesses the shared network through the second network card module and the network expansion module, so that when a control module accesses the external network, By enabling the network sharing function, other control modules of the electronic device can communicate with the Internet through the shared network.
附图说明DRAWINGS
图1是本发明一示例性实施例示出的一种电子设备的结构示意图;1 is a schematic structural diagram of an electronic device according to an exemplary embodiment of the present invention;
图2是本发明一示例性实施例示出的一种电子设备的结构示意图;FIG. 2 is a schematic structural diagram of an electronic device according to an exemplary embodiment of the present invention; FIG.
图3是本发明一示例性实施例示出的一种网络共享方法的流程图;FIG. 3 is a flowchart of a network sharing method according to an exemplary embodiment of the present invention; FIG.
图4是本发明一示例性实施例示出的一种网络共享方法的流程图; FIG. 4 is a flowchart of a network sharing method according to an exemplary embodiment of the present invention; FIG.
图5是本发明一示例性实施例示出的一种网络共享装置的逻辑框图。FIG. 5 is a logic block diagram of a network sharing apparatus according to an exemplary embodiment of the present invention.
具体实施方式Detailed ways
这里将详细地对示例性实施例进行说明,其示例表示在附图中。下面的描述涉及附图时,除非另有表示,不同附图中的相同数字表示相同或相似的要素。以下示例性实施例中所描述的实施方式并不代表与本发明相一致的所有实施方式。相反,它们仅是与如所附权利要求书中所详述的、本发明的一些方面相一致的装置和方法的例子。Exemplary embodiments will be described in detail herein, examples of which are illustrated in the accompanying drawings. The following description refers to the same or similar elements in the different figures unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Instead, they are merely examples of devices and methods consistent with aspects of the invention as detailed in the appended claims.
在本发明使用的术语是仅仅出于描述特定实施例的目的,而非旨在限制本发明。在本发明和所附权利要求书中所使用的单数形式的“一种”、“所述”和“该”也旨在包括多数形式,除非上下文清楚地表示其他含义。还应当理解,本文中使用的术语“和/或”是指并包含一个或多个相关联的列出项目的任何或所有可能组合。The terminology used in the present invention is for the purpose of describing particular embodiments, and is not intended to limit the invention. The singular forms "a", "the" and "the" It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
应当理解,尽管在本发明可能采用术语第一、第二、第三等来描述各种信息,但这些信息不应限于这些术语。这些术语仅用来将同一类型的信息彼此区分开。例如,在不脱离本发明范围的情况下,第一信息也可以被称为第二信息,类似地,第二信息也可以被称为第一信息。取决于语境,如在此所使用的词语“如果”可以被解释成为“在……时”或“当……时”或“响应于确定”。It should be understood that although the terms first, second, third, etc. may be used to describe various information in the present invention, such information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, the first information may also be referred to as the second information without departing from the scope of the invention. Similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "when" or "when" or "in response to determination."
目前,具有双系统的电子设备,特别是两个系统能够同时运行的电子设备越来越普遍。而要使两个系统能够同时运行,目前采用的方法主要是使用两个主板,每个主板安装一个系统,由于每个系统拥有一个独立的中央处理器(Central Processing Unit,CPU),从而两个系统能够同时运行。因此,为了使两个系统都能上网,每个主板上都需要集成网卡。这就导致每个系统均需要通过对应的网卡才能接入网络,以目前常见的具有windows操作系统和Android操作系统的双系统电子设备为例,如果是有线网络,使用Android操作系统需要接一根网线,使用windows操作系统需要再接一根网线(或更换网线的接口),从而导致使用不便捷。为此,本发明提出了一种在电子设备内部进行网络共享的方案,一实施例的电子设备的结构示意图如图1所示。At present, electronic devices with dual systems, especially electronic devices with two systems capable of running simultaneously, are becoming more and more popular. To enable the two systems to run at the same time, the current method is mainly to use two motherboards, one for each motherboard, because each system has a separate Central Processing Unit (CPU), so that two The system can run at the same time. Therefore, in order to make both systems available, an integrated network card is required on each motherboard. This results in each system needing to access the network through the corresponding network card. Take the current common dual-system electronic device with Windows operating system and Android operating system as an example. If it is a wired network, use the Android operating system to take one. The network cable needs to be connected to a network cable (or the interface for replacing the network cable) to use the Windows operating system, which results in inconvenient use. To this end, the present invention provides a solution for network sharing within an electronic device. A schematic structural diagram of an electronic device according to an embodiment is shown in FIG.
电子设备100包括网络扩展模块110、第一控制模块120和第二控制模块130。网络扩展模块110包括第一接口111和第二接口112。第一控制模块120中搭载有第一操作系统,第二控制模块130中搭载有第二操作系统,当然,第一操作系统和第二操作系统可以相同也可以不同,例如,一个为windows操作系统、另一个为Android操作系统,或者两个都为windows 操作系统或Android操作系统等,本发明对操作系统的类型不作限定。The electronic device 100 includes a network expansion module 110, a first control module 120, and a second control module 130. The network extension module 110 includes a first interface 111 and a second interface 112. The first control module 120 is equipped with a first operating system, and the second control module 130 is equipped with a second operating system. Of course, the first operating system and the second operating system may be the same or different. For example, one is a Windows operating system. Another is the Android operating system, or both are windows The operating system or the Android operating system, etc., the present invention does not limit the type of the operating system.
第一控制模块120中包含第一网卡模块121和第三网卡模块122,第二控制模块130中包含第二网卡模块131。网卡模块的功能包括:1、将控制模块的数据封装为帧,并通过网线(有线网络)或电磁波(无线网络)将数据发送到网络上去;2、接收网络上其它设备传过来的帧,并将帧重新组合成数据,发送到所在的控制模块。The first control module 120 includes a first network card module 121 and a third network card module 122, and the second control module 130 includes a second network card module 131. The functions of the network card module include: 1. Encapsulating the data of the control module into frames, and transmitting the data to the network through a network cable (wired network) or electromagnetic waves (wireless network); 2. receiving frames transmitted by other devices on the network, and The frames are reassembled into data and sent to the control module in which they are located.
第三网卡模块122用于连接外部网络,例如,第三网卡模块122中有RJ45接口,在该接口插上网线,则第三网卡模块122可以接入有线网络,第三网卡模块122可以是USB-PHY芯片等,USB-PHY芯片主要将RJ45的信号转成USB信号;当然也可以使用能够接入无线网络的第三网卡模块122,此时第三网卡模块122可以是无线网卡等,或者是有线网络、无线网络均能连接的第三网卡模块122,本发明对此不作限定。第一网卡模块120与第一接口111连接,第二网卡模块131与第二接口112连接,第一网卡模块120与第二网卡模块131能够通过网络扩展模块110进行数据通信。网络扩展模块110可以是交换机、路由器、集线器等,第一网卡模块121可以为以太网-PHY芯片等,以太网-PHY芯片可以将网络信号转成RJ45传输的信号,输入至交换机。第二网卡模块131可以为USB-PHY芯片等,能够将交换机输出的网络接入第二控制模块130,从而,在第一控制模块120接入网络时,第二控制模块130也可以接入网络。The third network card module 122 is configured to connect to an external network. For example, the third network card module 122 has an RJ45 interface. When the network cable is inserted into the interface, the third network card module 122 can access the wired network, and the third network card module 122 can be a USB. - PHY chip, etc., the USB-PHY chip mainly converts the signal of the RJ45 into a USB signal; of course, the third network card module 122 capable of accessing the wireless network can also be used, and the third network card module 122 can be a wireless network card, etc., or The third network card module 122 that can be connected to the wired network or the wireless network is not limited by the present invention. The first network card module 120 is connected to the first interface 111, the second network card module 131 is connected to the second interface 112, and the first network card module 120 and the second network card module 131 are capable of data communication through the network expansion module 110. The network expansion module 110 can be a switch, a router, a hub, etc. The first network card module 121 can be an Ethernet-PHY chip or the like. The Ethernet-PHY chip can convert the network signal into a signal transmitted by the RJ45 and input it to the switch. The second network card module 131 can be a USB-PHY chip or the like, and can access the network output by the switch to the second control module 130. Therefore, when the first control module 120 accesses the network, the second control module 130 can also access the network. .
当第三网卡模块122接入外部网络时,第一控制模块120启动网络共享及动态主机配置协议DHCP服务,通过第一网卡模块121生成共享网络;第二控制模块130通过第二网卡模块131、网络扩展模块110接入共享网络。When the third network card module 122 is connected to the external network, the first control module 120 starts the network sharing and the dynamic host configuration protocol (DHCP) service, and generates the shared network through the first network card module 121. The second control module 130 passes the second network card module 131. The network extension module 110 accesses the shared network.
DHCP(Dynamic Host Configuration Protocol,动态主机分配协议)是一个局域网的网络协议,使用UDP协议工作,主要有两个用途:给内部网络或网络服务供应商自动分配IP地址给用户,给内部网络管理员作为对所有计算机作中央管理的手段。启动DHCP的控制模块能够自动给其它控制模块分配IP地址、掩码,默认网关。从而,当第一控制模块120启动网络共享功能后,第二控制模块130能够接入该共享网络进行网络通信。第二控制模块130要发送数据到网络上去时,是由第二网卡模块131将数据封装为帧,再将数据帧发送到网络扩展模块110,网络扩展模块110将数据帧转发给第一控制模块120,第一控制模块120再将数据帧发送到网络上去;从网络上返回的数据发送到第二控制模块130的过程为:第三网卡模块122接收到从网络上返回的数据帧,将数据帧通过第一网卡模块120发送到网络扩展模块110,网络扩展模块110将数据帧转发给第二网卡模块131,第二网卡模块131将帧重新组合成数据供第二控制模块131使用。 DHCP (Dynamic Host Configuration Protocol) is a LAN network protocol that works with the UDP protocol. It has two main purposes: to automatically assign an IP address to the internal network or network service provider to the internal network administrator. As a means of central management of all computers. The DHCP-enabled control module can automatically assign IP addresses, masks, and default gateways to other control modules. Therefore, after the first control module 120 starts the network sharing function, the second control module 130 can access the shared network for network communication. When the second control module 130 wants to send data to the network, the second network card module 131 encapsulates the data into a frame, and then sends the data frame to the network expansion module 110, and the network expansion module 110 forwards the data frame to the first control module. 120. The first control module 120 sends the data frame to the network again. The process of sending the data returned from the network to the second control module 130 is: the third network card module 122 receives the data frame returned from the network, and the data is received. The frame is sent to the network extension module 110 through the first network card module 120. The network extension module 110 forwards the data frame to the second network card module 131, and the second network card module 131 reassembles the frames into data for use by the second control module 131.
从而,当一个控制模块(第一控制模块120)接入外部网络后,通过开启网络共享功能,电子设备100的其它控制模块(例如,第二控制模块130)能够通过共享网络与互联网通信。Thus, when a control module (first control module 120) accesses the external network, by opening the network sharing function, other control modules (eg, the second control module 130) of the electronic device 100 can communicate with the Internet through the shared network.
虽然第三网卡模块122接入外部网络后,第一控制模块120和第二控制模块130都能连网,为了防止第三网卡模块122发生故障后整个电子设备100都无法连接网络,如图2所示,在第二控制模块230中设置了能连接外部网络第四网卡模块232,从而,电子设备200也可以通过第四网卡模块232接入外部网络,第二控制模块230启动网络共享功能,通过第二网卡模块231启动生成共享网络,从而第一控制模块220通过第一网卡模块221、网络扩展模块210接入共享网络。After the third network card module 122 is connected to the external network, the first control module 120 and the second control module 130 can be connected to the network. In order to prevent the entire electronic device 100 from being connected to the network after the third network card module 122 fails, as shown in FIG. 2 As shown, the second network module 232 can be connected to the external network in the second control module 230. Therefore, the electronic device 200 can also access the external network through the fourth network card module 232, and the second control module 230 activates the network sharing function. The second shared network module 231 is configured to generate a shared network, so that the first control module 220 accesses the shared network through the first network card module 221 and the network expansion module 210.
当然,也可以是第一控制模块220通过第三网卡模块222接入外部网络,第二控制模块230通过第四网卡模块232接入外部网络,则无需启动网络共享功能,第一控制模块220和第二控制模块230均直接与外部网络进行数据通信。通常来说,第三网卡模块222和第四网卡模块232接入的外部网络是相同的,例如是由同一路由器提供的20M的网络,但也可能不同,例如,一个接入的是20M的网络,另一个接入的是100M的网络,因此,为了提高网络利用率,可以在第三网卡模块222和第四网卡模块232均接入外部网络时,对外部网络的性能进行比较,判断是否重新配置网络共享功能等。Of course, the first control module 220 can access the external network through the third network card module 222, and the second control module 230 can access the external network through the fourth network card module 232, so that the network sharing function does not need to be started, the first control module 220 and The second control module 230 is in direct data communication with the external network. Generally, the external network accessed by the third network card module 222 and the fourth network card module 232 is the same, for example, a 20M network provided by the same router, but may also be different, for example, one accessing a 20M network. The other access is a 100M network. Therefore, in order to improve network utilization, when the third network card module 222 and the fourth network card module 232 are both connected to the external network, the performance of the external network is compared to determine whether to re-establish Configure network sharing features, and more.
以第三网卡模块222接入的为第一外部网络、第四网卡模块232接入的为第二外部网络为例,第一控制模块220对第一外部网络与第二外部网络的网络性能进行比较,根据比较结果判断是否重新配置网络共享功能,例如,当第一外部网络的带宽大于第二外部网络的带宽时,由第一控制模块220启动网络共享功能;当第一外部网络的带宽小于第二外部网络的带宽时,由第二控制模块230启动网络共享功能。当然,用户也可以设定其它规则,例如,接入外部网络的控制模块均直接与外部网络通信,或者以接入的外部网络带宽小的控制模块启动网络共享功能等。The second external network is accessed by the third network card module 222, and the second external network is used as the second external network. The first control module 220 performs network performance on the first external network and the second external network. Comparing, determining whether to reconfigure the network sharing function according to the comparison result, for example, when the bandwidth of the first external network is greater than the bandwidth of the second external network, the network sharing function is initiated by the first control module 220; when the bandwidth of the first external network is less than When the bandwidth of the second external network is reached, the network sharing function is initiated by the second control module 230. Of course, the user can also set other rules. For example, the control module that accesses the external network directly communicates with the external network, or starts the network sharing function by using a control module with a small external network bandwidth.
通常来说,第三网卡模块222和第四网卡模块232接入外部网络存在一定的时间差,例如,先给第三网卡模块222插入网线后再给第四网卡模块232接入网线,则第四网卡模块232接入外部网络时,第一控制模块220已生成共享网络、第二控制模块230接入了共享网络,则第二控制模块230可以通过第四网卡模块232接入外部网络进行网络通信,也可以通过第二网卡模块231接入共享网络进行网络通信。第二控制模块230通过具有交换机功能的网络扩展模块210接入共享网络,网络扩展模块210存储有与之连接的控制模块(网卡模块)的MAC(Media Access Control,媒体访问控制)地址,并记录MAC地址对应的接口,从而能够准确的转发数据帧;对外还能够减少电子设备200占用的IP地址数量;以电子设备200所 在局域网拥有2个IP地址110.110.10.0、110.110.20.0为例,当第一控制模块220占用的IP地址为110.110.10.0时,若第二控制模块230直接通过外部网络进行网络通信,则第二控制模块230需要占用IP地址110.110.20.0,从而由于IP地址不够,该局域网不能接入其它电子设备;但当第二控制模块230通过共享网络进行网络通信时,第二控制模块230占用IP地址可能为110.110.10.10,则该局域网还能再接入一个电子设备。当然,第二控制模块230直接通过外部网络进行网络通信能够提高通信的可靠性,减少网络时延。网络扩展模块210还可以是具有路由功能或集线器功能等的模块,本发明对此不作限定。Generally, the third network card module 222 and the fourth network card module 232 have a certain time difference when accessing the external network. For example, the third network card module 222 is first inserted into the network cable, and then the fourth network card module 232 is connected to the network cable. When the NIC module 232 is connected to the external network, the first control module 220 has generated the shared network, and the second control module 230 has accessed the shared network, and the second control module 230 can access the external network through the fourth NIC module 232 for network communication. The second network card module 231 can also access the shared network for network communication. The second control module 230 accesses the shared network through the network expansion module 210 having the switch function, and the network expansion module 210 stores the MAC (Media Access Control) address of the control module (network card module) connected thereto, and records The interface corresponding to the MAC address, so that the data frame can be accurately forwarded; the number of IP addresses occupied by the electronic device 200 can be reduced externally; For example, when the IP address of the first control module 220 is 110.110.10.0, if the IP address of the first control module 220 is 110.110.10.0, the second control module 230 directly performs network communication through the external network. The control module 230 needs to occupy the IP address 110.110.20.0, so that the local area network cannot access other electronic devices because the IP address is insufficient; but when the second control module 230 performs network communication through the shared network, the second control module 230 may occupy the IP address. For 110.110.10.10, the LAN can be connected to an electronic device. Of course, the second control module 230 directly performs network communication through the external network to improve communication reliability and reduce network delay. The network expansion module 210 may also be a module having a routing function or a hub function, etc., which is not limited by the present invention.
如前所述,第三网卡模块222和第四网卡模块232均能接入外部网络,第一控制模块220和第二控制模块230均能启动网络共享功能,基于统一管理提高网络稳定性、避免功能冲突等目的,本发明一实施例提出了对配置网络共享功能进行统一管理的方式,例如由第一控制模块220进行统一管理。As described above, the third network card module 222 and the fourth network card module 232 can both access the external network, and the first control module 220 and the second control module 230 can start the network sharing function, improve network stability and avoid based on unified management. For the purpose of function conflicts and the like, an embodiment of the present invention provides a method for unified management of configuring a network sharing function, for example, unified management by the first control module 220.
第三网卡模块222和第四网卡模块232在接入或断开与外部网络的连接时,能够生成用于通知网络连接发生变化的变更信息,通过将变更信息至第一控制模块220,从而第一控制模块220能够得知电子设备200接入外部网络的情况,进而能够根据变更信息判断是否重新配置网络共享功能等。第一控制模块220与第二控制模块230可以通过电子设备200中的通信总线进行通讯。第一控制模块220可以根据变更信息更新网络连接状态信息,例如,可以在第一控制模块220中通过网络连接状态表记录各模块接入外部网络的情况(包括变化情况),电子设备200未接入外部网络时的网络连接状态表如下表1所示;使第一控制模块220接入外部网络时的网络连接状态表如下表2所示;再使第二控制模块230接入外部网络时的网络连接状态表如下表3所示;再断开第一控制模块220接入外部网络时的网络连接状态表如下表4所示;When the third network card module 222 and the fourth network card module 232 are connected to or disconnected from the external network, the third network card module 222 and the fourth network card module 232 can generate change information for notifying that the network connection has changed, and change the information to the first control module 220. A control module 220 can know that the electronic device 200 is connected to the external network, and can further determine whether to reconfigure the network sharing function or the like according to the change information. The first control module 220 and the second control module 230 can communicate via a communication bus in the electronic device 200. The first control module 220 can update the network connection status information according to the change information. For example, the first control module 220 can record the status of each module accessing the external network (including the change) through the network connection status table, and the electronic device 200 is not connected. The network connection status table when entering the external network is as shown in Table 1; the network connection status table when the first control module 220 is connected to the external network is as shown in Table 2; when the second control module 230 is connected to the external network. The network connection status table is as shown in Table 3; the network connection status table when the first control module 220 is disconnected from the external network is as shown in Table 4 below;
表1Table 1
第一控制模块First control module 第二控制模块 Second control module
00 00
表2Table 2
第一控制模块First control module 第二控制模块Second control module
(0-->)1(0-->)1 00
表3table 3
第一控制模块First control module 第二控制模块Second control module
11 (0-->)1(0-->)1
表4Table 4
第一控制模块First control module 第二控制模块Second control module
(1-->)0(1-->)0 11
其中,0表示未接入外部网络,1表示接入外部网络,(0-->)1表示从未接入外部网络变成接入外部网络,(1-->)0表示从接入外部网络变成未接入外部网络。0 indicates that the external network is not connected, 1 indicates that the external network is connected, (0-->)1 indicates that the external network has not been connected to the external network, and (1-->)0 indicates that the external network is accessed. The network becomes unconnected to the external network.
从而,当更新后的网络连接状态信息(网络连接状态表2)中仅第一控制模块220接入外部网络时,第一控制模块220启动网络共享功能;当更新后的网络连接状态信息(表4)中仅第二控制模块230接入外部网络时,第一控制模块220可以发送通知启动网络共享功能的启动通知信息至第二控制模块230,第二控制模块230根据启动通知信息启动网络共享功能。至于表3所示的第一控制模块220和第二控制模块230均接入外部网络的情况,可以参考前述描述,在此不予赘述。当然,电子设备200中的控制模块不限于2个,可以有任意多个,增加控制模块后联网、共享网络的方式与此类似;网络扩展模块210的接口数量可以根据需要进行设置,当然,还可以使其它需要上网的设备通过网络扩展模块210接入共享网络。Therefore, when only the first control module 220 accesses the external network in the updated network connection status information (network connection status table 2), the first control module 220 starts the network sharing function; when the updated network connection status information (table 4) When only the second control module 230 is connected to the external network, the first control module 220 may send a notification to initiate the network sharing function to the second control module 230, and the second control module 230 initiates the network sharing according to the startup notification information. Features. For the case where the first control module 220 and the second control module 230 shown in Table 3 are connected to the external network, reference may be made to the foregoing description, and details are not described herein. Certainly, the control module in the electronic device 200 is not limited to two, and may have any number. The manner of adding the control module to the network and sharing the network is similar; the number of interfaces of the network expansion module 210 can be set as needed, of course, Other devices that need to access the Internet can be connected to the shared network through the network extension module 210.
针对前述电子设备,本发明还提出了网络共享的方法,如图3所示,包括以下步骤:For the foregoing electronic device, the present invention also proposes a method for network sharing, as shown in FIG. 3, including the following steps:
S310:当检测到通知外部网络接入或断开的变更信息时,判断当前是否仅一个网卡模块接入外部网络;S310: When detecting the change information that informs the external network of access or disconnection, determining whether only one network card module is currently connected to the external network;
S320:若当前仅一个网卡模块接入外部网络,则控制该网卡模块所在的控制模块启动网络共享功能。S320: If only one NIC module is currently connected to the external network, the control module where the NIC module is controlled starts the network sharing function.
进一步的,所述判断当前是否仅一个网卡模块接入外部网络的步骤之后,还包括:Further, after the step of determining whether only one network card module is currently connected to the external network, the method further includes:
若当前一个网卡模块接入第一外部网络,另一网卡模块接入第二外部网络,则对所述第 一外部网络与第二外部网络的网络性能进行比较,根据比较结果判断是否重新配置网络共享功能;If the current NIC module accesses the first external network and the other NIC module accesses the second external network, Comparing the network performance of an external network with the second external network, and determining whether to reconfigure the network sharing function according to the comparison result;
其中,网络性能与是否重新配置网络共享功能的关系包括:Among them, the relationship between network performance and whether to reconfigure the network sharing function includes:
当第一外部网络的带宽大于第二外部网络的带宽时,由所述第一控制模块启动网络共享功能;When the bandwidth of the first external network is greater than the bandwidth of the second external network, the network sharing function is initiated by the first control module;
当第一外部网络的带宽小于第二外部网络的带宽时,由所述第二控制模块启动网络共享功能。When the bandwidth of the first external network is smaller than the bandwidth of the second external network, the network sharing function is initiated by the second control module.
上述方法的实现过程具体详见上述电子设备中对应模块的实现过程,在此不再赘述。The implementation process of the foregoing method is specifically described in the implementation process of the corresponding module in the foregoing electronic device, and details are not described herein again.
为了便于理解本方法的流程,接下来以2个具体实例进行描述,如图4所示。In order to facilitate the understanding of the flow of the method, the following is described in two specific examples, as shown in FIG.
S410:检测通知外部网络接入或断开的变更信息,根据该变更信息更新网络连接状态表,并统计当前接入外部网络的网卡模块的数量;当接入外部网络的网卡模块数量为0时,转步骤S420;当接入外部网络的网卡模块数量为1时,转步骤S430;当接入外部网络的网卡模块数量大于1时,转步骤S440;S410: Detecting the change information of the external network access or disconnection, updating the network connection status table according to the change information, and counting the number of network card modules currently accessing the external network; when the number of network card modules accessing the external network is 0 Go to step S420; when the number of network card modules accessing the external network is 1, go to step S430; when the number of network card modules accessing the external network is greater than 1, go to step S440;
S420:不开启网络共享功能;此时可能是原本接入的一个外部网络断开了;当然,在电子设备启动之后、接入外部网络之前,也处于不开启网络共享功能的状态;S420: The network sharing function is not enabled; at this time, an external network that was originally accessed may be disconnected; of course, after the electronic device is started and before being connected to the external network, the network sharing function is not turned on;
S430:由当前接入外部网络的网卡模块启动网络共享功能;可能是有一个网卡模块接入了外部网络;也可能是从其它网卡模块断开了外部网络,变成仅一个网卡模块接入外部网络;S430: The network sharing function is started by the network card module currently accessing the external network; there may be a network card module connected to the external network; or the external network may be disconnected from other network card modules, and only one network card module is connected to the external network. The internet;
S440:判断是否重新配置网络共享功能;若否,则转步骤S450;若是,则转步骤S460;S440: determining whether to reconfigure the network sharing function; if not, proceeding to step S450; if yes, proceeding to step S460;
S450:不重新配置网络共享功能;例如,之前已经有一个网卡模块接入了外部网络、并启动网络共享功能,则可以不改变当前的网络共享状态,以避免其它模块因切换网络连接而导致的功能不稳定;后面接入外部网络的控制模块是通过外部网络还是共享网络进行网络通信,本发明对此不作限定;S450: The network sharing function is not reconfigured; for example, if a network card module has previously accessed the external network and started the network sharing function, the current network sharing status may not be changed to avoid other modules being caused by switching network connections. The function is unstable; the control module that accesses the external network later performs network communication through the external network or the shared network, which is not limited by the present invention;
S460:比较各网卡模块接入的外部网络性能;S460: Comparing external network performance accessed by each network card module;
S470:由接入的外部网络性能最好的网卡模块启动网络共享功能;从而提高电子设备的网络利用率。S470: The network sharing function is started by the network card module with the best performance of the accessed external network; thereby improving the network utilization of the electronic device.
与前述网络共享方法的实施例相对应,本发明还提供了网络共享装置的实施例。Corresponding to the foregoing embodiment of the network sharing method, the present invention also provides an embodiment of a network sharing device.
请参考图5,一种网络共享装置500,包括: Referring to FIG. 5, a network sharing apparatus 500 includes:
判断模块510,用于当检测到通知外部网络接入或断开的变更信息时,判断当前是否仅一个网卡模块接入外部网络;The determining module 510 is configured to determine, when the change information of the external network access or disconnection is detected, whether only one network card module is currently connected to the external network;
共享模块520,用于若当前仅一个网卡模块接入外部网络,则控制该网卡模块所在的控制模块启动网络共享功能。The sharing module 520 is configured to control a network sharing function of the control module where the network card module is located if only one network card module is currently connected to the external network.
上述装置中各个单元的功能和作用的实现过程具体详见上述方法中对应步骤的实现过程,在此不再赘述。The implementation process of the function and the function of each unit in the foregoing device is specifically described in the implementation process of the corresponding steps in the foregoing method, and details are not described herein again.
对于装置实施例而言,由于其基本对应于方法实施例,所以相关之处参见方法实施例的部分说明即可。以上所描述的装置实施例仅仅是示意性的,其中所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本发明方案的目的。本领域普通技术人员在不付出创造性劳动的情况下,即可以理解并实施。For the device embodiment, since it basically corresponds to the method embodiment, reference may be made to the partial description of the method embodiment. The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, ie may be located A place, or it can be distributed to multiple network units. Some or all of the modules may be selected according to actual needs to achieve the objectives of the solution of the present invention. Those of ordinary skill in the art can understand and implement without any creative effort.
以上所述仅为本发明的较佳实施例而已,并不用以限制本发明,凡在本发明的精神和原则之内,所做的任何修改、等同替换、改进等,均应包含在本发明保护的范围之内。 The above is only the preferred embodiment of the present invention, and is not intended to limit the present invention. Any modifications, equivalents, improvements, etc., which are made within the spirit and principles of the present invention, should be included in the present invention. Within the scope of protection.

Claims (10)

  1. 一种电子设备,其特征在于,包括:网络扩展模块、搭载有第一操作系统的第一控制模块、搭载有第二操作系统的第二控制模块,所述网络扩展模块包括第一接口和第二接口,所述第一控制模块包含第一网卡模块和第三网卡模块,所述第二控制模块包含第二网卡模块;An electronic device, comprising: a network expansion module, a first control module equipped with a first operating system, and a second control module equipped with a second operating system, wherein the network expansion module includes a first interface and a a second interface, the first control module includes a first network card module and a third network card module, and the second control module includes a second network card module;
    所述第一网卡模块用于连接第一接口,当所述第三网卡模块接入外部网络时,所述第一控制模块用于启动网络共享及动态主机配置协议DHCP服务,通过所述第一网卡模块生成共享网络;The first network card module is configured to connect to the first interface, and when the third network card module is connected to the external network, the first control module is configured to start a network sharing and a dynamic host configuration protocol DHCP service, by using the first The network card module generates a shared network;
    所述第二网卡模块用于连接第二接口,所述第二控制模块用于通过所述第二网卡模块、网络扩展模块接入共享网络。The second network card module is configured to connect to the second interface, and the second control module is configured to access the shared network by using the second network card module and the network expansion module.
  2. 如权利要求1所述的电子设备,其特征在于,所述第二控制模块还包括第四网卡模块,所述第四网卡模块用于连接外部网络,所述第二网卡模块用于生成共享网络。The electronic device according to claim 1, wherein the second control module further comprises a fourth network card module, wherein the fourth network card module is configured to connect to an external network, and the second network card module is configured to generate a shared network. .
  3. 如权利要求2所述的电子设备,其特征在于,当所述第三网卡模块接入第一外部网络,且第四网卡模块接入第二外部网络时,所述第一控制模块用于对第一外部网络与第二外部网络的网络性能进行比较,根据比较结果判断是否重新配置网络共享功能。The electronic device according to claim 2, wherein when the third network card module is connected to the first external network, and the fourth network card module is connected to the second external network, the first control module is configured to The first external network is compared with the network performance of the second external network, and it is determined according to the comparison result whether to reconfigure the network sharing function.
  4. 如权利要求3所述的电子设备,其特征在于,网络性能与是否重新配置网络共享功能的关系包括:The electronic device of claim 3, wherein the relationship between network performance and whether to reconfigure the network sharing function comprises:
    当第一外部网络的带宽大于第二外部网络的带宽时,由所述第一控制模块启动网络共享功能;When the bandwidth of the first external network is greater than the bandwidth of the second external network, the network sharing function is initiated by the first control module;
    当第一外部网络的带宽小于第二外部网络的带宽时,由所述第二控制模块启动网络共享功能。When the bandwidth of the first external network is smaller than the bandwidth of the second external network, the network sharing function is initiated by the second control module.
  5. 如权利要求2所述的电子设备,其特征在于,当所述第四网卡模块接入外部网络时,若所述第一控制模块已生成共享网络,则所述第二控制模块用于通过所述第四网卡模块接入外部网络,或通过所述第二网卡模块接入共享网络。The electronic device according to claim 2, wherein when the fourth network card module accesses an external network, if the first control module has generated a shared network, the second control module is configured to pass the The fourth network card module is connected to the external network, or accesses the shared network through the second network card module.
  6. 如权利要求2至5中任一项所述的电子设备,其特征在于,所述第三网卡模块和第四网卡模块用于在接入或断开与外部网络的连接时,发送用于通知网络连接发生变化的变更信息至所述第一控制模块;The electronic device according to any one of claims 2 to 5, wherein the third network card module and the fourth network card module are configured to send a notification when accessing or disconnecting from an external network Change information of the network connection change to the first control module;
    所述第一控制模块用于根据变更信息判断是否重新配置网络共享功能。The first control module is configured to determine, according to the change information, whether to reconfigure the network sharing function.
  7. 如权利要求6所述的电子设备,其特征在于,所述第一控制模块用于根据所述变更信息更新网络连接状态信息;The electronic device according to claim 6, wherein the first control module is configured to update network connection state information according to the change information;
    当更新后的网络连接状态信息中仅第一控制模块接入外部网络时,所述第一控制模块用于启动网络共享功能; The first control module is configured to start a network sharing function when only the first control module accesses the external network in the updated network connection status information;
    当更新后的网络连接状态信息中仅第二控制模块接入外部网络时,所述第一控制模块用于发送通知启动网络共享功能的启动通知信息至所述第二控制模块,所述第二控制模块用于根据所述启动通知信息启动网络共享功能。When the second control module accesses the external network in the updated network connection status information, the first control module is configured to send a notification that initiates the network sharing function to the second control module, the second The control module is configured to start a network sharing function according to the startup notification information.
  8. 一种应用于权利要求1-7所述电子设备中的网络共享方法,其特征在于,包括以下步骤:A network sharing method for use in an electronic device according to any one of claims 1-7, characterized in that it comprises the following steps:
    当检测到通知外部网络接入或断开的变更信息时,判断当前是否仅一个网卡模块接入外部网络;When it is detected that the external network access or disconnection is notified, it is determined whether only one NIC module is currently connected to the external network;
    若当前仅一个网卡模块接入外部网络,则控制该网卡模块所在的控制模块启动网络共享功能。If only one NIC module is currently connected to the external network, the control module that controls the NIC module starts the network sharing function.
  9. 如权利要求8所述的网络共享方法,其特征在于,所述判断当前是否仅一个网卡模块接入外部网络的步骤之后,还包括:The network sharing method according to claim 8, wherein the step of determining whether the current network card module is connected to the external network is further included:
    若当前一个网卡模块接入第一外部网络,另一网卡模块接入第二外部网络,则对所述第一外部网络与第二外部网络的网络性能进行比较,根据比较结果判断是否重新配置网络共享功能;If the current NIC module accesses the first external network and the other NIC module accesses the second external network, compare the network performance of the first external network with the second external network, and determine whether to reconfigure the network according to the comparison result. Sharing function
    其中,网络性能与是否重新配置网络共享功能的关系包括:Among them, the relationship between network performance and whether to reconfigure the network sharing function includes:
    当第一外部网络的带宽大于第二外部网络的带宽时,由所述第一控制模块启动网络共享功能;When the bandwidth of the first external network is greater than the bandwidth of the second external network, the network sharing function is initiated by the first control module;
    当第一外部网络的带宽小于第二外部网络的带宽时,由所述第二控制模块启动网络共享功能。When the bandwidth of the first external network is smaller than the bandwidth of the second external network, the network sharing function is initiated by the second control module.
  10. 一种网络共享装置,其特征在于,包括:A network sharing device, comprising:
    判断模块,用于当检测到通知外部网络接入或断开的变更信息时,判断当前是否仅一个网卡模块接入外部网络;a judging module, configured to determine whether only one NIC module is currently connected to the external network when detecting the change information that informs the external network of access or disconnection;
    共享模块,用于若当前仅一个网卡模块接入外部网络,则控制该网卡模块所在的控制模块启动网络共享功能。 The sharing module is configured to control the network sharing function of the control module where the NIC module is located if only one NIC module is currently connected to the external network.
PCT/CN2017/116078 2017-10-13 2017-12-14 Electronic device and network sharing method and device WO2019071800A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710952083.8 2017-10-13
CN201710952083.8A CN107682162A (en) 2017-10-13 2017-10-13 Electronic equipment, network share method and device

Publications (1)

Publication Number Publication Date
WO2019071800A1 true WO2019071800A1 (en) 2019-04-18

Family

ID=61140760

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/116078 WO2019071800A1 (en) 2017-10-13 2017-12-14 Electronic device and network sharing method and device

Country Status (2)

Country Link
CN (1) CN107682162A (en)
WO (1) WO2019071800A1 (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108494895B (en) * 2018-04-04 2020-01-10 广州视源电子科技股份有限公司 Interactive intelligent panel, network domain conflict control method, device and medium
CN109039849B (en) * 2018-08-16 2021-07-09 杭州楷知科技有限公司 Multi-device common networking method, storage medium and multi-device all-in-one machine
CN111405367B (en) * 2020-03-11 2022-04-05 海信视像科技股份有限公司 Method for network sharing of system component based on multi-network switching scene and display equipment
CN113839826B (en) * 2020-06-23 2024-04-30 中兴通讯股份有限公司 Method and device for detecting windows terminal and computer readable storage medium
CN113099517B (en) * 2021-06-09 2021-08-31 广州朗国电子科技有限公司 Network sharing method and device of all-in-one conference machine and all-in-one conference machine

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070002826A1 (en) * 2005-06-29 2007-01-04 Bennett Matthew J System implementing shared interface for network link aggregation and system management
CN102685924A (en) * 2011-03-18 2012-09-19 联想(北京)有限公司 Terminal communication unit setting method and device of terminal, and terminal
CN103888337A (en) * 2014-02-28 2014-06-25 广州视睿电子科技有限公司 Networking method of multi-system all-in-one machine and multi-system all-in-one machine
CN104978174A (en) * 2014-04-08 2015-10-14 华为技术有限公司 Method and system for switching network cards in plurality of operating systems
CN105100135A (en) * 2014-04-29 2015-11-25 小米科技有限责任公司 Network sharing setting method and device

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1503286B1 (en) * 2003-07-30 2014-09-03 Jaluna SA Multiple operating system networking
US7876765B2 (en) * 2006-09-29 2011-01-25 Intel Corporation Method for supporting IP network interconnectivity between partitions in a virtualized environment
TWI352909B (en) * 2007-09-05 2011-11-21 Htc Corp Method and system for supporting network sharing a
US8739177B2 (en) * 2010-06-21 2014-05-27 Intel Corporation Method for network interface sharing among multiple virtual machines
CN106211282A (en) * 2016-07-26 2016-12-07 广州视源电子科技股份有限公司 Many boards connect the methods, devices and systems of Wi Fi

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070002826A1 (en) * 2005-06-29 2007-01-04 Bennett Matthew J System implementing shared interface for network link aggregation and system management
CN102685924A (en) * 2011-03-18 2012-09-19 联想(北京)有限公司 Terminal communication unit setting method and device of terminal, and terminal
CN103888337A (en) * 2014-02-28 2014-06-25 广州视睿电子科技有限公司 Networking method of multi-system all-in-one machine and multi-system all-in-one machine
CN104978174A (en) * 2014-04-08 2015-10-14 华为技术有限公司 Method and system for switching network cards in plurality of operating systems
CN105100135A (en) * 2014-04-29 2015-11-25 小米科技有限责任公司 Network sharing setting method and device

Also Published As

Publication number Publication date
CN107682162A (en) 2018-02-09

Similar Documents

Publication Publication Date Title
WO2019071800A1 (en) Electronic device and network sharing method and device
US10715411B1 (en) Altering networking switch priority responsive to compute node fitness
TWI382712B (en) Apparatus, method, system, and computer-readable medium to provide group power management of network devices
US10567308B1 (en) Virtual machine virtual fabric login system
US7969989B2 (en) High performance ethernet networking utilizing existing fibre channel arbitrated loop HBA technology
US8776080B2 (en) Management component transport protocol interconnect filtering and routing
US8085695B2 (en) Bootstrapping devices using automatic configuration services
US20130179593A1 (en) Cloud computing controlled gateway for communication networks
US20080043769A1 (en) Clustering system and system management architecture thereof
US20080222151A1 (en) Information Handling System Employing Unified Management Bus
US20180131637A1 (en) Gateway/standalone fibre channel switch system
US11012304B1 (en) Networking device replacement system
JP6665190B2 (en) Network sharing implementation method and apparatus
US10931601B2 (en) Method and apparatus for conditional broadcasting of network configuration data
US9014041B2 (en) Method and system for configuring a device that has failed to obtain network address
JP2006129355A (en) Information processor, data transmission system, data transmission method, and program for performing the data transmission method on the information processor
CN106101297A (en) A kind of message answer method and device
US10778574B2 (en) Smart network interface peripheral cards
TWI498037B (en) Service information managing method and service information managing system
CN109076059B (en) Inter-device communication
TWI799179B (en) Computing systems and methods for management of a network device
US11388061B2 (en) Automated OS networking configuration system
US20100172266A1 (en) Dynamic network configuration for a network device
US10037257B1 (en) Examining local hardware using a location-aware peripheral device
US10078615B1 (en) Ethernet controller with integrated multi-media payload de-framer and mapper

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17928352

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17928352

Country of ref document: EP

Kind code of ref document: A1

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 16/10/2020)

122 Ep: pct application non-entry in european phase

Ref document number: 17928352

Country of ref document: EP

Kind code of ref document: A1