CN117792993A - Gateway data forwarding method and device, electronic equipment and readable storage medium - Google Patents

Gateway data forwarding method and device, electronic equipment and readable storage medium Download PDF

Info

Publication number
CN117792993A
CN117792993A CN202311813905.6A CN202311813905A CN117792993A CN 117792993 A CN117792993 A CN 117792993A CN 202311813905 A CN202311813905 A CN 202311813905A CN 117792993 A CN117792993 A CN 117792993A
Authority
CN
China
Prior art keywords
service
forwarding
data
gateway
multicast
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.)
Pending
Application number
CN202311813905.6A
Other languages
Chinese (zh)
Inventor
刘泽新
陈飞
张恩利
代乐
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Skyworth Digital Technology Co Ltd
Original Assignee
Shenzhen Skyworth Digital Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Skyworth Digital Technology Co Ltd filed Critical Shenzhen Skyworth Digital Technology Co Ltd
Priority to CN202311813905.6A priority Critical patent/CN117792993A/en
Publication of CN117792993A publication Critical patent/CN117792993A/en
Pending legal-status Critical Current

Links

Abstract

The application is applied to the technical field of communication, and discloses a gateway data forwarding method, a device, electronic equipment and a readable storage medium, wherein the gateway data forwarding method comprises the following steps: receiving service data of a service LAN port of a gateway; determining a forwarding mapping relation of the service data according to the service type of the service data, wherein the forwarding mapping relation is characterized by a mapping relation between forwarding type information and a forwarding WAN port; and determining a target WAN port matched with the service data in the forwarding mapping relation, and forwarding the service data through the target WAN port. The application aims to solve the technical problem that the gateway is poor in usability.

Description

Gateway data forwarding method and device, electronic equipment and readable storage medium
Technical Field
The application belongs to the technical field of communication, and relates to a gateway data forwarding method, a gateway data forwarding device, electronic equipment and a readable storage medium.
Background
The home gateway is a network hub center of a home and carries all external IP service configuration and forwarding of the home and the outside. Due to the growing day and month of the development of the internet, the life quality of people is improved, and the requirements for the use of broadband services are higher and higher, so that a plurality of identical broadband services may need to be used. Different services of the existing home gateway have fixed physical interfaces for configuration and forwarding, the LAN (Local Area Network ) side interface of the gateway device is bound with a specific WAN (Wide Area Network ) connection, and after binding, all uplink data packets from the specific LAN side port can only be sent to the operator network from the WAN connection bound with it. For example, the IPTV service is fixed at the second LAN port of the gateway, and only the WAN port that can be bound with the second LAN port through the second LAN port can successfully forward the service data corresponding to the IPTV service to the server corresponding to the IPTV service, so as to implement normal forwarding of the IPTV service. However, other LAN ports of the gateway cannot support IPTV services, and the gateway supports fixed types and numbers of forwarded services, and when a user needs multiple IPTV services, multiple gateways are needed to implement the service, so that the functions of forwarding the services of the gateway are too single, and the gateway is easy to use and difficult to meet the needs of the user.
The foregoing is provided merely for the purpose of facilitating an understanding of the technical solutions of the present application and is not intended to represent an admission that the foregoing is prior art.
Disclosure of Invention
The main purpose of the present application is to provide a gateway data forwarding method, device, electronic equipment and readable storage medium, which aims to solve the technical problem of poor usability of the gateway.
In order to achieve the above object, the present application provides a gateway data forwarding method, which includes:
receiving service data of a service LAN port of a gateway;
determining a forwarding mapping relation of the service data according to the service type of the service data, wherein the forwarding mapping relation is characterized by a mapping relation between forwarding type information and a forwarding WAN port;
and determining a target WAN port matched with the service data in the forwarding mapping relation, and forwarding the service data through the target WAN port.
To achieve the above object, the present application provides a gateway data forwarding device, including:
the receiving module is used for receiving the service data of the service LAN port of the gateway;
the determining module is used for determining a forwarding mapping relation of the service data according to the service type of the service data, wherein the forwarding mapping relation is characterized as a mapping relation between forwarding type information and a forwarding WAN port;
And the forwarding module is used for determining a target WAN port matched with the service data in the forwarding mapping relation and forwarding the service data through the target WAN port.
The application also provides an electronic device comprising: the gateway data forwarding method comprises a memory, a processor and a program of the gateway data forwarding method stored in the memory and capable of running on the processor, wherein the program of the gateway data forwarding method can realize the steps of the gateway data forwarding method when being executed by the processor.
The present application also provides a readable storage medium, on which a program for implementing a gateway data forwarding method is stored, where the program for implementing the gateway data forwarding method, when executed by a processor, implements the steps of the gateway data forwarding method as described above.
The present application also provides a computer program product comprising a computer program which, when executed by a processor, implements the steps of a gateway data forwarding method as described above.
The application provides a gateway data forwarding method, a gateway data forwarding device, electronic equipment and a readable storage medium, wherein the gateway data forwarding method and the electronic equipment are used for receiving service data of a service LAN port of a gateway; determining a forwarding mapping relation of the service data according to the service type of the service data, wherein the forwarding mapping relation is characterized by a mapping relation between forwarding type information and a forwarding WAN port; and determining a target WAN port matched with the service data in the forwarding mapping relation, and forwarding the service data through the target WAN port.
When service data sent by a gateway LAN port is received, a target WAN port of the service data is determined based on a forwarding mapping relation of the gateway, so that the service data can be forwarded through the target WAN port. Because the forwarding mapping relationship is the mapping relationship between the forwarding type information and the forwarding WAN port, no matter which LAN port service data is received by the gateway, the target WAN port of the service data can be determined based on the service type of the service data, so that the service data can be forwarded to a corresponding server successfully through the target WAN port, and further the service data can not be limited by binding between the LAN port and the WAN port, so that the same broadband service can be accessed to any LAN port of the gateway, each broadband service can be accessed to any LAN port of the gateway, the configuration of the broadband service based on the binding relationship between each LAN port and each WAN port on the gateway is not needed, and the usability of the gateway is further improved, and a plurality of gateways do not need to be reconfigured when a user needs to realize a plurality of same broadband services.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the application and together with the description, serve to explain the principles of the application.
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are required to be used in the description of the embodiments or the prior art will be briefly described below, and it will be obvious to those skilled in the art that other drawings can be obtained from these drawings without inventive effort.
Fig. 1 is a schematic flow chart of a first embodiment of a gateway data forwarding method of the present application;
fig. 2 is a schematic flow chart of a second embodiment of a gateway data forwarding method of the present application;
fig. 3 is a schematic flow chart of determining a second mapping relationship in the gateway data forwarding method of the present application;
fig. 4 is a schematic device diagram of an embodiment of a gateway data forwarding method of the present application;
fig. 5 is a schematic device structure diagram of a hardware operating environment related to a gateway data forwarding method in an embodiment of the present application.
The implementation, functional features and advantages of the present application will be further described with reference to the accompanying drawings in conjunction with the embodiments.
Detailed Description
In order to make the above objects, features and advantages of the present application more comprehensible, the following description will make the technical solutions of the embodiments of the present application clear and complete with reference to the accompanying drawings of the embodiments of the present application. It will be apparent that the described embodiments are only some, but not all, of the embodiments of the present application. All other embodiments, based on the embodiments herein, which are within the scope of the protection of the present application, will be within the purview of one of ordinary skill in the art without the exercise of inventive faculty.
Example 1
Referring to fig. 1, an embodiment of the present application provides a gateway data forwarding method, where in a first embodiment of the gateway data forwarding method of the present application, the gateway data forwarding method includes:
step S10, receiving service data of a service LAN port of a gateway;
it should be noted that, the embodiments of the present application may be applied to a home gateway, where multiple broadband services may be supported, for example, voIP (Voice over Internet Protocol, voice call technology), HSI (High Speed Internet, high-speed internet), IPTV (Internet Protocol Television, internet television), TR069 (technical report 069, remote management internet portal device), and so on. The service LAN port refers to an interface on the gateway LAN side, and the gateway generally includes four LAN ports, where the four LANs support different services respectively, but in the embodiment of the present application, the four LAN ports of the gateway may also support the same service. The service data is data received at a service LAN port of the gateway, and the service LAN port may be any LAN port on the gateway. The service data may be service data corresponding to TR069 or VOIP, for example, SIP (Session Initiation Protocol, signaling control protocol) data is service data corresponding to VOIP, or may be service data corresponding to IPTV service. Illustratively, service data of any LAN port on the gateway is acquired, and after the service data is acquired, the gateway analyzes the service data to forward the service data.
Step S20, determining a forwarding mapping relation of the service data according to the service type of the service data, wherein the forwarding mapping relation is characterized as a mapping relation between forwarding type information and a forwarding WAN port;
it should be noted that the service type refers to a service type of service data, and the service type may be determined based on a service destination address of the service data. The service destination address is a destination address of a network to which service data needs to be forwarded outside the gateway, and the network outside the gateway refers to a network different from a service LAN port of the gateway. When the service LAN port of the gateway receives the service data, the service data carries the service destination address. The forwarding mapping relation is preset on the gateway, and the forwarding mapping relation is characterized as the mapping relation between forwarding type information and forwarding WAN ports. The forwarding mapping relation comprises a plurality of mapping relations between forwarding type information and forwarding WAN ports.
The forwarding mapping relation comprises a first mapping relation and a second mapping relation, the service data can be data corresponding to unicast service or data corresponding to multicast service, because the unicast service and the multicast service are different in corresponding address types, the unicast service is associated with the unicast address, the multicast service is associated with the multicast address, when the service type of the service data is unicast service, the target WAN port of the service data is determined based on the first mapping relation, and when the service type of the service data is multicast service, the target WAN port of the service data is determined based on the second mapping relation. The forwarding type information comprises a unicast destination address and a multicast protocol type, the target WAN port comprises a unicast WAN port and a multicast WAN port, the first mapping relation is used for describing the mapping relation between the unicast destination address and the unicast WAN port corresponding to the unicast service, and the second mapping relation is used for describing the mapping relation between the multicast protocol type and the multicast WAN port corresponding to the multicast service.
It should be further noted that, when forwarding service data of the service LAN port, the general gateway determines a WAN port from which the service data can be forwarded based on the WAN port bound to the service LAN port, but the present application determines forwarding mapping relationship between forwarding type information and forwarding WAN ports, so when receiving service data of the service LAN port, it may determine forwarding mapping relationship based on service type of the service data, and determine a target WAN port based on the forwarding mapping relationship, thereby successfully forwarding the service data. The target WAN port is an interface corresponding to a server to which the service data needs to be sent, and the service data can be successfully forwarded through the target WAN port.
Exemplary, the service type of the service data is determined based on the service destination address of the service data, the forwarding mapping relation of the service data is determined based on the service type of the service data, and the WAN port corresponding to the service data is searched in the forwarding mapping relation. When the service type is unicast service, the forwarding mapping relation is a first mapping relation associated with the unicast service, and when the service type is multicast service, the forwarding mapping relation is a second mapping relation associated with the multicast service.
And step S30, determining a target WAN port matched with the service data in the forwarding mapping relation, and forwarding the service data through the target WAN port.
It should be noted that, when the gateway determines the target WAN port corresponding to the service data, the gateway can forward the service data to the server corresponding to the service data through the target WAN port. Different service data correspond to different servers for communication, for example, when the service data are SIP data, the corresponding server is an SIP server, when the service data are IPTV data, the corresponding server is an ISP server, the service data are forwarded to the corresponding server, and the service data can be forwarded successfully, so that normal communication between the equipment accessed on the gateway LAN port and the corresponding server can be realized. The service data is forwarded through the target WAN port, and the service data may be a message or a protocol.
When service data sent by a gateway LAN port is received, a target WAN port of the service data is determined based on a forwarding mapping relation of the gateway, so that the service data can be forwarded through the target WAN port. Because the forwarding mapping relationship is the mapping relationship between the forwarding type information and the forwarding WAN port, no matter which LAN port service data is received by the gateway, the target WAN port of the service data can be determined based on the service type of the service data, so that the service data can be forwarded to a corresponding server successfully through the target WAN port, and further the service data can not be limited by binding between the LAN port and the WAN port, so that the same broadband service can be accessed to any LAN port of the gateway, each broadband service can be accessed to any LAN port of the gateway, the configuration of the broadband service based on the binding relationship between each LAN port and each WAN port on the gateway is not needed, and the usability of the gateway is further improved, and a plurality of gateways do not need to be reconfigured when a user needs to realize a plurality of same broadband services.
Example two
Further, referring to fig. 2, in another embodiment of the present application, the same or similar content as the above embodiment may be referred to the above description, and will not be repeated herein. On the basis, the step of determining the target WAN port of the service data in the forwarding mapping relation of the gateway according to the service destination address of the service data comprises the following steps:
step A10, obtaining a service destination address from the service data, and judging the service type of the service data according to the service destination address;
step A20, if the service type is unicast service, determining that the forwarding mapping relation of the service data is the first mapping relation;
and step A30, if the service type is multicast service, determining that the forwarding mapping relation of the service data is a second mapping relation.
It should be noted that the forwarding mapping relationship includes a first mapping relationship and a second mapping relationship. Both the first mapping relationship and the second mapping relationship may be mapping relationships configured on the gateway in advance. The first mapping relation and the second mapping relation which are automatically configured by the gateway when the equipment is to be accessed on the service LAN port of the gateway. The first mapping relation is a mapping relation related to a unicast service, and the second mapping relation is a mapping relation related to a multicast service. The mapping relationship between the unicast destination address corresponding to the unicast service and the unicast WAN port is represented in the first mapping relationship, specifically, the TR069 service and the SIP service belong to the unicast service, and the first mapping relationship includes the connection between the unicast destination address corresponding to the TRO69 service and the unicast WAN port, and also includes the connection between the unicast destination address corresponding to the SIP service and the unicast WAN port.
The second mapping relation characterizes the mapping relation between the multicast protocol type corresponding to the multicast service and the multicast WAN port, specifically, the IPTV service data belongs to the multicast service, the service data corresponding to the IPTV service is protocol data, and the second mapping relation comprises the mapping relation between the multicast protocol type corresponding to the IPTV service and the multicast WAN port. When the service LAN port on the gateway is accessed to the equipment corresponding to the IPTV service, the service LAN port receives the IPTV service, so that the service LAN port receives the service data corresponding to the IPTV service for the first time, after the target WAN port corresponding to the IPTV service data is determined, the service LAN port can not determine the target WAN port according to the service destination address corresponding to the IPTV service data after forwarding the IPTV service data, and the IPTV service data corresponding to the service LAN port can be directly forwarded to the target LAN port because the service destination addresses corresponding to the service data forwarded by the same service LAN port are the same.
Illustratively, steps a10 through a30 include: acquiring the service destination address from the service data and judging the service type of the service data; if the service type is unicast service, determining that a forwarding mapping relation of service data is a first mapping relation, searching a unicast destination address matched with the service destination address in the first mapping relation, and taking a unicast WAN port associated with the unicast destination address as a target WAN port; determining a target WAN port matched with the service destination address; if the service type is multicast service, determining that forwarding mapping of service data is a second mapping relation, searching a multicast protocol type matched with the service destination address in the second mapping relation, and taking a multicast WAN port associated with the multicast protocol type as a target WAN port.
According to the embodiment of the application, the forwarding mapping relation of the service data is determined through the service type, so that the target WAN port of the service data can be determined no matter what type of service data is received by the service LAN port of the gateway, and the service data can be successfully forwarded. In the application, the target WAN ports corresponding to the service data of the unicast service are determined through the first mapping relation, and the target WAN ports corresponding to the service data of the multicast service are determined through the second mapping relation, so that the multicast service and the unicast service can be connected to any service LAN port on the gateway without being limited by the binding of the LAN ports and the WAN ports, a plurality of same unicast services or multicast services can be realized on the same gateway, the usability of the gateway is improved, the use experience of a user can be improved, and when the user needs to use a plurality of same services, a plurality of gateways are not needed, and the use cost of the user gateway is reduced.
In a possible embodiment, step a10 includes:
step a11, obtaining service address data matched with preset address bit information from the service destination address;
step a12, judging whether the service address data is matched with the preset multicast address bit information;
Step a13, if yes, determining the service type of the service data as the multicast service;
and step a14, if not, determining the service type of the service data as the unicast service.
It should be noted that, the service destination address includes a plurality of address bits, the preset address bit information is position serial number information of a designated address bit in the service destination address, and the preset address bit information may be the first bit to the fourth bit of the service destination address. The service address data is corresponding address data on address bits matched with the preset address bit information. The service address data may be address data of the first four bits in the service destination address. The preset multicast address bit information is characterized as a header address of a destination address of the multicast service. The header addresses of different multicast services are generally the same, so it can be determined whether the service address data is a multicast service by determining whether the service address data matches with the preset multicast address bit information.
Illustratively, steps a11 through a14 include: acquiring service address data matched with preset address bit information from the service destination address; judging whether the service address data is matched with preset multicast address bit information or not; if the service address data is matched with the preset multicast address bit information, determining that the service type of the service data is the multicast service; and if the service address data is not matched with the preset multicast address bit information, determining that the service type of the service data is the unicast service.
According to the embodiment of the application, the service type of the service data is judged through the service address data and the preset multicast address bit information, so that unicast service and multicast service can be distinguished, further the service data can be forwarded conveniently, and the service data forwarding failure is avoided.
In a possible embodiment, the step of determining a target WAN port matching the service data in the forwarding mapping relationship includes:
and step B10, searching a target static route matched with the service destination address in a first mapping relation according to the service destination address of the service data to determine the target WAN port under the condition that the service type is unicast service.
It should be noted that, the first mapping relationship includes a mapping relationship between a unicast destination address and a unicast WAN port, and specifically, the unicast WAN port may be a unicast static route, where the static route is configured based on an IP address segment, and the unicast static route is a static route corresponding to a unicast service. When the traffic data is unicast traffic, the target WAN port may be a target static route.
It should also be noted that in the embodiment of the present application, the unicast service may be SIP service and TR069 service. The first mapping relationship may be a routing forwarding table, where the routing forwarding table is a mapping relationship between a unicast destination address and a unicast static route, and the routing forwarding table includes a unicast static route corresponding to a SIP service and also includes a static route corresponding to a TR069 service. When the service type of the service data is unicast service, a target unicast destination address matched with the service destination address is searched in the first mapping relation, and a unicast WAN port associated with the target unicast destination address is used as a target WAN port. According to the embodiment of the invention, the corresponding service data is forwarded by matching the corresponding target static route, so that any LAN port of the gateway can forward the service data corresponding to the corresponding unicast service, and the flexibility of the gateway is enhanced.
In a possible embodiment, before step B20, further includes:
step X10, obtaining unicast forwarding registration information preset in the gateway;
step X20, determining a unicast destination address from the unicast forwarding registration information, and configuring a forwarding static route of the unicast destination address to determine a unicast WAN port;
and step X30, taking the unicast destination address and the associated unicast WAN port as the first mapping relation.
Before the gateway is used, various devices are accessed to each service LAN port of the gateway so as to forward various service data corresponding to the devices through the gateway. Specifically, the device information may be registration information of a device, where the unicast forwarding registration information includes a plurality of device information, the unicast forwarding registration information may be URLs corresponding to the device, and in this embodiment, the unicast service may be an SIP service and a TR069 service, so the unicast forwarding registration information includes SIP registration information of an SIP service and TR069 registration information of the TR069 service, where the SIP registration information is a URL (Uniform Resource Locator ) of an SIP, and the TR069 registration information is a URL corresponding to TR 069. The gateway may configure SIP registration information and TR069 registration information in advance, but the gateway cannot determine which WAN port to send service data corresponding to the S IP service, and cannot determine which WAN port to send service data corresponding to the TR069 service, only according to the SIP registration information and the TR069 registration information. It is necessary to determine a first mapping of the gateway to associate the unicast destination address with the unicast WAN port. The forwarding static route comprises an S IP static route corresponding to the SIP service and also comprises a TR069 static route corresponding to the TR069 service. The unicast destination address may be a SIP destination address corresponding to a SIP service, or may be a TR069 destination address corresponding to a TR069 service.
Illustratively, steps X10 through X30 include: acquiring unicast forwarding registration information, wherein the unicast forwarding registration information comprises SIP registration information and TR069 registration information; and acquiring an SIP destination address from the SIP registration information, and configuring an SIP static route for the SIP destination address to obtain an SIP unicast WAN port corresponding to the SIP. Acquiring a TR069 destination address from TR069 registration information, and configuring a TR069 static route for the TR069 destination address to obtain a TR069 unicast WAN port corresponding to the TR 069; and associating the SIP destination address with the SIP unicast WAN port, and associating the TR069 destination address with the TR069 unicast WAN port to obtain a first mapping relation. According to the method and the device, the association relation between the TR069 destination address corresponding to the TRO69 service and the TR069 unicast WAN port is determined, and the association relation between the SIP destination address corresponding to the SIP service and the SIP unicast WAN port is determined, so that the SIP service or the TR069 service can be accessed to any LAN port of the gateway, the association relation between the unicast destination address and the unicast WAN port is determined, and therefore when the gateway is formally put into use, the target WAN port corresponding to the service data can be determined based on the first mapping relation, and the service data can be successfully forwarded.
In a possible embodiment, step X20 includes:
And step X21, if the unicast forwarding registration information is a domain name, calling a domain name resolution module of the gateway, and searching a unicast destination address matched with the domain name in the domain name resolution module.
It should be noted that, the unicast service may be a SIP service and a TR069 service, so the unicast forwarding registration information may be SIP registration information or TR069 registration information, the SIP registration information may be a URL of SIP, the URL of SIP may be a SIP domain name or an IP address of SIP, the TR069 registration information may be a URL of TR069, the URL of TR069 may be a TR069 domain name, or an IP address of TR 069. The unicast destination address may be a SIP destination address or a TR069 destination address, and the unicast address segment may be a SIP address segment corresponding to the SIP destination address or a TR069 address segment corresponding to the TR069 destination address.
It should be noted that, the unicast forwarding registration information preset in the gateway may be an IP address or a domain name, and when the preset domain name is that the IP address cannot be directly determined, the domain name needs to be resolved to obtain the IP address corresponding to the domain name. The domain name may be a SIP domain name when the unicast service is a SIP service, and a TR069 domain name when the unicast service is a TR069 service. The domain name resolution module is a DNS (Domai n Name Server ) resolution module, the DNS resolution module has a mapping relation between a domain name and an IP address, and the IP address corresponding to the domain name can be determined through the DNS resolution module.
Illustratively, step X21 includes: if the unicast forwarding registration information is an SIP domain name, a domain name resolution module is called, an SIP destination address matched with the SIP domain name is searched in the domain name resolution module, and the SIP destination address is converted into an SIP address segment, so that an SIP static route of the SIP is obtained; and if the unicast forwarding registration information is the TR069 domain name, calling a domain name resolution module, searching a TR069 destination address matched with the TR069 domain name in the domain name resolution module, and converting the TR069 destination address into a TR069 address field to obtain a TR069 static route of the TR 069. If the unicast forwarding registration information is an IP address corresponding to the SIP service, the IP address corresponding to the SIP service is an SIP destination address, the IP address corresponding to the SIP service is converted into an SIP address segment to obtain an SIP static route of the SIP, and if the unicast forwarding registration information is an IP address corresponding to the TR069 service, the IP address corresponding to the TR069 service is a TR069 destination address, the IP address corresponding to the TR069 service is converted into a TR069 address segment to obtain the TR069 static route of the TR 069.
According to the method and the device for forwarding the unicast service, the mapping relation between the unicast destination address corresponding to the unicast service and the forwarding static route can be established no matter whether the IP address corresponding to the unicast service or the domain name is preset on the gateway, so that the IP address corresponding to the domain name is determined, and the forwarding static route corresponding to the domain name is determined at the same time.
Further, after resolving to obtain the unicast destination address of the domain name, the domain name and the unicast destination address may be associated, so that when the service LAN port of the gateway sends a request corresponding to the domain name, the unicast destination address related to the domain name may be returned to the service LAN port. In addition, when determining the first mapping relationship, it is further required to determine a service LAN port that performs address masquerading so that the target WAN port can correctly return the returned data to the service data, and specifically, an instruction may be added to the NAT (Network Address Translation ) corresponding to the target WAN port: the instruction means that the private network address of the service LAN port is converted into the public network address of the target WAN port, so that the target WAN port can be matched with the service LAN port disguised as the target WAN port when the target WAN port returns data again, and the data can be correctly returned to the service LAN port. The service LAN port corresponds to a private network address, and the target WAN port also corresponds to a public network address.
In a possible embodiment, the step of determining the service type of the service data according to the service destination address includes:
And step C10, determining a target WAN port matched with the multicast protocol type in the second mapping relation according to the multicast protocol type of the service data under the condition that the service type is multicast service.
It should be noted that, the second mapping relationship characterizes the mapping relationship between the multicast protocol type corresponding to the multicast service and the multicast WAN port, the service data of the multicast service with the service type is a protocol, the protocols corresponding to different multicast services are different, for example, the multicast protocol type corresponding to the IPTV service is an I GMP (I nternet Group Management Ptotoco l, internet group management protocol) protocol. When the service type is multicast service, the multicast configuration module of the gateway is called, the multicast protocol type of the service data is determined through the multicast configuration module, and a target WAN port matched with the multicast protocol type is determined in the second mapping relation. The multicast configuration module is used for determining the multicast protocol type of the multicast data.
In a possible embodiment, before step C10, further includes:
step Y10, receiving the multicast data of the gateway;
step Y20, calling a multicast configuration module of the gateway, determining a multicast protocol type from the multicast data, and configuring a multicast WAN port for the multicast protocol type based on interface configuration information in the multicast configuration module;
And step Y30, taking the multicast protocol type and the associated multicast WAN port as the second mapping relation.
It should be noted that, the multicast data in the gateway generally refers to service data corresponding to the IPTV service, where the multicast data and the multicast configuration module are configured to determine a relationship between a multicast protocol type and a multicast WAN port in the second mapping relationship; the multicast configuration module is used for configuring the multicast protocol type of the multicast data and the multicast WAN port. The multicast configuration module is a HOOK (hijack) module, which is in Li nux kernel, li nux being an operating system. Illustratively, prior to step Y20, the step of configuring the multicast configuration module in the gateway includes: and calling a PROC interface, and storing each WAN port to be configured into the HOOK module, wherein the WAN port to be configured can be a WAN port corresponding to a server which performs data interaction with a gateway, and the WAN port to be configured is configured to obtain a multicast WAN port. Wherein the interface configuration information includes WAN ports to be configured.
It should be noted that, the multicast configuration module includes a plurality of callback interfaces, where the callback interfaces are two-way calling interfaces, that is, when the called interfaces are called, the called interfaces will also call the other interfaces. When the multicast protocol type in the multicast data is configured, a callback interface in a multicast configuration module needs to be initialized. After receiving the multicast data of the gateway, the multicast configuration module also judges whether the multicast data is an I GMP protocol; and if the multicast data is I GMP protocol, calling a HOOK module to determine a multicast WAN port of the multicast data. The HOOK module is used for determining a multicast WAN port of the multicast data, and when the HOOK module determines that the protocol is the I GMP protocol, the multicast WAN port corresponding to the I GMP protocol can be obtained in a matching mode.
Illustratively, steps Y10 through Y30 include: the method comprises the steps of receiving multicast data of a gateway, calling a multicast configuration module of the gateway, determining a multicast protocol type from the multicast data, configuring a multicast WAN port for the multicast protocol type based on interface configuration information in the multicast configuration module, forwarding the multicast data through the multicast WAN port, and taking the multicast protocol type and the associated multicast WAN port as a second mapping relation after the multicast data is successfully forwarded. For example, after the multicast data is forwarded successfully, an accelerated forwarding flow may be formed, specifically, when the multicast data is forwarded successfully, a mapping relationship is established between a service LAN port receiving the multicast data and a multicast WAN port, and when the multicast data is retransmitted by the next service LAN port, the multicast data may be forwarded directly through the multicast LAN port associated with the service LNA port without determining the multicast protocol type of the multicast data, so that the accelerated forwarding is implemented, and the data forwarding efficiency is improved.
The multicast protocol type in the second mapping relation can carry a multicast LAN port for receiving multicast data, the multicast LAN port is a service LAN port on the gateway, and the multicast LAN port can be regarded as a service LAN port for accessing the multicast service. That is, after the second mapping relation is determined, an acceleration forwarding flow may be formed, specifically, if the gateway receives the multicast service data, and the multicast service data is service data of which service type is multicast service, a multicast WAN port matched with a multicast LAN port for transmitting the multicast service data is determined from the second mapping relation, and the multicast service data is forwarded through the multicast WAN port, so that the acceleration forwarding of the service data may be achieved. In addition, the multicast WAN port may be determined based on the multicast protocol type of the multicast service data to forward the multicast service data, and the method for determining the multicast WAN port may not be limited in the embodiments of the present application. Further, when the multicast service data is forwarded through the multicast WAN port, the multicast LAN port corresponding to the multicast service data is marked on the multicast WAN port, so that the multicast service data can be returned to the multicast LAN port when the multicast WAN port returns the data, and communication failure caused by return errors is avoided.
In the embodiment of the application, any broadband service such as an IPTV service, an S IP service, etc. can be accessed to any service LAN port of the gateway when the gateway is configured, compared with the prior art, the embodiment of the application can not be limited by binding between a given LAN port and a WAN port on the gateway, for example, in the prior art, the IPTV service can only be connected to a second LAN port of the gateway, and other LAN ports can not be connected, but the embodiment of the application does not limit the type of the broadband service that the service LAN port on the gateway is connected to, and in the embodiment of the application, any service LAN port of the gateway can be connected to the IPTV service. When any service LAN port is connected with the IPTV service, the gateway needs to be configured, so that when the gateway receives the service data corresponding to the IPTV service, the gateway determines the WAN port corresponding to the IPTV service to successfully forward the service data corresponding to the IPTV service, and particularly, the service type of the IPTV service is multicast service, so the configuration of the gateway determines the second mapping relation of the gateway, thereby determining the corresponding WAN port of the IPTV service. Therefore, any service LAN port can be accessed to IPTV service, and when the service LAN port of the gateway is fixedly accessed to the IPTV service, the multicast destination address of the corresponding service data transmission of the IPTV service is consistent, so that the mapping relation between the service LAN port and the multicast WAN port can be directly established, the multicast service data can be accelerated to be forwarded, the multicast service data can be the service data corresponding to the IPTV service, the service data corresponding to the IPTV service can be forwarded to an I SP server through the multicast WAN port, and the I SP server can process the service data corresponding to the IPTV service.
For a better understanding of the embodiments of the present application, referring to fig. 3, fig. 3 is a schematic flow chart of determining the second mapping relationship, and interface configuration information may be sent to a multicast configuration module (HOOK module) through a PROC interface, so that the HOOK module may determine a multicast WAN port of multicast data based on the interface configuration information; the multicast data can be transmitted to the HOOK module through the service LAN port, the HOOK module can determine the multicast WAN port of the multicast data, so that the multicast data can be sent to the isp server through the multicast WAN port, the relationship between the protocol type and the multicast WAN port can be determined, the isp server can perform data interaction with the service LAN port through the multicast WAN port, the isp server can perform data feedback to the gateway, for example, the isp can return feedback data to the service LAN port sending the multicast data.
Example III
Referring to fig. 4, an embodiment of the present application further provides a gateway data forwarding apparatus, where the gateway data forwarding apparatus includes:
a receiving module 10, configured to receive service data of a service LAN port of a gateway;
a determining module 20, configured to determine a forwarding mapping relationship of the service data according to a service type of the service data, where the forwarding mapping relationship is characterized by a mapping relationship between forwarding type information and a forwarding WAN port;
And the forwarding module 30 is configured to determine a target WAN port matched with the service data in the forwarding mapping relationship, and forward the service data through the target WAN port.
Optionally, the determining module 20 is further configured to:
acquiring a service destination address from the service data, and judging the service type of the service data according to the service destination address;
if the service type is unicast service, determining that the forwarding mapping relation of the service data is the first mapping relation;
and if the service type is multicast service, determining that the forwarding mapping relation of the service data is a second mapping relation.
Optionally, the forwarding module 30 is further configured to:
and under the condition that the service type is unicast service, searching a target static route matched with the service destination address in a first mapping relation according to the service destination address of the service data to determine the target WAN port.
Optionally, the forwarding module 30 is further configured to:
acquiring unicast forwarding registration information preset in the gateway;
determining a unicast destination address from the unicast forwarding registration information, and configuring a forwarding static route of the unicast destination address to determine a unicast WAN port;
And taking the unicast destination address and the associated unicast WAN port as the first mapping relation.
Optionally, the forwarding module 30 is further configured to:
and if the unicast forwarding registration information is a domain name, calling a domain name resolution module of the gateway, and searching a unicast destination address matched with the domain name in the domain name resolution module.
Optionally, the forwarding module 30 is further configured to:
and under the condition that the service type is multicast service, determining a target WAN port matched with the multicast protocol type in the second mapping relation according to the multicast protocol type of the service data.
Optionally, the forwarding module 30 is further configured to:
before the step of acquiring the service destination address from the service data and judging the service type of the service data, the method further comprises the following steps:
receiving multicast data of the gateway;
calling a multicast configuration module of the gateway to determine the multicast protocol type of the multicast data;
configuring a multicast WAN port for the multicast protocol type based on interface configuration information in the multicast configuration module;
and taking the multicast protocol type and the associated multicast WAN port as the second mapping relation.
The gateway data forwarding device provided by the application adopts the gateway data forwarding method in the embodiment, and aims to solve the technical problem of poor usability of the gateway. Compared with the prior art, the beneficial effects of the gateway data forwarding method provided by the embodiment of the present application are the same as those of the gateway data forwarding method provided by the foregoing embodiment, and other technical features of the gateway data forwarding device are the same as those disclosed by the method of the foregoing embodiment, which are not described in detail herein.
Example IV
The embodiment of the application provides an electronic device, which may be a playing device, including: at least one processor; and a memory communicatively coupled to the at least one processor; the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the gateway data forwarding method of the above embodiment.
Referring now to fig. 5, a schematic diagram of an electronic device suitable for use in implementing embodiments of the present disclosure is shown. The electronic devices in the embodiments of the present disclosure may include, but are not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistant, personal digital assistants), PADs (portable Android device, tablet computers), PMPs (Portable Media Player, portable multimedia players), vehicle terminals (e.g., car navigation terminals), and the like, and stationary terminals such as digital TVs, desktop computers, and the like. The electronic device shown in fig. 5 is merely an example and should not be construed to limit the functionality and scope of use of the disclosed embodiments.
As shown in fig. 5, the electronic apparatus may include a processing device (e.g., a central processing unit, a graphics processor, etc.) that may perform various appropriate actions and processes according to a program stored in a ROM (Read-Only Memory) or a program loaded from a storage device into a RAM (Random Access Memory ). In the RAM, various programs and data required for the operation of the electronic device are also stored. The processing device, ROM and RAM are connected to each other via a bus. An input/output (I/O) interface is also connected to the bus.
In general, the following systems may be connected to the I/O interface: input devices including, for example, touch screens, touch pads, keyboards, mice, image sensors, microphones, tachometers, gyroscopes, etc.; output devices including, for example, LCDs (Liquid Crystal Display, liquid crystal displays), speakers, vibrators, and the like; storage devices including, for example, magnetic tape, hard disk, etc.; a communication device. The communication means may allow the electronic device to communicate with other devices wirelessly or by wire to exchange data. While electronic devices having various systems are shown in the figures, it should be understood that not all of the illustrated systems are required to be implemented or provided. More or fewer systems may alternatively be implemented or provided.
In particular, according to embodiments of the present disclosure, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method shown in the flowcharts. In such an embodiment, the computer program may be downloaded and installed from a network through a communication system, or installed from a storage system, or installed from ROM. The above-described functions defined in the methods of the embodiments of the present disclosure are performed when the computer program is executed by a processing system.
The electronic device provided by the application adopts the gateway data forwarding method in the first embodiment to solve the technical problem of poor usability of the gateway. Compared with the prior art, the beneficial effects of the product flow data distribution provided by the embodiment of the present application are the same as those of the gateway data forwarding method provided by the above embodiment, and other technical features in the gateway data forwarding device are the same as those disclosed by the method of the above embodiment, which are not described in detail herein.
It should be understood that portions of the present disclosure may be implemented in hardware, software, firmware, or a combination thereof. In the description of the above embodiments, particular features, structures, materials, or characteristics may be combined in any suitable manner in any one or more embodiments or examples.
The foregoing is merely specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily think about changes or substitutions within the technical scope of the present application, and the changes and substitutions are intended to be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.
Example five
The present embodiment provides a readable storage medium having computer readable program instructions stored thereon for performing the gateway data forwarding method of the first embodiment.
The readable storage medium provided in the embodiments of the present application may be, for example, a usb disk, but is not limited to, an apparatus, a device or a device of electric, magnetic, optical, electromagnetic, infrared, or semiconductor, or a combination of any of the above. More specific examples of the readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable EPROM (Electrical Programmable Read Only Memory, read-only memory) or flash memory, an optical fiber, a portable compact disc CD-ROM (compact disc read-only memory), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In this embodiment, the readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution apparatus, device, or device. Program code embodied on a readable storage medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, fiber optic cables, RF (radio frequency), and the like, or any suitable combination of the foregoing.
The readable storage medium may be contained in an electronic device; or may exist alone without being assembled into an electronic device.
The readable storage medium carries one or more programs which, when executed by an electronic device, cause the electronic device to: receiving service data of a service LAN port of a gateway; determining a forwarding mapping relation of the service data according to the service type of the service data, wherein the forwarding mapping relation is characterized by a mapping relation between forwarding type information and a forwarding WAN port; and determining a target WAN port matched with the service data in the forwarding mapping relation, and forwarding the service data through the target WAN port.
Computer program code for carrying out operations of the present disclosure may be written in one or more programming languages, including an object oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a LAN (local area network ) or WAN (Wide Area Network, wide area network), or it may be connected to an external computer (for example, through the Internet using an Internet service provider).
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of devices, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based devices which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules described in the embodiments of the present disclosure may be implemented in software or hardware. Wherein the name of the module does not constitute a limitation of the unit itself in some cases.
The readable storage medium provided by the application stores computer readable program instructions for executing the gateway data forwarding method, and aims to solve the technical problem of poor usability of a gateway. Compared with the prior art, the beneficial effects of the readable storage medium provided by the embodiment of the present application are the same as those of the gateway data forwarding method provided by the foregoing embodiment, and are not described herein in detail.
Example six
The present application also provides a computer program product comprising a computer program which, when executed by a processor, implements the steps of a gateway data forwarding method as described above.
The computer program product aims to solve the technical problem of poor usability of a gateway. Compared with the prior art, the beneficial effects of the computer program product provided by the embodiment of the present application are the same as those of the gateway data forwarding method provided by the foregoing embodiment, and are not described herein in detail.
The foregoing description is only of the preferred embodiments of the present application and is not intended to limit the scope of the claims, and all equivalent structures or equivalent processes using the descriptions and drawings of the present application, or direct or indirect application in other related technical fields are included in the scope of the claims.

Claims (10)

1. The gateway data forwarding method is characterized by comprising the following steps:
receiving service data of a service LAN port of a gateway;
determining a forwarding mapping relation of the service data according to the service type of the service data, wherein the forwarding mapping relation is characterized by a mapping relation between forwarding type information and a forwarding WAN port;
and determining a target WAN port matched with the service data in the forwarding mapping relation, and forwarding the service data through the target WAN port.
2. The gateway data forwarding method of claim 1 wherein the forwarding mapping relationship includes a first mapping relationship and a second mapping relationship; the step of determining the forwarding mapping relationship of the service data according to the service type of the service data comprises the following steps:
acquiring a service destination address from the service data, and judging the service type of the service data according to the service destination address;
if the service type is unicast service, determining that the forwarding mapping relation of the service data is the first mapping relation;
and if the service type is multicast service, determining that the forwarding mapping relation of the service data is a second mapping relation.
3. The gateway data forwarding method of claim 1 wherein the forwarding mapping relationship comprises a first mapping relationship; the step of determining the target WAN port matched with the service data in the forwarding mapping relation comprises the following steps:
and under the condition that the service type is unicast service, searching a target static route matched with the service destination address in a first mapping relation according to the service destination address of the service data so as to determine the target WAN port.
4. The gateway data forwarding method of claim 3 wherein the forwarding type information includes a unicast destination address and the forwarding WAN port includes a unicast WAN port;
and searching a target static route matched with the service destination address in a first mapping relation according to the service destination address of the service data to determine the target WAN port under the condition that the service type is unicast service, wherein the method further comprises the following steps:
acquiring unicast forwarding registration information preset in the gateway;
determining a unicast destination address from the unicast forwarding registration information, and configuring a forwarding static route of the unicast destination address to determine a unicast WAN port;
And taking the unicast destination address and the associated unicast WAN port as the first mapping relation.
5. The gateway data forwarding method of claim 4 wherein said step of determining a unicast destination address from said unicast forwarding registration information comprises:
and if the unicast forwarding registration information is a domain name, calling a domain name resolution module of the gateway, and searching a unicast destination address matched with the domain name in the domain name resolution module.
6. The gateway data forwarding method of claim 1 wherein the forwarding mapping relationship comprises a second mapping relationship; the step of determining the target WAN port matched with the service data in the forwarding mapping relation comprises the following steps:
and under the condition that the service type is multicast service, determining a target WAN port matched with the multicast protocol type in the second mapping relation according to the multicast protocol type of the service data.
7. The gateway data forwarding method of claim 6 wherein the forwarding type information comprises a multicast protocol type and the forwarding WAN port comprises a multicast WAN port;
and before the step of determining the target WAN port matched with the multicast protocol type in the second mapping relation according to the multicast protocol type of the service data under the condition that the service type is multicast service, the method further comprises the following steps:
Receiving multicast data of the gateway;
calling a multicast configuration module of the gateway to determine the multicast protocol type of the multicast data;
configuring a multicast WAN port for the multicast protocol type based on interface configuration information in the multicast configuration module;
and taking the multicast protocol type and the associated multicast WAN port as the second mapping relation.
8. A gateway data forwarding device, characterized in that the gateway data forwarding device comprises:
the receiving module is used for receiving the service data of the service LAN port of the gateway;
the determining module is used for determining a forwarding mapping relation of the service data according to the service type of the service data, wherein the forwarding mapping relation is characterized as a mapping relation between forwarding type information and a forwarding WAN port;
and the forwarding module is used for determining a target WAN port matched with the service data in the forwarding mapping relation and forwarding the service data through the target WAN port.
9. An electronic device, the electronic device comprising:
at least one processor;
and a memory communicatively coupled to the at least one processor;
wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the steps of the gateway data forwarding method of any of claims 1 to 7.
10. A readable storage medium, characterized in that the readable storage medium is a computer readable storage medium, on which a program implementing a gateway data forwarding method is stored, the program implementing the gateway data forwarding method being executed by a processor to implement the steps of the gateway data forwarding method according to any one of claims 1 to 7.
CN202311813905.6A 2023-12-26 2023-12-26 Gateway data forwarding method and device, electronic equipment and readable storage medium Pending CN117792993A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311813905.6A CN117792993A (en) 2023-12-26 2023-12-26 Gateway data forwarding method and device, electronic equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311813905.6A CN117792993A (en) 2023-12-26 2023-12-26 Gateway data forwarding method and device, electronic equipment and readable storage medium

Publications (1)

Publication Number Publication Date
CN117792993A true CN117792993A (en) 2024-03-29

Family

ID=90390406

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311813905.6A Pending CN117792993A (en) 2023-12-26 2023-12-26 Gateway data forwarding method and device, electronic equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN117792993A (en)

Similar Documents

Publication Publication Date Title
US10250646B2 (en) Method and device for establishing channel
US20100014536A1 (en) Method for building connection channel between network terminals through dynamic domain name sarver
US20130346591A1 (en) Clientless Cloud Computing
US8949952B2 (en) Multi-stack subscriber sign on
CN108540674B (en) Automatic testing method and device, computer equipment and storage medium
US20110179184A1 (en) Integration Of Remote Electronic Device With Media Local Area Network
WO2017161769A1 (en) Bullet comment transmission method and apparatus
US9294591B2 (en) Apparatus and methods for flexible communications in a network
US8549118B2 (en) Updating a domain name server with information corresponding to dynamically assigned internet protocol addresses
US8386603B2 (en) Information processing terminal device and network connection method
US20130318173A1 (en) Automatically replacing localhost as hostname in url with fully qualified domain name or ip address
JP2012501133A (en) Method for transferring a video session between a fixed multimedia device and a mobile multimedia device
KR20170063423A (en) Multimedia sharing method, registration method, server and proxy server
US20170353608A1 (en) Voice service routing system for accessibility
US9929951B1 (en) Techniques for using mappings to manage network traffic
CN117792993A (en) Gateway data forwarding method and device, electronic equipment and readable storage medium
US9769222B2 (en) Method and apparatus for providing ARS service
US20100011099A1 (en) Method and apparatus for monitoring and logging communication sessions
US10594511B2 (en) Address system
CN115002069A (en) Port mapping method and device, electronic equipment and storage medium
CN113497764A (en) Service routing method, system, computer storage medium and electronic device
US9256882B2 (en) Methods, communications devices, and computer program products for selecting an advertisement to initiate device-to-device communications
CN114786047B (en) Multi-screen interaction realization method and device, storage medium and electronic equipment
JP2009239864A (en) Information receiver and method for receiving information
CN114650271B (en) Global load DNS neighbor site learning method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination