CN110430478B - Networking communication method, device, terminal equipment and storage medium - Google Patents

Networking communication method, device, terminal equipment and storage medium Download PDF

Info

Publication number
CN110430478B
CN110430478B CN201910559144.3A CN201910559144A CN110430478B CN 110430478 B CN110430478 B CN 110430478B CN 201910559144 A CN201910559144 A CN 201910559144A CN 110430478 B CN110430478 B CN 110430478B
Authority
CN
China
Prior art keywords
network
networking
networking device
scheduler
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.)
Active
Application number
CN201910559144.3A
Other languages
Chinese (zh)
Other versions
CN110430478A (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.)
Ud Network Co ltd
Original Assignee
Ud Network 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 Ud Network Co ltd filed Critical Ud Network Co ltd
Priority to CN201910559144.3A priority Critical patent/CN110430478B/en
Publication of CN110430478A publication Critical patent/CN110430478A/en
Application granted granted Critical
Publication of CN110430478B publication Critical patent/CN110430478B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/46Interconnection of networks
    • H04L12/4604LAN interconnection over a backbone network, e.g. Internet, Frame Relay
    • H04L12/462LAN interconnection over a bridge based backbone
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/141Setup of application sessions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/16Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
    • H04L69/161Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields
    • H04L69/162Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields involving adaptations of sockets based mechanisms
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/60Network structure or processes for video distribution between server and client or between remote clients; Control signalling between clients, server and network components; Transmission of management data between server and client, e.g. sending from server to client commands for recording incoming content stream; Communication details between server and client 
    • H04N21/61Network physical structure; Signal processing

Abstract

The invention is suitable for the technical field of information, and provides a networking communication method, a networking communication device, terminal equipment and a storage medium based on an IPTV system, wherein the networking communication method comprises the following steps: after detecting that the networking device is accessed to the network, updating the current network environment of the scheduler, wherein the networking device comprises a first networking device deployed in the IPTV private network environment and a second networking device deployed in the developer network environment, and the scheduler is deployed in the public network environment; judging the network type of the updated network environment; and based on the judgment result of the network type, networking through a preset networking strategy corresponding to the network type so as to enable first equipment in an IPTV private network environment corresponding to the first networking device to communicate with second equipment in a developer network environment corresponding to the second networking device. By introducing the networking device and the scheduler to transmit and configure in a centralized manner, the problem of complex networking in different places is solved, and quick networking access is realized; by judging the network type, data connection optimization is performed under different networks, and the transmission efficiency and stability are improved.

Description

Networking communication method, device, terminal equipment and storage medium
Technical Field
The invention belongs to the technical field of information, and particularly relates to a networking communication method, a networking communication device, terminal equipment and a storage medium based on an IPTV system.
Background
An Internet Protocol Television (IPTV) is an intranet system that transmits Television information using a broadband network as a medium and integrates Internet, multimedia, communication, and other technologies. In the development and maintenance process of the IPTV system software, in order to communicate the external network equipment with the internal network equipment, the static port mapping, the route forwarding, the VPN and other modes are adopted at present. However, the prior art has the following problems: the configuration of the core network route or the switch needs to be modified, so that the system is easy to break down due to errors; the interference of a business approval process usually causes uncontrollable effective time; if the parameters of the access system are changed, configuration and process approval are required to be carried out again; the method based on port mapping and route forwarding has potential safety hazard. Therefore, the existing networking mode is complex and cannot realize rapid networking.
Disclosure of Invention
In view of this, embodiments of the present invention provide a networking communication method, apparatus, terminal device and storage medium based on an IPTV system, so as to solve the problem that a networking mode of the IPTV system in the prior art is complex.
A first aspect of an embodiment of the present invention provides a networking communication method based on an IPTV system, where the method includes:
after detecting that the networking device is accessed to the network, requesting a scheduler to update the current network environment of the networking device, wherein the networking device comprises a first networking device deployed in an IPTV private network environment and a second networking device deployed in a developer network environment, and the scheduler is deployed in a public network environment;
judging the network type of the updated network environment, wherein the network type comprises a public IP network, an Upnp network or an NAT network;
and based on the judgment result of the network type, networking through a preset networking strategy corresponding to the network type so as to enable first equipment in an IPTV private network environment corresponding to the first networking device to communicate with second equipment in a developer network environment corresponding to the second networking device, wherein the preset networking strategy comprises a direct connection mode, a hole punching mode or a bridging mode.
A second aspect of the embodiments of the present invention provides a networking communication device based on an IPTV system, including:
the updating module is used for updating the current network environment of the scheduler after detecting that the networking device is accessed to the network, wherein the networking device comprises a first networking device deployed in an IPTV private network environment and a second networking device deployed in a developer network environment, and the scheduler is deployed in a public network environment;
the judging module is used for judging the network type of the updated network environment, wherein the network type comprises a public IP network, an Upnp network or an NAT network;
and the networking module is used for networking through a preset networking strategy corresponding to the network type based on the judgment result of the network type so as to enable the first equipment in the IPTV private network environment corresponding to the first networking device to communicate with the second equipment in the developer network environment corresponding to the second networking device, wherein the preset networking strategy comprises a direct connection mode, a hole punching mode or a bridging mode.
A third aspect of the embodiments of the present invention provides a terminal device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the steps of the networking communication method based on the IPTV system when executing the computer program.
A fourth aspect of the embodiments of the present invention provides a computer-readable storage medium, where a computer program is stored, and when the computer program is executed by a processor, the steps of the networking communication method based on the IPTV system are implemented.
After detecting that a networking device is accessed to a network, the embodiment of the invention updates the current network environment of a scheduler, wherein the networking device comprises a first networking device deployed in an IPTV private network environment and a second networking device deployed in a developer network environment, and the scheduler is deployed in a public network environment; judging the network type of the updated network environment, wherein the network type comprises a public IP network, an Upnp network or an NAT network; and based on the judgment result of the network type, networking through a preset networking strategy corresponding to the network type so as to enable first equipment in an IPTV private network environment corresponding to the first networking device to communicate with second equipment in a developer network environment corresponding to the second networking device, wherein the preset networking strategy comprises a direct connection mode, a hole punching mode or a bridging mode. By introducing the networking device and the scheduler to transmit and configure in a centralized manner, the problem of complex networking in different places is solved, and quick networking access is realized; by judging the network type, data connection optimization is performed under different networks, and the transmission efficiency and stability are improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.
Fig. 1 is a schematic diagram of a networking structure of an IPTV system according to an embodiment of the present invention;
fig. 2 is a schematic flow chart illustrating an implementation of a networking communication method based on an IPTV system according to an embodiment of the present invention;
fig. 3 is a schematic flow chart illustrating an implementation of a hole-punching manner in a networking communication method based on an IPTV system according to an embodiment of the present invention;
fig. 4 is an exemplary diagram of a flow of implementing a bridging manner in a networking communication method based on an IPTV system according to an embodiment of the present invention;
fig. 5 is a schematic diagram of a networking communication device based on an IPTV system according to an embodiment of the present invention;
fig. 6 is a schematic diagram of a terminal device according to an embodiment of the present invention.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the invention. It will be apparent, however, to one skilled in the art that the present invention may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present invention with unnecessary detail.
In order to explain the technical means of the present invention, the following description will be given by way of specific examples.
Fig. 1 shows a schematic networking structure diagram of an IPTV system according to an embodiment of the present invention. For convenience of explanation, only the portions related to the present embodiment are shown. Referring to fig. 1, a networking structure of an IPTV system includes a first networker and a first device deployed in an IPTV private network environment, a second networker and a second device deployed in a developer network environment, and a scheduler deployed in a public network environment; the first network component is connected with the first device through an IPTV private network, the second network component is connected with the second device through a developer network, and the first network component and the second network component are respectively in communication connection with the dispatcher.
Optionally, the scheduler is a scheduling server deployed in an Internet public network environment, and has a public network IP, a data transfer capability, and a configuration information issuing capability; the first network device and the second network device support TCP/IP protocol micro electronic equipment, and the first network device and the second network device have direct connection communication capability after being connected with the scheduler.
Optionally, the Network types of the first and second Network devices, which are respectively connected to the scheduler in communication, include a public IP Network, an Upnp (Universal Plug and Play) Network, or an NAT (Network Address Translation) Network.
The IPTV private network is a network where an IPTV system is deployed, and the developer network is a network where a development device (i.e., a second device) is located. In the development and maintenance process of the IPTV system software, in order to enable an external device (such as a second device outside an IPTV private network) to be communicated with an internal device (such as a first device inside the IPTV private network), the networking is carried out by adopting modes of static port mapping, route forwarding, VPN and the like at present, but the existing networking mode is complex and cannot realize rapid networking. The invention solves the problem of complex networking in different places by introducing the centralized issuing configuration of the networking device and the scheduler.
Fig. 2 illustrates a networking communication method based on an IPTV system according to an embodiment of the present invention. For convenience of explanation, only the portions related to the present embodiment are shown. Referring to fig. 1, the networking communication method based on the IPTV system includes steps S201 to S203.
S201, after detecting that a networking device accesses a network, requesting a scheduler to update the current network environment of the networking device, wherein the networking device comprises a first networking device deployed in an IPTV private network environment and a second networking device deployed in a developer network environment, and the scheduler is deployed in a public network environment.
Optionally, each networking device is provided with a unique UID, and the scheduler records the network type of the network environment of the networking device according to the UID of the networking device, so as to adopt a corresponding networking policy according to the network type, but the network type of the network environment after each power-on connection of the networking device is not necessarily the last network type, and therefore the network type of the networking device recorded in the scheduler needs to be updated.
Specifically, the networking device is deployed in two network environments to be communicated (for example, in this embodiment, the first networking device is deployed in an IPTV private network environment, and the second networking device is deployed in a developer network environment), and after the networking device is powered on, the networking device is initialized: the WAN port of the networking device is accessed to the network, connected with the scheduler and requesting the scheduler to update the current network environment, and the scheduler records the network type of the current network environment and the UID of the networking device. The UID is used for corresponding the network type, so that the networking device can be freely deployed, and can be operated by electrifying and networking, and the user operation is facilitated.
S202, judging the network type of the updated network environment, wherein the network type comprises a public IP network, an Upnp network or an NAT network.
The public IP network is a network type that the first network component and/or the second network component is provided with a public network IP, and transmits network data through a peer-to-peer (P2P) transmission technology; the Upnp (Universal Plug and Play) network is a network type based on Upnp protocol, which also transmits network data through P2P.
Optionally, the NAT (Network Address Translation) Network includes a simple NAT Network that can be penetrated by a Network and a complex NAT Network that cannot be penetrated by a Network; wherein the simple NAT network comprises Full Cone NAT, reserved Cone NAT and Port reserved Cone NAT; the complex NAT network is Symmetric NAT.
By judging the network type of the network environment, different networking modes are adopted according to different network types, so that the data connection of different networks is optimized, and the transmission efficiency and the stability are improved.
S203, based on the judgment result of the network type, networking is performed through a preset networking strategy corresponding to the network type, so that a first device in an IPTV private network environment corresponding to the first networking device communicates with a second device in a developer network environment corresponding to the second networking device, wherein the preset networking strategy comprises a direct connection mode, a hole punching mode or a bridging mode.
The network type and the preset networking strategy have a corresponding relationship, and optionally, the public IP network corresponds to a direct connection mode, the Upnp network corresponds to a punching mode, and the NAT network corresponds to a punching mode or a bridging mode.
On the basis of the embodiment shown in fig. 2, fig. 3 shows a flowchart for implementing another networking communication method based on an IPTV system. As shown in fig. 3, step S203 in the embodiment shown in fig. 2 specifically includes steps S2031 to S2033. It should be noted that the steps that are the same as those in the embodiment of fig. 1 are not repeated herein, please refer to the foregoing description.
S2031, when the network type is the public IP network, networking is performed through a direct connection mode, wherein the direct connection mode is that the first networking device and the second networking device communicate through direct connection;
s2032, when the network type is the Upnp network, networking is performed in a hole punching mode, and the hole punching mode is that the first networking device and the second networking device communicate through port mapping;
s2033, when the network type is the NAT network, networking is carried out in a punching mode or a bridging mode, and the bridging mode is that the first networking device and the second networking device establish socket connection with the scheduler to carry out bridging communication.
The direct connection mode is that the first network device and the second network device are directly connected to exchange network data; in the above hole punching manner, the first network component maps an intranet (IPTV private network) port to an extranet (developer network or network environment where the scheduler is located) port of the second network component, and when the second device sends network data to the first device, the extranet port of the second network component receives the network data and forwards the network data to the first device through the intranet port. The bridging mode is that the first networking device and the second networking device respectively establish socket connection with the scheduler according to a sockets 5 proxy protocol.
Optionally, the public IP network, the Upnp network and the simple NAT network adopt P2P to transmit network data, wherein data in the public IP network during transmission does not need to pass through a scheduler, so as to reduce transmission pressure of the scheduler as a central node. The complex NAT network does not use P2P to transmit network data, but relays network data through the scheduler.
On the basis of the embodiment shown in fig. 3, the present embodiment provides a specific manner of step S2033. When the network type is the NAT network, networking through the punching mode or the bridging mode comprises the following steps: when the NAT network is a network penetrable NAT network, networking is carried out through the punching mode; and when the NAT network is a non-network-penetrable NAT network, networking through the bridging mode.
The NAT network includes a simple NAT network that can perform network penetration (e.g., intranet penetration) and a complex NAT network that cannot perform network penetration; optionally, the simple NAT network comprises a fully-Cone NAT (full Cone NAT), a organically-penetrable address-restricted Cone NAT (restricted Cone NAT) and a organically-penetrable port-restricted Cone NAT; the complex NAT network is an impenetrable symmetric NAT (symmetric NAT).
It should be noted that, Full Cone Nat walks the hole punching method, symmetry Nat walks the bridge method, and Port reserved Cone Nat and reserved Cone Nat prefer the hole punching method when the network can be penetrated, and select the bridge method when the network cannot be penetrated.
On the basis of the embodiment shown in fig. 3, this embodiment provides a specific implementation of the hole punching manner in step S2032. The first networker and the second networker communicate through port mapping, and the method includes: requesting an allocation port from the scheduler; and performing port mapping through the port allocated by the scheduler according to the self-increment algorithm so as to enable the first networking device to communicate with the second networking device.
When the network type is an Upnp network or a simple NAT network, the networking device requests the scheduler to allocate a port, the scheduler issues a large port based on an increasing algorithm, the first networking device maps an IPTV private network port to the port issued by the scheduler, when the second networking device needs to send data to the first device, the data is sent to the port issued by the scheduler together, the IPTV private network port forwards the data value to the first device, otherwise, the second networking device maps the developer network port to the port issued by the scheduler, and intercommunication and interconnection with the first networking device are realized. The configuration is centrally issued by a scheduler, so that the rapid networking is realized.
Furthermore, the dispatcher counts the connection result of the issued port according to the UID of the networking device, and subsequently, the port with the connection success record is issued preferentially.
On the basis of the embodiment shown in fig. 3, fig. 4 shows a flowchart for implementing the bridging manner in step S2033. As shown in fig. 4, the bridging manner in S2033 of the embodiment shown in fig. 3 specifically includes steps S401 and S402. It should be noted that the steps that are the same as those in the embodiment of fig. 3 are not repeated herein, please refer to the foregoing description. Referring to fig. 4, the first networker and the second networker communicate by establishing a socket connection with the scheduler, and the method includes:
s401, starting socks5 proxy service of the scheduler;
s402, establishing a socket long connection between the first networking device and a first port of the scheduler, and establishing a sockets 5 proxy between the second networking device and a second port of the scheduler, so that the first networking device and the second networking device perform bridge communication.
The above-mentioned sockets 5 proxy service is a proxy service based on the sockets 5 protocol of socket connection, so the scheduler is also a sockets 5 server, which supports both TCP and UDP protocols, and the socket is a programming interface encapsulating TCP/UDP. The first networker and the second networker establish connection with the dispatcher based on the socks5 proxy to carry out bridge communication, and the configuration of a core network route or a switch does not need to be modified, so that the stability of the system is guaranteed.
On the basis of the embodiment shown in fig. 4, in this embodiment, a specific implementation manner is given that the first device in the IPTV private network environment corresponding to the first network component in step S203 communicates with the second device in the developer network environment corresponding to the second network component, where the specific implementation manner includes:
when the second device sends a network request to the first device, transmitting request data corresponding to the network request sent by the second device to the second port through the second network component; and transmitting the request data received by the second port to the first networking device through the first port, so that the first networking device establishes a connection with the first device.
The process is that the second device performs network access to the first device, and the process realizes that the external device (the second device) performs network access to the internal device (the first device), so that a developer can perform remote maintenance on the IPTV system software development. The scheduler also has data buffering capacity, and the data buffering capacity can buffer the data from the first networking device and the second networking device, so that the data can not be lost.
Further, after the transmitting the request data received by the second port to the first networker through the first port of the scheduler, the method includes: transmitting response data generated after the first networking device receives the request data to the first port; and transmitting the response data received by the first port to the second networking device through the second port.
The request condition is fed back to the second device by the first network component, which is essentially the process of the first device accessing the second device, and the intercommunication and interconnection between the external device (the second device) and the internal device (the first device) are realized, so that a developer can perform remote maintenance of the IPTV system software development, and can also acquire data from the IPTV system.
Further, data of the communication link of the first device and the second device is encrypted by an encryption algorithm, wherein the encryption algorithm may be selected as a symmetric encryption algorithm.
The following describes a specific scenario to illustrate an implementation process of the bridging mode in the embodiment of the present invention. It should be noted that the description is only exemplary and should not be construed as limiting the invention.
The process accesses the first device having address 172.21.1.5 for the second device having address 10.137.1.100. Deploying a dispatcher with a domain name of dispatch.example.com, and monitoring 1080 ports (second ports) of the dispatcher to start socks5 proxy services; starting a first networker and a second networker, and respectively connecting a dispatcher scheduler; the first network device actively establishes a socket long connection with a dispatcher. example. com1195 port (first port), the connection supports a TCP/UDP protocol, and the first network device has a heartbeat and retry mechanism, so that the connection can be ensured to be continuous, and the stability of data transmission is ensured; the second networker establishes a sock5 proxy with the dispatcher example 1080 port, thereby enabling the first networker and the second networker to perform bridge communication by establishing a connection with the dispatcher.
When the second device initiates a network request to the first device, 172.21.1.0/24 requests the packet to be forwarded to the dispatch. And a 1080 port of the scheduler receives the data packet from the second networking device and buffers data in the data packet, and the scheduler sends the buffered data packet to the first networking device through a 1195 port.
And after receiving the data packet sent by the port 1195, the first networking device establishes a TCP/UDP connection with the first device of 172.21.1.5 and requests for data transparent transmission. After the request is completed, the first networker generates response data and transmits the response data back to the port of the scheduler 1195. The scheduler 1195 port buffers the response data, and returns the response data to the second networker through the 1080 port maintaining the connection state, and the second networker completes the socks5 proxy, and the second device of 10.137.1.100 receives the response of the first device of 172.21.1.5.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.
Fig. 5 is a schematic structural diagram of a networking communication device based on an IPTV system according to an embodiment of the present invention. For convenience of explanation, only the portions related to the present embodiment are shown. Referring to fig. 2, a networking communication device 500 based on the IPTV system includes:
an updating module 501, configured to update a current network environment of a scheduler after detecting that a networking device accesses a network, where the networking device includes a first networking device deployed in an IPTV private network environment and a second networking device deployed in a developer network environment, and the scheduler is deployed in a public network environment;
a determining module 502, configured to determine a network type of the updated network environment, where the network type includes a public IP network, an Upnp network, or an NAT network;
the networking module 503 is configured to perform networking through a preset networking policy corresponding to the network type based on the determination result of the network type, so that a first device in an IPTV private network environment corresponding to the first networking device communicates with a second device in a developer network environment corresponding to the second networking device, where the preset networking policy includes a direct connection manner, a hole punching manner, or a bridging manner.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described apparatuses, modules and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
Fig. 6 is a schematic diagram of a terminal device according to an embodiment of the present invention. As shown in fig. 6, the terminal device 6 of this embodiment includes: a processor 60, a memory 61 and a computer program 62, e.g. a program for determining the type of network, stored in said memory 61 and executable on said processor 60. The processor 60 executes the computer program 62 to implement the steps in each of the embodiments of the networking communication method based on the IPTV system, such as the steps 201 to 203 shown in fig. 1. Alternatively, the processor 60, when executing the computer program 62, implements the functions of each module/unit in the above-mentioned device embodiments, for example, the functions of the modules 501 to 503 shown in fig. 5.
Illustratively, the computer program 62 may be partitioned into one or more modules/units that are stored in the memory 61 and executed by the processor 60 to implement the present invention. The one or more modules/units may be a series of computer program instruction segments capable of performing specific functions, which are used to describe the execution of the computer program 62 in the terminal device 6. For example, the computer program 62 may be divided into an update module, a determination module, and a networking module (module in a virtual device), and each module has the following specific functions: the updating module is used for updating the current network environment of the scheduler after detecting that the networking device is accessed to the network, wherein the networking device comprises a first networking device deployed in an IPTV private network environment and a second networking device deployed in a developer network environment, and the scheduler is deployed in a public network environment; the judging module is used for judging the network type of the updated network environment, wherein the network type comprises a public IP network, an Upnp network or an NAT network; and the networking module is used for networking through a preset networking strategy corresponding to the network type based on the judgment result of the network type so as to enable first equipment in an IPTV private network environment corresponding to the first networking device to communicate with second equipment in a developer network environment corresponding to the second networking device, wherein the preset networking strategy comprises a direct connection mode, a hole punching mode or a bridging mode.
The terminal device 6 may be a desktop computer, a notebook, a palm computer, a cloud server, or other computing devices. The terminal device may include, but is not limited to, a processor 60, a memory 61. Those skilled in the art will appreciate that fig. 6 is merely an example of a terminal device 6 and does not constitute a limitation of terminal device 6 and may include more or less components than those shown, or some components in combination, or different components, for example, the terminal device may also include input output devices, network access devices, buses, etc.
The Processor 60 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 61 may be an internal storage unit of the terminal device 6, such as a hard disk or a memory of the terminal device 6. The memory 61 may also be an external storage device of the terminal device 6, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, which are provided on the terminal device 6. Further, the memory 61 may also include both an internal storage unit and an external storage device of the terminal device 6. The memory 61 is used for storing the computer program and other programs and data required by the terminal device. The memory 61 may also be used to temporarily store data that has been output or is to be output.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-mentioned functions. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working processes of the units and modules in the system may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus/terminal device and method may be implemented in other ways. For example, the above-described embodiments of the apparatus/terminal device are merely illustrative, and for example, the division of the modules or units is only one logical division, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated modules/units, if implemented in the form of software functional units and sold or used as separate products, may be stored in a computer readable storage medium. Based on such understanding, all or part of the flow of the method according to the embodiments of the present invention may also be implemented by a computer program, which may be stored in a computer-readable storage medium, and when the computer program is executed by a processor, the steps of the method embodiments may be implemented. . Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, and the like. It should be noted that the computer readable medium may contain content that is subject to appropriate increase or decrease as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media does not include electrical carrier signals and telecommunications signals as is required by legislation and patent practice.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present invention, and are intended to be included within the scope of the present invention.

Claims (9)

1. A networking communication method based on an IPTV system is characterized in that the method comprises the following steps:
after detecting that a networking device accesses a network, requesting a scheduler to update the current network environment of the networking device, wherein the networking device comprises a first networking device deployed in an IPTV private network environment and a second networking device deployed in a developer network environment, and the scheduler is deployed in a public network environment;
judging the network type of the updated network environment, wherein the network type comprises a public IP network, an Upnp network or an NAT network;
based on the judgment result of the network type, networking is carried out through a preset networking strategy corresponding to the network type, so that first equipment in an IPTV private network environment corresponding to the first networking device communicates with second equipment in a developer network environment corresponding to the second networking device, wherein the preset networking strategy comprises a direct connection mode, a hole punching mode or a bridging mode;
specifically, the networking is performed through a preset networking policy corresponding to the network type based on the judgment result of the network type, and the method includes:
when the network type is the public IP network, networking is carried out in the direct connection mode, wherein the direct connection mode is that the first networking device and the second networking device are in direct connection communication;
when the network type is the Upnp network, networking is performed in the hole punching mode, wherein the hole punching mode is that the first networking device and the second networking device communicate through port mapping;
and when the network type is the NAT network, networking is carried out in the punching mode or the bridging mode, wherein the bridging mode is that the first networking device and the second networking device establish socket connection with the scheduler to carry out bridging communication.
2. The method for networking communication based on the IPTV system according to claim 1, wherein the first and second netgraph devices perform bridge communication by establishing a socket connection with the scheduler, and the method comprises:
launching socks5 proxy services for the dispatcher;
establishing a socket long connection between the first network component and a first port of the scheduler, and establishing a sockets 5 proxy between the second network component and a second port of the scheduler, so that the first network component and the second network component perform bridge communication.
3. The method according to claim 2, wherein the communicating between the first device in the IPTV private network environment corresponding to the first networking device and the second device in the developer network environment corresponding to the second networking device comprises:
when the second device sends a network request to the first device, transmitting request data corresponding to the network request sent by the second device to the second port through the second network component;
and transmitting the request data received by the second port to the first networking device through the first port, so that the first networking device establishes a connection with the first device.
4. The method according to claim 3, wherein after the transmitting the request data received by the second port to the first networking device via the first port of the scheduler, the method comprises:
transmitting response data generated after the first networking device receives the request data to the first port;
and transmitting the response data received by the first port to the second networking device through the second port.
5. The method for networking communication based on the IPTV system of claim 1, wherein the first and second networker communicate through port mapping, comprising:
requesting an allocation port from the scheduler;
and performing port mapping through the port allocated by the scheduler according to the self-increment algorithm so as to enable the first networking device to communicate with the second networking device.
6. The networking communication method based on the IPTV system of claim 1, wherein when the network type is the NAT network, networking is performed in the hole punching manner or the bridge manner, which includes:
when the NAT network is a network penetrable NAT network, networking is carried out through the punching mode;
and when the NAT network is a non-network-penetrable NAT network, networking through the bridging mode.
7. A networking communication apparatus based on an IPTV system, comprising:
the updating module is used for updating the current network environment of the scheduler after detecting that the networking device is accessed to the network, wherein the networking device comprises a first networking device deployed in an IPTV private network environment and a second networking device deployed in a developer network environment, and the scheduler is deployed in a public network environment;
the judging module is used for judging the network type of the updated network environment, wherein the network type comprises a public IP network, an Upnp network or an NAT network;
the networking module is used for networking through a preset networking strategy corresponding to the network type based on the judgment result of the network type so as to enable first equipment in an IPTV private network environment corresponding to the first networking device to be communicated with second equipment in a developer network environment corresponding to the second networking device, wherein the preset networking strategy comprises a direct connection mode, a hole punching mode or a bridging mode;
the networking module is further specifically configured to: when the network type is the public IP network, networking is carried out in the direct connection mode, wherein the direct connection mode is that the first networking device and the second networking device are in direct connection communication; when the network type is the Upnp network, networking is performed in the hole punching mode, wherein the hole punching mode is that the first networking device and the second networking device communicate through port mapping; and when the network type is the NAT network, networking is carried out in the punching mode or the bridging mode, wherein the bridging mode is that the first networking device and the second networking device establish socket connection with the scheduler to carry out bridging communication.
8. A terminal device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the steps of the method according to any of claims 1 to 6 when executing the computer program.
9. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 6.
CN201910559144.3A 2019-06-21 2019-06-21 Networking communication method, device, terminal equipment and storage medium Active CN110430478B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910559144.3A CN110430478B (en) 2019-06-21 2019-06-21 Networking communication method, device, terminal equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910559144.3A CN110430478B (en) 2019-06-21 2019-06-21 Networking communication method, device, terminal equipment and storage medium

Publications (2)

Publication Number Publication Date
CN110430478A CN110430478A (en) 2019-11-08
CN110430478B true CN110430478B (en) 2021-04-30

Family

ID=68408707

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910559144.3A Active CN110430478B (en) 2019-06-21 2019-06-21 Networking communication method, device, terminal equipment and storage medium

Country Status (1)

Country Link
CN (1) CN110430478B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113035183B (en) * 2019-12-24 2022-10-04 中移物联网有限公司 Voice control network switching method and terminal, and voice processing method and system
CN114285785A (en) * 2021-12-24 2022-04-05 广州炒米信息科技有限公司 Storage system building method and device, computer equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2005025138A1 (en) * 2003-09-09 2005-03-17 Roamad Holdings Limited Wireless networking system and method
CN104378266A (en) * 2013-08-16 2015-02-25 中兴通讯股份有限公司 Communication method and system for home network and PLC device
CN108617023A (en) * 2018-03-20 2018-10-02 拓客通讯(深圳)有限公司 Self-organized network communication method and terminal device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2005025138A1 (en) * 2003-09-09 2005-03-17 Roamad Holdings Limited Wireless networking system and method
CN104378266A (en) * 2013-08-16 2015-02-25 中兴通讯股份有限公司 Communication method and system for home network and PLC device
CN108617023A (en) * 2018-03-20 2018-10-02 拓客通讯(深圳)有限公司 Self-organized network communication method and terminal device

Also Published As

Publication number Publication date
CN110430478A (en) 2019-11-08

Similar Documents

Publication Publication Date Title
CN109561171B (en) Configuration method and device of virtual private cloud service
CN105378659B (en) Client device is set to be able to access that the method and system of remote desktop
US11856065B2 (en) Data transmission for service integration between a virtual private cloud and an intranet
CN103051510B (en) The method and apparatus that network strategy unloads to the safety and efficiently of network interface unit
CN106790420B (en) A kind of more session channel method for building up and system
US20130132607A1 (en) Providing Network Capability Over A Converged Interconnect Fabric
CN110191031A (en) Network resource access method, device, electronic equipment
US20180063879A1 (en) Apparatus and method for interoperation between internet-of-things devices
CN110198334A (en) Access method, device and storage medium based on object storage service
WO2011109778A1 (en) System and method for connecting network sockets between applications
US20180069787A1 (en) Exposing a subset of hosts on an overlay network to components external to the overlay network without exposing another subset of hosts on the overlay network
CN102984237B (en) A kind of data transmission system and method connecting based on socket
CN103973785B (en) A kind of log read system and method based on P2P
CN110430478B (en) Networking communication method, device, terminal equipment and storage medium
JP5122587B2 (en) Connection control method, connection control server device, connection control client device, connection control system, and program
CN110691110B (en) Communication method, device, system, terminal, equipment and medium
CN104995610B (en) Device, system, method, storage medium and computer system for being communicated with the local component for calculating equipment
CN110784489B (en) Secure communication system and method thereof
CN102594886A (en) Method and device for direct communication between browsers, and communication system
CN110392066A (en) A kind of method and apparatus of access service
CA2770391A1 (en) System and method for sharing a payload among multiple homed networks
WO2020038443A1 (en) Bridging communication method and device
CN104488240B (en) Session management method, address management method and relevant device
CN114025009A (en) Method, system, proxy server and device for forwarding request
CN113765801B (en) Message processing method and device applied to data center, electronic equipment and medium

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