CN112511344B - Master-slave equipment network sharing method and device and Internet of things equipment - Google Patents

Master-slave equipment network sharing method and device and Internet of things equipment Download PDF

Info

Publication number
CN112511344B
CN112511344B CN202011295647.3A CN202011295647A CN112511344B CN 112511344 B CN112511344 B CN 112511344B CN 202011295647 A CN202011295647 A CN 202011295647A CN 112511344 B CN112511344 B CN 112511344B
Authority
CN
China
Prior art keywords
network
interface
preset
master
virtual
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.)
Active
Application number
CN202011295647.3A
Other languages
Chinese (zh)
Other versions
CN112511344A (en
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.)
Shenzhen Skyworth RGB Electronics Co Ltd
Original Assignee
Shenzhen Skyworth RGB Electronics 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 Shenzhen Skyworth RGB Electronics Co Ltd filed Critical Shenzhen Skyworth RGB Electronics Co Ltd
Priority to CN202011295647.3A priority Critical patent/CN112511344B/en
Publication of CN112511344A publication Critical patent/CN112511344A/en
Application granted granted Critical
Publication of CN112511344B publication Critical patent/CN112511344B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • 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/06Management of faults, events, alarms or notifications
    • H04L41/0654Management of faults, events, alarms or notifications using network fault recovery
    • H04L41/0668Management of faults, events, alarms or notifications using network fault recovery by dynamic selection of recovery network elements, e.g. replacement by the most appropriate element after failure
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/22Arrangements for detecting or preventing errors in the information received using redundant apparatus to increase reliability
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/22Alternate routing

Landscapes

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

Abstract

The application provides a master-slave device network sharing method, a device and an Internet of things device, wherein the master-slave device network sharing method comprises the following steps: after the system is started, loading a network transfer driver of a preset interface; at least one virtual network interface is newly added from the current network communication through a preset virtual route forwarding function; and connecting the virtual network interface to the preset interface so as to enable the slave equipment connected with the preset interface to perform network communication. According to the master-slave device network sharing method, through the preset interface, the corresponding network transferring drive of the preset interface and the virtual routing forwarding function, the network of the master device of the Internet of things can be shared with the slave device, the slave device can be connected to the Internet through the preset interface of the master device, the difficulty in connecting the slave device to the Internet is reduced, and the expansion of the Internet of things is facilitated.

Description

Master-slave equipment network sharing method and device and Internet of things equipment
Technical Field
The application relates to the field of internet of things, in particular to a master-slave device network sharing method and device, internet of things devices and a readable storage medium.
Background
Along with the continuous development of the internet of things, the types of internet of things equipment are also increasing, most of internet of things equipment is divided into master equipment and slave equipment, and the master equipment and the slave equipment can normally operate only after being connected with a network. The existing slave equipment is generally directly connected with a router to acquire network signals, and under the condition that the number of the devices of the Internet of things is large, the slave equipment occupies a large amount of routing resources, so that the expansion of the Internet of things network is not facilitated.
Disclosure of Invention
In view of the above problems, the application provides a master-slave device network sharing method, a device, an Internet of things device and a readable storage medium, so as to reduce the difficulty of connecting slave devices to the Internet, thereby facilitating the expansion of the Internet of things network.
In order to achieve the above purpose, the present application adopts the following technical scheme:
a master-slave device network sharing method, comprising:
after the system is started, loading a network transfer driver of a preset interface;
at least one virtual network interface is newly added from the current network communication through a preset virtual route forwarding function;
and connecting the virtual network interface to the preset interface so as to enable the slave equipment connected with the preset interface to perform network communication.
Preferably, in the master-slave device network sharing method, the method further includes:
after loading the network transfer drive, judging whether network connection exists at present;
after determining that there is a network connection currently, executing a step of adding at least one virtual network interface from the current network communication through a preset virtual routing forwarding function and a subsequent step.
Preferably, in the master-slave device network sharing method, the method further includes:
and after determining that no network connection exists currently, controlling the preset interface to communicate with the slave device through the route configuration so as to send and receive control information of the slave device through the preset interface.
Preferably, in the master-slave device network sharing method, the preset interface includes a USB interface.
Preferably, in the master-slave device network sharing method, the preset virtual routing forwarding function is a linux system network routing forwarding function.
The application also provides a master-slave device network sharing device, which comprises:
the network transfer drive loading module is used for loading a network transfer drive of a preset interface after the system is started;
the route forwarding module is used for adding at least one virtual network interface from the current network communication through a preset virtual route forwarding function;
and the network signal transmission module is used for connecting the virtual network interface to the preset interface so as to enable the slave equipment connected with the preset interface to perform network communication.
Preferably, the master-slave device network sharing apparatus further includes:
the network connection judging module is used for judging whether network connection exists at present after the network conversion drive is loaded; after determining that there is a network connection currently, executing a step of adding at least one virtual network interface from the current network communication through a preset virtual routing forwarding function and a subsequent step.
Preferably, the master-slave device network sharing apparatus further includes:
and the route configuration control module is used for controlling the preset interface to communicate with the slave equipment through route configuration after determining that no network connection exists currently so as to send and receive control information of the slave equipment through the preset interface.
The application also provides the Internet of things equipment, which comprises a memory and a processor, wherein the memory stores a computer program, and the processor runs the computer program to enable the Internet of things equipment to execute the master-slave equipment network sharing method.
The application also provides a readable storage medium storing a computer program which when run on a processor performs the master-slave device network sharing method.
The application provides a master-slave device network sharing method, which comprises the following steps: after the system is started, loading a network transfer driver of a preset interface; at least one virtual network interface is newly added from the current network communication through a preset virtual route forwarding function; and connecting the virtual network interface to the preset interface so as to enable the slave equipment connected with the preset interface to perform network communication. According to the master-slave device network sharing method, through the preset interface, the corresponding network transferring drive of the preset interface and the virtual routing forwarding function, the network of the master device of the Internet of things can be shared with the slave device, the slave device can be connected to the Internet through the preset interface of the master device, the difficulty in connecting the slave device to the Internet is reduced, and the expansion of the Internet of things is facilitated.
In order to make the above objects, features and advantages of the present application more comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the technical solutions of the present application, the drawings that are required for the embodiments will be briefly described, it being understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope of the present application. Like elements are numbered alike in the various figures.
Fig. 1 is a flowchart of a master-slave device network sharing method provided in embodiment 1 of the present application;
fig. 2 is a flowchart of a master-slave device network sharing method provided in embodiment 2 of the present application;
fig. 3 is a flowchart of a master-slave device network sharing method provided in embodiment 3 of the present application;
fig. 4 is a schematic structural diagram of a master-slave device network sharing apparatus according to embodiment 4 of the present application;
fig. 5 is a schematic structural diagram of another master-slave device network sharing apparatus according to embodiment 4 of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present application, but not all embodiments.
The components of the embodiments of the present application generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the application, as presented in the figures, is not intended to limit the scope of the application, as claimed, but is merely representative of selected embodiments of the application. All other embodiments, which can be made by a person skilled in the art without making any inventive effort, are intended to be within the scope of the present application.
The terms "comprises," "comprising," "including," or any other variation thereof, are intended to cover a specific feature, number, step, operation, element, component, or combination of the foregoing, which may be used in various embodiments of the present application, and are not intended to first exclude the presence of or increase the likelihood of one or more other features, numbers, steps, operations, elements, components, or combinations of the foregoing.
Furthermore, the terms "first," "second," "third," and the like are used merely to distinguish between descriptions and should not be construed as indicating or implying relative importance.
Unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which various embodiments of the application belong. The terms (such as those defined in commonly used dictionaries) will be interpreted as having a meaning that is the same as the context of the relevant art and will not be interpreted in an idealized or overly formal sense unless expressly so defined herein in connection with the various embodiments of the application.
Example 1
Fig. 1 is a flowchart of a master-slave device network sharing method provided in embodiment 1 of the present application, where the method includes the following steps:
step S11: after the system is started, loading a network transfer driver of a preset interface.
In the embodiment of the application, the master-slave device network sharing method can be applied to sharing network signals among various master-slave devices of the Internet of things, and the master device can forward the network signals to the slave device after being connected to the Internet through the network signals, so that the slave device can draw the Internet through the forwarded network signal connection. The master-slave device includes a master screen, a slave screen, and other devices of the internet of things, which are not limited herein.
In the embodiment of the application, after the main equipment system is started, the network conversion drive of the preset interface on the main equipment is loaded so as to realize that the network signal in the main equipment is used as the network data to be output to the slave equipment through the preset interface. The preset interface includes a USB interface or an ethernet interface, and a network driver of the USB interface or the ethernet interface may be stored in the host device in advance.
Step S12: and at least one virtual network interface is newly added from the current network communication through a preset virtual routing forwarding function.
In the embodiment of the application, after the network transfer drive of the preset interface is loaded, the master device forwards the network signal received by the current master device through the preset virtual route forwarding function, and newly adds at least one virtual network interface from the current network communication, and forwards the network signal by using the at least one virtual network interface. The preset virtual routing forwarding function is a linux system network routing forwarding function, that is, a system in the master device may be a linux system or other systems developed based on a linux system kernel, such as an android system, and a linux system network router is arranged in the system, and forwards network signals through the linux system network router.
Step S13: and connecting the virtual network interface to the preset interface so as to enable the slave equipment connected with the preset interface to perform network communication.
In the embodiment of the present application, after at least one virtual network interface is newly added to the current network communication through the preset virtual router, the master device connects the virtual network interface to the preset interface, and forwards the output network signal through the preset interface, that is, the master device is equivalent to a router, so that the slave device connected through the preset interface obtains the network signal, where the master device may be provided with a plurality of preset interfaces to connect to a plurality of slave devices, which is not limited herein.
In the embodiment of the application, the network of the main equipment of the internet of things can be shared with the auxiliary equipment through the preset interface, the corresponding network-transferring drive of the preset interface and the virtual routing forwarding function, so that the auxiliary equipment can be connected to the Internet through the preset interface of the main equipment, the difficulty of connecting the auxiliary equipment to the Internet is reduced, and the expansion of the internet of things is facilitated.
Example 2
Fig. 2 is a flowchart of a master-slave device network sharing method provided in embodiment 2 of the present application, where the method includes the following steps:
step S21: after the system is started, loading a network transfer driver of a preset interface.
This step corresponds to the above step S11, and will not be described here again.
Step S22: and after the network conversion drive is loaded, judging whether network connection exists currently.
In the embodiment of the application, after the internet of things device loads the network conversion drive of the preset interface, whether network connection exists at present can be judged. Specifically, a test message of network link may be set in the internet of things device, and by sending a message to a network communication port, a corresponding response message is received, and whether the main device is connected to the internet is determined according to the response message.
Step S23: after determining that the network connection exists currently, at least one virtual network interface is newly added from the current network communication through a preset virtual routing forwarding function.
This step corresponds to the above step S12, and will not be described here again.
Step S24: and connecting the virtual network interface to the preset interface so as to enable the slave equipment connected with the preset interface to perform network communication.
This step corresponds to the above step S13 and will not be described here again.
Example 3
Fig. 3 is a flowchart of a master-slave device network sharing method provided in embodiment 3 of the present application, where the method includes the following steps:
step S31: after the system is started, loading a network transfer driver of a preset interface.
This step corresponds to the above step S11, and will not be described here again.
Step S32: and after the network conversion drive is loaded, judging whether network connection exists currently.
This step corresponds to the step S22 described above, and will not be described again here.
Step S33: after determining that the network connection exists currently, at least one virtual network interface is newly added from the current network communication through a preset virtual routing forwarding function.
This step corresponds to the above step S12, and will not be described here again.
Step S34: and connecting the virtual network interface to the preset interface so as to enable the slave equipment connected with the preset interface to perform network communication.
This step corresponds to the above step S13 and will not be described here again.
Step S35: and after determining that no network connection exists currently, controlling the preset interface to communicate with the slave device through the route configuration so as to send and receive control information of the slave device through the preset interface.
In the embodiment of the application, when the master device is not connected with the network, namely can not be connected with the Internet, the master device can also control the preset interface through adding a route configuration, and the communication is carried out between the preset interface and the slave device through the preset interface, so that the control information of the slave device is transmitted to the master device through the preset interface, and the control information of the master device is also transmitted to the slave device through the preset interface.
Example 4
Fig. 4 is a schematic structural diagram of a master-slave device network sharing apparatus according to embodiment 4 of the present application.
The master-slave device network sharing apparatus 400 includes:
the network transfer driver loading module 410 is configured to load a network transfer driver of a preset interface after the system is started;
a route forwarding module 420, configured to add at least one virtual network interface from the current network communication through a preset virtual route forwarding function;
and the network signal transmission module 430 is configured to connect the virtual network interface to the preset interface, so that the slave device connected to the preset interface performs network communication.
As shown in fig. 5, the master-slave device network sharing apparatus 400 further includes:
a network connection judging module 440, configured to judge whether there is a network connection currently after loading the network conversion driver; after determining that there is a network connection currently, executing a step of adding at least one virtual network interface from the current network communication through a preset virtual routing forwarding function and a subsequent step.
And the route configuration control module 450 is configured to control the preset interface to communicate with the slave device through route configuration after determining that no network connection is currently available, so as to send and receive control information of the slave device through the preset interface.
In the embodiment of the present application, the more detailed functional description of each module may refer to the content of the corresponding portion in the foregoing embodiment, which is not described herein.
In addition, the application also provides the Internet of things equipment, which comprises a memory and a processor, wherein the memory can be used for storing a computer program, and the processor runs the computer program so that the Internet of things equipment executes the functions of the above method or each module in the master-slave equipment network sharing device.
The memory may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data created according to the use of the internet of things device (such as audio data, phonebooks, etc.), and the like. In addition, the memory may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage device.
The embodiment also provides a readable storage medium for storing the computer program used in the internet of things device.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other manners. The apparatus embodiments described above are merely illustrative, for example, of the flow diagrams and block diagrams in the figures, which illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In addition, functional modules or units in various embodiments of the application may be integrated together to form a single part, or the modules may exist alone, or two or more modules may be integrated to form a single part.
The functions, if implemented in the form of software functional modules and sold or used as a stand-alone product, may be stored in a computer-readable storage medium. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a smart phone, a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The foregoing is merely illustrative of the present application, and the present application is not limited thereto, and any person skilled in the art will readily recognize that variations or substitutions are within the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (6)

1. A master-slave device network sharing method, comprising:
after the system is started, loading a network transfer driver of a preset interface;
at least one virtual network interface is newly added from the current network communication through a preset virtual route forwarding function;
connecting the virtual network interface to the preset interface so as to enable the slave equipment connected with the preset interface to perform network communication;
after the network transfer drive is loaded, judging whether network connection exists currently or not;
after determining that the network connection exists currently, executing the step of adding at least one virtual network interface from the current network communication through a preset virtual routing forwarding function and the subsequent steps;
and after determining that no network connection exists currently, controlling the preset interface to communicate with the slave device through the route configuration so as to send and receive control information of the slave device through the preset interface.
2. The master-slave device network sharing method of claim 1, wherein the preset interface comprises a USB interface.
3. The master-slave device network sharing method according to claim 1, wherein the preset virtual routing forwarding function is a linux system network routing forwarding function.
4. A master-slave device network sharing apparatus, comprising:
the network transfer drive loading module is used for loading a network transfer drive of a preset interface after the system is started;
the route forwarding module is used for adding at least one virtual network interface from the current network communication through a preset virtual route forwarding function;
the network signal transmission module is used for connecting the virtual network interface to the preset interface so as to enable the slave equipment connected with the preset interface to perform network communication;
the network connection judging module is used for judging whether network connection exists at present after the network conversion drive is loaded; after determining that the network connection exists currently, executing the step of adding at least one virtual network interface from the current network communication through a preset virtual routing forwarding function and the subsequent steps;
and the route configuration control module is used for controlling the preset interface to communicate with the slave equipment through route configuration after determining that no network connection exists currently so as to send and receive control information of the slave equipment through the preset interface.
5. An internet of things device comprising a memory storing a computer program and a processor running the computer program to cause the internet of things device to perform the master-slave device network sharing method according to any one of claims 1 to 3.
6. A readable storage medium, characterized in that it stores a computer program which, when run on a processor, performs the master-slave device network sharing method of any one of claims 1 to 3.
CN202011295647.3A 2020-11-18 2020-11-18 Master-slave equipment network sharing method and device and Internet of things equipment Active CN112511344B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011295647.3A CN112511344B (en) 2020-11-18 2020-11-18 Master-slave equipment network sharing method and device and Internet of things equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011295647.3A CN112511344B (en) 2020-11-18 2020-11-18 Master-slave equipment network sharing method and device and Internet of things equipment

Publications (2)

Publication Number Publication Date
CN112511344A CN112511344A (en) 2021-03-16
CN112511344B true CN112511344B (en) 2023-12-08

Family

ID=74956897

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011295647.3A Active CN112511344B (en) 2020-11-18 2020-11-18 Master-slave equipment network sharing method and device and Internet of things equipment

Country Status (1)

Country Link
CN (1) CN112511344B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103532802A (en) * 2013-10-11 2014-01-22 小米科技有限责任公司 Method and device for network sharing, and terminal equipment
CN108494639A (en) * 2018-02-09 2018-09-04 维沃移动通信有限公司 Network access method and mobile terminal
CN109067718A (en) * 2018-07-23 2018-12-21 浙江吉利汽车研究院有限公司 Method, apparatus, the system of vehicle mounted multimedia host and mobile terminal sharing network

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103532802A (en) * 2013-10-11 2014-01-22 小米科技有限责任公司 Method and device for network sharing, and terminal equipment
CN108494639A (en) * 2018-02-09 2018-09-04 维沃移动通信有限公司 Network access method and mobile terminal
CN109067718A (en) * 2018-07-23 2018-12-21 浙江吉利汽车研究院有限公司 Method, apparatus, the system of vehicle mounted multimedia host and mobile terminal sharing network

Also Published As

Publication number Publication date
CN112511344A (en) 2021-03-16

Similar Documents

Publication Publication Date Title
US8966499B2 (en) Virtual switch extensibility
CN104065637A (en) Web-game running method and device
EP2961108A1 (en) Switch and program
CN105450759A (en) System mirror image management method and device
CN112732616B (en) BMC starting method, device and equipment based on SPI controller
US9720755B2 (en) Information processing device
CN112764823B (en) Starting method of NVR (network video recorder) system, host operating system and data communication method
CN109361693B (en) Virtual device communication method and device
CN113472700B (en) Message processing method, device, storage medium and network card
CN104731577B (en) Multisystem and the method for starting the multisystem
US20140359114A1 (en) Computer-readable recording medium, usage mode data generation method, and usage mode data generation device
CN112511344B (en) Master-slave equipment network sharing method and device and Internet of things equipment
CN114780465A (en) Method and device for creating sharable remote direct data access link
CN114401218B (en) Bypass forwarding method and device for data message
CN114172841B (en) Message forwarding method and device, electronic equipment and read storage medium
CN113791792B (en) Method, device and storage medium for acquiring application call information
US11409538B2 (en) Data processing system and method for configuring and operating a data processing system
CN113806035B (en) Distributed scheduling method and service server
CN109710545B (en) Data transmission method and device, computer readable storage medium and computer system
KR102379558B1 (en) Driver system of vehicle with feedback logic and operation method thereof
US9977757B2 (en) Prevented inter-integrated circuit address conflict service system and method thereof
US9330030B2 (en) Bridge decoder for a vehicle infotainment system
CN110046120B (en) Data processing method, device and system based on IIC protocol and storage medium
CN114676085B (en) CCIX bus control method, device and medium
CN112988638B (en) Keyboard interface multiplexing method and electronic equipment

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
GR01 Patent grant
GR01 Patent grant