CN117615201A - Terminal equipment and wired network sharing method - Google Patents

Terminal equipment and wired network sharing method Download PDF

Info

Publication number
CN117615201A
CN117615201A CN202310962088.4A CN202310962088A CN117615201A CN 117615201 A CN117615201 A CN 117615201A CN 202310962088 A CN202310962088 A CN 202310962088A CN 117615201 A CN117615201 A CN 117615201A
Authority
CN
China
Prior art keywords
network
sharing
port
terminal device
network port
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
CN202310962088.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.)
Hisense Visual Technology Co Ltd
Original Assignee
Hisense Visual 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 Hisense Visual Technology Co Ltd filed Critical Hisense Visual Technology Co Ltd
Priority to CN202310962088.4A priority Critical patent/CN117615201A/en
Publication of CN117615201A publication Critical patent/CN117615201A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/436Interfacing a local distribution network, e.g. communicating with another STB or one or more peripheral devices inside the home
    • H04N21/43615Interfacing a Home Network, e.g. for connecting the client to a plurality of peripherals
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/442Monitoring of processes or resources, e.g. detecting the failure of a recording device, monitoring the downstream bandwidth, the number of times a movie has been viewed, the storage space available from the internal hard disk
    • H04N21/44227Monitoring of local network, e.g. connection or bandwidth variations; Detecting new devices in the local network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/442Monitoring of processes or resources, e.g. detecting the failure of a recording device, monitoring the downstream bandwidth, the number of times a movie has been viewed, the storage space available from the internal hard disk
    • H04N21/4424Monitoring of the internal components or processes of the client device, e.g. CPU or memory load, processing speed, timer, counter or percentage of the hard disk space used

Abstract

The method can respond to a starting event of the terminal equipment, monitor the node state of a network port, and set a network port mode of the network port as a server mode when the node state is a connected state, wherein the server mode is used for representing that the network port is an outlet of network sharing. Setting network sharing parameters for external devices connected with the network ports, and sharing a network to the external devices based on the network sharing parameters. The method can automatically perform wired network sharing after starting up, establish a channel for network sharing between the terminal equipment and the external equipment, monitor the change of the uplink network, and establish a data forwarding path between the external equipment and the uplink network after monitoring that the terminal equipment is connected to the uplink network, thereby realizing network use of the external equipment and solving the problem that the uplink network is required to be connected first and then shared when the network is shared.

Description

Terminal equipment and wired network sharing method
Technical Field
The present disclosure relates to the field of network sharing technologies, and in particular, to a terminal device and a wired network sharing method.
Background
The terminal device refers to a device that inputs a program and data to a computer or receives a result of processing output from the computer via a communication facility. The intelligent advertisement screen can be terminal equipment such as an intelligent television, a mobile phone, a communication terminal, an intelligent advertisement screen, a projector and the like. Taking intelligent electricity as an example, the intelligent television is based on the Internet application technology, has an open operating system and a chip, has an open application platform, can realize a bidirectional man-machine interaction function, and is a television product integrating multiple functions of video, entertainment, data and the like, and the intelligent television is used for meeting the diversified and personalized requirements of users.
The terminal equipment can be connected with the network in a wired network connection mode or a wireless network connection mode to realize the internet function. In order to improve the user experience, the terminal device may support network sharing functions, including bluetooth, hot spot, usb, wired network sharing form types. The user can share the network from the terminal device to other devices through the network sharing form, so that the network use of the other devices is realized.
However, when implementing network sharing, the user is required to connect the terminal device to the local network first, and then check whether the device requiring network sharing is available after the connection is successful, and then perform network sharing if the device requiring network sharing is available.
Disclosure of Invention
The application provides a terminal device and a wired network sharing method, which are used for solving the problem that an uplink network is required to be connected first and then shared when a network is shared.
In a first aspect, some embodiments of the present application provide a terminal device, including: and a network port and a controller. The network port is configured to establish a connection relationship with external equipment; the controller is configured to perform the following program steps:
responding to a starting event of the terminal equipment, and monitoring the node state of the network port;
when the node state is a connected state, setting a network port mode of the network port as a server mode, wherein the server mode is used for representing that the network port is an outlet of network sharing;
setting network sharing parameters for external devices connected with the network port, and sharing a network to the external devices based on the network sharing parameters.
In a second aspect, some embodiments of the present application provide a wired network sharing method, which is applied to the terminal device, where the wired network sharing method includes the following steps:
responding to a starting event of the terminal equipment, monitoring the node state of a network port, and establishing a connection relationship between the network port and external equipment;
When the node state is a connected state, setting a network port mode of the network port as a server mode, wherein the server mode is used for representing that the network port is an outlet of network sharing;
setting network sharing parameters for external devices connected with the network port, and sharing a network to the external devices based on the network sharing parameters.
As can be seen from the above technical solutions, the terminal device and the wired network sharing method provided by the foregoing embodiments may monitor a node state of a network port in response to a power-on event of the terminal device, and set a network port mode of the network port to be a server mode when the node state is a connected state, where the server mode is used to characterize that the network port is an outlet of network sharing. Setting network sharing parameters for external devices connected with the network ports, and sharing a network to the external devices based on the network sharing parameters. The method can automatically perform wired network sharing after starting up, establish a channel for network sharing between the terminal equipment and the external equipment, monitor the change of the uplink network, and establish a data forwarding path between the external equipment and the uplink network after monitoring that the terminal equipment is connected to the uplink network, thereby realizing network use of the external equipment and solving the problem that the uplink network is required to be connected first and then shared when the network is shared.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic diagram of an operation scenario between a terminal device and a control device provided in some embodiments of the present application;
fig. 2 is a schematic hardware configuration diagram of a control device according to some embodiments of the present application;
fig. 3 is a schematic hardware configuration diagram of a terminal device according to some embodiments of the present application;
fig. 4 is a schematic software configuration diagram of a terminal device according to some embodiments of the present application;
fig. 5 is a schematic diagram of network sharing of a terminal device according to some embodiments of the present application;
FIG. 6 is a flow chart of network sharing according to some embodiments of the present application;
fig. 7 is a schematic diagram of a usage scenario of a wired network sharing method according to some embodiments of the present application;
fig. 8 is a flowchart illustrating a wired network sharing method according to some embodiments of the present disclosure;
FIG. 9 is an interface diagram of a network sharing interface provided in some embodiments of the present application;
fig. 10 is a flowchart illustrating a setting a sharing mode of a network port according to some embodiments of the present application;
FIG. 11 is a schematic flow chart of sharing a wired network in the scenario of FIG. 7 according to some embodiments of the present application;
fig. 12 is a flowchart illustrating performing network sharing according to some embodiments of the present application.
Detailed Description
For the purposes of making the objects, technical solutions and advantages of the exemplary embodiments of the present application more apparent, the technical solutions in the exemplary embodiments of the present application will be clearly and completely described below with reference to the drawings in the exemplary embodiments of the present application, and it is apparent that the described exemplary embodiments are only some embodiments of the present application, but not all embodiments.
All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present application, are intended to be within the scope of the present application based on the exemplary embodiments shown in the present application. Furthermore, while the disclosure has been presented in terms of an exemplary embodiment or embodiments, it should be understood that various aspects of the disclosure can be practiced separately from the disclosure in a complete subject matter.
It should be understood that the terms "first," "second," "third," and the like in the description and in the claims and in the above-described figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate, such as where appropriate, for example, implementations other than those illustrated or described in accordance with embodiments of the present application.
Furthermore, the terms "comprise" and "have," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a product or apparatus that comprises a list of elements is not necessarily limited to those elements expressly listed, but may include other elements not expressly listed or inherent to such product or apparatus.
The terminal device provided in the embodiment of the application may have various implementation forms, for example, may be a television, an intelligent television, a laser projection device, a display (monitor), an electronic whiteboard (electronic bulletin board), an electronic desktop (electronic table), and the like. Fig. 1 and fig. 3 are specific embodiments of a terminal device of the present application.
Fig. 1 is a schematic diagram of an operation scenario between a terminal device and a control apparatus according to an embodiment. As shown in fig. 1, a user may operate the terminal device 200 through the smart device 300 or the control apparatus 100.
In some embodiments, the control device 100 may be a remote controller, and the communication between the remote controller and the terminal device includes infrared protocol communication or bluetooth protocol communication, and other short-range communication modes, and the terminal device 200 is controlled by a wireless or wired mode. The user may control the terminal device 200 by inputting user instructions through keys on a remote controller, voice input, control panel input, etc.
In some embodiments, the smart device 300 (e.g., mobile terminal, tablet, computer, notebook, etc.) may also be used to control the terminal device 200. For example, the terminal device 200 is controlled using an application running on the smart device.
In some embodiments, the terminal device may not receive the instruction using the above-described smart device or control device, but receive the control of the user through touch or gesture, or the like.
In some embodiments, the terminal device 200 may also perform control in a manner other than the control apparatus 100 and the smart device 300, for example, the voice command control of the user may be directly received through a module configured inside the terminal device 200 for acquiring a voice command, or the voice command control of the user may be received through a voice control apparatus configured outside the terminal device 200.
In some embodiments, the terminal device 200 is also in data communication with the server 400. The terminal device 200 may be permitted to make communication connection through a Local Area Network (LAN), a Wireless Local Area Network (WLAN), and other networks. The server 400 may provide various contents and interactions to the terminal device 200. The server 400 may be a cluster, or may be multiple clusters, and may include one or more types of servers.
Fig. 2 exemplarily shows a block diagram of a configuration of the control apparatus 100 in accordance with an exemplary embodiment. As shown in fig. 2, the control device 100 includes a controller 110, a communication interface 130, a user input/output interface 140, a memory, and a power supply. The control apparatus 100 may receive an input operation instruction of a user and convert the operation instruction into an instruction recognizable and responsive to the terminal device 200, and may function as an interaction between the user and the terminal device 200.
As shown in fig. 3, the terminal apparatus 200 includes at least one of a modem 210, a communicator 220, a detector 230, an external device interface 240, a controller 250, a display 260, an audio output interface 270, a memory, a power supply, and a user interface.
In some embodiments the controller includes a processor, a video processor, an audio processor, a graphics processor, RAM, ROM, a first interface for input/output to an nth interface.
The display 260 includes a display screen component for presenting a picture, and a driving component for driving an image display, a component for receiving an image signal from the controller output, displaying video content, image content, and a menu manipulation interface, and a user manipulation UI interface.
The display 260 may be a liquid crystal display, an OLED display, a projection device, or a projection screen.
The communicator 220 is a component for communicating with external devices or servers according to various communication protocol types. For example: the communicator may include at least one of a Wifi module, a bluetooth module, a wired ethernet module, or other network communication protocol chip or a near field communication protocol chip, and an infrared receiver. The terminal device 200 may establish transmission and reception of control signals and data signals with the control apparatus 100 or the server 400 through the communicator 220.
A user interface, which may be used to receive control signals from the control device 100 (e.g., an infrared remote control, etc.).
The detector 230 is used to collect signals of the external environment or interaction with the outside. For example, detector 230 includes a light receiver, a sensor for capturing the intensity of ambient light; alternatively, the detector 230 includes an image collector such as a camera, which may be used to collect external environmental scenes, user attributes, or user interaction gestures, or alternatively, the detector 230 includes a sound collector such as a microphone, or the like, which is used to receive external sounds.
The external device interface 240 may include, but is not limited to, the following: high Definition Multimedia Interface (HDMI), analog or data high definition component input interface (component), composite video input interface (CVBS), USB input interface (USB), RGB port, etc. The input/output interface may be a composite input/output interface formed by a plurality of interfaces.
The modem 210 receives broadcast television signals through a wired or wireless reception manner, and demodulates audio and video signals, such as EPG data signals, from a plurality of wireless or wired broadcast television signals.
In some embodiments, the controller 250 and the modem 210 may be located in separate devices, i.e., the modem 210 may also be located in an external device to the main device in which the controller 250 is located, such as an external set-top box or the like.
The controller 250 controls the operation of the terminal device and responds to the user's operations through various software control programs stored in the memory. The controller 250 controls the overall operation of the terminal device 200. For example: in response to receiving a user command to select a UI object to be displayed on the display 260, the controller 250 may perform an operation related to the object selected by the user command.
In some embodiments the controller includes at least one of a central processing unit (Central Processing Unit, CPU), video processor, audio processor, graphics processor (Graphics Processing Unit, GPU), RAM (Random Access Memory, RAM), ROM (Read-Only Memory, ROM), first to nth interfaces for input/output, a communication Bus (Bus), etc.
The user may input a user command through a Graphical User Interface (GUI) displayed on the display 260, and the user input interface receives the user input command through the Graphical User Interface (GUI). Alternatively, the user may input the user command by inputting a specific sound or gesture, and the user input interface recognizes the sound or gesture through the sensor to receive the user input command.
A "user interface" is a media interface for interaction and exchange of information between an application or operating system and a user, which enables conversion between an internal form of information and a user-acceptable form. A commonly used presentation form of the user interface is a graphical user interface (Graphic User Interface, GUI), which refers to a user interface related to computer operations that is displayed in a graphical manner. It may be an interface element such as an icon, a window, a control, etc. displayed in a display screen of the electronic device, where the control may include a visual interface element such as an icon, a button, a menu, a tab, a text box, a dialog box, a status bar, a navigation bar, a Widget, etc.
As shown in fig. 4, in some embodiments, the system is divided into four layers, from top to bottom, an application layer (application layer), an application framework layer (Application Framework layer), a An Zhuoyun row (Android run) and a system library layer (system runtime layer), and a kernel layer, respectively.
In some embodiments, at least one application program is running in the application program layer, and these application programs may be a Window (Window) program of an operating system, a system setting program, a clock program, or the like; or may be an application developed by a third party developer. In particular implementations, the application packages in the application layer are not limited to the above examples.
The framework layer provides an application programming interface (application programming interface, API) and programming framework for the application. The application framework layer includes a number of predefined functions. The application framework layer corresponds to a processing center that decides to let the applications in the application layer act. Through the API interface, the application program can access the resources in the system and acquire the services of the system in the execution.
As shown in fig. 4, the application framework layer in the embodiment of the present application includes a manager (manager), a Content Provider (Content Provider), and the like, where the manager includes at least one of the following modules: an Activity Manager (Activity Manager) is used to interact with all activities that are running in the system; a Location Manager (Location Manager) is used to provide system services or applications with access to system Location services; a Package Manager (Package Manager) for retrieving various information about an application Package currently installed on the device; a notification manager (Notification Manager) for controlling the display and clearing of notification messages; a Window Manager (Window Manager) is used to manage bracketing icons, windows, toolbars, wallpaper, and desktop components on the user interface.
In some embodiments, the activity manager is used to manage the lifecycle of the individual applications as well as the usual navigation rollback functions, such as controlling the exit, opening, fallback, etc. of the applications. The window manager is used for managing all window programs, such as obtaining the size of the display screen, judging whether a status bar exists or not, locking the screen, intercepting the screen, controlling the change of the display window (for example, reducing the display window to display, dithering display, distorting display, etc.), etc.
In some embodiments, the system runtime layer provides support for the upper layer, the framework layer, and when the framework layer is in use, the android operating system runs the C/C++ libraries contained in the system runtime layer to implement the functions to be implemented by the framework layer.
In some embodiments, the kernel layer is a layer between hardware and software. As shown in fig. 4, the kernel layer contains at least one of the following drivers: audio drive, display drive, bluetooth drive, camera drive, WIFI drive, USB drive, HDMI drive, sensor drive (e.g., fingerprint sensor, temperature sensor, pressure sensor, etc.), and power supply drive, etc.
In some embodiments, the terminal device 200 has a network surfing function, so that a user can use the terminal device 200 to surf the internet, thereby browsing various media assets in the network, for example, watching media asset resources in the network, and the like, and also can realize a network surfing function such as video chat.
In some embodiments, the terminal device 200 may connect to the network by way of a wired connection network. The terminal device 200 may be provided with a network interface through which one end of a network cable may be connected, and the other end of the network cable may be connected to an electronic device that provides a network, such as a router, to implement wired connection between the terminal device 200 and the electronic device that provides a network, such as a router, so as to connect the networks provided by these electronic devices.
In some embodiments, the terminal device 200 may connect to the network in the form of a wireless connection network. The terminal device 200 may be connected wirelessly with an electronic device that provides a network, such as a router. For example, the router device may provide WiFi to which the terminal device may connect to the network.
The terminal device 200 may also be provided with a communicator 220, where the communicator 220 may enable the terminal device 200 to perform communication connection with other electronic devices, so as to implement operations such as data interaction. The communicator 220 may include a bluetooth module for controlling the terminal device 200 to turn on and off a bluetooth function. The communicator 220 may further include a WiFi module for WiFi connection, an infrared receiving module for receiving infrared signals, and the like. Based on the communicator 220, the terminal device can make various forms of communication connection with the electronic device, including bluetooth communication connection, infrared connection, wiFi connection, and the like.
In some embodiments, as shown in fig. 5, the terminal device 200 has a network sharing function, including bluetooth, hotspot, us b, wired network sharing form types. The user may share the network from the terminal device 200 to other devices through the above-described network sharing form, thereby realizing network use of the other devices. That is, after the terminal device 200 is connected to the internet through the data network, the internet access service of the terminal device 200 is shared with other devices (such as the game device, the mobile phone terminal, the computer and the like shown in fig. 5) through the downlink function (such as WiFi, bluetooth, hot spot and USB port) of the terminal device 200, so that the other devices can access the internet.
For example, network sharing is achieved through a WiFi hotspot function of the terminal device 200, the terminal device 200 accesses the internet through a traffic service of a mobile operator, and simultaneously, a wireless AP function is opened, so that surrounding devices connect to the terminal device 200 through WiFi, thereby sharing the internet access of the terminal device 200. As another example, the terminal device 200 and other devices share the network via bluetooth through a bluetooth connection.
Fig. 6 is a schematic flow chart of network sharing according to an embodiment of the present application. Network sharing is performed for the terminal device 200 that already has a network connection. First, the user enters the setting interface by clicking on the "setting" option provided by the terminal device 200, and opens the network sharing by clicking on the "network sharing" option, and starts the network sharing service of the terminal device 200, i.e., the IP Server, allowing other devices to connect and use the shared network connection. And (5) reconfiguring and starting a dynamic host configuration protocol Server (Dynamic Host Configuration Protocol, DHCP Server), wherein the DHCP Server is a Server for distributing IP addresses and other network configuration information, when the DHCP Server is configured, the IP addresses and the subnet masks of the DHCP Server are set, and the DHCP Server is configured and started, so that other devices can acquire the required information such as the IP addresses, the subnet masks and the like through the DHCP Server. And then acquiring an upstream network card, wherein the upstream network card refers to a network card interface connected to the Internet or other networks so as to correctly route data traffic in the network sharing process. An IP forwarding Service and a domain name Service (Domain Name Service) are reconfigured and started, wherein IP forwarding refers to a function of forwarding a data packet from one network interface to another network interface in a shared network, and by configuring and starting the IP forwarding Service, data in the shared network can be forwarded correctly. And finally, configuring the ip rule and the ip tables, wherein the ip rule and the ip tables are tools for setting network rules and configuring firewalls, and the rules of the ip rule and the ip tables can be configured according to actual requirements so as to realize control and security of network traffic.
Based on the above network sharing method, for the terminal device 200 having a network connection, other devices may be connected to the shared network of the terminal device 200 in a wireless or wired manner to obtain rights to access the internet. However, when implementing network sharing, the user is required to connect the terminal device 200 to the local network first, and then check whether the device requiring network sharing is available after the connection is successful, and then perform network sharing if available. That is, the terminal device 200 may be interconnected with other devices and share the network after accessing the internet. This way of requiring uplink network connection before sharing limits the use scenarios of network sharing. For example, the user may just set up a path when sharing the network, that is, the terminal device 200 may be connected to other devices without an uplink network connection.
In order to solve the problem of limited network sharing use, some embodiments of the present application further provide a wired network sharing method, which is applied to the terminal device 200, and after the terminal device 200 is powered on, the wired network sharing can be automatically performed, a channel for network sharing between the terminal device 200 and the external device is established, and uplink network changes are monitored, so as to implement network use of the external device. Wherein the terminal device 200 capable of applying the wired network sharing method includes: network portal and controller 250. The network port is configured to establish a connection with an external device, and the controller 250 is configured to execute the wired network sharing method.
Fig. 7 is a schematic diagram of a usage scenario of a wired network sharing method according to an embodiment of the present application. The terminal device 200 may connect to an Upstream Network (upflow Network) to achieve Network access. An Upstream Network (Upstream Network) refers to a direction in which data flows from a local Network to other Network nodes or a higher-level Network, and may refer to an electronic device such as a switch, a router, etc. connected to the local Network, and is responsible for transferring data to the other Network nodes or the higher-level Network. The uplink network includes a wired network and a wireless network, that is, the terminal device 200 may connect the networks in a wired connection network manner or a wireless connection network manner.
To connect to the network and to share the network, the terminal device 200 includes two network ports, an eth1 port and an eth0 port, respectively. The terminal device 200 may be connected to an electronic device that provides a network, such as a router, through an eth0 network port, and may also be connected to WiFi that is provided by an electronic device, such as a router, in a wireless manner, so as to implement connection to an uplink network. The eth1 network port is used for establishing a connection relationship with the external device, one end of the network cable can be connected through the eth1 network port, and the other end of the network cable can be connected with the external device at the same time, so that the wired connection between the terminal device 200 and the external device is realized.
The external device refers to a device of a shared network, and may be, for example, an open pluggable specification (Open Pluggable Specification, OPS) computer, a smart television, a laser projection device, a monitor (monitor), an electronic whiteboard (electronic bulletin board), and the like.
After the network cable of the external device is inserted into the eth1 network port, the terminal device 200 can be interconnected with the external device, a channel shared by the terminal device 200 and the external device network is established through the eth1 network port, and after the terminal device 200 is connected with the uplink network, the external device connected with the eth1 network port shares the network, so that the networking of the external device is realized. That is, after the external device is connected to the terminal device 200 through the eth1 network port in a wired manner, the external device can be connected to the terminal device 200, and there is no requirement for an uplink network of the terminal device 200, and the external device may be connected to the uplink network or not connected to the uplink network. And after the terminal equipment 200 is connected to the uplink network, the terminal equipment 200 can share the network with the external equipment, and the limitation that the uplink network is required to be connected first and then shared when the network is shared is broken.
It is to be understood that the number of eth1 ports is not limited to the number shown in fig. 7, and the terminal device 200 may determine the number of devices that the terminal device 200 can share the network according to the number of eth1 ports. And if the number of the eth1 network ports is 1, the number of the external devices corresponding to the shared network is 1. The number of the eth1 network ports is multiple, and the number of the external devices corresponding to the shared network is multiple.
As shown in fig. 8, fig. 8 is a flow chart of a wired network sharing method in an embodiment of the present application, which specifically includes the following contents:
s100: and responding to a starting event of the terminal equipment, and monitoring the node state of the network port.
The controller 250 of the terminal device 200 may receive various control instructions input by a user during use by the user, thereby controlling the overall operation of the display device 200. Wherein, different control instructions correspondingly have different functions. For example, the user may click on a "setup" option provided by the terminal device 200, invoking a setup interface. The setting interface comprises a network sharing option, and the user can click on the network sharing option to enter the network sharing interface shown in fig. 9. The network sharing interface includes network sharing modes such as bluetooth network sharing, USB network sharing, wired network sharing, etc., and the user can click on the corresponding option to control the terminal device 200 to execute network sharing based on the corresponding network sharing mode. The user clicks the "wired sharing network" option, and an instruction for performing wired network sharing may be input to the controller 250, and the controller 250 may control the terminal device 200 to perform the wired network sharing method provided in the embodiment of the present application in response to the instruction.
In order to reduce the user operation steps, the method for sharing the wired network provided in the present application may be automatically triggered and executed after the terminal device 200 is powered on, that is, after the terminal device 200 performs the power on operation, a power on event is triggered, and in response to the power on event, the controller 250 may control the terminal device 200 to execute the method for sharing the wired network. That is, the wired network sharing method provided in the embodiment of the present application does not need the user to click the switch of the "network sharing" option from the setting page or other application entries, nor does it need the connection triggering of the uplink network, and the wired network sharing can be automatically performed after the terminal device 200 is powered on.
The wired network sharing method provided in the embodiment of the present application may establish a channel for sharing a network between the terminal device 200 and an external device after the terminal device 200 is connected to the external device through a network port in a wired manner, and share the network with the external device after the terminal device 200 is connected to an uplink network. Accordingly, the controller 250 may monitor the node status of the network port, i.e., whether the devices of the shared network and the terminal device 200 are hardware-connected, in response to the power-on event of the terminal device 200.
The node state includes a connected state and an unconnected state, and it can be understood that the connected state refers to a state that the external device is inserted into the network port through the network cable and the data transmission of the network cable is normal, and the unconnected state refers to a state that the network cable is not inserted into the network port or the data transmission of the network cable is abnormal. And when the node state is monitored to be in a connected state, establishing a channel shared by the terminal equipment 200 and an external equipment network.
In some embodiments, the controller 250 may initiate a network service, such as an Ethernet service (Ethernet service), in response to a power-on event of the terminal device 200, and register a monitoring procedure for a node status of the network port to monitor the node status of the network port, and update the node status to a connected status (i.e., up status) when it is monitored that there is a network signal transmission in the network port. That is, after the terminal device 200 is powered on, it may traverse the loaded network port, detect whether the data path of the loaded network port is a path, that is, whether the network port is inserted into a network cable and whether there is network signal transmission, and if the data path of the network port is a path, update the node state of the network port to be a connected state.
Taking the use scenario shown in fig. 7 as an example, the terminal device 200 may share a network with an external device connected to the eth1 portal. After the terminal device 200 is powered on, the controller 250 may monitor whether the external device is connected to the terminal device 200 in hardware, that is, whether the eth1 port is in a connected state (i.e. up state), and when it is monitored that the node state of the eth1 port is in the connected state, establish a channel shared by the terminal device 200 connected to the eth1 port and the external device network.
S200: and when the node state is a connected state, setting a network port mode of the network port as a server mode.
Before establishing a channel shared by the terminal device 200 and the external device network, a sharing mode of the network port needs to be distinguished. The sharing mode includes a client mode (client mode) and a server mode (server mode). The client mode is used for representing the network port as an entry of network sharing of the terminal device 200, and the server mode is used for representing the network port as an exit of network sharing of the terminal device 200. It may be understood that if the network port is used as an entry for network sharing of the terminal device 200, the external device connected to the network port shares the network with the terminal device 200, and if the network port is used as an exit for network sharing of the terminal device 200, the terminal device 200 shares the network with the external device connected to the network port.
Taking the use scenario shown in fig. 7 as an example, the eth0 portal is used as a client mode, and is used as a portal for network sharing of the terminal device 200, that is, whether the terminal device 200 can monitor whether the network cable of the electronic device providing the network through the eth0 portal is inserted into the terminal device 200, if so, the terminal device 200 can connect to the network through the eth0 portal and surfing the internet. The eth1 network port is in a server mode, and serves as an outlet for network sharing of the terminal device 200, that is, the terminal device 200 can monitor whether a network cable of an external device needing to be shared with the network is inserted into the terminal device 200 through the eth1 network port, if yes, the terminal device 200 can share the network with the external device through the eth1 network port.
Therefore, in order to reduce the situation that the network sharing is opposite, before the controller 250 performs the network sharing through the wired medium, the filtering action of connecting the network is performed with respect to the network port, that is, when the node state of the network port is monitored to be in the connected state, the port mode of the network port is set to be the server mode. That is, the selection judgment is made on the sharing mode of the network sharing, and if the node state of the network port is in the connected state, the network connection operation as the client is not initiated, but is processed as the service (server) side.
In some embodiments, the processing of the wired network by the terminal device 200 may determine the sharing mode according to the name of the wired node. For example, the default of the network port name prefix of "eth" is the client mode, and whether the network cable of the router is inserted into the terminal device 200 is monitored through the network port, if yes, the terminal device 200 can connect to the network through the network port and surfing the internet.
Therefore, the network port may be written and defined in the hardware layer of the terminal device 200 in advance, and when the filtering action of connecting the network is performed with respect to the network port, the controller 250 may read the port name of the network port when the node state of the network port is monitored to be the connected state, where the port name is the port name written in the hardware layer of the terminal device in advance. If the network port name is a first preset name, setting the network port mode of the network port as a server mode so as to share the network with the external equipment connected with the network port. If the network port name is a second preset name, setting the network port mode of the network port as a client mode so as to connect the network based on the network port.
Taking the usage scenario shown in fig. 7 as an example, the terminal device 200 includes two network ports, namely, an eth1 port and an eth0 port. According to the purpose of the network port, the network port names defining the eth1 network port and the eth0 network port are written in the hardware layer in advance, and are respectively 'eth 1' and 'eth 0'. That is, the network port with the network port name "eth1" is used for the shared network, and the network port with the network port name "eth0" is used for the connection network.
As shown in fig. 10, a flow chart of setting a sharing mode of a network port according to an embodiment of the present application is provided, and in response to a power-on event of the terminal device 200, the controller 250 starts an Ethernet service (Ethernet service), and registers monitoring of node states of the network ports (eth 1 port and eth0 port). When the network port is inserted into the network cable and network signals are transmitted, the node state of the network port is updated to be in a connected state.
And when the node state of the network port is in a connected state, selecting and judging a sharing mode of network sharing, and reading the port name of the network port written in the hardware layer in advance. If the network port name is "eth1", it is determined that the network port is an eth1 network port, and the network port MODE of the network port is set as a SERVER MODE (i.e. executing the INTERFACE-MODE-SERVER), and the system of the terminal device 200 is notified that the network port can perform network sharing, so as to share the network with the external device connected to the network port. Correspondingly, if the network port name is "eth0", determining that the network port is an eth0 network port, setting the network port MODE of the network port as a CLIENT MODE (i.e. executing the INTERFACE-MODE-CLIENT), connecting the network through the network port and surfing the internet.
In addition, the sharing mode of the network port can be defaulted to be a client mode (client mode), when the sharing mode of the network sharing is selected and judged, when the network port is detected to be the eth1 port, the sharing mode of the network port is changed to be a server mode (server mode), and if the network port is detected not to be the eth1 port, the processing is not performed, and the sharing mode of the network port is defaulted to be the client mode (client mode).
S300: setting network sharing parameters for external devices connected with the network ports, and sharing a network to the external devices based on the network sharing parameters.
After the network port mode of the network port is the server mode, that is, the network port is selected as the outlet of the network sharing, the controller 250 may set a network sharing parameter for the external device connected to the network port, and share the network to the external device based on the network sharing parameter. This section needs to declare the wired node-to-sharing type conversion section in the terminal device 200, that is, when it is detected that the node state of the network port is the connected state, the controller 250 may set the network sharing type to the wired network sharing type, which is a network sharing type that performs network sharing based on the network port added in advance in the frame layer of the terminal device 200, and share the network to the external device according to the network sharing type.
It will be appreciated that since the native logic of the end device 200 does not assert the wired type by default, only the wired, bluetooth, p2p, etc. nodes are identified, such that the wired node is defined as an invalid shared type (i.e., TETHERING _inv ALID) when it is imported. The embodiment of the application can add the network sharing type (TETHERING _ethernet) for performing network sharing based on the network port in the frame layer (frame) of the terminal device 200, so as to avoid the situation that the network fails due to type invalidation when the network is shared by wire.
In some embodiments, the controller 250 may initiate a network sharing service, i.e., an IP Server, when setting network sharing parameters for an external device connected to the network portal. The network sharing service is based on the allocation of an internet protocol address (i.e. an IP address) to a network port, and the DHCP Server can be enabled to allocate an IP address to a device connected to the sharing network, so as to ensure that the device is started and configured correctly. After the IP address is allocated, the routing parameters and the packet filtering parameters are configured for the external equipment connected with the network port of the network, so that a channel shared by the terminal equipment 200 and the external equipment network is established, namely, the routing, the IP rule and the IP tables are configured, and the data traffic is ensured to be forwarded correctly. In this case, the terminal device 200 does not require an uplink network, and may be connected to the uplink network or may not be connected to the uplink network.
After establishing a channel in which the terminal device 200 shares with the external device network, if the terminal device 200 is not connected to the uplink network, the network cannot be shared with the external device. After the terminal device 200 is connected to the uplink network, the configuration of the uplink network can be changed according to the uplink network connected with the terminal device 200 to configure the data packet forwarding address of the external device, so as to establish a data forwarding path between the external device and the uplink network, thereby realizing the purpose that the terminal device 200 shares the network with the external device, and enabling the external device to access the internet.
When the configuration of the uplink network is changed, the controller 250 may acquire the internet protocol address of the uplink network, and set the packet forwarding address of the external device to the internet protocol address, that is, set the packet forwarding of the domain name Service (Domain Name Service). For example, taking the use scenario shown in fig. 7 as an example, a data forwarding path between the external device and the uplink network is established, so that the data packet can be forwarded from the eth1 port to the eth0 port or the wlan. If the IP address of wifi connected to the terminal device 200 is 162.168.1.1, the DNSForward of the external device is set to 162.168.1.1, so that the data packet can be forwarded from the eth1 network port to the wlan, and internet access of the external device is achieved.
In this embodiment, in the wired network sharing method provided by the present application, when the terminal device 200 is not connected to the uplink network, a channel shared by the terminal device 200 and the external device network may be established, so as to implement interconnection between the terminal device 200 and the external device. After the terminal device 200 is connected to the uplink network, a data forwarding path between the external device and the uplink network is established by changing the configuration of the uplink network, so as to realize the network use of the external device.
In some embodiments, in order to timely acquire the network connection state of the terminal device 200, efficiency of network sharing is improved. The controller 250 may monitor the network connection state of the terminal device 200 and the uplink network, and configure the packet forwarding address of the external device according to the uplink network when the network connection state is monitored to be the connection state, so as to share the network to the external device based on the packet forwarding address.
Exemplary, as shown in fig. 11, a flow chart of wired network sharing is provided in an embodiment of the present application. Taking the use scenario shown in fig. 7 as an example, in response to a power-on event of the terminal device 200, the controller 250 monitors a node state of a network port, and when it is monitored that the node state of the eth1 port is a connected state, shields a client process on the eth1 port, that is, sets a port mode of the eth1 port as a server mode, and uses the eth1 port as an outlet of network sharing. Then, a teaming function in the terminal device 200 is started, and the teaming function refers to the use of sharing internet connection to other devices through a network (such as a 4G network) of the terminal device 200. And starting the IP Server, distributing an IP address for a network port based on the IP Server, performing route configuration, and establishing a channel for network sharing of the terminal equipment 200 and the external equipment.
Meanwhile, the controller 250 registers monitoring on the uplink network, monitors the network connection state of the terminal device 200, i.e. whether wired connection is performed between the terminal device and the electronic device providing the network such as the router through the eth0 network port, or whether wireless connection is performed between the terminal device and the WiFi provided by the electronic device such as the router. If the network connection state is monitored to be the connection state, the configuration of the uplink network can be changed, so that a data forwarding path between the external device and the uplink network is established, and network sharing is performed, so that the purpose of accessing the internet by the external device is achieved.
In some embodiments, the configuration of the upstream network may be altered by listening for network changes through a state machine. That is, the controller 250 may create a State Machine (State Machine) based on which the network connection State of the terminal device with the upstream network is monitored. That is, a state machine is created for handling network change events and state transitions.
The state machine is a model representing different states and transition conditions, and different states may be defined in the state machine, which characterizes the network connection state of the terminal device 200, for example, "Connected" and "Disconnected" are defined, which characterize the network connection state as a Connected state and a Disconnected state, respectively. While state transition conditions and transition actions are defined in the state machine. For example, when the network connection state is changed from "Disconnected" to "Connected", a corresponding event is triggered, and a series of operations are performed to change the configuration of the upstream network.
Specifically, after the terminal device 200 is connected to the UPSTREAM network, the controller 250 receives a broadcast message (e.g. Connectivity-action) sent by the frame layer of the terminal device 200 and indicating that the network connection is successful, triggers an operation of processing a change in the state of the network connection (i.e. handleconnectityaction), and processes a command for changing the UPSTREAM network (i.e. CMD-UPSTREAM-CHANGED). The TetherModeAliverState state machine processes the network change event and sets up the upstream network (i.e., setDNSF orward).
Fig. 12 is a schematic flow chart of performing network sharing according to an embodiment of the present application. First, an ethernet sharing function (enableethernet sharing) is activated. And registering a callback function, and monitoring the node state of a network port and the connection state of an uplink network. Network sharing (startthering) is turned on. Requesting the network sharing state of the node corresponding to the network port, and triggering the callback of the wired network sharing when the node is available.
And starting the IPServer triggering callback to perform state circulation of the TetherMainSM state machine. An EVENT-IFACE-service-STATE-ACTION EVENT is triggered, which is used to indicate a change in the interface service STATE. Executing a CMD-te-connect-CHANGED command to handle changes in the network shared connection. Executing a chooseUpstreamType event to select an upstream network type.
And when a callback for wired network sharing is triggered, the type of ipsving is set to TETHERING-ETHERNET (wired network sharing type added in advance at the framework layer). Start IPServer and set ip of DHCP Server to 192.168.44.1. And executing the changeInterfacestate operation for changing the state of the network port. The CMD-TETHER-REQUESTED event is processed for processing the enable network sharing. When the TetherModeAlyState state machine is triggered to process the network change event, the state machine of the IPServer is switched to the TetherdState. The state of the shared network refers to a state when the ipsec is successfully started and is in the shared network state in the network sharing process. Configuring iprule and iptables, and executing a tetherAddForward operation to add forwarding rules for network sharing to ensure that data packets are forwarded correctly to devices on the shared network.
Based on the wired network sharing method. There is also provided in some embodiments of the present application a terminal device 200, including: network portal and controller 250. The network port is configured to establish a connection relationship with the external device; the controller 250 is configured to perform the following program steps:
S100: and responding to a starting event of the terminal equipment, and monitoring the node state of the network port.
S200: and when the node state is a connected state, setting a network port mode of the network port as a server mode.
The server mode is used for representing that the network port is an outlet of network sharing.
S300: setting network sharing parameters for external devices connected with the network ports, and sharing a network to the external devices based on the network sharing parameters.
As can be seen from the above technical solutions, the terminal device and the wired network sharing method provided by the foregoing embodiments may monitor a node state of a network port in response to a power-on event of the terminal device, and set a network port mode of the network port to be a server mode when the node state is a connected state, where the server mode is used to characterize that the network port is an outlet of network sharing. Setting network sharing parameters for external devices connected with the network ports, and sharing a network to the external devices based on the network sharing parameters. The method can automatically perform wired network sharing after starting up, establish a channel for network sharing between the terminal equipment and the external equipment, monitor the change of the uplink network, and establish a data forwarding path between the external equipment and the uplink network after monitoring that the terminal equipment is connected to the uplink network, thereby realizing network use of the external equipment and solving the problem that the uplink network is required to be connected first and then shared when the network is shared.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some or all of the technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present application.
The foregoing description, for purposes of explanation, has been presented in conjunction with specific embodiments. However, the illustrative discussions above are not intended to be exhaustive or to limit the embodiments to the precise forms disclosed above. Many modifications and variations are possible in light of the above teaching. The embodiments were chosen and described in order to best explain the principles and the practical application, to thereby enable others skilled in the art to best utilize the embodiments and various embodiments with various modifications as are suited to the particular use contemplated.

Claims (10)

1. A terminal device, comprising:
the network port is configured to establish a connection relationship with external equipment;
A controller configured to:
responding to a starting event of the terminal equipment, and monitoring the node state of the network port;
when the node state is a connected state, setting a network port mode of the network port as a server mode, wherein the server mode is used for representing that the network port is an outlet of network sharing;
setting network sharing parameters for external devices connected with the network port, and sharing a network to the external devices based on the network sharing parameters.
2. The terminal device of claim 1, wherein the controller is further configured to:
when the node state of the network port is monitored to be in a connected state, reading the network port name of the network port, wherein the network port name is written in the hardware layer of the terminal equipment in advance;
and if the network port name is a first preset name, setting the network port mode of the network port as a server mode.
3. The terminal device of claim 2, wherein the controller is further configured to:
if the network port name is a second preset name, setting a network port mode of the network port as a client mode, wherein the client mode is used for representing that the network port is a network sharing inlet;
And connecting a network based on the network port.
4. The terminal device of claim 1, wherein the controller is further configured to:
when the node state is a connected state, setting a network sharing type as a wired network sharing type, wherein the wired network sharing type is a network sharing type which is added in the terminal equipment frame layer in advance and is used for executing network sharing based on a network port;
and sharing a network to the external equipment according to the network sharing type.
5. The terminal device according to claim 1, wherein the controller is configured to set a network sharing parameter for an external device connected to the network port, and is configured to:
starting a network sharing service;
distributing an Internet protocol address for the network port based on the network sharing service;
configuring routing parameters and information packet filtering parameters for external equipment connected with the network port so as to establish a channel shared by the terminal equipment and the external equipment network;
and configuring the data packet forwarding address of the external equipment according to the uplink network connected with the terminal equipment so as to establish a data forwarding path between the external equipment and the uplink network.
6. The terminal device of claim 1, wherein the controller is further configured to:
monitoring the network connection state of the terminal equipment and an uplink network, wherein the uplink network comprises a wired network and a wireless network;
when the network connection state is monitored to be the connection state, configuring a data packet forwarding address of the external device according to the uplink network;
and sharing a network to the external equipment based on the data packet forwarding address.
7. The terminal device of claim 6, wherein the controller is further configured to:
creating a state machine;
and monitoring the network connection state of the terminal equipment and the uplink network based on the state machine.
8. The terminal device according to claim 6, wherein the controller performs configuring the packet forwarding address of the external device according to the uplink network to which the terminal device is connected, and is configured to:
acquiring an internet protocol address of the uplink network;
and setting the data packet forwarding address of the external device as the Internet protocol address.
9. The terminal device of claim 1, wherein the controller is further configured to:
Responding to the starting event of the terminal equipment, and starting network service;
registering a monitoring process of the node state of the network port;
and updating the node state into a connected state when the network port is monitored to have network signal transmission.
10. A method for sharing a wired network, comprising:
responding to a starting event of the terminal equipment, monitoring the node state of a network port, and establishing a connection relationship between the network port and external equipment;
when the node state is a connected state, setting a network port mode of the network port as a server mode, wherein the server mode is used for representing that the network port is an outlet of network sharing;
setting network sharing parameters for external devices connected with the network port, and sharing a network to the external devices based on the network sharing parameters.
CN202310962088.4A 2023-08-01 2023-08-01 Terminal equipment and wired network sharing method Pending CN117615201A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310962088.4A CN117615201A (en) 2023-08-01 2023-08-01 Terminal equipment and wired network sharing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310962088.4A CN117615201A (en) 2023-08-01 2023-08-01 Terminal equipment and wired network sharing method

Publications (1)

Publication Number Publication Date
CN117615201A true CN117615201A (en) 2024-02-27

Family

ID=89956695

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310962088.4A Pending CN117615201A (en) 2023-08-01 2023-08-01 Terminal equipment and wired network sharing method

Country Status (1)

Country Link
CN (1) CN117615201A (en)

Similar Documents

Publication Publication Date Title
CN112905210B (en) Server and gray level publishing method
CN112612443B (en) Audio playing method, display device and server
CN114286165B (en) Display equipment, mobile terminal, and screen-throwing data transmission method and system
CN114296670B (en) Display device and control method for same-screen display of multi-device screen throwing
CN114339332B (en) Mobile terminal, display device and cross-network screen projection method
CN112911380B (en) Display device and connection method with Bluetooth device
CN113064645A (en) Startup interface control method and display device
CN114077724A (en) Account management method and display device
CN112507329A (en) Safety protection method and device
CN117615201A (en) Terminal equipment and wired network sharing method
CN115278822A (en) Display apparatus, control apparatus, and broadcast source scanning method
CN113542882B (en) Method for waking up standby display device, display device and terminal
CN114885193A (en) Display device, terminal device and screen projection method
US10659306B2 (en) Information processing device and method for setting the environment of the device
CN115150643A (en) Application awakening method, display device, mobile terminal and server
CN117615214A (en) Data sharing method and display device
CN113542827B (en) Multi-channel data transmission method and display device
CN115914073A (en) Display device and android system-based intelligent routing method
CN117768697A (en) Screen-throwing control method and display device
CN115914732A (en) Display device and intelligent routing method based on USB channel
CN117539569A (en) Wifi (wireless fidelity) reconnection method and display device
CN117608441A (en) Display equipment and picture switching method applying same-screen display
CN114785778A (en) Gateway apparatus and content distribution method
CN117615194A (en) Display equipment and method for improving screen throwing speed
CN117241346A (en) Wifi hotspot channel selection method and display device

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