CN114884876A - Cross-network plane communication method, device and readable storage medium - Google Patents

Cross-network plane communication method, device and readable storage medium Download PDF

Info

Publication number
CN114884876A
CN114884876A CN202210393487.9A CN202210393487A CN114884876A CN 114884876 A CN114884876 A CN 114884876A CN 202210393487 A CN202210393487 A CN 202210393487A CN 114884876 A CN114884876 A CN 114884876A
Authority
CN
China
Prior art keywords
label
control
network
data message
cross
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.)
Granted
Application number
CN202210393487.9A
Other languages
Chinese (zh)
Other versions
CN114884876B (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.)
Fiberhome Telecommunication Technologies Co Ltd
Original Assignee
Fiberhome Telecommunication Technologies 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 Fiberhome Telecommunication Technologies Co Ltd filed Critical Fiberhome Telecommunication Technologies Co Ltd
Priority to CN202210393487.9A priority Critical patent/CN114884876B/en
Publication of CN114884876A publication Critical patent/CN114884876A/en
Application granted granted Critical
Publication of CN114884876B publication Critical patent/CN114884876B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/66Arrangements for connecting between networks having differing types of switching systems, e.g. gateways
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/302Route determination based on requested QoS
    • H04L45/306Route determination based on the nature of the carried application
    • 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/06Notations for structuring of protocol data, e.g. abstract syntax notation one [ASN.1]
    • 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/631Multimode Transmission, e.g. transmitting basic layers and enhancement layers of the content over different transmission paths or transmitting with different error corrections, different keys or with different transmission protocols
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/50Reducing energy consumption in communication networks in wire-line communication networks, e.g. low power modes or reduced link rate

Abstract

The invention provides a cross-network plane communication method, cross-network plane communication equipment and a readable storage medium. The method comprises the following steps: adding a label corresponding to the control to a data message constructed by the application program using the control; judging whether the data message added with the label is constructed by an IPTV application program using control; if so, sending the data message with the label of the first label to the actual network port of the equipment, transmitting the data message with the label of the second label to the virtual network port of the equipment, and transmitting the data message with the label of the second label to the gateway through the virtual network port of the equipment, so that the gateway sends the data message from the actual network port of the equipment through a public network, and sends the data message from the virtual network port of the equipment through a private network. The invention solves the problem that IPTV service access can not be carried out when the IP address of the server is changed or is not recorded in the prior art.

Description

Cross-network plane communication method, device and readable storage medium
Technical Field
The present invention relates to the field of communication network technologies, and in particular, to a method, a device, and a readable storage medium for cross-network plane communication.
Background
With the evolution of the intelligent technology of IPTV (interactive network television) service, services such as voice control and multi-screen interaction are gradually merged into IPTV. An EPG (Electronic Program Guide) system and a video system of a conventional IPTV are deployed in a private network, but new services such as voice control and multi-screen interaction are deployed in a public network. How to enable an application program to access both an IPTV private network and a public network is a problem to be urgently solved in the industry.
Under the condition that a plurality of EPG server ip addresses and a plurality of video server ip addresses deployed in an IPTV system private network are known, a gateway formulates a routing table according to the server ip addresses. The set-top box receives the routing table and acquires double ip addresses (the IP address of the local area network and the IP address of the IPTV private network). And obtaining a routing table of the set-top box device according to the ip address recorded in the routing table and the ip address obtained by the device. When the set-top box accesses the EPG server and the video server of the IPTV private network, the IP address of the IPTV private network is used for accessing IPTV services according to the rule of the routing table of the set-top box equipment because the destination address is known. When the set-top box accesses other destination addresses, the IP address of the local area network is used for accessing IPTV services, thereby realizing service differentiation. However, in this scheme, it is necessary to know in advance ip addresses of multiple EPG servers and multiple video servers deployed in the private network of the IPTV system, and to send these ip addresses to the set-top box through the gateway, and when the addresses of the EPG servers and the video servers deployed in the private network of the IPTV system are changed or the recording is not complete, the device cannot access the IPTV service.
Disclosure of Invention
The invention mainly aims to provide a cross-network plane communication method, equipment and a readable storage medium. The method aims to solve the technical problem that IPTV service access cannot be performed when the IP address of the server is changed or no record is recorded.
In a first aspect, the present invention provides a cross-network plane communication method, including:
adding a label corresponding to the control to a data message constructed by the application program using the control;
judging whether the data message added with the label is constructed by an IPTV application program using control;
if so, sending the data message with the label of the first label to the actual network port of the equipment, transmitting the data message with the label of the second label to the virtual network port of the equipment, and transmitting the data message with the label of the second label to the gateway through the virtual network port of the equipment, so that the gateway sends the data message from the actual network port of the equipment through a public network, and sends the data message from the virtual network port of the equipment through a private network.
Optionally, before the step of adding the label corresponding to the control to the data packet constructed by the application using the control, the method includes:
acquiring the type of an actual network port of equipment corresponding to a connected public network;
and establishing a virtual network port of the equipment according to the VLAN ID of the IPTV channel, wherein the type of the virtual network port of the equipment corresponds to the type of the actual network port of the equipment.
Optionally, before the step of adding the label corresponding to the control to the data packet constructed by the application using the control, the method further includes:
acquiring control IDs of all controls needing to communicate with the outside;
determining the network type to be accessed by each control corresponding to the control ID of each control according to the control ID of each control;
adding a first label to a control with a network type to be accessed as a public network, and adding a second label to a control with a network type to be accessed as a private network, wherein the first label corresponds to the public network, and the second label corresponds to the private network.
Optionally, the step of adding the label corresponding to the control to the data packet constructed by the application using the control includes:
adding a first label to a data message constructed by an application program by using a control added with the first label;
and adding a second label to the data message constructed by the application program by using the control added with the second label.
Optionally, before the step of adding the label corresponding to the control to the data packet constructed by the application using the control, the method further includes:
respectively creating socket connections corresponding to all the controls, wherein each control corresponds to one socket connection;
and adding a first label to the socket connection corresponding to the control with the label as the first label, and adding a second label to the socket connection corresponding to the control with the label as the second label.
Optionally, before the step of adding the label corresponding to the control to the data packet constructed by the application using the control, the method further includes:
and binding the first label with a first routing table and binding the second label with a second routing table by using an IP rule, wherein the first routing table is bound with an actual network port of the equipment, the second routing table is bound with a virtual network port of the equipment, the first label corresponds to a public network, and the second label corresponds to a private network.
Optionally, the step of sending the data packet labeled as the first label to the actual network port of the device includes:
sending the data message labeled as the first label to an actual network port of the equipment through a first routing table corresponding to the first label and socket connection with the label as the first label corresponding to a control for constructing the data message labeled as the first label;
the step of sending the data message with the label as the second label to the virtual network port of the device comprises the following steps:
and sending the data message labeled with the second label to the virtual network port of the equipment through the second routing table corresponding to the second label and the socket connection with the label as the second label corresponding to the control for constructing the data message labeled with the second label.
Optionally, the step of determining whether the data packet with the tag is constructed by an IPTV application using a control includes:
acquiring a first process number of an IPTV application program;
acquiring a second process number of the running application program through a processpolicy function in the service layer;
if the first process number is the same as the second process number, judging that the data message added with the label is constructed by the IPTV application program using control;
and if the first process number is different from the second process number, judging that the data message added with the label is not constructed by the IPTV application program using control.
In a second aspect, the present invention also provides a cross-network plane communication device, which includes a processor, a memory, and a cross-network plane communication program stored on the memory and executable by the processor, wherein the cross-network plane communication program, when executed by the processor, implements the steps of the cross-network plane communication method as described above.
In a third aspect, the present invention further provides a readable storage medium, on which a cross-network plane communication program is stored, wherein when the cross-network plane communication program is executed by a processor, the steps of the cross-network plane communication method as described above are implemented.
In the invention, a label corresponding to a control is added to a data message constructed by the application program using the control; judging whether the data message added with the label is constructed by an IPTV application program using control; if so, sending the data message with the label of the first label to the actual network port of the equipment, transmitting the data message with the label of the second label to the virtual network port of the equipment, and transmitting the data message with the label of the second label to the gateway through the virtual network port of the equipment, so that the gateway sends the data message from the actual network port of the equipment through a public network, and sends the data message from the virtual network port of the equipment through a private network. By the invention, because the first routing table is respectively bound with the first label and the actual network port of the device, and the second routing table is respectively bound with the second label and the virtual network port of the device, after determining that the data message constructed by the IPTV application program using the control is the data message, the data message labeled as the first label is sent to the actual network port of the device and is transmitted to the gateway through the actual network port of the device, the data message labeled as the second label is sent to the virtual network port of the device and is transmitted to the gateway through the virtual network port of the device, so that the gateway sends the data message from the actual network port of the device through the public network, and sends the data message from the virtual network port of the device through the private network, thereby, the requirement that an application program can access the private network and the public network can be met without acquiring the IP address of a server, and the problem that when the IP address of the server is changed or has no record in the prior art is solved, the problem that IPTV service access can not be carried out.
Drawings
Fig. 1 is a schematic hardware structure diagram of a cross-network plane communication device according to an embodiment of the present invention;
fig. 2 is a flowchart illustrating a cross-network plane communication method according to a first embodiment of the present invention;
FIG. 3 is a detailed diagram of the process of step S20 in FIG. 2;
FIG. 4 is a flowchart illustrating a cross-network plane communication method according to a second embodiment of the present invention;
FIG. 5 is a flowchart illustrating a third embodiment of a cross-network plane communication 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.
In a first aspect, an embodiment of the present invention provides a cross-network plane communication device, which may be a Personal Computer (PC), a notebook computer, a server, or other devices having a data processing function.
Referring to fig. 1, fig. 1 is a schematic diagram of a hardware structure of a cross-network plane communication device according to an embodiment of the present invention. In this embodiment of the present invention, the inter-network plane communication device may include a processor 1001 (e.g., a Central processing unit, CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. The communication bus 1002 is used for realizing connection communication among the components; the user interface 1003 may include a Display screen (Display), an input unit such as a Keyboard (Keyboard); the network interface 1004 may optionally include a standard wired interface, a WIreless interface (e.g., a WI-FI interface, WI-FI interface); the memory 1005 may be a Random Access Memory (RAM) or a non-volatile memory (non-volatile memory), such as a magnetic disk memory, and the memory 1005 may optionally be a storage device independent of the processor 1001. Those skilled in the art will appreciate that the hardware configuration depicted in FIG. 1 is not intended to be limiting of the present invention, and may include more or less components than those shown, or some components in combination, or a different arrangement of components.
With continued reference to FIG. 1, the memory 1005 of FIG. 1, which is one type of computer storage medium, may include an operating system, a network communication module, a user interface module, and a cross-network plane communication program. The processor 1001 may call a cross-network plane communication program stored in the memory 1005, and execute the cross-network plane communication method provided by the embodiment of the present invention.
In a second aspect, an embodiment of the present invention provides a cross-network plane communication method.
In an embodiment, referring to fig. 2, fig. 2 is a flowchart illustrating a cross-network plane communication method according to a first embodiment of the present invention. As shown in fig. 2, the cross-network plane communication method includes:
step S10, adding a label corresponding to the control to the data message constructed by the control used by the application program;
in this embodiment, the control is a package of a method, and one application includes multiple controls, where a webview control is a package of an IPTV page access method, a ctclayer is a package of an IPTV playback method, and an ottlayer is a package of a multi-screen interactive playback method. And according to the program setting, marking a label corresponding to the control on the data message constructed by the control used by the application program, and transmitting the data message added with the label to the service layer according to the program setting.
Further, in one embodiment, step S10 includes:
adding a first label to a data message constructed by an application program by using a control added with the first label;
and adding a second label to the data message constructed by the application program by using the control added with the second label.
In this embodiment, after the application layer adds the first tag to the control of the public network, which is the network type to be accessed, the application program adds the first tag to the data packet constructed by using the control added with the first tag through program setting.
After the application layer adds a second label to the control of the private network of the network type to be accessed, adding the second label to the data message constructed by the application program by using the control added with the second label through program setting.
Step S20, judging whether the data message added with the label is constructed by an IPTV application program using control;
in this embodiment, it is determined in the service layer whether the data packet added with the tag is constructed by the IPTV application use control.
Further, in one embodiment, step S20 includes:
step S201, acquiring a first process number of an IPTV application program;
step S202, acquiring a second process number of the running application program through a processpolicy function in the service layer;
step S203, if the first process number is the same as the second process number, judging that the data message added with the label is constructed by an IPTV application program using control;
step S204, if the first process number is different from the second process number, judging that the data message added with the label is not constructed by the IPTV application program using control.
In this embodiment, referring to fig. 3, fig. 3 is a detailed schematic diagram of the process of step S20 in fig. 2. As shown in fig. 3, a first process number after the IPTV application is started is obtained, and the first process number is transferred from the application layer to the service layer (fwmarkserver) through a jni function, where the jni function is a local function defined at the native layer and corresponds to a method using a native keyword declaration at the java layer. In the service layer, a second process number of the running application program is obtained through a processcontent function, the first process number is compared with the second process number, if the first process number is the same as the second process number, the data message added with the label is judged to be constructed by the IPTV application program using control, and if the first process number is different from the second process number, the data message added with the label is judged not to be constructed by the IPTV application program using control. The processcontent function is an existing function of android and is a process client in the android system.
Step S30, if yes, the data message with the label as the first label is sent to the device actual network port and is transmitted to the gateway through the device actual network port, the data message with the label as the second label is sent to the device virtual network port and is transmitted to the gateway through the device virtual network port, so that the gateway sends the data message from the device actual network port through the public network, and sends the data message from the device virtual network port through the private network.
In this embodiment, if it is determined in step S20 that the data packet with the tag is constructed by the IPTV application use control, the data packet with the tag of the first tag value is routed to the device virtual network port through the first routing table and then transmitted to the gateway through the device actual network port, and the data packet with the tag of the second tag value is routed to the device virtual network port through the second routing table and then transmitted to the gateway through the device virtual network port. Furthermore, the data message transmitted to the gateway through the device virtual network port is added with a tag corresponding to the VLAN ID of the IPTV channel, and the data message transmitted to the gateway through the device virtual network port is not added with a tag corresponding to the VLAN ID of the IPTV channel, so that the gateway determines whether the data message is transmitted from the device virtual network port or from the device virtual network port according to whether the data message is added with a tag corresponding to the VLAN ID of the IPTV channel, and then transmits the data message from the device virtual network port through the private network, and transmits the data message from the device virtual network port through the public network.
In the embodiment, a label corresponding to the control is added to the data message constructed by the application program using the control; judging whether the data message added with the label is constructed by an IPTV application program using control; if so, sending the data message with the label of the first label to the actual network port of the equipment, transmitting the data message with the label of the second label to the virtual network port of the equipment, and transmitting the data message with the label of the second label to the gateway through the virtual network port of the equipment, so that the gateway sends the data message from the actual network port of the equipment through a public network, and sends the data message from the virtual network port of the equipment through a private network. Through the embodiment, because the first routing table is respectively bound with the first label and the actual network port of the device, and the second routing table is respectively bound with the second label and the virtual network port of the device, after determining that the data message constructed by the IPTV application program using the control is the data message, the data message labeled as the first label is sent to the actual network port of the device and is transmitted to the gateway through the actual network port of the device, the data message labeled as the second label is sent to the virtual network port of the device and is transmitted to the gateway through the virtual network port of the device, so that the gateway sends the data message from the actual network port of the device through the public network, and sends the data message from the virtual network port of the device through the private network, thereby, the requirement that an application program can access the private network and the public network can be met without acquiring the IP address of the IPTV server, and the problem that when the IP address of the server is changed or has no record in the prior art is solved, the problem that IPTV service access can not be carried out.
Further, in an embodiment, before step S10, the method includes:
step S001, acquiring the type of an actual network port of equipment corresponding to the connected public network;
step S002, establishing a virtual network port of the device according to the VLAN ID of the IPTV channel, wherein the type of the virtual network port of the device corresponds to the type of the actual network port of the device.
In this embodiment, referring to fig. 4, fig. 4 is a flowchart illustrating a cross-network plane communication method according to a second embodiment of the present invention. As shown in fig. 4, the device running the IPTV application acquires the actual type of the device corresponding to the connected public network, and one way of step S002 is to send an instruction for querying the VLAN ID of the IPTV channel to the gateway device through the connected public network, after receiving the instruction for querying the VLAN ID of the IPTV channel, the gateway device feeds back the queried VLAN ID of the IPTV channel to the device running the IPTV application, and the device running the IPTV application establishes the virtual network according to the VLAN ID of the IPTV channel fed back by the gateway.
Further, the device running the IPTV application acquires the actual network port type of the device corresponding to the connected public network, and another way of step S002 is to manually set a VLAN ID of an IPTV channel on the set-top box, and then the device running the IPTV application establishes a device virtual network port according to the VLAN ID of the IPTV channel.
If the type of the actual network port of the device is a wired type, the type of the virtual network port is also a wired type, and if the type of the actual network port of the device is a wireless type, the type of the virtual network port is also a wireless type, that is, the type of the established virtual network port is to correspond to the type of the actual network port of the device.
Further, in an embodiment, before step S10, the method includes:
step S010, acquiring control IDs of all controls needing to communicate with the outside;
step S020, determining the network type which needs to be accessed by each control corresponding to the control ID of each control according to the control ID of each control;
and S030, adding a first label to the control of which the network type to be accessed is the public network, and adding a second label to the control of which the network type to be accessed is the private network, wherein the first label corresponds to the public network, and the second label corresponds to the private network.
In this embodiment, referring to fig. 5, fig. 5 is a flowchart illustrating a cross-network plane communication method according to a third embodiment of the present invention. As shown in fig. 5, the control IDs of the controls that need to communicate with the outside are obtained in the application layer, the control IDs of the controls are transmitted to the network client (netdclient) in the service layer through the extended function, and the network types that the controls need to access, corresponding to the control IDs of the controls, are determined in the network client (netdclient) in the service layer according to the control IDs of the controls. Adding a control needing to access a public network to a first network identifier, adding a control needing to access a private network to a second network identifier through a setnetworkforsocket function in a network client (netdclient), for determining that the tagged data message was constructed by the IPTV application using the control, the fwmark. intvalue _1 corresponding to the first network identification is added by a setsockopt function, adding fwmark. intvalue _2 corresponding to the second network identification by a setsockopt function, so as to find the socket connection of which the tag corresponding to fwmark. intvalue _1 is the first tag through the setsockopt function, so that the data message with the label of the first label constructed by the control with the label of the first label is sent to the actual network port of the equipment through the socket connection with the label of the first label, and finding a socket connection with the label corresponding to fwmark. intvalue _2 as the second label through a setsockopt function, and sending the data message with the label as the second label, which is constructed by the control with the label as the second label, to the virtual network interface of the equipment through the socket connection with the label as the second label. The first network identifier corresponds to a public network, the second network identifier corresponds to a private network, fwmark _ intvalue _1 corresponds to a public network, and fwmark _ intvalue _2 corresponds to a private network. The method includes the steps that an interface _1 is a parameter in an option of fwmark _1, a device running the IPTV application program finds a socket connection with a label corresponding to the interface _1 as a first label through a setsockopt function and sends a data message, an interface _2 is a parameter in an option of fwmark _2, the device running the IPTV application program finds a socket connection with a label corresponding to the interface _2 as a second label through the setsockopt function and sends the data message, and the setsockopt () function is used for setting option values of sockets in any type and any state, an extension function refers to adding a new behavior to one class, and the setworkforsocker function is an existing function of android and can be directly called.
Further, in the application layer, initializing each control needing communication, then adding a first label to each initialized control of which the network type needing access is a public network, and adding a second label to each initialized control of which the network type needing access is a private network. For example, a webview (web page view) control corresponding to a browser needing to access a private network is set to be 2, and a multi-screen interaction control needing to access a public network is set to be 1.
However, before step S10, step S001 and step S002 may be performed, step S010 to step S030 may be performed, or step S001 to step S002 may be performed together with step S010 to step S030.
Further, in an embodiment, before step S10, the method further includes:
respectively creating socket connections corresponding to all the controls, wherein each control corresponds to one socket connection;
and adding a first label to the socket connection corresponding to the control with the label as the first label, and adding a second label to the socket connection corresponding to the control with the label as the second label.
In this embodiment, socket connections corresponding to the respective controls that need to communicate are created through the IPTV application program, where each control corresponds to one socket connection. And adding the socket connection corresponding to the control with the label as the first label to the first label through a setsockopt function, and adding the socket connection corresponding to the control with the label as the second label to the second label through the setsockopt function. Wherein, setsockopt () function is used for setting option value of socket in any type and any state, two programs on the network realize data exchange through a bidirectional communication connection, and one end of the connection is called a socket.
Further, in an embodiment, before step S10, the method further includes:
and binding the first label with a first routing table and binding the second label with a second routing table by using an IP rule, wherein the first routing table is bound with an actual network port of the equipment, the second routing table is bound with a virtual network port of the equipment, the first label corresponds to a public network, and the second label corresponds to a private network.
In this embodiment, a first tag and a second tag are added to an IPTV application program through program setting, where the first tag corresponds to a public network and the second tag corresponds to an IPTV private network. Specifically, a first tag netmark _1 and a second tag netmark _2 are added to an IPTV application program through program setting, where the first tag netmark _1 ═ 1 corresponds to a public network, and the second tag netmark _2 ═ 2 corresponds to a private network. Binding fwmark _1 corresponding to the first label with the first routing table by using an IP rule, binding fwmark _2 corresponding to the second label with the second routing table, binding the first routing table with the actual device internet access, binding the second routing table with the virtual device internet access, so that a device running an IPTV application program can send a data message to the actual device internet access or the virtual device internet access by identifying a label of the data message constructed by using a control by the IPTV application program, wherein the fwmark _1 is an option for adjusting the first routing table in network connection, and the fwmark _2 is an option for adjusting the second routing table in network connection.
Further, in an embodiment, the step of sending the data packet labeled as the first label to the actual port of the device includes:
sending the data message labeled as the first label to an actual network port of the equipment through a first routing table corresponding to the first label and socket connection with the label as the first label corresponding to a control for constructing the data message labeled as the first label;
the step of sending the data packet with the label as the second label to the virtual network port of the device includes:
and sending the data message labeled with the second label to the virtual network port of the equipment through the second routing table corresponding to the second label and the socket connection with the label as the second label corresponding to the control for constructing the data message labeled with the second label.
In this embodiment, since the first routing table is bound to the fwmark _1 corresponding to the first tag, and the socket connection with the tag as the first tag corresponding to the control that constructs the data packet with the tag as the first tag is added with the first tag, the data packet with the tag as the first tag sent through the socket connection with the tag as the first tag is routed to the actual network port of the device by the first routing table.
Because the second routing table is bound with fwmark _2 corresponding to the second label, the second label is added to the socket connection labeled with the second label corresponding to the control for constructing the data packet labeled with the second label, so that the data packet labeled with the second label and sent by the socket connection labeled with the second label can be routed to the virtual network port of the device by the second routing table.
In a third aspect, the present invention further provides a readable storage medium for cross-network plane communication.
The readable storage medium of the present invention stores thereon a cross-network plane communication program, wherein the cross-network plane communication program, when executed by a processor, implements the steps of the cross-network plane communication method as described above.
The method for implementing the cross-network plane communication program when executed may refer to various embodiments of the cross-network plane communication method of the present invention, and details thereof are not described herein.
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 or the portions contributing to the prior art may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) as described above and includes several instructions for causing a terminal 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 (10)

1. A cross-network plane communication method, characterized in that the cross-network plane communication method comprises:
adding a label corresponding to the control to a data message constructed by the application program using the control;
judging whether the data message added with the label is constructed by an IPTV application program using control;
if so, sending the data message with the label of the first label to the actual network port of the equipment, transmitting the data message with the label of the second label to the virtual network port of the equipment, and transmitting the data message with the label of the second label to the gateway through the virtual network port of the equipment, so that the gateway sends the data message from the actual network port of the equipment through a public network, and sends the data message from the virtual network port of the equipment through a private network.
2. The cross-network plane communication method according to claim 1, wherein before the step of adding the label corresponding to the control to the data packet constructed by the application using the control, the method comprises:
acquiring the type of an actual network port of equipment corresponding to a connected public network;
and establishing a virtual network port of the equipment according to the VLAN ID of the IPTV channel, wherein the type of the virtual network port of the equipment corresponds to the type of the actual network port of the equipment.
3. The cross-network plane communication method according to claim 1, wherein before the step of adding the label corresponding to the control to the data packet constructed by the application using the control, further comprising:
acquiring control IDs of all controls needing to communicate with the outside;
determining the network type to be accessed by each control corresponding to the control ID of each control according to the control ID of each control;
adding a first label to a control with a network type to be accessed as a public network, and adding a second label to a control with a network type to be accessed as a private network, wherein the first label corresponds to the public network, and the second label corresponds to the private network.
4. The cross-network plane communication method of claim 3, wherein the step of adding the label corresponding to the control to the data packet constructed by the application using the control comprises:
adding a first label to a data message constructed by an application program by using a control added with the first label;
and adding a second label to the data message constructed by the application program by using the control added with the second label.
5. The cross-network plane communication method according to claim 3, wherein before the step of adding the label corresponding to the control to the data packet constructed by the application using the control, further comprising:
respectively creating socket connections corresponding to all the controls, wherein each control corresponds to one socket connection;
and adding a first label to the socket connection corresponding to the control with the label as the first label, and adding a second label to the socket connection corresponding to the control with the label as the second label.
6. The cross-network plane communication method of claim 5, wherein before the step of adding the label corresponding to the control to the data packet constructed by the application using the control, further comprising:
and binding the first label with a first routing table and binding the second label with a second routing table by using an IP rule, wherein the first routing table is bound with an actual network port of the equipment, the second routing table is bound with a virtual network port of the equipment, the first label corresponds to a public network, and the second label corresponds to a private network.
7. The method of claim 6, wherein the step of sending the data message labeled as the first label to the device's actual portal comprises:
sending the data message labeled as the first label to an actual network port of the equipment through a first routing table corresponding to the first label and socket connection with the label as the first label corresponding to a control for constructing the data message labeled as the first label;
the step of sending the data packet with the label as the second label to the virtual network port of the device includes:
and sending the data message labeled with the second label to the virtual network port of the device through the second routing table corresponding to the second label and the socket connection with the label of the second label corresponding to the control for constructing the data message labeled with the second label.
8. The cross-network plane communication method according to claim 1, wherein the step of determining whether the tagged data packet is constructed by an IPTV application use control comprises:
acquiring a first process number of an IPTV application program;
acquiring a second process number of the running application program through a processpolicy function in the service layer;
if the first process number is the same as the second process number, judging that the data message added with the label is constructed by the IPTV application program using control;
and if the first process number is different from the second process number, judging that the data message added with the label is not constructed by the IPTV application program using control.
9. A cross-network plane communication device comprising a processor, a memory, and a cross-network plane communication program stored on the memory and executable by the processor, wherein the cross-network plane communication program, when executed by the processor, implements the steps of the cross-network plane communication method of any of claims 1 to 8.
10. A readable storage medium, having a cross-network plane communication program stored thereon, wherein the cross-network plane communication program, when executed by a processor, implements the steps of the cross-network plane communication method according to any one of claims 1 to 8.
CN202210393487.9A 2022-04-14 2022-04-14 Cross-network plane communication method, device and readable storage medium Active CN114884876B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210393487.9A CN114884876B (en) 2022-04-14 2022-04-14 Cross-network plane communication method, device and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210393487.9A CN114884876B (en) 2022-04-14 2022-04-14 Cross-network plane communication method, device and readable storage medium

Publications (2)

Publication Number Publication Date
CN114884876A true CN114884876A (en) 2022-08-09
CN114884876B CN114884876B (en) 2023-06-30

Family

ID=82669028

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210393487.9A Active CN114884876B (en) 2022-04-14 2022-04-14 Cross-network plane communication method, device and readable storage medium

Country Status (1)

Country Link
CN (1) CN114884876B (en)

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6657991B1 (en) * 1998-12-21 2003-12-02 3Com Corporation Method and system for provisioning network addresses in a data-over-cable system
WO2006108344A1 (en) * 2005-04-12 2006-10-19 Huawei Technologies Co., Ltd. Method for realizing vpn
US20100095347A1 (en) * 2008-10-15 2010-04-15 At&T Intellectual Property I, L.P. Broadcast interactive television system
US20100122306A1 (en) * 2007-11-09 2010-05-13 At&T Intellectual Property I, L.P. System and Method for Tagging Video Content
CN106973010A (en) * 2017-06-02 2017-07-21 中国电信股份有限公司四川分公司 A kind of method that home gateway single port merges two kinds of heterogeneous networks
CN111371685A (en) * 2020-02-28 2020-07-03 北京百度网讯科技有限公司 Data processing and IPv6 mounting method and device
US20210026702A1 (en) * 2019-07-24 2021-01-28 Vmware, Inc. Tag assisted cloud resource identification for onboarding and application blueprint construction
US20210083902A1 (en) * 2018-06-01 2021-03-18 Huawei Technologies Co., Ltd. Method for Managing Virtual Private Network, and Device
CN113194020A (en) * 2021-05-24 2021-07-30 上海层峰网络科技有限公司 Virtual network interaction method and virtual network architecture
JP2021145345A (en) * 2018-06-26 2021-09-24 華為技術有限公司Huawei Technologies Co., Ltd. Vxlan implementation method, network device, and communications system
CN113923494A (en) * 2021-10-09 2022-01-11 深圳创维数字技术有限公司 IPTV set-top box and dual-network playing method

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6657991B1 (en) * 1998-12-21 2003-12-02 3Com Corporation Method and system for provisioning network addresses in a data-over-cable system
WO2006108344A1 (en) * 2005-04-12 2006-10-19 Huawei Technologies Co., Ltd. Method for realizing vpn
US20100122306A1 (en) * 2007-11-09 2010-05-13 At&T Intellectual Property I, L.P. System and Method for Tagging Video Content
US20100095347A1 (en) * 2008-10-15 2010-04-15 At&T Intellectual Property I, L.P. Broadcast interactive television system
CN106973010A (en) * 2017-06-02 2017-07-21 中国电信股份有限公司四川分公司 A kind of method that home gateway single port merges two kinds of heterogeneous networks
US20210083902A1 (en) * 2018-06-01 2021-03-18 Huawei Technologies Co., Ltd. Method for Managing Virtual Private Network, and Device
JP2021145345A (en) * 2018-06-26 2021-09-24 華為技術有限公司Huawei Technologies Co., Ltd. Vxlan implementation method, network device, and communications system
US20210026702A1 (en) * 2019-07-24 2021-01-28 Vmware, Inc. Tag assisted cloud resource identification for onboarding and application blueprint construction
CN111371685A (en) * 2020-02-28 2020-07-03 北京百度网讯科技有限公司 Data processing and IPv6 mounting method and device
CN113194020A (en) * 2021-05-24 2021-07-30 上海层峰网络科技有限公司 Virtual network interaction method and virtual network architecture
CN113923494A (en) * 2021-10-09 2022-01-11 深圳创维数字技术有限公司 IPTV set-top box and dual-network playing method

Also Published As

Publication number Publication date
CN114884876B (en) 2023-06-30

Similar Documents

Publication Publication Date Title
US10033818B2 (en) Using listen ranges to deliver content to electronic devices from local caching servers
TWI274491B (en) Network interconnection apparatus, network interconnection method, name resolution apparatus and computer program
US6385615B1 (en) Communicating network information using universal resource locators
US7836164B2 (en) Extensible network discovery subsystem
CN102232286B (en) Set up network equipment and the method for IPTV session
US9338168B2 (en) Method and device for controlling digital living network alliance contents
US20070189486A1 (en) Communication apparatus, system, method and computer readable medium
US20100115053A1 (en) Method and apparatus for managing state information of remote user interface
US6604241B1 (en) Communicating video information in a network using universal resource locators
US9323940B2 (en) Rights control method and apparatus for digital living network alliance
EP3461226B1 (en) Home gateway and forwarding service method thereof
US8386614B2 (en) Network connection manager
US20010051981A1 (en) Methods and systems for discovering object-exchange resources on a network
CN111405042B (en) Electronic device discovery method and device, storage medium and electronic device
CN107015870A (en) Realize method, device and the electronic equipment of web page and locally applied communication
KR101799447B1 (en) Server connectiong method, information providng method of device and device applying the same, Cloud Computing Network system and operation method thereof
US9697173B2 (en) DNS proxy service for multi-core platforms
US20050278417A1 (en) Client access to web services
US20170264666A1 (en) Method and associated server for providing user-friendly operation
CN114884876B (en) Cross-network plane communication method, device and readable storage medium
CN105959248B (en) The method and device of message access control
CN113285920B (en) Service access method, device, equipment and storage medium
US8645544B2 (en) Cross product/service management
KR100521762B1 (en) Application downloading method which can download application packs and install automatically, make menu dynamically and integrated home server system using it
WO2009062396A1 (en) Resource access method and resource access system

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