A method and apparatus for automatically identifying ports
By automatically identifying ports through IPTV data streams and DHCP/PPPoE response messages, the problem of poor user experience caused by manual configuration is solved, and automated port identification and IPTV data pass-through are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-10-29
- Publication Date
- 2026-03-17
AI Technical Summary
The existing IPTV data pass-through method requires users to manually configure the router's iTV port and STB port, resulting in a poor user experience.
The LAN-side port is identified by recognizing IPTV data streams, and the WAN-side port is identified by recognizing DHCP or PPPoE response messages, avoiding manual configuration by users and covering all STB usage scenarios.
It enables automatic identification of the ports connecting the router to the optical modem and set-top box without requiring manual configuration by the user, improving the user experience and covering all STB usage scenarios.
Smart Images

Figure CN116074233B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of network communication technology, and in particular to a method and apparatus for automatically identifying ports. Background Technology
[0002] Internet Protocol Television (IPTV) data pass-through refers to the direct forwarding of IPTV data packets transmitted between the set-top box (STB) and the optical modem without any processing. These IPTV data packets include both uplink data packets transmitted from the optical modem to the STB (i.e., data packets transmitted from the WAN port (iTV port) connected to the IPTV port of the optical modem to the LAN port (STB port) connected to the STB) and downlink data packets transmitted from the STB to the optical modem (i.e., data packets transmitted from the STB port to the iTV port).
[0003] Currently, to achieve IPTV data pass-through, it is first necessary to identify the iTV port (IPTV port) of the router's uplink connection to the optical modem and the STB port (STB) of the router's downlink connection. Then, a virtual local area network (VLAN) is established to achieve lossless pass-through of IPTV data packets between the iTV port and the STB port. There are two existing methods for identifying the iTV port: one is to designate a fixed WAN-side port as the iTV port via the router, and the other is to select any LAN-side port as the iTV port through manual user configuration. The existing method for identifying the STB port is mainly through manual user configuration. However, manual configuration increases the difficulty of use for users, resulting in a poor user experience.
[0004] It is evident that the existing IPTV data pass-through method requires users to manually configure the router's iTV port and STB port, resulting in a poor user experience. Summary of the Invention
[0005] This application provides a method and apparatus for automatically identifying ports to solve the technical problem that existing IPTV data pass-through requires users to manually configure the port selection for connecting the optical modem and set-top box, resulting in a poor user experience.
[0006] In a first aspect, embodiments of this application provide a method for automatically identifying ports, applied to routing, wherein the routing is the main route of a distributed Internet Protocol Television (IPTV) system or any route of a non-distributed IPTV system, the method comprising:
[0007] Receive the first data stream sent by the set-top box and determine whether the first data stream is an IPTV data stream;
[0008] If the first data stream is determined to be an IPTV data stream, then the LAN port receiving the first data stream is determined to be the first port, and when it is determined that only Internet access data stream and IPTV data stream are received, the Dynamic Host Configuration Protocol (DHCP) or the Point-to-Point Protocol (PPPoE) server on Ethernet is turned off. The first port is a LAN port connected to the set-top box through a first sub-router or directly connected to the set-top box, and the first sub-router is any sub-router of the distributed IPTV system.
[0009] If a DHCP or PPPoE response message is received from the IPTV server, the LAN-side port that receives the DHCP or PPPoE response message is determined to be the second port, wherein the second port is the WAN-side port connected to the IPTV port of the optical modem.
[0010] The first data stream is sent to the optical modem via the second port.
[0011] Based on the above technical solution, the main router of the distributed IPTV system or any router of the non-distributed IPTV system can receive the first data stream sent by the set-top box and determine whether the first data stream is an IPTV data stream. If the first data stream is determined to be an IPTV data stream, the LAN-side port receiving the first data stream is designated as the first port. When it is determined that only Internet data streams and IPTV data streams are received, the DHCP or PPPoE server is turned off. The first port is the LAN-side port connected to the set-top box through the first sub-router or directly connected to the set-top box. The first sub-router is any sub-router of the distributed IPTV system. If a DHCP or PPPoE response message is received from the IPTV server, the LAN-side port receiving the DHCP or PPPoE response message is designated as the second port. The second port is the WAN-side port connected to the IPTV port of the optical modem. Based on the second port, the first data stream is sent to the optical modem. By identifying IPTV data streams, the system identifies the LAN-side ports connected to the set-top box via the first sub-router or directly to the set-top box. It also identifies the WAN-side ports connected to the IPTV port of the optical modem by recognizing DHCP or PPPoE response messages. This avoids the need for manual user configuration to select the ports connecting the optical modem and set-top box, and eliminates the need to rely on the option60 field in DHCP uplink messages for automatic identification of these ports. Furthermore, it eliminates the need to pre-obtain the STB vendor list used for client OUI matching to automatically identify the ports connecting the optical modem and set-top box, thus improving user experience and covering all STB usage scenarios.
[0012] In one possible design, determining whether the first data stream is an IPTV data stream includes:
[0013] Determine whether the first data stream carries IPTV characteristics;
[0014] If it is determined that the first data stream carries the IPTV characteristics, then the first data stream is determined to be an IPTV data stream.
[0015] In one possible design, before sending the first data stream to the optical modem via the second port, the following steps are also included:
[0016] Determine the first VLAN tag corresponding to the first port and the second VLAN tag corresponding to the second port;
[0017] Based on the first VLAN tag and the second VLAN tag, update the VLAN tag conversion table, wherein the updated VLAN tag conversion table includes the correspondence between the first VLAN tag and the second VLAN tag;
[0018] Based on the updated VLAN tag conversion table, the first data stream is subjected to VLAN tag conversion processing.
[0019] In one possible design, based on the updated VLAN tag conversion table, VLAN tag conversion processing is performed on the first data stream, including:
[0020] The first data stream is subjected to tag removal processing, and the first data stream after tag removal processing is sent to the second port, wherein the tag removal processing is used to remove the first VLAN tag carried by the first data stream;
[0021] Based on the updated VLAN tag conversion table, a tag creation process is performed on the first data stream after the tag deletion process on the second port, wherein the first data stream after the tag creation process carries the second VLAN tag.
[0022] In one possible design, after updating the VLAN tag translation table based on the first VLAN tag and the second VLAN tag, the following steps are also included:
[0023] Determine whether the connection between the first port and the set-top box has been disconnected;
[0024] If the connection has been broken, the mapping between the first VLAN tag and the second VLAN tag will be deleted from the updated VLAN tag conversion table.
[0025] Receive the second data stream sent by the set-top box and determine whether the second data stream is an IPTV data stream;
[0026] If the second data stream is determined to be an IPTV data stream, then the LAN-side port receiving the second data stream is determined to be the third port. The third port is a LAN-side port that is connected to the set-top box through the second sub-route or directly connected to the set-top box. The second sub-route is any sub-route of the distributed IPTV system other than the first sub-route.
[0027] Create a mapping relationship between the third VLAN tag and the second VLAN tag in the updated VLAN tag conversion table, wherein the third VLAN tag is the VLAN tag corresponding to the third port.
[0028] In one possible design, determining whether the connection between the first port and the set-top box has been broken includes:
[0029] If it is determined that the storage time of the media access control MAC address of the set-top box stored in the forwarding database FDB is greater than a first preset threshold, then it is determined that the connection between the first port and the set-top box has been broken; or,
[0030] If the time after sending an Address Resolution Protocol (ARP) message to the set-top box without receiving a reply from the set-top box exceeds a second preset threshold, then it is determined that the connection between the first port and the set-top box has been broken; or,
[0031] If the routing driver detects that the physical link is broken, it determines that the connection between the first port and the set-top box has been broken.
[0032] Based on the above technical solution, the main router of the distributed IPTV system or any router of the non-distributed IPTV system can determine whether the connection between the first port and the set-top box has been disconnected. If it has been disconnected, the correspondence between the first VLAN tag and the second VLAN tag is deleted in the updated VLAN tag conversion table. The second data stream sent by the set-top box is received, and it is determined whether the second data stream is an IPTV data stream. If the second data stream is determined to be an IPTV data stream, the LAN-side port receiving the second data stream is determined to be the third port. The third port is the LAN-side port connected to the set-top box through the second sub-route or directly connected to the set-top box. The second sub-route is any sub-route of the distributed IPTV system other than the first sub-route. A correspondence between the third VLAN tag and the second VLAN tag is created in the updated VLAN tag conversion table. The third VLAN tag is the VLAN tag corresponding to the third port. When the connection between the first port and the set-top box is determined to be broken, the LAN-side port connected to the set-top box via the second sub-router or directly to the set-top box is re-identified. The mapping relationship between the VLAN tag corresponding to the re-identified LAN-side port and the second VLAN tag is created in the VLAN tag conversion table. This enables IPTV data pass-through and avoids the problem of needing to rebind the port after changing the port connected to the set-top box and the router. It is plug-and-play and improves the user experience.
[0033] Secondly, this application also provides an apparatus for automatically identifying ports. This apparatus has the function of implementing the first aspect or any possible design method described in the first aspect. This function can be implemented by hardware or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above-described function, such as a determining module, a first processing module, a second processing module, and a sending module.
[0034] The determination module is used to receive the first data stream sent by the set-top box and determine whether the first data stream is an IPTV data stream;
[0035] The first processing module is configured to, if it is determined that the first data stream is an IPTV data stream, determine the LAN side port receiving the first data stream as the first port, and close the Dynamic Host Configuration Protocol (DHCP) or PPPoE server on Ethernet when it is determined that only Internet access data stream and IPTV data stream are received, wherein the first port is a LAN side port connected to the set-top box through a first sub-router or directly connected to the set-top box, and the first sub-router is any sub-router of the distributed IPTV system;
[0036] The second processing module is used to determine the LAN port receiving the DHCP or PPPoE response message as the second port if it receives the DHCP or PPPoE response message sent by the IPTV server. The second port is the WAN port connected to the IPTV port of the optical modem.
[0037] The sending module is used to send the first data stream to the optical modem based on the second port.
[0038] In one possible design, the determining module is specifically used for:
[0039] Determine whether the first data stream carries IPTV characteristics;
[0040] If it is determined that the first data stream carries the IPTV characteristics, then the first data stream is determined to be an IPTV data stream.
[0041] In one possible design, the device further includes a third processing module for:
[0042] Determine the first VLAN tag corresponding to the first port and the second VLAN tag corresponding to the second port;
[0043] Based on the first VLAN tag and the second VLAN tag, update the VLAN tag conversion table, wherein the updated VLAN tag conversion table includes the correspondence between the first VLAN tag and the second VLAN tag;
[0044] Based on the updated VLAN tag conversion table, the first data stream is subjected to VLAN tag conversion processing.
[0045] In one possible design, the third processing module is specifically used for:
[0046] The first data stream is subjected to tag removal processing, and the first data stream after tag removal processing is sent to the second port, wherein the tag removal processing is used to remove the first VLAN tag carried by the first data stream;
[0047] Based on the updated VLAN tag conversion table, a tag creation process is performed on the first data stream after the tag deletion process on the second port, wherein the first data stream after the tag creation process carries the second VLAN tag.
[0048] In one possible design, the device further includes a fourth processing module for:
[0049] Determine whether the connection between the first port and the set-top box has been disconnected;
[0050] If the connection has been broken, the mapping between the first VLAN tag and the second VLAN tag will be deleted from the updated VLAN tag conversion table.
[0051] Receive the second data stream sent by the set-top box and determine whether the second data stream is an IPTV data stream;
[0052] If the second data stream is determined to be an IPTV data stream, then the LAN-side port receiving the second data stream is determined to be the third port. The third port is a LAN-side port that is connected to the set-top box through the second sub-route or directly connected to the set-top box. The second sub-route is any sub-route of the distributed IPTV system other than the first sub-route.
[0053] Create a mapping relationship between the third VLAN tag and the second VLAN tag in the updated VLAN tag conversion table, wherein the third VLAN tag is the VLAN tag corresponding to the third port.
[0054] In one possible design, the fourth processing module is specifically used for:
[0055] If it is determined that the storage time of the media access control MAC address of the set-top box stored in the forwarding database FDB is greater than a first preset threshold, then it is determined that the connection between the first port and the set-top box has been broken; or,
[0056] If the time after sending an Address Resolution Protocol (ARP) message to the set-top box without receiving a reply from the set-top box exceeds a second preset threshold, then it is determined that the connection between the first port and the set-top box has been broken; or,
[0057] If the routing driver detects that the physical link is broken, it determines that the connection between the first port and the set-top box has been broken.
[0058] Thirdly, this application also provides a system for automatically identifying ports, the system including at least one processor and a memory; the memory stores one or more computer programs; when the one or more computer programs stored in the memory are executed by the at least one processor, the system performs the method described in the first aspect or any possible design of the first aspect.
[0059] Fourthly, this application also provides a computer storage medium including computer instructions that, when executed on a computer, cause the computer to perform the method described in the first aspect or any possible design of the first aspect.
[0060] Fifthly, this application also provides a computer program product that, when run on a computer, causes the computer to perform the method described in the first aspect or any possible design of the first aspect.
[0061] In a sixth aspect, this application also provides a chip that can be coupled to the memory of a system with an automatic identification port, for calling a computer program stored in the memory and executing the method described in the first aspect or any possible design of the first aspect.
[0062] The beneficial effects of the second to sixth aspects and any of their possible designs can be referred to the description of the beneficial effects of the methods in the first aspect and any of their possible designs. Attached Figure Description
[0063] Figure 1a A schematic diagram illustrating IPTV data pass-through provided in an embodiment of this application;
[0064] Figure 1b A schematic diagram illustrating another IPTV data pass-through method provided in an embodiment of this application;
[0065] Figure 2 This application provides a schematic diagram of the structure of an automatic port identification system.
[0066] Figure 3 A flowchart illustrating a method for automatically identifying ports provided in an embodiment of this application;
[0067] Figure 4 This is a schematic diagram illustrating a transparent transmission of IPTV data provided in an embodiment of this application;
[0068] Figure 5 A schematic diagram of the structure of an automatic port identification device provided in an embodiment of this application;
[0069] Figure 6 This is a schematic diagram of the structure of another automatic port identification system provided in an embodiment of this application. Detailed Implementation
[0070] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings.
[0071] To better understand the technical solutions provided in the embodiments of this application, the technical terms involved in the embodiments of this application will be explained below.
[0072] I. Data Transmission for Internet Protocol Television (IPTV)
[0073] IPTV data pass-through refers to the direct forwarding of IPTV data packets transmitted between the set-top box (STB) and the optical modem without any processing, via a router. These IPTV data packets include both uplink data packets from the optical modem to the STB (i.e., data packets transmitted from the WAN (Internet Protocol) port (iTV port) connected to the optical modem's IPTV port to the LAN (Local Area Network) port (STB port) connected to the STB), and downlink data packets from the STB to the optical modem (i.e., data packets transmitted from the STB port to the iTV port). The router can be the main router of a distributed IPTV system or any router in a non-distributed IPTV system.
[0074] For example, such as Figure 1a The diagram shown is a schematic representation of an IPTV data pass-through method provided in an embodiment of this application. Figure 1a The IPTV system in this example is a non-distributed IPTV system, consisting of only one router. The router has two WAN-side ports (WAN port and iTV port) and multiple LAN-side ports (LAN1, LAN2, LAN3, LAN4, ..., LANX). The WAN port connects to the optical modem's internet port via an uplink network cable and is used to transmit ordinary internet data packets. The iTV port connects to the optical modem's IPTV port via an uplink network cable and is used to transmit IPTV data packets, thus forming a dual-WAN uplink network. The LAN3 port connects to the STB's network port via a downlink network cable and is used to transmit IPTV data packets; therefore, the router's LAN3 port can be referred to as the STB port. During IPTV data pass-through, the uplink data packets from the optical modem to the STB are transmitted via: optical modem's IPTV port → router's iTV port → router's LAN3 port → STB's network port. The downlink data packets from the STB to the optical modem are transmitted via: STB's network port → router's LAN3 port → router's iTV port → optical modem's IPTV port.
[0075] For example, such as Figure 1b The diagram shown is a schematic representation of another IPTV data pass-through method provided in an embodiment of this application. Figure 1bThe IPTV system in this example is a distributed IPTV system, consisting of a main router (i.e., an access point controller (AC)) and multiple sub-routers (i.e., access points (APs)). The main router AC has two WAN-side ports: a WAN port and an iTV port, and multiple LAN-side ports: LAN1, LAN2, LAN3, LAN4, ..., LANX. The WAN port connects to the optical modem's internet port via an uplink network cable and is used to transmit ordinary internet data packets. The iTV port connects to the optical modem's IPTV port via an uplink network cable and is used to transmit IPTV data packets, thus forming a dual-WAN uplink network. Each sub-router AP connects to the main router AC's LAN-side ports via an uplink network cable and to the STB's network port via a downlink network cable. For example, if sub-router AP3 connects to the main router AC's LAN3 port via an uplink network cable and to the STB's network port via a downlink network cable, then the main router AC's LAN3 port can be referred to as the STB port. When performing IPTV data pass-through, the transmission route of uplink data packets from the optical modem to the STB is as follows: IPTV port of the optical modem → iTV port of the main router AC → LAN3 port of the main router AC → AP3 of the sub-router → network port of the STB. The transmission route of downlink data packets from the STB to the optical modem is as follows: network port of the STB → AP3 of the sub-router → LAN3 port of the main router AC → iTV port of the main router AC → IPTV port of the optical modem.
[0076] Therefore, to achieve IPTV data pass-through, it is first necessary to identify the iTV port (IPTV port) of the router's uplink connection to the optical modem and the STB port (network port) of the router's downlink connection to the STB. Then, a virtual local area network (VLAN) is established to achieve lossless pass-through of IPTV data packets between the iTV port and the STB port. There are currently two methods for identifying the iTV port: one is to designate a fixed WAN-side port as the iTV port via the router, and the other is to select any LAN-side port as the iTV port through manual user configuration. The existing method for identifying the STB port is mainly through manual user configuration. However, manual configuration increases the difficulty of use for users, resulting in a poor user experience.
[0077] 2. Automatically identify the router's iTV port and STB port.
[0078] (1) The router parses the Option60 field in the Dynamic Host Configuration Protocol (DHCP) message sent by the client (Internet client and IPTV client), and determines the service type of the client's Medium Access Control (MAC) based on the parsed field information, thereby identifying the STB's information flow. Specifically, if the field information contains a SCITV field or an encrypted field containing @ITV, then the client's MAC is of IPTV type; otherwise, the client's MAC is of Internet type. If the client's MAC is of IPTV type, then the data flow sent by the client is transferred to the IPTV VLAN channel. For example, the router receives the data flow sent by the client through the STB port of the downlink network port connected to the STB, and forwards the data flow sent by the client through the iTV port of the IPTV port connected to the optical modem uplink. Otherwise, the data flow of the client's MAC is transferred to the Internet VLAN channel. For example, the router receives the data flow sent by the client through the LAN port of the downlink network port connected to the client, and forwards the data flow sent by the client through the WAN port of the Internet port connected to the optical modem uplink. However, this technical solution relies on the option60 field in the DHCP message to automatically identify the iTV port and STB port of the route. If the client sends a point-to-point protocol over Ethernet (PPPoE) message, it will not be able to automatically identify the iTV port and STB port of the route, resulting in the inability to cover all STB usage scenarios.
[0079] (2) When a client (Internet client and IPTV client) is connected to any port of the router, the router will automatically search for the client's Organizationally Unique Identifier (OUI) in the STB vendor list of any STB connected to the router. If the STB matches the client, the port will be automatically marked as the iTV port of the router's uplink connection to the optical modem's IPTV port. If the STB does not match the client, the port will be automatically marked as the WAN port of the router's uplink connection to the optical modem's Internet port. However, when automatically identifying the router's iTV port and STB port through the STB vendor list, the STB vendor list used to match the client's OUI must be obtained in advance. Furthermore, if the OUIs in the STB vendor list are incomplete, the corresponding client cannot be identified, thus failing to cover all STB usage scenarios.
[0080] Therefore, existing IPTV data pass-through methods either fail to automatically identify the router's iTV and STB ports, requiring manual configuration by the user, resulting in a poor user experience; or rely on the option60 field in DHCP uplink packets for automatic identification, which cannot be done with PPPoE uplink packets, thus failing to cover all STB usage scenarios; or require obtaining a list of STB vendors for matching client OUIs in advance, but if the OUIs in the STB vendor list are incomplete, the corresponding client cannot be identified, again failing to cover all STB usage scenarios.
[0081] In view of this, embodiments of this application provide a method for automatically identifying ports. This method can receive a first data stream sent by a set-top box and determine whether the first data stream is an IPTV data stream. If the first data stream is determined to be an IPTV data stream, the LAN-side port receiving the first data stream is determined to be the first port. When it is determined that only Internet data streams and IPTV data streams are received, the DHCP or PPPoE server is turned off. The first port is a LAN-side port connected to the set-top box through a first sub-router or directly connected to the set-top box. The first sub-router is any sub-router of the distributed IPTV system. If a DHCP or PPPoE response message is received from an IPTV server, the LAN-side port receiving the DHCP or PPPoE response message is determined to be the second port. The second port is a WAN-side port connected to the IPTV port of the optical modem. Based on the second port, the first data stream is sent to the optical modem. By identifying IPTV data streams, the system identifies the LAN-side ports connected to the set-top box via the first sub-router or directly to the set-top box. It also identifies the WAN-side ports connected to the IPTV port of the optical modem by recognizing DHCP or PPPoE response messages. This avoids the need for manual user configuration to select the ports connecting the optical modem and set-top box, and eliminates the need to rely on the option60 field in DHCP uplink messages for automatic identification of these ports. Furthermore, it eliminates the need to pre-obtain the STB vendor list used for client OUI matching to automatically identify the ports connecting the optical modem and set-top box, thus improving user experience and covering all STB usage scenarios.
[0082] It should be understood that the technical solutions of the embodiments of this application can be applied to various systems that automatically identify ports. For example... Figure 2The diagram shown is a structural schematic of an automatic port identification system provided in an embodiment of this application. The automatic port identification system includes an optical modem 201, an IPTV system 202, and an STB 203. The IPTV system 202 can be a non-distributed IPTV system 202 or a distributed IPTV system 202. This embodiment of the application does not make specific limitations on this.
[0083] If IPTV system 202 is a distributed IPTV system 202, then IPTV system 202 includes a router 2020. Router 2020 has two WAN-side ports, namely the WAN port and the iTV port, and multiple LAN-side ports, namely LAN1 port, LAN2 port, LAN3 port, LAN4 port, ..., LANX port. The WAN port is connected to the Internet access port of optical modem 201 via an uplink network cable and is used to transmit ordinary Internet access data packets. The iTV port is connected to the IPTV port of optical modem 201 via an uplink network cable and is used to transmit IPTV data packets. The LAN3 port is connected to the network port of STB203 via an offline network cable and is used to transmit IPTV data packets. Therefore, the LAN3 port of router 2020 is the STB port of router 2020.
[0084] If IPTV system 202 is a distributed IPTV system 202, then IPTV system 202 includes a main router AC and multiple sub-routers AP, namely AC2020 and AP2021, AP2022, AP2023, AP2024, ..., AP202X. AC2020 has two WAN-side ports, namely the WAN port and the iTV port, and multiple LAN-side ports, namely LAN1, LAN2, LAN3, LAN4, ..., LANX. The WAN port connects to the optical modem's internet port via an uplink network cable and is used to transmit ordinary internet data packets. The iTV port connects to the optical modem's IPTV port via an uplink network cable and is used to transmit IPTV data packets. Each AP connects to the AC's LAN-side ports via an uplink network cable, such as AP2021 connecting to the AC's LAN1 port, AP2022 connecting to the AC's LAN2 port, AP2023 connecting to the AC's LAN3 port, AP2024 connecting to the AC's LAN4 port, ..., AP2020... The X port is connected to the LAN X port of the AC. Each AP connects to the STB port via the network cable. For example, if AP2023 connects to the STB203 port via the network cable, then the LAN3 port of AC2020 is the STB port of AC2020.
[0085] The above describes the automatic port identification system to which the technical solutions of the embodiments of this application can be applied. The following describes an automatic port identification method provided by the embodiments of this application in conjunction with the accompanying drawings.
[0086] It should be understood that "at least one" in the embodiments of this application refers to one or more, and "more than one" refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can represent: a, b, c, a and b, a and c, b and c, or a and b and c.
[0087] Furthermore, unless otherwise stated, the ordinal numbers such as "first" and "second" mentioned in the embodiments of this application are used to distinguish multiple objects and are not used to limit the order, sequence, priority, or importance of multiple objects. For example, the first priority criterion and the second priority criterion are only used to distinguish different criteria, and do not indicate that the content, priority, or importance of these two criteria are different.
[0088] like Figure 3 The diagram shown is a flowchart illustrating an automatic port identification method provided in an embodiment of this application. This automatic port identification method can be applied to the above-mentioned... Figure 2 The shown or the Figure 2 On systems with similar functional structures that automatically identify ports, the specific process of this automatic port identification method is described below.
[0089] S301. Receive the first data stream sent by the set-top box and determine whether the first data stream is an IPTV data stream.
[0090] In some embodiments, a user can connect the set-top box to any port of the IPTV system. If the IPTV system is a distributed IPTV system, the set-top box can be connected to any sub-router of the distributed IPTV system. For example, STB203 can be connected to AP2023 of the distributed IPTV system 202, that is, AP2023 is a directly connected route of STB203. If the IPTV system is a non-distributed IPTV system, the set-top box can be connected to any port of the non-distributed IPTV system. For example, STB203 can be connected to the LAN3 port of route 2020 of the non-distributed IPTV system 202, that is, route 2020 is a directly connected route of STB203. After the set-top box is powered on, it sends a first data stream to the main router of the distributed IPTV system or any router of the non-distributed IPTV system. The main router of the distributed IPTV system or any router of the non-distributed IPTV system receives the first data stream sent by the set-top box and determines whether the first data stream is an IPTV data stream. For example, it determines whether the first data stream carries IPTV characteristics. IPTV characteristics include IPTV resource paths, IPTV reference information, IPTV verification domain names, IPTV video stream addresses or IPTV request messages, as well as basic data characteristics such as data length, protocol type, port number, multicast messages, DHCP interaction messages, etc. This application embodiment does not make specific limitations on this. If it is determined that the first data stream carries IPTV characteristics, then the first data stream is determined to be an IPTV data stream.
[0091] For example, STB203 sends an HTTP GET request message to AC2020 of distributed IPTV system 202 or router 2020 of non-distributed IPTV system 202. The HTTP GET request message carries the resource path / iptvepg / platform / index.jsp. AC2020 of distributed IPTV system 202 or router 2020 of non-distributed IPTV system 202 determines that the resource path is an IPTV resource path, and thus determines that the HTTP GET request message is an IPTV message.
[0092] STB203 sends an HTTP POST request message to AC2020 of the distributed IPTV system 202 or Router 2020 of the non-distributed IPTV system 202. The reference information of this HTTP POST request message is Referer:http: / / 121.60.255.6:8080 / iptvepg / platform / index.jsp?UserID=wh1810161569&Action=Login&FCCSupport=1\r\n. AC2020 of the distributed IPTV system 202 or Router 2020 of the non-distributed IPTV system 202 determines that this reference information is IPTV reference information, and thus determines that this HTTP POST request message is an IPTV message.
[0093] STB203 sends a Domain Name Server (DNS) request message to AC2020 of the distributed IPTV system 202 or Router 2020 of the non-distributed IPTV system 202. This DNS request message requests the resolution of the addresses scs.openspeech.cn and appstorerrc.jjc.cnitv.net. Since commonly used IPTV verification domains include: eds.gx.vnet.cn, data.openspeech.cn, appstorerrc.jjc.cnitv.net, schemas.upnp.org, stb.gx.mihua.tv, api.cloud.189.cn, schemas.xmlsoap.org, data.openspeech.cn, alog.umeng.com, oc.umeng.com, etc., AC2020 of the distributed IPTV system 202 or Router 2020 of the non-distributed IPTV system 202 determines that this DNS request message requests the resolution of IPTV verification domains, and thus determines that this DNS request message is an IPTV message.
[0094] STB203 sends video stream addresses to AC2020 of the distributed IPTV system 202 or Router 2020 of the non-distributed IPTV system 202. For example, CCTV-1 General: rtsp: / / 180.141.207.228 / PLTV / *** / 10000100000000060000000000081813_0.smil; CCTV-2 Finance: rtsp: / / 180.141.207.228 / PLTV / *** / 10000100000000060000000000081816_0.smil; CCTV-4 Chinese International: rtsp: / / 180.1 41.207.228 / PLTV / *** / 10000100000000060000000000081812_0.smil, CCTV-7 National Defense and Military: rtsp: / / 180.141.207.228 / PLTV / *** / 10000100000000060000000000081852_0.smil, CCTV-10 Science and Education: rtsp: / / 180.141.207.228 / PLTV / *** / 10000100000000060000000000081839_0.smil, CCTV-12 Society and Law: rtsp: / / 180.141.207.228 / PLTV / *** / 10000100000000060000000000081817_0.smil, CCTV-13 News: rtsp: / / 180.141.207.228 / PLTV / *** / 10000100000000060000000000081820_0.smil, CCTV-14 Children's Channel: rtsp: / / 180.141.207.228 / PLTV / *** / 10000100000000060000000000081823_0.smil, Dragon TV: rtsp: / / 180.141.207.228 / PLTV / *** / 10000100000000060000000000081830_0.smil, Beijing TV: rtsp: / / 180.141.207.228 / PLTV / *** / 10000100000000060000000000081828_0.smil, Zhejiang TV: rtsp: / / 180.141.207.228 / PLTV / *** / 10000100000000060000000000081826_0.smil, Jiangsu TV: rtsp: / / 180.141.207.228 / PLTV / *** / 10000100000000060000000000081827_0.smil, Hubei TV: rtsp: / / 180.141.207.228 / PLTV / *** / 10000100000000060000000000081844_0.smil, etc., the AC2020 of the distributed IPTV system 202 or the routing 2020 of the non-distributed IPTV system 202 determines this video stream address as the IPTV video stream address;
[0095] STB203 sends a request message to AC2020 of the distributed IPTV system 202 or router 2020 of the non-distributed IPTV system 202. This request message is used to request a channel list, or to request the service entry address, such as homepage, live broadcast, on-demand, replay, etc., or to request login, upgrade, authentication, loading specific links, etc. AC2020 of the distributed IPTV system 202 or router 2020 of the non-distributed IPTV system 202 determines that the channel list request message is an IPTV request message.
[0096] S302. If it is determined that the first data stream is an IPTV data stream, then the LAN side port receiving the first data stream is determined as the first port, and the DHCP or PPPoE server is turned off when it is determined that only Internet data stream and IPTV data stream are received.
[0097] In some embodiments, after receiving the first data stream sent by the set-top box and determining that the first data stream is an IPTV data stream, the main router of the distributed IPTV system or any router of the non-distributed IPTV system can determine that the LAN-side port receiving the first data stream is the first port (STB port), and disable the DHCP or PPPoE server when it is determined that only Internet data stream and IPTV data stream are received. The first port is the LAN-side port connected to the set-top box through the first sub-router or directly connected to the set-top box, and the first sub-router is any sub-router of the distributed IPTV system.
[0098] For example, after receiving the first data stream sent by STB203 and determining that the first data stream is an IPTV data stream, AC2020 of distributed IPTV system 202 or router 2020 of non-distributed IPTV system 202 can determine that the LAN3 port of AC2020 or router 2020 receiving the first data stream is the first port. That is, LAN3 port is the LAN-side port of AC2020 connected to STB203 through AP2023, or LAN3 port is the LAN-side port of router 2020 directly connected to STB203.
[0099] It should be noted that, in this embodiment, the time point for disabling the DHCP or PPPoE server is after the first port is determined. Specifically, it can be after receiving the first data stream sent by the set-top box. If the first data stream is determined to be an IPTV data stream, then the LAN port receiving the first data stream is determined as the first port, and the DHCP or PPPoE server is disabled. Alternatively, it can be after receiving a DHCP message sent by the client, determining the service type of the client's MAC address based on the Option60 field in the DHCP message. If the field information is a field with SCITV or an encrypted field with @ITV, then the client's MAC address is of type IPTV, the LAN port receiving the DHCP message is determined as the first port, and the DHCP or PPPoE server is disabled. This embodiment does not impose specific limitations on this.
[0100] S303. If a DHCP or PPPoE response message is received from the IPTV server, the LAN port that receives the DHCP or PPPoE response message is determined to be the second port.
[0101] In some embodiments, after determining that the LAN-side port receiving the first data stream is the first port, and after disabling the DHCP or PPPoE server when determining that only Internet data stream and IPTV data stream are received, if a DHCP or PPPoE response message is received from the IPTV server, the LAN-side port receiving the DHCP or PPPoE response message is determined to be the second port (iTV port), wherein the second port is the WAN-side port connected to the IPTV port of the optical modem.
[0102] It should be noted that, in the embodiments of this application, after the main router of the distributed IPTV system or any router of the non-distributed IPTV system determines that the LAN side port receiving the DHCP or PPPoE response message is the second port, it can create an IPTV WAN, thereby binding the identified second port and restarting the DHCP or PPPoE server to transmit ordinary Internet access data.
[0103] S304. Based on the second port, send the first data stream to the optical modem.
[0104] In some embodiments, after determining that the LAN-side port receiving DHCP or PPPoE response messages is the second port, the main router of the distributed IPTV system or any router of the non-distributed IPTV system can first create a VLAN tag conversion table between the second port (the iTV port of the IPTV port connected to the optical modem upstream) and the first port (the STB port connected to the set-top box downstream). Based on the VLAN tag conversion table, VLAN tag conversion processing is performed on the first data stream. Specifically, the first VLAN tag corresponding to the first port and the second VLAN tag corresponding to the second port are determined. Based on the first VLAN tag and the second VLAN tag, the VLAN tag conversion table is updated. The updated VLAN tag conversion table includes the correspondence between the first VLAN tag and the second VLAN tag. Based on the updated VLAN tag conversion table, VLAN tag conversion processing is performed on the first data stream. For example, the first data stream is tag deleted, and the first data stream after tag deletion is sent to the second port. The tag deletion process is used to delete the first VLAN tag carried by the first data stream. Based on the updated VLAN tag conversion table, the first data stream after tag deletion is tag created on the second port. The first data stream after tag creation carries the second VLAN tag. The first data stream, after VLAN tag conversion, is sent to the optical modem via the second port. Then, based on the second port, the first data stream after VLAN tag conversion is sent back to the optical modem. This establishes a one-to-n VLAN tag conversion table, preventing IPTV data packets from being incorrectly transmitted to another set-top box port when all ports connected to the set-top boxes are in the same VLAN environment, thus making IPTV data packet transmission more flexible.
[0105] For example, such as Figure 4 The diagram shown is a schematic representation of a transparent transmission of IPTV data provided in an embodiment of this application. Figure 4In the distributed IPTV system 202, the STB203 sends uplink IPTV data packets to the AC2020. The AP2023, directly connected to the STB203, performs first tag creation processing on the uplink IPTV data packets. The uplink IPTV data packets after first tag creation carry a first VLAN tag, such as VLAN 3. After receiving the uplink IPTV data packets after first tag creation processing through its LAN3 port, the AC2020 performs tag deletion processing on the uplink IPTV data packets and then sends the tagged uplink IPTV data packets to the network. The data is sent to the iTV port. The tag deletion process is used to delete the first VLAN tag carried in the uplink IPTV data packet. Based on the VLAN tag conversion table, the second VLAN tag corresponding to the first VLAN tag is determined. The uplink IPTV data packet after the tag deletion process is processed on the iTV port to create a second tag. The uplink IPTV data packet after the second tag creation process carries a second VLAN tag, such as VLAN(X+1). The uplink IPTV data packet after the second tag creation process is sent to the optical modem 201 through the iTV port, thereby realizing the transparent transmission of the uplink IPTV data packet.
[0106] akin, Figure 4 The optical modem 201 sends downlink IPTV data packets to the AC2020 of the distributed IPTV system 202. The iTV port of the AC2020, which is directly connected to the IPTV port of the optical modem 201, performs a first tag creation process on the downlink IPTV data packets. The downlink IPTV data packets after the first tag creation process carry a second VLAN tag, such as VLAN (X+1). After receiving the downlink IPTV data packets after the first tag creation process through the iTV port, the AC2020 performs tag deletion processing on the downlink IPTV data packets and sends the tag-deleted downlink IPTV data packets to the distributed IPTV system 202. TV data packets are sent to the LAN3 port. The tag deletion process is used to delete the second VLAN tag carried in the downlink IPTV data packet. Based on the VLAN tag conversion table, the first VLAN tag corresponding to the second VLAN tag is determined. The downlink IPTV data packet after the tag deletion process is processed on the LAN3 port to create a second tag. The downlink IPTV data packet after the second tag creation process carries the first VLAN tag, such as VLAN3. The downlink IPTV data packet after the second tag creation process is sent to the STB203 through the LAN3 port, thereby realizing the transparent transmission of the downlink IPTV data packet.
[0107] It should be noted that, in the embodiments of this application, after updating the VLAN tag conversion table based on the first VLAN tag and the second VLAN tag, the main router of the distributed IPTV system or any router of the non-distributed IPTV system determines whether the connection between the first port and the set-top box has been broken. For example, the main router of the distributed IPTV system receives first information sent by the first sub-router, wherein the first information is used to indicate that the connection between the first sub-router and the set-top box has been broken, thereby determining whether the connection between the first port and the set-top box has been broken. Alternatively, any router of the non-distributed IPTV system directly determines whether the connection between the first port and the set-top box has been broken. If the connection between the first port and the set-top box has been broken, the correspondence between the first VLAN tag and the second VLAN tag is deleted in the updated VLAN tag conversion table, the second data stream sent by the set-top box is received, and it is determined whether the second data stream is an IPTV data stream. If the second data stream is determined to be an IPTV data stream, then the LAN port receiving the second data stream is designated as the third port. The third port is either a LAN port connected to the set-top box via a second sub-router or directly connected to the set-top box. The second sub-router is any sub-router in the distributed IPTV system other than the first sub-router. A mapping between the third VLAN tag and the second VLAN tag is created in the updated VLAN tag translation table, where the third VLAN tag is the VLAN tag corresponding to the third port.
[0108] For example, the user will Figure 2 In the distributed IPTV system 202, the connection between port A of AP2023 and STB203 is disconnected, and STB203 is connected to port B of AP2024 of the distributed IPTV system 202. AP2023 deletes the MAC address and port corresponding to STB203 stored in the forwarding database (FDB), and sends a first message to AC2020 of the distributed IPTV system indicating that the connection between port A of AP2023 and STB203 has been disconnected. After receiving the first message, AC2020 deletes the mapping relationship between VLAN3 and VLAN(X+1) in the VLAN tag conversion table. AC2020 receives the second data stream sent by STB203 and determines whether the second data stream is an IPTV data stream. If the second data stream is determined to be an IPTV data stream, then the LAN4 port receiving the second data stream is determined to be the third port. That is, the LAN4 port is the LAN side port of AC2020 connected to STB203 through AP2024. The correspondence between VLAN4 and VLAN(X+1) is deleted in the VLAN tag conversion table.
[0109] It should be noted that, in the embodiments of this application, the methods by which the direct route of the set-top box (such as the first sub-route or any route of the non-distributed IPTV system) determines that the connection between the port and the set-top box has been broken include the following: (1) determining whether the storage time of the MAC address of the set-top box stored in the FDB is greater than a first preset threshold. If it is greater, then the connection between the port and the set-top box is determined to be broken; (2) determining whether the time after sending an address resolution protocol (ARP) message to the set-top box without receiving a reply from the set-top box is greater than a second preset threshold. If it is greater, then the connection between the port and the set-top box is determined to be broken; (3) whether the route driver detects that the physical link is broken. If it detects that the physical link is broken, then the connection between the port and the set-top box is determined to be broken.
[0110] Based on the above technical solution, the main router of the distributed IPTV system or any router of the non-distributed IPTV system can receive the first data stream sent by the set-top box and determine whether the first data stream is an IPTV data stream. If the first data stream is determined to be an IPTV data stream, the LAN-side port receiving the first data stream is designated as the first port. When it is determined that only Internet data streams and IPTV data streams are received, the DHCP or PPPoE server is turned off. The first port is the LAN-side port connected to the set-top box through the first sub-router or directly connected to the set-top box. The first sub-router is any sub-router of the distributed IPTV system. If a DHCP or PPPoE response message is received from the IPTV server, the LAN-side port receiving the DHCP or PPPoE response message is designated as the second port. The second port is the WAN-side port connected to the IPTV port of the optical modem. Based on the second port, the first data stream is sent to the optical modem. By identifying IPTV data streams, the system identifies the LAN-side ports connected to the set-top box via the first sub-router or directly to the set-top box. It also identifies the WAN-side ports connected to the IPTV port of the optical modem by recognizing DHCP or PPPoE response messages. This avoids the need for manual user configuration to select the ports connecting the optical modem and set-top box, and eliminates the need to rely on the option60 field in DHCP uplink messages for automatic identification of these ports. Furthermore, it eliminates the need to pre-obtain the STB vendor list used for client OUI matching to automatically identify the ports connecting the optical modem and set-top box, thus improving user experience and covering all STB usage scenarios.
[0111] It should be understood that, in the embodiments of this application, the routing in the system that automatically identifies ports can perform some or all of the steps in the embodiments of this application, but these steps are only examples, and the routing in the system that automatically identifies ports can also perform other steps or variations of various steps. The steps can be performed in different orders as presented in the embodiments of this application, and it is not necessary to perform all the steps in the embodiments of this application.
[0112] Furthermore, in the various embodiments of this application, unless otherwise specified or in case of logical conflict, the terminology and / or descriptions between different embodiments are consistent and can be referenced by each other, and the technical features in different embodiments can be combined to form new embodiments according to their inherent logical relationships.
[0113] It should be understood that, in the embodiments of this application, the routing in the system for automatically identifying ports can be divided into functional modules according to the above method embodiments. For example, each function can be divided into its own functional module, or two or more functions can be integrated into one functional module. The integrated module can be implemented in the form of a hardware structure or a software module. It should be noted that the module division in the embodiments of this application is illustrative and is only a logical functional division; in actual implementation, there may be other division methods.
[0114] Based on the above embodiments, this application also provides an apparatus for automatically identifying ports, the apparatus being used to implement the method for automatically identifying ports as shown in the above figures, such as... Figure 5 The diagram shown is a structural schematic of an automatic port identification device provided in an embodiment of this application. The device 500 may include:
[0115] The determination module 501 is used to receive the first data stream sent by the set-top box and determine whether the first data stream is an IPTV data stream;
[0116] The first processing module 502 is configured to, if it is determined that the first data stream is an IPTV data stream, determine the LAN side port receiving the first data stream as the first port, and close the Dynamic Host Configuration Protocol (DHCP) or PPPoE server on Ethernet when it is determined that only Internet access data stream and IPTV data stream are received, wherein the first port is a LAN side port connected to the set-top box through a first sub-router or directly connected to the set-top box, and the first sub-router is any sub-router of the distributed IPTV system;
[0117] The second processing module 503 is used to determine the LAN side port that receives the DHCP or PPPoE response message as the second port if it receives the DHCP or PPPoE response message sent by the IPTV server, wherein the second port is the WAN side port connected to the IPTV port of the optical modem.
[0118] The sending module 504 is used to send the first data stream to the optical modem based on the second port.
[0119] In one possible design, the determining module 501 is specifically used for:
[0120] Determine whether the first data stream carries IPTV characteristics;
[0121] If it is determined that the first data stream carries the IPTV characteristics, then the first data stream is determined to be an IPTV data stream.
[0122] In one possible design, the device further includes a third processing module for:
[0123] Determine the first VLAN tag corresponding to the first port and the second VLAN tag corresponding to the second port;
[0124] Based on the first VLAN tag and the second VLAN tag, update the VLAN tag conversion table, wherein the updated VLAN tag conversion table includes the correspondence between the first VLAN tag and the second VLAN tag;
[0125] Based on the updated VLAN tag conversion table, the first data stream is subjected to VLAN tag conversion processing.
[0126] In one possible design, the third processing module is specifically used for:
[0127] The first data stream is subjected to tag removal processing, and the first data stream after tag removal processing is sent to the second port, wherein the tag removal processing is used to remove the first VLAN tag carried by the first data stream;
[0128] Based on the updated VLAN tag conversion table, a tag creation process is performed on the first data stream after the tag deletion process on the second port, wherein the first data stream after the tag creation process carries the second VLAN tag.
[0129] In one possible design, the device further includes a fourth processing module for:
[0130] Determine whether the connection between the first port and the set-top box has been disconnected;
[0131] If the connection has been broken, the mapping between the first VLAN tag and the second VLAN tag will be deleted from the updated VLAN tag conversion table.
[0132] Receive the second data stream sent by the set-top box and determine whether the second data stream is an IPTV data stream;
[0133] If the second data stream is determined to be an IPTV data stream, then the LAN-side port receiving the second data stream is determined to be the third port. The third port is a LAN-side port that is connected to the set-top box through the second sub-route or directly connected to the set-top box. The second sub-route is any sub-route of the distributed IPTV system other than the first sub-route.
[0134] Create a mapping relationship between the third VLAN tag and the second VLAN tag in the updated VLAN tag conversion table, wherein the third VLAN tag is the VLAN tag corresponding to the third port.
[0135] In one possible design, the fourth processing module is specifically used for:
[0136] If it is determined that the storage time of the media access control MAC address of the set-top box stored in the forwarding database FDB is greater than a first preset threshold, then it is determined that the connection between the first port and the set-top box has been broken; or,
[0137] If the time after sending an Address Resolution Protocol (ARP) message to the set-top box without receiving a reply from the set-top box exceeds a second preset threshold, then it is determined that the connection between the first port and the set-top box has been broken; or,
[0138] If the routing driver detects that the physical link is broken, it determines that the connection between the first port and the set-top box has been broken.
[0139] Based on the above embodiments, this application also provides a system for automatically identifying ports, the system being used to implement the methods for automatically identifying ports shown in the above figures, such as... Figure 6 The diagram shown is a structural schematic of another automatic port identification system provided in this application embodiment. The system 600 may include:
[0140] At least one processor 601; and a communication interface 603 communicatively connected to the at least one processor 601;
[0141] The at least one processor 601 causes the system 600 to perform operations by executing instructions stored in the memory 602. Figures 3-4 The method shown.
[0142] In one possible design, the memory 602 is located outside the system 600.
[0143] In one possible design, the system 600 includes a memory 602 connected to the at least one processor 601, the memory 602 storing instructions executable by the at least one processor 601. (Appendix) Figure 6 The dashed line indicates that memory 602 is optional for system 600.
[0144] The processor 601 and the memory 602 can be coupled through an interface circuit or integrated together; no restriction is imposed here.
[0145] It should be noted that, in this embodiment, the specific connection medium between the processor 601, memory 602, and communication interface 603 is not limited. This embodiment... Figure 6 The processor 601, memory 602, and communication interface 603 are connected via a bus 604. Figure 6 The connections between other components are shown in bold and are for illustrative purposes only, not as limiting information. The bus can be divided into address bus, data bus, control bus, etc. For ease of illustration, Figure 6 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.
[0146] It should be noted that, in the embodiments of this application, the processor mentioned can be implemented in hardware or software. When implemented in hardware, the processor can be a logic circuit, integrated circuit, etc. When implemented in software, the processor can be a general-purpose processor, implemented by reading software code stored in memory.
[0147] For example, the processor can be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor.
[0148] It should be noted that, in the embodiments of this application, the memory mentioned can be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. Specifically, non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous linked dynamic random access memory (SLDRAM), and direct rambus RAM (DR RAM).
[0149] It should be noted that, in the embodiments of this application, when the processor is a general-purpose processor, DSP, ASIC, FPGA or other programmable logic device, discrete gate or transistor logic device, or discrete hardware component, the memory (storage module) can be integrated into the processor.
[0150] It should be noted that the memories described herein are intended to include, but are not limited to, these and any other suitable types of memories.
[0151] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above description... Figure 6 The specific working process of system 600 after implementing the embodiments of the present invention can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here. A more detailed structure and function of system 600 can be found in the foregoing... Figure 2 Detailed description of the illustrated embodiments.
[0152] Based on the above embodiments, this application also provides a computer storage medium, including computer instructions, which, when executed on a system that automatically identifies ports, cause the system to perform the above... Figures 3-4 The various method embodiments shown.
[0153] Based on the above embodiments, this application also provides a computer program product that, when run on a system that automatically identifies ports, causes the system to execute the above-mentioned functions. Figures 3-4 The various method embodiments shown.
[0154] Based on the above embodiments, this application also provides a chip, which is coupled to the memory of the automatic identification port system, for reading and executing program instructions stored in the memory, so that the automatic identification port system performs the above... Figures 3-4 The various method embodiments shown.
[0155] It should be understood that all relevant content of each step involved in the above method embodiments can be referenced from the functional description of the corresponding functional module, and will not be repeated here.
[0156] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0157] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in one or more blocks of the flowchart illustrations and / or one or more blocks of the block diagrams.
[0158] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means that implement the functions specified in one or more flowcharts and / or one or more block diagrams.
[0159] These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process, such that the instructions, which execute on the computer or other programmable apparatus, provide steps for implementing the functions specified in one or more flowcharts and / or one or more block diagrams.
[0160] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.
Claims
1. A method of automatically identifying a port, characterized by, The method is applied to a route, which is a main route of a distributed Internet Protocol Television (IPTV) system or any route of a non-distributed IPTV system, and comprises the following steps: receiving a first data stream sent by a set top box, and determining whether the first data stream is an IPTV data stream according to whether the first data stream carries an IPTV feature; if it is determined that the first data stream is an IPTV data stream, determining a local area network (LAN) side port receiving the first data stream as a first port, and closing a dynamic host configuration protocol (DHCP) or point-to-point protocol over Ethernet (PPPoE) server when it is determined that only web data streams and IPTV data streams are received, wherein the first port is a LAN side port connected to the set top box through a first sub-route or directly connected to the set top box, and the first sub-route is any sub-route of the distributed IPTV system; if a DHCP or PPPoE response message sent by an IPTV server is received, determining a wide area network (WAN) side port receiving the DHCP or PPPoE response message as a second port, wherein the second port is a WAN side port connected to an IPTV port of an optical modem; sending the first data stream to the optical modem based on the second port.
2. The method of claim 1, wherein, The step of determining whether the first data stream is an IPTV data stream comprises the following steps: if it is determined that the first data stream carries the IPTV feature, determining that the first data stream is an IPTV data stream.
3. The method of claim 1 or 2, wherein, Before the step of sending the first data stream to the optical modem based on the second port, the method further comprises the following steps: determining a first virtual LAN (VLAN) tag corresponding to the first port and a second VLAN tag corresponding to the second port; updating a VLAN tag conversion table based on the first VLAN tag and the second VLAN tag, wherein the updated VLAN tag conversion table comprises a corresponding relationship between the first VLAN tag and the second VLAN tag; performing VLAN tag conversion processing on the first data stream based on the updated VLAN tag conversion table.
4. The method of claim 3, wherein, The step of performing VLAN tag conversion processing on the first data stream based on the updated VLAN tag conversion table comprises the following steps: performing label deletion processing on the first data stream, and sending the first data stream after the label deletion processing to the second port, wherein the label deletion processing is used to delete the first VLAN tag carried by the first data stream; performing label creation processing on the first data stream after the label deletion processing at the second port based on the updated VLAN tag conversion table, wherein the first data stream after the label creation processing carries the second VLAN tag.
5. The method of claim 4, wherein, After the step of updating the VLAN tag conversion table based on the first VLAN tag and the second VLAN tag, the method further comprises the following steps: determining whether a connection between the first port and the set top box has been disconnected; if the connection has been disconnected, deleting the corresponding relationship between the first VLAN tag and the second VLAN tag in the updated VLAN tag conversion table. receiving a second data stream sent by the set top box, and determining whether the second data stream is an IPTV data stream; if it is determined that the second data stream is an IPTV data stream, determining a LAN side port receiving the second data stream as a third port, wherein the third port is a LAN side port connected to the set top box through a second sub-route or directly connected to the set top box, and the second sub-route is any sub-route of the distributed IPTV system except the first sub-route; creating a corresponding relationship between a third VLAN tag and the second VLAN tag in the updated VLAN tag conversion table, wherein the third VLAN tag is a VLAN tag corresponding to the third port.
6. The method of claim 5, wherein, determining whether the connection between the first port and the set top box has been disconnected, comprising: if it is determined that the storage time of the MAC address of the set top box stored in the FDB is greater than a first preset threshold, it is determined that the connection between the first port and the set top box has been disconnected; or, if it is determined that the time of not receiving the reply of the set top box after sending an ARP packet to the set top box is greater than a second preset threshold, it is determined that the connection between the first port and the set top box has been disconnected; or, if the routing driver senses that the physical link is disconnected, it is determined that the connection between the first port and the set top box has been disconnected.
7. An apparatus for automatically identifying a port, the apparatus comprising: The device is applied to a routing, the routing is a main routing of a distributed IPTV system or any routing of a non-distributed IPTV system, and the device comprises: a determining module, configured to receive a first data stream sent by a set top box, and determine whether the first data stream is an IPTV data stream according to whether the first data stream carries an IPTV feature; a first processing module, configured to, if it is determined that the first data stream is an IPTV data stream, determine a LAN side port receiving the first data stream as a first port, and close a DHCP or PPPoE server on Ethernet when it is determined that only internet data streams and IPTV data streams are received, wherein the first port is a LAN side port connected to the set top box through a first sub-route or directly connected to the set top box, and the first sub-route is any sub-route of the distributed IPTV system; a second processing module, configured to, if a DHCP or PPPoE response packet sent by an IPTV server is received, determine a LAN side port receiving the DHCP or PPPoE response packet as a second port, wherein the second port is a WAN side port connected to an IPTV port of an optical modem; a sending module, configured to send the first data stream to the optical modem based on the second port.
8. The apparatus of claim 7, wherein, The determining module is specifically configured to: if it is determined that the first data stream carries the IPTV feature, it is determined that the first data stream is an IPTV data stream.
9. The apparatus of claim 7 or 8, wherein, The device further comprises a third processing module, configured to: determine a first VLAN tag corresponding to the first port and a second VLAN tag corresponding to the second port. updating a VLAN tag conversion table based on the first VLAN tag and the second VLAN tag, wherein the updated VLAN tag conversion table comprises a correspondence between the first VLAN tag and the second VLAN tag; performing VLAN tag conversion processing on the first data stream based on the updated VLAN tag conversion table.
10. The apparatus of claim 9, wherein, The third processing module is specifically configured to: performing tag deletion processing on the first data stream, and sending the first data stream after the tag deletion processing to the second port, wherein the tag deletion processing is configured to delete the first VLAN tag carried by the first data stream; performing tag creation processing on the first data stream after the tag deletion processing at the second port based on the updated VLAN tag conversion table, wherein the first data stream after the tag creation processing carries the second VLAN tag.
11. The apparatus of claim 10, wherein, The apparatus further comprises a fourth processing module configured to: determining whether the connection between the first port and the set-top box has been disconnected; if the connection has been disconnected, deleting the correspondence between the first VLAN tag and the second VLAN tag in the updated VLAN tag conversion table; receiving a second data stream sent by the set-top box, and determining whether the second data stream is an IPTV data stream; if it is determined that the second data stream is an IPTV data stream, determining a LAN-side port receiving the second data stream as a third port, wherein the third port is a LAN-side port connected to the set-top box through a second sub-route or directly connected to the set-top box, and the second sub-route is any sub-route of the distributed IPTV system except the first sub-route; creating a correspondence between a third VLAN tag and the second VLAN tag in the updated VLAN tag conversion table, wherein the third VLAN tag is a VLAN tag corresponding to the third port.
12. The apparatus of claim 11, wherein, The fourth processing module is specifically configured to: if it is determined that a storage time of a media access control (MAC) address of the set-top box stored in a forwarding database (FDB) is greater than a first preset threshold, determining that the connection between the first port and the set-top box has been disconnected; or, if it is determined that a time of not receiving a reply of an address resolution protocol (ARP) message sent to the set-top box is greater than a second preset threshold, determining that the connection between the first port and the set-top box has been disconnected; or, if a routing driver senses that a physical link is disconnected, determining that the connection between the first port and the set-top box has been disconnected.
13. A system for automatically identifying a port, the system comprising: The system comprises a memory and a processor; the memory is configured to store computer instructions; and the processor is configured to invoke the computer instructions stored in the memory to execute the method in any one of claims 1-6.
14. A computer storage medium, characterized in that, The computer storage medium comprises computer instructions; when the computer instructions run on a computer, the computer instructions make the computer execute the method in any one of claims 1-6.
15. A computer program product, characterised in that, When the computer program product is run on a computer, it causes the computer to perform the method of any one of claims 1-6.
Citation Information
Patent Citations
Method and device for automatically recognizing LAN (Local Area Network) port and WAN (Wide Area Network) port
CN106341246A
IPTV networking system, first forwarding equipment and access point equipment
CN107196793A