CN107888991B - Network link processing method, device and computer readable storage medium - Google Patents

Network link processing method, device and computer readable storage medium Download PDF

Info

Publication number
CN107888991B
CN107888991B CN201711121356.0A CN201711121356A CN107888991B CN 107888991 B CN107888991 B CN 107888991B CN 201711121356 A CN201711121356 A CN 201711121356A CN 107888991 B CN107888991 B CN 107888991B
Authority
CN
China
Prior art keywords
link
socket
received
time period
preset time
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
CN201711121356.0A
Other languages
Chinese (zh)
Other versions
CN107888991A (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 Software Co Ltd
Original Assignee
Shenzhen Skyworth Software 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 Software Co Ltd filed Critical Shenzhen Skyworth Software Co Ltd
Priority to CN201711121356.0A priority Critical patent/CN107888991B/en
Publication of CN107888991A publication Critical patent/CN107888991A/en
Application granted granted Critical
Publication of CN107888991B publication Critical patent/CN107888991B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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/63Control signaling related to video distribution between client, server and network components; Network processes for video distribution between server and clients or between remote clients, e.g. transmitting basic layer and enhancement layers over different transmission paths, setting up a peer-to-peer communication via Internet between remote STB's; Communication protocols; Addressing
    • H04N21/64Addressing
    • H04N21/6405Multicasting
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/02Details
    • H04L12/16Arrangements for providing special services to substations
    • H04L12/18Arrangements for providing special services to substations for broadcast or conference, e.g. multicast
    • 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/63Control signaling related to video distribution between client, server and network components; Network processes for video distribution between server and clients or between remote clients, e.g. transmitting basic layer and enhancement layers over different transmission paths, setting up a peer-to-peer communication via Internet between remote STB's; Communication protocols; Addressing
    • H04N21/643Communication protocols
    • H04N21/64322IP
    • 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/63Control signaling related to video distribution between client, server and network components; Network processes for video distribution between server and clients or between remote clients, e.g. transmitting basic layer and enhancement layers over different transmission paths, setting up a peer-to-peer communication via Internet between remote STB's; Communication protocols; Addressing
    • H04N21/647Control signaling between network components and server or clients; Network processes for video distribution between server and clients, e.g. controlling the quality of the video stream, by dropping packets, protecting content from unauthorised alteration within the network, monitoring of network load, bridging between two different networks, e.g. between IP and wireless
    • H04N21/64723Monitoring of network processes or resources, e.g. monitoring of network load
    • H04N21/64738Monitoring network characteristics, e.g. bandwidth, congestion level

Landscapes

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

Abstract

The invention discloses a network link processing method, which comprises the steps of setting a socket IP as the IP of a PPPoE link when a multicast adding instruction is received, and determining whether multicast data are received in a first preset time period; then when the multicast data is not received in a first preset time period, resetting the socket IP as the IP of the ETH link, and determining whether the multicast data is received in a second preset time period; and then, when the multicast data is not received in a second preset time period, setting the socket IP as the IP of the PPPoE link again. The invention also discloses a network link processing device and a computer readable storage medium. The method of the invention can process the multicast data accessed to the ETH link under the condition that the current IPTV terminal accesses the IPTV network by the PPPoE account, thereby ensuring the timely and effective transmission of the data and improving the stability of the data transmission of the IPTV terminal.

Description

Network link processing method, device and computer readable storage medium
Technical Field
The present invention relates to the field of digital television technologies, and in particular, to a network link processing method and apparatus, and a computer-readable storage medium.
Background
Accessing a digital broadband television IPTV (Internet Protocol television) network through a Point-to-Point communication Protocol PPPoE (Point to Point Protocol Ethernet) account based on a local area network is a network access verification mode. The interface link corresponding to PPPoE is a link created on an ethernet ETH (ethernet) interface, and is also a data transmission on an ETH physical port, but a point-to-point protocol ppp (point protocol) protocol is applied for dialing. In this case, there are generally two paths for multicast data: one is to transmit the data packets to the ue through the corresponding link of the PPP protocol, and each data packet has a PPP frame header and an ethernet frame header. The other is directly over the ethernet link. Under normal conditions, which network access authentication mode is used, which multicast link data is sent. However, in the recent past, such a scenario has emerged: when the PPPoE access mode is used, multicast stream data from an operator needs to be transmitted through an Ethernet link; and some hotels provide local multicast live data independent of IPTV, and need to play multicast data streams established by local ethernet routers in case of network access by PPPoE links. At this time, a method is needed to switch between the two multicast modes of PPPoE link and ETH link.
The above is only for the purpose of assisting understanding of the technical aspects of the present invention, and does not represent an admission that the above is prior art.
Disclosure of Invention
The present invention mainly aims to provide a network link processing method, a device and a computer readable storage medium, and aims to solve the technical problem of processing multicast data transmitted through an ETH link in a PPPoE access mode.
In order to achieve the above object, the present invention provides a network link processing method, which includes the following steps:
when a multicast adding instruction is received, setting a socket IP as the IP of a PPPoE link, and determining whether multicast data is received in a first preset time period;
when the multicast data is not received in the first preset time period, resetting the socket IP as the IP of the ETH link, and determining whether the multicast data is received in a second preset time period;
and when the multicast data is not received in the second preset time period, setting the socket IP as the IP of the PPPoE link again.
Preferably, before the step of setting the socket IP as the IP of the PPPoE link and determining whether multicast data is received within a first preset time period after the step of receiving the multicast joining instruction is performed, the method further includes:
and when dial-up connection is completed through the ETH interface, setting a static IP for the ETH interface, and accessing the EPG of the IPTV.
Preferably, when receiving a multicast joining instruction, setting a socket IP as an IP of a PPPoE link, and determining whether multicast data is received within a first preset time period includes:
when receiving a multicast adding instruction, creating a multicast socket, and setting a socket IP as the IP of a PPPoE link;
and joining the multicast group and monitoring the multicast data, and determining whether the multicast data is received in a first preset time period.
Preferably, after the step of determining whether multicast data is received within a first preset time period, the method further comprises:
and entering a data processing stage when the multicast data is received in the first preset time period.
Preferably, when the multicast data is not received in the first preset time period, the step of resetting the socket IP as the IP of the ETH link, and determining whether the multicast data is received in the second preset time period includes:
when the multicast data is not received within the first preset time period, determining whether a link type corresponding to the socket interface executes over-switching operation;
and when the link type corresponding to the socket interface does not execute the switching operation, resetting the socket IP as the IP of the ETH link, adding a multicast group, monitoring multicast data, and determining whether the multicast data is received in a second preset time period.
Preferably, after the step of determining whether a link type corresponding to the socket interface has performed a handover operation when the multicast data is not received within the first preset time period, the method further includes:
when the link type corresponding to the socket interface has executed switching operation, determining whether the link type corresponding to the current socket interface is PPPoE;
and entering a data processing stage when the link type corresponding to the current socket interface is PPPoE.
Preferably, when the multicast data is not received within the second preset time period, the step of setting the socket IP as the IP of the PPPoE link again includes:
when the multicast data is not received in the second preset time period, determining whether a link type corresponding to the socket interface executes over-switching operation;
when the link type corresponding to the socket interface has executed switching operation, determining whether the link type corresponding to the current socket interface is PPPoE;
and when the link type corresponding to the current socket interface is not PPPoE, leaving the current multicast group, and setting the socket IP as the IP of the PPPoE link again.
Preferably, after the step of setting the socket IP again as the IP of the PPPoE link, the method further includes:
and when the socket IP is set as the IP of the PPPoE link again, executing the steps of adding the multicast group and monitoring the multicast data.
In order to achieve the above object, the present invention provides a network link processing apparatus, including: a memory, a processor, and a network link handler stored on the memory and executable on the processor, the network link handler when executed by the processor implementing the steps of the network link processing method as in any one of the above.
In addition, to achieve the above object, the present invention further provides a computer readable storage medium, wherein the computer readable storage medium stores thereon a network link processing program, and the network link processing program, when executed by a processor, implements the steps of the network link processing method according to any one of the above.
According to the scheme, when a multicast adding instruction is received, a socket IP is set to be the IP of a PPPoE link, and whether multicast data are received or not in a first preset time period is determined; then when the multicast data is not received in the first preset time period, resetting the socket IP as the IP of the ETH link, and determining whether the multicast data is received in a second preset time period; and then, when the multicast data is not received in the second preset time period, setting the socket IP as the IP of the PPPoE link again. The network link processing method provided by the invention can simultaneously access the multicast data of the ETH link under the condition that the current IPTV terminal accesses the IPTV network by the PPPoE account number, has lower cost, can essentially solve the problem of temporary multicast data transmission of the unused link, ensures the timely and effective transmission of the data, and improves the stability of the data transmission of the IPTV terminal and the utilization rate of socket.
Drawings
Fig. 1 is a schematic structural diagram of a terminal to which a network link processing apparatus belongs in a hardware operating environment according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating a network link processing method according to a first embodiment of the present invention;
fig. 3 is a detailed flowchart of a step of setting a socket IP as an IP of a PPPoE link and determining whether multicast data is received within a first preset time period when a multicast adding instruction is received in the second embodiment of the network link processing method according to the present invention;
fig. 4 is a detailed flowchart of a step of resetting a socket IP to an IP of an ETH link and determining whether multicast data is received within a second preset time period in the third embodiment of the network link processing method according to the present invention when the multicast data is not received within the first preset time period;
fig. 5 is a flowchart illustrating a fourth embodiment of a network link processing method according to the present invention;
fig. 6 is a detailed flowchart of the step of setting the socket IP again as the IP of the PPPoE link when the multicast data is not received within the second preset time period in the fifth embodiment of the network link processing method according to the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
As shown in fig. 1, fig. 1 is a schematic structural diagram of a terminal belonging to a device in a hardware operating environment according to an embodiment of the present invention.
The terminal of the embodiment of the invention can be a PC, and can also be a mobile terminal device with a display function, such as a smart phone, a tablet computer, an electronic book reader, an MP3(Moving Picture Experts Group Audio Layer III, dynamic video Experts compress standard Audio Layer 3) player, an MP4(Moving Picture Experts Group Audio Layer IV, dynamic video Experts compress standard Audio Layer 3) player, a portable computer, and the like.
As shown in fig. 1, the terminal may include: a processor 1001, such as a CPU, a network interface 1004, a user interface 1003, a memory 1005, a communication bus 1002. Wherein a communication bus 1002 is used to enable connective communication between these components. The user interface 1003 may include a Display screen (Display), an input unit such as a Keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface). The memory 1005 may be a high-speed RAM memory or a non-volatile memory (e.g., a magnetic disk memory). The memory 1005 may alternatively be a storage device separate from the processor 1001.
Optionally, the terminal may further include a camera, a Radio Frequency (RF) circuit, a sensor, an audio circuit, a WiFi module, and the like. Such as light sensors, motion sensors, and other sensors. Specifically, the light sensor may include an ambient light sensor that may adjust the brightness of the display screen according to the brightness of ambient light, and a proximity sensor that may turn off the display screen and/or the backlight when the mobile terminal is moved to the ear. As one of the motion sensors, the gravity acceleration sensor can detect the magnitude of acceleration in each direction (generally, three axes), detect the magnitude and direction of gravity when the mobile terminal is stationary, and can be used for applications (such as horizontal and vertical screen switching, related games, magnetometer attitude calibration), vibration recognition related functions (such as pedometer and tapping) and the like for recognizing the attitude of the mobile terminal; of course, the mobile terminal may also be configured with other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, and an infrared sensor, which are not described herein again.
Those skilled in the art will appreciate that the terminal structure shown in fig. 1 is not intended to be limiting and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
As shown in fig. 1, a memory 1005, which is a kind of computer storage medium, may include therein an operating system, a network communication module, a user interface module, and a network link handler.
In the terminal shown in fig. 1, the network interface 1004 is mainly used for connecting to a backend server and performing data communication with the backend server; the user interface 1003 is mainly used for connecting a client (user side) and performing data communication with the client; and processor 1001 may be used to invoke a network link handler stored in memory 1005.
In this embodiment, the network link processing apparatus includes: a memory 1005, a processor 1001, and a network link handler stored on the memory 1005 and operable on the processor 1001, wherein the processor 1001, when calling the network link handler stored in the memory 1005, performs the following operations:
when a multicast adding instruction is received, setting a socket IP as the IP of a PPPoE link, and determining whether multicast data is received in a first preset time period;
when the multicast data is not received in the first preset time period, resetting the socket IP as the IP of the ETH link, and determining whether the multicast data is received in a second preset time period;
and when the multicast data is not received in the second preset time period, setting the socket IP as the IP of the PPPoE link again.
Further, the processor 1001 may call the network link handler stored in the memory 1005, and also perform the following operations:
and when dial-up connection is completed through the ETH interface, setting a static IP for the ETH interface, and accessing the EPG of the IPTV.
Further, the processor 1001 may call the network link handler stored in the memory 1005, and also perform the following operations:
when receiving a multicast adding instruction, creating a multicast socket, and setting a socket IP as the IP of a PPPoE link;
and joining the multicast group and monitoring the multicast data, and determining whether the multicast data is received in a first preset time period.
Further, the processor 1001 may call the network link handler stored in the memory 1005, and also perform the following operations:
and entering a data processing stage when the multicast data is received in the first preset time period.
Further, the processor 1001 may call the network link handler stored in the memory 1005, and also perform the following operations:
when the multicast data is not received within the first preset time period, determining whether a link type corresponding to the socket interface executes over-switching operation;
and when the link type corresponding to the socket interface does not execute the switching operation, resetting the socket IP as the IP of the ETH link, adding a multicast group, monitoring multicast data, and determining whether the multicast data is received in a second preset time period.
Further, the processor 1001 may call the network link handler stored in the memory 1005, and also perform the following operations:
when the link type corresponding to the socket interface has executed switching operation, determining whether the link type corresponding to the current socket interface is PPPoE;
and entering a data processing stage when the link type corresponding to the current socket interface is PPPoE.
Further, the processor 1001 may call the network link handler stored in the memory 1005, and also perform the following operations:
when the multicast data is not received in the second preset time period, determining whether a link type corresponding to the socket interface executes over-switching operation;
when the link type corresponding to the socket interface has executed switching operation, determining whether the link type corresponding to the current socket interface is PPPoE;
and when the link type corresponding to the current socket interface is not PPPoE, leaving the current multicast group, and setting the socket IP as the IP of the PPPoE link again.
Further, the processor 1001 may call the network link handler stored in the memory 1005, and also perform the following operations:
and when the socket IP is set as the IP of the PPPoE link again, executing the steps of adding the multicast group and monitoring the multicast data.
A first embodiment of the present invention provides a network link processing method, and referring to fig. 2, fig. 2 is a schematic flow diagram of the first embodiment of the network link processing method of the present invention, where the network link processing method includes:
step S10, when receiving the multicast adding instruction, setting the socket IP as the IP of the PPPoE link, and determining whether multicast data is received in a first preset time period;
a digital broadband television iptv (internet Protocol television) is a new service that provides accurate digital multimedia services to users by using internet cable network resources and network technologies such as unicast and multicast, and using a h264 video compression method. It is being widely popularized with the continuous improvement of broadband operator services. The multicast technique is a technique of making full use of the replication capability of a network node. For users watching the same channel live broadcast, the users can join the same multicast group, and the network node copies the data to the corresponding user home, so that only one part of media data on the backbone network can be provided, and the effect of reducing the bearing pressure of the backbone network is achieved.
The PPP protocol is connected from the bearing point to the point on the Ethernet, a large number of hosts form a network by utilizing the Ethernet, the Internet is connected through a remote access device, the control and charging functions are realized for each accessed host, and the PPPoE is widely applied to a series of applications including cell group network construction and the like due to the extremely high cost performance. Ethernet ETH is a baseband lan specification and is also the most common communication protocol standard used by today's existing lans. The point-to-point protocol ppp (point-to-point protocol) provides an encapsulation protocol for IP traffic transmission between two peer nodes. In the TCP-IP protocol suite, it is a data link layer protocol used to synchronously modulate connections, replacing the original non-standard second layer protocol, SLIP. Point-to-Point communication Protocol PPPoE (Point to Point Protocol over ethernet) based on lan is a newly developed standard to meet the communication between more and more broadband internet devices and faster networks, and is based on two widely accepted standards: local area network Ethernet and PPP point-to-point dial protocols. Compared with other protocols, PPPoE has the advantages that for an end user, the user does not need to know a deeper local area network technology, and only needs to use the technology as a common dial-up networking technology, for a service provider, huge expenses are not needed to be spent on large-area transformation on the basis of the existing local area network, and an IP address binding user is set to support a private line mode. The essence of PPPoE is a relay protocol between Ethernet and dial-up network, which inherits the advantages of Ethernet such as high speed and PPP dial-up simplicity, user authentication, IP allocation and the like. In practical application, PPPoE uses the working mechanism of Ethernet to interconnect the 10 BASE-T interface of ADSL Modem with internal Ethernet, after the ADSL Modem adopts the bridge packaging mode of RFC1483 to carry out LLC/SNAP packaging on the PPP packet sent by the terminal, the connection is established between the ADSL Modem and the broadband access server at the network side through the PVC connecting the two ends, thus realizing the dynamic access of PPP. The port number socket is also called a socket, is used for describing an IP address and a port, is a handle of a communication chain, and can be used for realizing communication between different virtual machines or different computers.
The network access authentication method of the IPTV network generally includes access to a DHCP + or PPPoE account. The PPPoE interface is a link created by dialing by applying PPP protocol over ETH interface, and is essentially data transmission over ETH physical port. Therefore, in this case, the multicast data may be transmitted through two paths, the first path is to transmit the multicast data to the user end through the PPPoE link corresponding to the PPP protocol, and each packet has a PPP frame header and an ethernet frame header; the other is to send directly to the user end through the ethernet link.
When the user opens the IPTV, the user requests any program through the IPTV, namely, the user sends a multicast adding instruction. And when the IPTV terminal receives the multicast adding instruction, establishing a multicast socket, setting a socket IP as the IP of the PPPoE link, adding a multicast group corresponding to the multicast instruction based on the IP of the PPPoE link, monitoring the socket, and determining whether multicast data is received in a first preset time period. The first preset time period may be set by a technician, for example, set to 500ms, and then after the IPTV terminal joins the designated multicast group, the socket is monitored for 500ms to determine whether multicast data is received in this time period.
Step S20, when the multicast data is not received in the first preset time period, resetting the socket IP as the IP of the ETH link, and determining whether the multicast data is received in the second preset time period;
and if the multicast data sent by the appointed multicast group is not received in the first preset time period, trying to switch the link when a judgment result that the link switching action is not executed before is obtained. Specifically, first leave the previous multicast group, then modify the socket IP to the IP of the ETH link, join the multicast group based on the IP of the ETH link and listen to the socket data.
Step S30, when the multicast data is not received within the second preset time period, setting the socket IP as the IP of the PPPoE link again.
If the multicast data sent by the appointed multicast group is not received in the second preset time period, when the judgment result of executing the link switching action is obtained, the switching back to the PPPoE link is tried, at the moment, the previous multicast group still leaves, then the socket IP is modified again to be the IP of the PPPoE link, and the switching back to the PPPoE link is carried out again.
Further, in an embodiment, before step S10, the method further includes:
and when dial-up connection is completed through the ETH interface, setting a static IP for the ETH interface, and accessing the EPG of the IPTV.
A dial-up connection is the process of establishing communication. When an IPTV terminal wants to start a PPPoE session, it must first perform a discovery phase to identify the ethernet MAC address of the opposite end and establish a PPPoE SESSON _ ID. In the discovery phase, based on the topology of the network, the client may discover multiple PPPoE servers and then select one from them, but typically the one that reacts the fastest. The discovery phase is a stateless phase, which mainly selects an access server, determines a PPP Session identifier Session ID to be established, and simultaneously obtains connection information from a peer to a peer; the PPP session phase performs standard PPP procedures. When this phase is completed, both ends of the communication know the PPPoE SESSON _ ID and the ethernet address of the opposite end, which together define a unique PPPoE session. These steps include the client broadcasting an initiation Packet (PADI), one or more PPPoE servers sending response Packets (PADO), the client sending request Packets (PADR) to selected servers, and the selected PPPoE servers sending an acknowledgement Packet (PADS) to the client. When the client receives the acknowledgement packet, it can start the PPP session phase. When the PPPoE server sends out an acknowledgement packet, it can start a PPP session.
In this embodiment, the set-top box terminal may perform dial-up connection based on PPP protocol through the ETH interface, and when a communication channel is established, set an arbitrary static IP for the ETH interface, and access an electronic Program menu epg (electronic Program guide) of IPTV, so as to complete preparation before transmitting multicast data. An electronic Program guide epg (electronic Program guide) system is used as a portal system of an IPTV service, and mainly has functions of providing a Program menu, helping a user select a favorite multicast channel, requesting a favorite video Program, and searching various information provided by the IPTV.
In the network link processing method provided in this embodiment, when a multicast adding instruction is received, a socket IP is set to be an IP of a PPPoE link, and it is determined whether multicast data is received within a first preset time period; then when the multicast data is not received in the first preset time period, resetting the socket IP as the IP of the ETH link, and determining whether the multicast data is received in a second preset time period; then, when the multicast data is not received in the second preset time period, setting the socket IP as the IP of the PPPoE link again; the network link processing method provided by the invention can simultaneously access the multicast data of the ETH link under the condition that the current IPTV terminal accesses the IPTV network by the PPPoE account number, has lower cost, can essentially solve the problem of temporary multicast data transmission of the unused link, ensures the timely and effective transmission of the data, and improves the stability of the data transmission of the IPTV terminal and the utilization rate of socket.
Based on the first embodiment, a second embodiment of the network link processing method of the present invention is proposed, and referring to fig. 3, step S10 includes:
step S11, when receiving the adding multicast command, creating a multicast socket, and setting the socket IP as the IP of the PPPoE link;
after the user starts the IPTV terminal, the user can search the content interested by the user through the EPG information system provided by the IPTV, and then order any program, namely, send a multicast adding instruction. And when the IPTV terminal receives the multicast adding instruction, establishing a multicast socket and setting a socket IP as the IP of the PPPoE link.
Step S12, join the multicast group and monitor the multicast data, and determine whether the multicast data is received within a first preset time period.
And adding a multicast group corresponding to the multicast adding instruction based on the IP of the PPPoE link, monitoring the socket and determining whether multicast data is received in a first preset time period. The first preset time period may be set by a technician, for example, set to 500ms, and then after the IPTV terminal joins the designated multicast group, the socket is monitored for 500ms to determine whether multicast data is received in this time period.
Further, in an embodiment, after step S12, the method further includes:
and entering a data processing stage when the multicast data is received in the first preset time period.
Generally, the digital television service is implemented by digitally compressing, encoding and modulating captured analog signals such as video and audio to form digital signals, transmitting the digital signals to a digital television terminal in various ways, receiving the digital signals by the digital television terminal, and restoring the analog signals such as video and audio to display and play through digital demodulation and decoding processing. The program source received by the digital television terminal or the set-top box is transmitted in the form of multi-segment code stream, the digital television terminal automatically acquires the program code stream information sent by the television program service provider through the digital television information when being started each time, and the program code stream information is analyzed when the digital television terminal or the set-top box receives the program code stream information.
When the IPTV terminal receives the multicast data of the PPPoE link in the first preset time period, the IPTV terminal also processes the received multicast data according to a certain method, including but not limited to the steps of identifying, verifying, analyzing, and the like.
In the network link processing method provided in this embodiment, when a multicast adding instruction is received, a multicast socket is created, and a socket IP is set to be an IP of a PPPoE link; then, adding the multicast group and monitoring multicast data, and determining whether the multicast data is received in a first preset time period; after the socket IP is set as the IP of the PPPoE link, the data transmission condition of the socket interface can be monitored within a certain time, the data transmission condition is mastered, and when the data cannot be received after the certain time, the condition can be fed back in time so that the IPTV terminal can execute the next procedure.
Based on the first embodiment, a third embodiment of the network link processing method of the present invention is proposed, and referring to fig. 4, step S20 includes:
step S21, when the multicast data is not received in the first preset time period, determining whether the link type corresponding to the socket interface executes the over-switching operation;
when the socket interface does not receive the multicast data sent by the specified multicast group in the first preset time period, judging whether the link type corresponding to the socket interface has the over-switching operation.
Step S22, when the link type corresponding to the socket interface does not perform the switching operation, resetting the socket IP as the IP of the ETH link, adding to the multicast group and monitoring the multicast data, and determining whether the multicast data is received within a second preset time period.
When a judgment result that the link switching action has not been executed before is obtained, the link switching is tried. Specifically, first leave the previous multicast group, then modify the socket IP to the IP of the ETH link, join the multicast group based on the IP of the ETH link and monitor the socket data, the IP of the ETH is a static IP, and is randomly allocated in the process of dial-up connection. And when the socket IP is modified, rejoining the multicast group and monitoring the multicast data, and determining whether the multicast data is received in a second preset time period. The second preset time period may be set by a technician, for example, set to 500ms, and then after the IPTV terminal joins the designated multicast group, the socket is monitored for 500ms to determine whether multicast data is received in this time period.
In the network link processing method provided in this embodiment, when the multicast data is not received within the first preset time period, it is determined whether a link type corresponding to the socket interface performs an over-switching operation; then when the link type corresponding to the socket interface does not execute the switching operation, resetting the socket IP as the IP of the ETH link, adding a multicast group, monitoring multicast data, and determining whether the multicast data is received in a second preset time period; under the condition that the multicast data is not received in the first preset time period, the socket IP is modified to be the static IP of the ETH link, and the multicast data is waited to be received.
Based on the third embodiment, a fourth embodiment of the network link processing method of the present invention is proposed, and referring to fig. 5, after step S21, the method further includes:
step S23, when the link type corresponding to the socket interface has executed the switching operation, determining whether the link type corresponding to the current socket interface is PPPoE;
and when a judgment result that the link switching action is executed before is obtained, obtaining a link type corresponding to the current socket interface, and determining whether the link is PPPoE.
And step S24, when the link type corresponding to the current socket interface is PPPoE, leaving the current multicast group.
And when the link type corresponding to the current socket interface is PPPoE, leaving the current multicast group and ending the step.
In the network link processing method provided in this embodiment, when a link type corresponding to the socket interface has performed a switching operation, it is determined whether the link type corresponding to the current socket interface is PPPoE; then, when the link type corresponding to the current socket interface is PPPoE, entering a data processing stage; when the link switching action is executed, if the current link type is still PPPoE, the current step is directly exited, and the IPTV terminal can normally receive the multicast data sent by other links afterwards.
Based on the first embodiment, a fifth embodiment of the network link processing method of the present invention is proposed, and referring to fig. 6, step S30 includes:
step S31, when the multicast data is not received within the second preset time period, determining whether a link type corresponding to the socket interface has executed an over-switching operation;
and when the multicast data is not received in a second preset time period, judging whether the link type corresponding to the socket interface has the over-switching operation.
Step S32, when the link type corresponding to the socket interface has executed the switching operation, determining whether the link type corresponding to the current socket interface is PPPoE;
and when the link type corresponding to the socket interface has executed the switching operation, acquiring the link type corresponding to the current socket interface, and determining whether the link is PPPoE.
And step S33, when the link type corresponding to the current socket interface is not PPPoE, leaving the current multicast group, and setting the socket IP as the IP of the PPPoE link again.
And when the link type corresponding to the current socket interface is not PPPoE, leaving the current multicast group, and setting the socket IP as the IP of the PPPoE link again.
Further, in an embodiment, after the step of setting the socket IP again as the IP of the PPPoE link, the method further includes:
and when the socket IP is set as the IP of the PPPoE link again, executing the steps of adding the multicast group and monitoring the multicast data.
And when the socket IP is set to be the IP of the PPPoE link again, the communication link is switched back to the PPPoE link, and the data is continuously waited. When the user requests the program through the EPG of the IPTV, the user sends a multicast adding instruction. And when receiving the multicast adding instruction, the IPTV terminal executes the action of establishing the multicast socket again, sets the socket IP as the IP of the PPPoE link, adds the multicast group corresponding to the multicast instruction based on the IP of the PPPoE link, monitors the socket and determines whether multicast data is received in a first preset time period.
In the network link processing method provided in this embodiment, when the multicast data is not received within the second preset time period, it is determined whether a link type corresponding to the socket interface performs an over-switching operation; then when the link type corresponding to the socket interface has executed switching operation, determining whether the link type corresponding to the current socket interface is PPPoE; then when the link type corresponding to the current socket interface is not PPPoE, leaving the current multicast group, and setting the socket IP as the IP of the PPPoE link again; when the link type corresponding to the switched socket interface is an ETH link, if the data can not be received, the PPPoE type is switched back again to wait for the data, so that the IPTV terminal can normally receive multicast data sent by other links later.
Furthermore, an embodiment of the present invention further provides a computer-readable storage medium, where a network link processing program is stored on the computer-readable storage medium, and when executed by a processor, the network link processing program implements the following operations:
when a multicast adding instruction is received, setting a socket IP as the IP of a PPPoE link, and determining whether multicast data is received in a first preset time period;
when the multicast data is not received in the first preset time period, resetting the socket IP as the IP of the ETH link, and determining whether the multicast data is received in a second preset time period;
and when the multicast data is not received in the second preset time period, setting the socket IP as the IP of the PPPoE link again.
Further, the network link handler when executed by the processor further performs the following:
and when dial-up connection is completed through the ETH interface, setting a static IP for the ETH interface, and accessing the EPG of the IPTV.
Further, the network link handler when executed by the processor further performs the following:
when receiving a multicast adding instruction, creating a multicast socket, and setting a socket IP as the IP of a PPPoE link;
and joining the multicast group and monitoring the multicast data, and determining whether the multicast data is received in a first preset time period.
Further, the network link handler when executed by the processor further performs the following:
and entering a data processing stage when the multicast data is received in the first preset time period.
Further, the network link handler when executed by the processor further performs the following:
when the multicast data is not received within the first preset time period, determining whether a link type corresponding to the socket interface executes over-switching operation;
and when the link type corresponding to the socket interface does not execute the switching operation, resetting the socket IP as the IP of the ETH link, adding a multicast group, monitoring multicast data, and determining whether the multicast data is received in a second preset time period.
Further, the network link handler when executed by the processor further performs the following:
when the link type corresponding to the socket interface has executed switching operation, determining whether the link type corresponding to the current socket interface is PPPoE;
and entering a data processing stage when the link type corresponding to the current socket interface is PPPoE.
Further, the network link handler when executed by the processor further performs the following:
when the multicast data is not received in the second preset time period, determining whether a link type corresponding to the socket interface executes over-switching operation;
when the link type corresponding to the socket interface has executed switching operation, determining whether the link type corresponding to the current socket interface is PPPoE;
and when the link type corresponding to the current socket interface is not PPPoE, leaving the current multicast group, and setting the socket IP as the IP of the PPPoE link again.
Further, the network link handler when executed by the processor further performs the following:
and when the socket IP is set as the IP of the PPPoE link again, executing the steps of adding the multicast group and monitoring the multicast data.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) as described above and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (9)

1. A network link processing method, characterized in that the network link processing method comprises the steps of:
when a multicast adding instruction is received, setting a socket IP as the IP of a PPPoE link, and determining whether multicast data is received in a first preset time period;
when the multicast data is not received in the first preset time period, resetting the socket IP as the IP of the ETH link, and determining whether the multicast data is received in a second preset time period;
when the multicast data is not received within the second preset time period, setting the socket IP as the IP of the PPPoE link again;
wherein, when the multicast data is not received in the first preset time period, the step of resetting the socket IP as the IP of the ETH link and determining whether the multicast data is received in the second preset time period includes:
when the multicast data is not received within the first preset time period, determining whether a link type corresponding to the socket interface executes over-switching operation;
and when the link type corresponding to the socket interface does not execute the switching operation, resetting the socket IP as the IP of the ETH link, adding a multicast group, monitoring multicast data, and determining whether the multicast data is received in a second preset time period.
2. The method of claim 1, wherein before the step of setting a socket IP as an IP of a PPPoE link and determining whether multicast data is received within a first preset time period when the multicast joining instruction is received, the method further comprises:
and when dial-up connection is completed through the ETH interface, setting a static IP for the ETH interface, and accessing the EPG of the IPTV.
3. The method as claimed in claim 1, wherein the step of setting a socket IP as an IP of a PPPoE link when the multicast joining instruction is received, and determining whether multicast data is received within a first preset time period comprises:
when receiving a multicast adding instruction, creating a multicast socket, and setting a socket IP as the IP of a PPPoE link;
and joining the multicast group and monitoring the multicast data, and determining whether the multicast data is received in a first preset time period.
4. The network link processing method of claim 1 or 3, wherein after the step of determining whether multicast data is received within a first preset time period, the method further comprises:
and entering a data processing stage when the multicast data is received in the first preset time period.
5. The method according to claim 1, wherein after the step of determining whether the link type corresponding to the socket interface performs the over-switching operation when the multicast data is not received within the first preset time period, the method further includes:
when the link type corresponding to the socket interface has executed switching operation, determining whether the link type corresponding to the current socket interface is PPPoE;
and entering a data processing stage when the link type corresponding to the current socket interface is PPPoE.
6. The method of claim 1, wherein the step of setting a socket IP again as the IP of the PPPoE link when the multicast data is not received within the second preset time period comprises:
when the multicast data is not received in the second preset time period, determining whether a link type corresponding to the socket interface executes over-switching operation;
when the link type corresponding to the socket interface has executed switching operation, determining whether the link type corresponding to the current socket interface is PPPoE;
and when the link type corresponding to the current socket interface is not PPPoE, leaving the current multicast group, and setting the socket IP as the IP of the PPPoE link again.
7. The network link processing method of claim 1 or 6, wherein after the step of setting the socket IP again as the IP of the PPPoE link, the method further comprises:
and when the socket IP is set as the IP of the PPPoE link again, executing the steps of adding the multicast group and monitoring the multicast data.
8. A network link processing apparatus, the network link processing apparatus comprising: memory, a processor and a network link handler stored on the memory and executable on the processor, the network link handler when executed by the processor implementing the steps of the network link processing method according to any of claims 1 to 7.
9. A computer-readable storage medium, having stored thereon a network link processing program which, when executed by a processor, implements the steps of the network link processing method according to any one of claims 1 to 7.
CN201711121356.0A 2017-11-10 2017-11-10 Network link processing method, device and computer readable storage medium Active CN107888991B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711121356.0A CN107888991B (en) 2017-11-10 2017-11-10 Network link processing method, device and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711121356.0A CN107888991B (en) 2017-11-10 2017-11-10 Network link processing method, device and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN107888991A CN107888991A (en) 2018-04-06
CN107888991B true CN107888991B (en) 2020-04-10

Family

ID=61776545

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711121356.0A Active CN107888991B (en) 2017-11-10 2017-11-10 Network link processing method, device and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN107888991B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1863156A (en) * 2005-10-25 2006-11-15 华为技术有限公司 Method and system for providing clock synchronization by packet network
CN1992707A (en) * 2005-12-29 2007-07-04 上海贝尔阿尔卡特股份有限公司 Fast restoration method of multicast service and network apparatus
WO2007101374A1 (en) * 2006-03-06 2007-09-13 Zte Corporation A method for establishing the point-to-point protocol channel dynamically in the heterogeneous link layer path
CN101052006A (en) * 2007-05-14 2007-10-10 华为技术有限公司 Message up sending method and interface plate and router for realizing said method
CN101083779A (en) * 2007-05-22 2007-12-05 深圳市智林机电技术有限公司 Method and equipment for realizing cheap redundant network array
CN101159523A (en) * 2007-11-26 2008-04-09 中控科技集团有限公司 Industry ethernet based fault processing method, system and a switching arrangement
CN101345678A (en) * 2008-08-27 2009-01-14 华为技术有限公司 Multicast communication method, system and multicast communication equipment

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1863156A (en) * 2005-10-25 2006-11-15 华为技术有限公司 Method and system for providing clock synchronization by packet network
CN1992707A (en) * 2005-12-29 2007-07-04 上海贝尔阿尔卡特股份有限公司 Fast restoration method of multicast service and network apparatus
WO2007101374A1 (en) * 2006-03-06 2007-09-13 Zte Corporation A method for establishing the point-to-point protocol channel dynamically in the heterogeneous link layer path
CN101052006A (en) * 2007-05-14 2007-10-10 华为技术有限公司 Message up sending method and interface plate and router for realizing said method
CN101083779A (en) * 2007-05-22 2007-12-05 深圳市智林机电技术有限公司 Method and equipment for realizing cheap redundant network array
CN101159523A (en) * 2007-11-26 2008-04-09 中控科技集团有限公司 Industry ethernet based fault processing method, system and a switching arrangement
CN101345678A (en) * 2008-08-27 2009-01-14 华为技术有限公司 Multicast communication method, system and multicast communication equipment

Also Published As

Publication number Publication date
CN107888991A (en) 2018-04-06

Similar Documents

Publication Publication Date Title
US9191415B2 (en) Method and system for providing virtual gateway services
EP2744169B1 (en) Method and apparatus for playing streaming media files
US8429707B2 (en) Method and apparatus for interacting with a set-top box based on sensor events from a user device
EP3996355B1 (en) Method for transferring media stream and user equipment
US9456398B2 (en) Auto-discovery of home and out-of-franchise networks
CN101753976B (en) Method for controlling interactive web TV business as well as equipment and system thereof
US10034057B2 (en) Message processing method, device, gateway, STB and IPTV
CN111427527B (en) Screen projection method, device, equipment and computer readable storage medium
CN108632558B (en) Video call method and device
WO2022089088A1 (en) Display device, mobile terminal, screen-casting data transmission method, and transmission system
KR101647938B1 (en) Method and System for Providing Media Streaming By Interworking Heterogeneous Network through a Mobile Communication Network
WO2014019357A1 (en) Method and device for implementing multi-screen interaction
WO2013178015A1 (en) Method, apparatus, and system for acquiring media
WO2012151957A1 (en) Server, client, and method and system for playing video file remotely therewith
WO2013083052A1 (en) Method, device, and system for acquiring multicast address
CN107547517B (en) Audio and video program recording method, network equipment and computer device
JP4789604B2 (en) Content switching determination system, switching instruction terminal, and content switching determination method
US11102551B2 (en) Sharing video content from a set top box through a mobile phone
US20080025306A1 (en) Internet protocol television system, method for providing internet protocol multicast TV signal, TV transferring apparatus, and TV receiving apparatus
CN107888991B (en) Network link processing method, device and computer readable storage medium
WO2015156476A1 (en) Device for transmitting and receiving seamless stream on basis of chunk, and method therefor
WO2012079317A1 (en) Transmission method, device and system for digital television interactive contents
US20170085623A1 (en) Content downloading and network provisioning
CN104935571A (en) Interaction method of TV game server and client
CN103731637B (en) The control system and its method of local area network video 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
GR01 Patent grant
GR01 Patent grant