Communication method and device

Modify the IP packet of the access device through the gateway device, including the back address index to identify the public IP address and port number of the gateway device, solving the high cost and low adaptability of the server to actively access the access device, and achieving more Cost and efficient access equipment management.

CN118118532BActive Publication Date: 2024-12-13HUAWEI TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211511009.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-29
Publication Date
2024-12-13
Estimated Expiration
2042-11-29

AI Technical Summary

Technical Problem

The prior art requires setting up additional servers when implementing servers to actively access access devices, which are costly and low in adaptability, making it difficult to take into account both cost and adaptability.

Method used

Receive IP packets from the access device through the gateway device, build and send modified IP packets, including the back address index to identify the public IP address of the gateway device and the port number of the access device, so that the server can actively connect to the connection Enter the device to avoid setting up a separate server for address conversion.

Benefits of technology

Reduces costs, improves adaptability, simplifies the process of servers actively accessing access devices, and avoids interaction with multiple servers.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118118532B_ABST
    Figure CN118118532B_ABST
Patent Text Reader

Abstract

The present application provides a communication method and device, which can take into account both cost and adaptability and can be applied to a communication system. The method includes: a gateway device receives a first network protocol IP message from an access device. The gateway device constructs a second IP message and sends the second IP message. Among them, the source IP address in the IP header of the first IP message is the IP address of the access device, and the payload of the first IP message includes a back-connection address index and the IP address of the access device, and the IP address of the access device is identified by the back-connection address index. The source IP address in the IP header of the second IP message is the public IP address of the gateway device, and the payload of the second IP message includes the back-connection address index, the public IP address of the gateway device, and the port number corresponding to the access device, and the public IP address of the gateway device and the port number corresponding to the access device are both identified by the back-connection address index.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communications, and in particular to a communication method and device. Background Art

[0002] In order to achieve the purpose of the server for management function (hereinafter referred to as the first server) actively accessing the access device connected to the gateway device, an additional server (hereinafter referred to as the second server) can be set in the communication system to assist the first server in achieving the purpose of actively accessing the access device through the second server. Among them, the access device can periodically send a binding request to the second server at a configured frequency. The binding request can be used to detect whether there is a network address translation (NAT) gateway between the access device and the second server, and to detect the aging time of the NAT table of the gateway device, so as to keep the user datagram protocol (UDP) session from the access device to the second server in an active state. When the first server needs to actively connect to the access device, the first server first sends a UDP request to the second server. The second server forwards the UDP request of the first server to the access device through the UDP session between the second server and the access device according to the binding request from the access device. After receiving the connection request from the first server, the access device actively establishes a connection with the first server, thereby realizing two-way communication between the first server and the access device.

[0003] In the above solution, the first server actively accesses the access device, and a second server needs to be set up in the system, which is costly. In addition, in a communication system without a second server, it is difficult for the first server to actively access the access device, and the adaptability is low. In summary, it is difficult for the existing technology to balance cost and adaptability. Summary of the invention

[0004] The embodiments of the present application provide a communication method and device that can take into account both cost and adaptability.

[0005] In order to achieve the above objectives, this application adopts the following technical solutions:

[0006] In a first aspect, a communication method is provided. The communication method includes: a gateway device receives a first network protocol IP message from an access device. The source IP address in the network protocol IP header of the first IP message is the IP address of the access device, and the payload of the first IP message includes a back-connection address index and the IP address of the access device, and the IP address of the access device is identified by the back-connection address index. The gateway device constructs a second IP message and sends the second IP message to a server. The source IP address in the IP header of the second IP message is the public IP address of the gateway device, and the payload of the second IP message includes the back-connection address index, the public IP address of the gateway device, and the port number corresponding to the access device, and the public IP address of the gateway device and the port number corresponding to the access device are both identified by the back-connection address index.

[0007] Based on the communication method provided in the first aspect, the gateway device can receive the first IP message of the access device, construct the second IP message, and send the second IP message to the server. Among them, the payload of the first IP message includes the back-connection address index and the IP address of the access device, and the IP address of the access device is identified by the back-connection address index. The payload of the second IP message includes the back-connection address index, the public IP address of the gateway device and the port number corresponding to the access device, and the public IP address of the gateway device and the port number corresponding to the access device are both identified by the back-connection address index. In this way, in the second IP message sent by the gateway device to the server, the address identified by the back-connection address index is modified to the public IP address of the gateway device and the port number corresponding to the access device, so that the server can parse from the payload of the second IP message to obtain the address of the server actively connecting to the access device, so as to achieve the purpose of the server actively connecting to the access device, and it can avoid setting up a separate server for address conversion, thereby reducing costs and improving adaptability.

[0008] In one possible design, the gateway device sending the second IP message to the server may include: if the gateway device determines that the media access control MAC address in the first IP message is a preset MAC address, sending the second IP message to the server. In this way, the gateway device can filter the IP messages accessing the server to improve security.

[0009] In a possible design scheme, the payload of the second IP message may also include a device identification index, a device identification of the gateway device, and a device identification of the access device. The device identification index is used to indicate the device identification of the gateway device and the device identification of the access device. In this way, the server can obtain the connection relationship between the gateway device and the access device according to the second IP message.

[0010] In a possible design scheme, the method provided in the first aspect may further include: the gateway device sends configuration information to the access device. The configuration information comes from the server, and the configuration information may include one or more of the following: a user name for the access device to access the server, a password for the access device to access the server, or a time interval for the access device to report information to the server. In this way, when the gateway device detects that the configuration information is updated, it can notify the access device more promptly, thereby improving communication efficiency.

[0011] In a possible design scheme, the method provided in the first aspect may also include: the gateway device receives a third IP message from the server. The destination IP address in the IP header of the third IP message is the public IP address of the gateway device, and the user datagram protocol header or transmission control protocol header of the third IP message also includes the port number corresponding to the access device. The gateway device sends the third IP message to the access device corresponding to the port number. In this way, the gateway device can send the third IP message to the access device corresponding to the port number based on the port number, thereby achieving the purpose of the server actively accessing the access device.

[0012] Optionally, the gateway device sends the third IP message to the access device corresponding to the port number, which may include: the gateway device determines the access device corresponding to the port number included in the user datagram protocol header or the transmission control protocol header of the third IP message according to the correspondence between the port number on the gateway device and the access device. The gateway device sends the third IP message to the access device corresponding to the port number.

[0013] Optionally, the method provided in the first aspect may further include: the gateway device assigning a port number on the gateway device to an access device connected to the gateway device, and the gateway device storing a correspondence between the port number on the gateway device and the access device.

[0014] In a second aspect, a communication method is provided. The communication method includes: a server receives a second IP message from a gateway device. The source IP address in the IP header of the second IP message is the public IP address of the gateway device, and the payload of the second IP message includes a back-connection address index, the public IP address of the gateway device, and the port number corresponding to the access device. The public IP address of the gateway device and the port number corresponding to the access device are both identified by the back-connection address index. The server sends a third IP message to the gateway device. The destination IP address in the IP header of the third IP message includes the public IP address of the gateway device and the port number corresponding to the access device.

[0015] Based on the communication method provided in the second aspect, the server can receive a second IP message from a gateway device and send a third IP message to the gateway device. Among them, the payload of the second IP message includes a back-connection address index, a public IP address of the gateway device, and a port number corresponding to the access device, and the public IP address of the gateway device and the port number corresponding to the access device are both identified by the back-connection address index. The destination IP address in the IP header of the third IP message includes the public IP address of the gateway device and the port number corresponding to the access device. In this way, the server can obtain the address of the server actively connected to the access device from the payload of the second IP message, and send the third IP message based on the address of the server actively connected to the access device, so as to achieve the purpose of the server actively connecting to the access device, which can avoid setting up a separate server for address conversion, thereby reducing costs and improving adaptability.

[0016] In a third aspect, a communication device is provided. The communication device includes: a processing module and a transceiver module. The processing module is used to receive a first network protocol IP message from an access device through the transceiver module. The source IP address in the network protocol IP header of the first IP message is the IP address of the access device, and the payload of the first IP message includes a back-connection address index and the IP address of the access device, and the IP address of the access device is identified by the back-connection address index. The processing module is also used to construct a second IP message and send the second IP message to the server through the transceiver module. The source IP address in the IP header of the second IP message is the public IP address of the communication device, and the payload of the second IP message includes the back-connection address index, the public IP address of the communication device, and the port number corresponding to the access device, and the public IP address of the communication device and the port number corresponding to the access device are both identified by the back-connection address index.

[0017] In a possible design scheme, the processing module can be specifically configured to send a second IP message to the server through the transceiver module when it is determined that the media access control MAC address in the first IP message is a preset MAC address.

[0018] In a possible design, the payload of the second IP message may further include a device identification index, a device identification of the communication device, and a device identification of the access device, wherein the device identification index is used to indicate the device identification of the communication device and the device identification of the access device.

[0019] In one possible design scheme, the processing module can also be used to send configuration information to the access device through the transceiver module; wherein the configuration information comes from the server, and the configuration information includes one or more of the following: the user name of the access device to access the server, the password of the access device to access the server, or the time interval for the access device to report information to the server.

[0020] In a possible design scheme, the processing module can also be used to receive a third IP message from the server through the transceiver module. The destination IP address in the IP header of the third IP message is the public network IP address of the communication device, and the user datagram protocol header or transmission control protocol header of the third IP message also includes the port number corresponding to the access device. The processing module can also be used to send the third IP message to the access device corresponding to the port number through the transceiver module.

[0021] Optionally, the processing module can be specifically used to determine the access device corresponding to the port number included in the user datagram protocol header or the transmission control protocol header of the third IP message according to the correspondence between the port number on the communication device and the access device. The processing module is also used to send the third IP message to the access device corresponding to the port number through the transceiver module.

[0022] Furthermore, the processing module may also be used to allocate a port number on the communication device to an access device to which the communication device is connected.

[0023] The processing module is also used to store the corresponding relationship between the port number on the communication device and the access device.

[0024] Optionally, the transceiver module may include a receiving module and a sending module, wherein the transceiver module is used to implement the sending function and the receiving function of the communication device described in the third aspect.

[0025] Optionally, the communication device described in the third aspect may further include a storage module, wherein the storage module stores a program or an instruction. When the processing module executes the program or the instruction, the communication device may execute the communication method described in the first aspect.

[0026] It should be noted that the communication device described in the third aspect can be a gateway device, or a chip (system) or other parts or components that can be set in the gateway device, or a device that includes a gateway device, which is not limited in this application.

[0027] In addition, the technical effects of the communication device described in the third aspect can refer to the technical effects of the communication method described in the first aspect, and will not be repeated here.

[0028] In a fourth aspect, a communication device is provided. The communication device includes: a processing module and a transceiver module. The processing module is used to receive a second IP message from a gateway device through the transceiver module. The second IP message is obtained after the gateway device processes the first IP message, and the source IP address in the IP header of the second IP message is the public IP address of the gateway device. The payload of the second IP message includes a back-connection address index, the public IP address of the gateway device, and the port number corresponding to the access device. The public IP address of the gateway device and the port number corresponding to the access device are both identified by the back-connection address index. The processing module is also used to send a third IP message to the gateway device through the transceiver module. The destination IP address in the IP header of the third IP message includes the public IP address of the gateway device and the port number corresponding to the access device.

[0029] Optionally, the transceiver module may include a receiving module and a sending module, wherein the transceiver module is used to implement the sending function and the receiving function of the communication device described in the fourth aspect.

[0030] Optionally, the communication device described in the fourth aspect may further include a storage module, wherein the storage module stores a program or an instruction. When the processing module executes the program or the instruction, the communication device may execute the communication method described in the second aspect.

[0031] It should be noted that the communication device described in the fourth aspect can be a gateway device, or a chip (system) or other parts or components that can be set in the gateway device, or a device that includes a gateway device, which is not limited in this application.

[0032] In addition, the technical effects of the communication device described in the fourth aspect can refer to the technical effects of the communication method described in the second aspect, and will not be repeated here.

[0033] In a fifth aspect, a communication device is provided, which is used to execute the communication method described in any one of the implementation modes of the first aspect to the second aspect.

[0034] In the present application, the communication device described in the fifth aspect may be the gateway device described in the first aspect or the server described in the second aspect, or a chip (system) or other parts or components that may be set in the gateway device or server, or a device including the gateway device or server.

[0035] It should be understood that the communication device described in the fifth aspect includes a module, unit, or means corresponding to the communication method described in any one of the first to second aspects, and the module, unit, or means can be implemented by hardware, software, or hardware executing the corresponding software implementation. The hardware or software includes one or more modules or units for performing the functions involved in the above-mentioned communication method.

[0036] In a sixth aspect, a communication device is provided, including: a processor, the processor being configured to execute the communication method described in any possible implementation manner in the first aspect to the second aspect.

[0037] In a possible design solution, the communication device described in the sixth aspect may further include a transceiver. The transceiver may be a transceiver circuit or an interface circuit. The transceiver may be used for the communication device described in the sixth aspect to communicate with other communication devices.

[0038] In a possible design scheme, the communication device described in the sixth aspect may also include a memory. The memory may be integrated with the processor or may be separately provided. The memory may be used to store the computer program and / or data involved in the communication method described in any one of the first aspect to the second aspect.

[0039] In the present application, the communication device described in the sixth aspect may be the gateway device described in the first aspect or the server described in the second aspect, or a chip (system) or other parts or components that may be set in the gateway device or server, or a device including the gateway device or server.

[0040] In a seventh aspect, a communication device is provided, comprising: a processor coupled to a memory, the processor being configured to execute a computer program stored in the memory, so that the communication device executes the communication method described in any possible implementation manner in the first aspect to the second aspect.

[0041] In a possible design solution, the communication device described in the seventh aspect may further include a transceiver. The transceiver may be a transceiver circuit or an interface circuit. The transceiver may be used for the communication device described in the seventh aspect to communicate with other communication devices.

[0042] In the present application, the communication device described in the seventh aspect may be the gateway device described in the first aspect or the server described in the second aspect, or a chip (system) or other parts or components that may be set in the gateway device or server, or a device including the gateway device or server.

[0043] In an eighth aspect, a communication device is provided, comprising: a processor and a memory; the memory is used to store a computer program, and when the processor executes the computer program, the communication device executes the communication method described in any one of the implementation methods of the first aspect to the second aspect.

[0044] In a possible design solution, the communication device described in the eighth aspect may further include a transceiver. The transceiver may be a transceiver circuit or an interface circuit. The transceiver may be used for the communication device described in the eighth aspect to communicate with other communication devices.

[0045] In the present application, the communication device described in the eighth aspect may be the gateway device described in the first aspect or the server described in the second aspect, or a chip (system) or other parts or components that may be set in the gateway device or server, or a device including the gateway device or server.

[0046] In a ninth aspect, a communication device is provided, comprising: a processor; the processor is used to couple with a memory, and after reading a computer program in the memory, execute a communication method as described in any one of the implementation methods in the first aspect to the second aspect according to the computer program.

[0047] In a possible design scheme, the communication device described in the ninth aspect may further include a transceiver. The transceiver may be a transceiver circuit or an interface circuit. The transceiver may be used for the communication device described in the ninth aspect to communicate with other communication devices.

[0048] In the present application, the communication device described in the ninth aspect may be the gateway device described in the first aspect or the server described in the second aspect, or a chip (system) or other parts or components that may be set in the gateway device or server, or a device including the gateway device or server.

[0049] In addition, the technical effects of the communication devices described in the fifth to ninth aspects above can refer to the technical effects of the communication methods described in the first to second aspects above, and will not be repeated here.

[0050] In a tenth aspect, a processor is provided, wherein the processor is used to execute the communication method described in any possible implementation manner of the first aspect to the second aspect.

[0051] In an eleventh aspect, a communication system is provided, which includes one or more terminal devices and one or more network devices.

[0052] In a twelfth aspect, a computer-readable storage medium is provided, comprising: a computer program or instructions; when the computer program or instructions are executed on a computer, the computer executes the communication method described in any possible implementation manner in the first aspect to the second aspect.

[0053] In a thirteenth aspect, a computer program product is provided, comprising a computer program or instructions, which, when executed on a computer, enables the computer to execute the communication method described in any possible implementation of the first to second aspects. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] Figure 1 A schematic diagram of the architecture of a communication system provided in an embodiment of the present application;

[0055] Figure 2 A schematic diagram of the architecture of another communication system provided in an embodiment of the present application;

[0056] Figure 3 A schematic diagram of the internal framework of a gateway device provided in an embodiment of the present application;

[0057] Figure 4 A flow chart of a communication method provided in an embodiment of the present application;

[0058] Figure 5 A schematic diagram of the message structure of a first IP message provided in an embodiment of the present application;

[0059] Figure 6 A schematic diagram of the message structure of a second IP message provided in an embodiment of the present application;

[0060] Figure 7 A schematic diagram of the structure of a communication device provided in an embodiment of the present application;

[0061] Figure 8 A schematic diagram of the structure of another communication device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0062] The present application will present various aspects, embodiments or features around a system that may include multiple devices, components, modules, etc. It should be understood and appreciated that each system may include additional devices, components, modules, etc., and / or may not include all of the devices, components, modules, etc. discussed in conjunction with the figures. In addition, combinations of these schemes may also be used.

[0063] In addition, in the embodiments of the present application, words such as "exemplarily" and "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "exemplary" in the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of the word "exemplary" is intended to present concepts in a concrete way.

[0064] In the embodiments of the present application, "information", "signal", "message", "channel" and "signaling" may be used interchangeably. It should be noted that when the distinction between them is not emphasized, the meanings they intend to express are consistent. "of", "corresponding, relevant" and "corresponding" may be used interchangeably. It should be noted that when the distinction between them is not emphasized, the meanings they intend to express are consistent.

[0065] In the embodiments of the present application, sometimes a subscript such as W1 may be mistakenly written as a non-subscript such as W1. When the difference is not emphasized, the meanings to be expressed are consistent.

[0066] The network architecture and business scenarios described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. A person of ordinary skill in the art can appreciate that with the evolution of the network architecture and the emergence of new business scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.

[0067] The technical solution in this application will be described below in conjunction with the accompanying drawings.

[0068] In a communication system, a gateway device connected to a server can interact with the server through a wide area network (WAN) interface to exchange Internet protocol (IP) messages. The payload of the IP message sent by the gateway device to the server can carry the IP address and port number used for server backconnection, that is, actively accessing the gateway device. The server can actively connect to the gateway device based on the IP address and port number in the IP message payload from the gateway device, thereby managing the gateway device. Taking the server as an auto-configuration server (ACS), the gateway device and the ACS communicate through the technical report 069 (TR069) protocol as an example, the gateway device and the ACS can interact with each other through the WAN interface. The ACS can send the configuration information of the gateway device to the gateway device through the WAN interface for upgrading the software of the gateway device, etc., thereby realizing the management of the gateway device. Among them, the configuration information of the gateway device may include other WAN interfaces of the gateway device (such as IP address), the method of obtaining the address, the virtual local area network (vLAN) information of the gateway device, the account number of the gateway device to access the server, the password of the gateway device to access the server, the channel used by the gateway device for communication, the conditions for the gateway device to report abnormalities, etc.

[0069] Among them, in the IP message sent by the gateway device to the ACS, the source IP address of the IP header includes the IP address of the gateway device, and the IP address of the gateway device is carried in the payload. The IP address of the gateway device carried in the payload can be identified by the return address index. After receiving the IP message from the gateway device, the ACS can parse the IP message from the gateway device to obtain the IP address of the gateway device identified by the return address index in the payload, that is, the IP address of the ACS return gateway device. In the case where the ACS needs to actively send information to the gateway device, such as when the configuration information of the gateway device needs to be updated or the software needs to be upgraded, the ACS can determine the IP address and port number of the gateway device identified by the return address index in the payload of the above IP message as the address for connecting to the gateway device, thereby sending an IP message for configuration update or soft upgrade to the gateway device.

[0070] In some embodiments, in order to improve the coverage of the network, at least one access device, such as a wireless access point (AP), may be connected to the gateway device in the communication system. For example, in a fiber to the room (FTTR) scenario, the gateway device may be connected to devices in the home network, such as access devices.

[0071] The gateway device communicates with the access device connected to the gateway device through a private network (also called a local area network or a small network).

[0072] In the architecture where the access device is connected to the gateway device, the network address translation (NAT) function can be configured on the gateway device. When the access device sends an IP message to the server, the gateway device can modify the source IP address in the IP header of the IP message sent by the access device from the private network IP address of the access device to the public network IP address of the gateway device. In the payload of the message sent by the access device, the IP address used by the server to connect back to the access device is the private network address of the access device.

[0073] Exemplarily, when the server is an ACS, the address identified by the back-connection address index is the private IP address of the access device that sends the IP message and the port number of the gateway device. For example, if the private IP address of the access device is "192.168.100.2.port number", the address identified by the back-connection address index in the payload of the IP message sent by the access device is "192.168.100.2.port number".

[0074] In this way, the server resolves the address from the payload of the received message to the private network IP address of the access device and the port number of the gateway device. If the access device needs to actively access the server, the access device can directly send an IP message to the server.

[0075] If the server needs to actively access the access device, such as when the server needs to send configuration information to the access device for software upgrades, the return address obtained by the server is the private network address of the access device and the port number of the gateway device, and the gateway device cannot forward the IP message according to the characteristics of the IP message sent by the server. Therefore, in this case, the server cannot actively access the access device and it is difficult to manage the access device.

[0076] In some embodiments, in order to achieve the purpose of the server for management function (hereinafter referred to as the first server) actively accessing the access device, an additional server (hereinafter referred to as the second server) can be set in the communication system, so as to achieve the purpose of the first server actively accessing the access device in combination with the second server. The second server can assist the first server in achieving the purpose of actively accessing the access device. Among them, the access device can periodically send a binding request to the second server at a configured frequency. The binding request can be used to detect whether there is a network address translation (NAT) gateway between the access device and the second server, and to detect the aging time of the NAT table of the gateway device, so as to keep the user datagram protocol (UDP) session from the access device to the second server in an active state. When the first server needs to actively connect to the access device, the first server first sends a UDP request to the second server. The second server forwards the UDP request of the first server to the access device through the UDP session between the second server and the access device according to the binding request from the access device. After receiving the connection request from the first server, the access device actively establishes a connection with the first server, thereby realizing two-way communication between the first server and the access device.

[0077] Taking the first server as an auto-configuration server (ACS) and the second server as a simple traversal of UDP through NAT (STUN) server as an example, in this case, the STUN server and the technical report 111 (TR111) protocol can be combined to achieve the purpose of ACS actively accessing the access device, thereby realizing AP management.

[0078] The following combination Figure 1The communication system shown is further described.

[0079] like Figure 1 As shown, the communication system includes: ACS101, gateway device 102, STUN server 103 and at least one access device (access device 104a to access device 104c). Among them, ACS101 is connected to the gateway device 102 and STUN server 103 respectively, the gateway device 102 is connected to the STUN server 103, and the gateway device 102 is connected to each access device in at least one access device (access device 104a to access device 104c). Among them, the access device can periodically send a STUN binding request to the STUN server at a configured frequency, and the STUN binding request can be used to detect whether there is a NAT gateway between the access device and the STUN server, and detect the aging time of the ONT gateway NAT table, so as to keep the UDP session from the access device to the STUN server in an active state. When the ACS needs to actively connect to the access device, the ACS first sends a UDP request to the STUN server. According to the STUN binding request from the access device, the STUN server forwards the UDP request to the access device through the UDP session between the STUN server and the access device. After receiving the connection request from the ACS, the access device actively establishes a connection with the ACS, thereby achieving two-way communication between the ACS and the access device.

[0080] In the above scheme, the first server, such as the ACS server, actively accesses the access device, and a second server, such as a STUN server, needs to be set up in the system, which is costly. In addition, in a communication system without a second server, such as a STUN server, it is difficult for the first server to actively access the access device, and the adaptability is low.

[0081] In order to solve the above technical problems, an embodiment of the present application proposes a communication method. In the communication method, an access device can send a first IP message to a gateway device. Correspondingly, a network device can receive a first IP message from an access device. The gateway device can construct a second IP message and send the second IP message to a server. Among them, the source IP address in the network protocol IP header of the first IP message is the IP address of the access device, and the payload of the first IP message includes a back-connection address index and the IP address of the access device, and the IP address of the access device is identified by the back-connection address index. The source IP address in the IP header of the second IP message is the public IP address of the gateway device, and the payload of the second IP message includes a back-connection address index, the public IP address of the gateway device, and the port number corresponding to the access device, and the public IP address of the gateway device and the port number corresponding to the access device are both identified by the back-connection address index. In this way, the gateway device modifies the IP of the access device identified by the first IP message back-connection address index and the port number of the gateway device to the public IP address of the gateway device and the port number corresponding to the access device, so that the server can obtain the address information for actively connecting to the access device, that is, the public IP address of the gateway device and the port number corresponding to the access device, thereby avoiding the need to set up a separate server and reducing costs. In addition, it can avoid interacting with multiple servers and simplify the process of the server actively accessing the access device.

[0082] To facilitate understanding of the embodiments of the present application, first Figure 2 The communication system shown in the example is used to describe in detail the communication system applicable to the embodiment of the present application. Figure 2 A schematic diagram of the architecture of a communication system applicable to the communication method provided in an embodiment of the present application.

[0083] like Figure 2 As shown, the communication system includes a server 201, a gateway device 202 and at least one access device (access device 203a to access device 203c).

[0084] The server 201 is communicatively connected to the gateway device 202, and the gateway device 202 is communicatively connected to at least one access device (access device 203a to access device 203c).

[0085] The server 201 is a device having an access device management function. For example, the server 201 may be an ACS.

[0086] The above-mentioned gateway device is a device located on the network side of the communication system and has information receiving and information sending functions, or a chip or chip system that can be set in the device. The gateway device includes but is not limited to: home gateway, router, etc. The gateway device can also be an optical network terminal (ONT).

[0087] The access device is a device located on the network side of the communication system and having wireless transceiver functions, or a chip or chip system that can be set in the device. The access device includes but is not limited to: access point (AP) in wireless fidelity (WiFi) system, set-top box, re-router, WiFi repeater.

[0088] The access device is configured with a management interface, which can be used to obtain a private network address from the gateway device and to allow the access device to interact with the gateway device for information related to management functions.

[0089] Understandable, Figure 2 The communication system shown may be a communication system in a fiber to the room (FTTR) scenario.

[0090] The internal framework diagram of the gateway device is as follows: Figure 3 As shown. The gateway device may include a user program layer, a kernel layer and a hardware layer, and the user program layer includes an access device management unit. The kernel layer may include a routing policy unit, a public network address export unit (such as a TR069 WAN interface) unit of the gateway device, an application level gateway (ALG) unit and a hardware driver (DRV) layer. The hardware layer may include a user port for communicating with the access device and an uplink port for communicating with a server such as an ACS.

[0091] The routing strategy unit is connected to the hardware driver layer and the public network address export unit of the gateway device, the public network address export unit of the gateway device is connected to the ALG unit, and the ALG unit is connected to the hardware driver layer. The hardware driver layer is connected to the user port and the uplink port respectively.

[0092] The access management unit may be used for access authentication of the access device, or for synchronizing ACS parameter information, such as the configuration information described below, to the access device.

[0093] It is understandable that the gateway device may also include units for implementing other services, which is not limited in the embodiments of the present application.

[0094] It should be noted that the communication method provided in the embodiment of the present application can be applied to Figure 2 The specific implementation between the access device, gateway device and server shown can refer to the following method embodiment, which will not be repeated here.

[0095] It should be pointed out that the solutions in the embodiments of the present application can also be applied to other communication systems, and the corresponding names can also be replaced by the names of corresponding functions in other communication systems.

[0096] It should be understood that Figure 2 This is a simplified schematic diagram for ease of understanding only. The communication system may also include other gateway devices and / or other access devices. Figure 2 In addition, Figure 2 The communication system shown may also include terminal equipment, etc., which will not be described in detail here.

[0097] The following will be combined Figure 3-Figure 5 The communication method provided in the embodiment of the present application is described in detail.

[0098] For example, Figure 4 A flow chart of a communication method provided in an embodiment of the present application. The communication method can be applied to Figure 2 The communication between the access device, gateway device and server is shown.

[0099] like Figure 4 As shown, the communication method includes the following steps:

[0100] S401: The access device sends a first IP message to the gateway device. Correspondingly, the gateway device receives the first IP message from the access device.

[0101] The source IP address in the network protocol IP header of the first IP message is the IP address of the access device, the payload of the first IP message includes the back-connection address index and the IP address of the access device, and the IP address of the access device is identified by the back-connection address index. The back-connection address index is used to identify the address information of the server actively connecting to the access device.

[0102] Exemplarily, the first IP message is a message sent by the access device. The first IP message may be a notification (INFORM) message.

[0103] The following combination Figure 2 and Figure 5 The structure of the first IP message is described. The first IP message includes a media access control (MAC) header, an IP header, and a payload. Figure 2 As shown in FIG. 1 , it is assumed that the private network IP addresses of access devices 203a to 203c correspond to "192.168.100.2", "192.168.100.3" and "192.168.100.4" respectively, and the IP address and port number of gateway device 202 are "51.123.12.7:7547". If the access device that sends the first IP message is access device 203a, then Figure 5 The source IP address carried in the IP header of the first IP message shown is "192.168.100.2". The payload of the first IP message includes the back-connection address index, the private network address "192.168.100.2" of the access device 203a and the port number 7547 of the gateway device 202, and the IP address and port number identified by the back-connection address index are "192.168.100.2:7547", which is the private network address "192.168.100.2" of the access device 203a and the port number "7547" of the gateway device 202.

[0104] Optionally, the payload of the first IP message may further include a device identification index and a device identification of the access device.

[0105] The device identification index may be used to identify the device identification of the access device.

[0106] Exemplarily, in the first IP message, the device identifier of the access device may be information used to identify the access device in the communication system. For example, the first device identifier of the access device may be a subscriber number (SN) of the access device.

[0107] Optionally, the device identification index may be implemented by characters. For example, in the TR069 protocol, the device identification index may include "SerialNumber". For example, the code for the device identification index to identify the device identification as "48575443F2C7F6421" may be:

[0108] “ <serialnumber> 48575443F2C7F6421< / serialnumber> ”.

[0109] Or, optionally, the device identification index may also be implemented through a fixed field or bit, which will not be described in detail here.

[0110] S402: The gateway device constructs a second IP message.

[0111] Among them, the source IP address in the IP header of the second IP message is the public IP address of the gateway device, and the payload of the second IP message includes the back-connection address index, the public IP address of the gateway device and the port number corresponding to the access device. The public IP address of the gateway device and the port number corresponding to the access device are both identified (indicated) by the back-connection address index.

[0112] The second IP message may be a notification (INFORM) message.

[0113] Exemplarily, the port number corresponding to the access device may be a port number assigned by the gateway device to the access device, and the port number may be dynamically assigned by the gateway device. For the same gateway device, the port numbers of different access devices connected to the gateway device are different. In other words, the port number on the same gateway device is unique.

[0114] In a possible design, the backlink address index can be implemented by characters. For example, in the TR069 protocol, the backlink address index can include "InternetGatewayDevice.ManagementServer.ConeectionRequestURL". In this case, the public network IP address of the gateway device and the port number corresponding to the access device are located after "InternetGatewayDevice.ManagementServer.ConeectionRequestURL". For example, the code for the backlink address index to identify the IP address and port number 10.2.71.140:5001 can be:

[0115] “ <name> InternetGatewayDevice.ManagementServer.ConeectionRequestURL< / name>

[0116] <Value xsi:type=“xsd:string”> http: / / 10.2.71.140:5001".

[0117] It is understandable that in another possible design scheme, the device identification index may also be implemented through a fixed field or bit, which will not be described in detail here.

[0118] Exemplarily, S402 may include: the gateway device may construct a second IP packet according to the first IP packet.

[0119] For example, S402 may include step 4.1 and step 4.2.

[0120] Step 4.1: The gateway device allocates a port number to the access device, that is, performs a hole punching connection, thereby establishing a channel for the server to actively access the access device.

[0121] Regarding the implementation principle of the hole punching connection, you can refer to the existing implementation principle of the hole punching connection, which will not be repeated here.

[0122] In step 4.2, the gateway device performs network address and port translation (NAPT) on the first IP message, thereby modifying the IP address of the access device in the IP header to the public IP address of the gateway device, and modifying the private IP address of the access device and the port number corresponding to the gateway device identified by the back-connection address index in the payload of the first IP message to the public IP address of the gateway device and the port number allocated by the gateway device to the access device.

[0123] The following combination Figure 2 and Figure 6 Explain steps 4.1 and 4.2. Figure 2 As shown, it is assumed that the private IP addresses of access devices 203a to 203c are "192.168.100.2", "192.168.100.3" and "192.168.100.4" respectively, and the public IP address and port number of gateway device 202 are "51.123.12.7:7547". The port numbers allocated by gateway device 202 to access devices 203a to 203c are port numbers "8001" to port number "8003" respectively. If the access device sending the message is access device 203a, and the first IP message is as follows Figure 6 As shown, the source IP address carried in the IP header of the second IP message is: the public IP address "51.123.12.7" of the gateway device 202. The payload of the first IP message includes the back-connection address index, the public IP address "51.123.12.7" of the gateway device 202, and the port number "8001" assigned by the gateway device 202 to the access device 203a, and the back-connection address index identifies the public IP address "51.123.12.7" of the gateway device 202 and the port number "8001" assigned by the gateway device 202 to the access device 203a. It can be understood that the port numbers "8001" to "8003" are only used for example, and in actual implementation, other port numbers can also be used.

[0124] In addition, S402 may further include step 4.3.

[0125] In step 4.3, the gateway device may also modify the IP address of the access device in the transmission control protocol (TCP) header or the UDP header in the first IP message to the public IP address of the gateway device.

[0126] Optionally, the payload of the second IP message may further include a device identification index, a device identification of the gateway device, and a device identification of the access device.

[0127] The device identification index is used to indicate the device identification of the gateway device and the device identification of the access device.

[0128] Exemplarily, the device identification of the gateway device may be information for identifying the gateway device. For example, the device identification of the gateway device may be the SN of the gateway device. The device identification of the access device in the second IP message may be information for identifying the access device in the device to which the gateway device is connected.

[0129] When the payload of the first IP message includes the device identification index and the device identification of the access device, the device identification of the access device in the second IP message corresponds to the device identification of the access device in the first IP message. The device identification of the access device in the second IP message may be the same as or different from the device identification of the access device in the first IP message.

[0130] In this case, S402 may further include step 4.4.

[0131] In step 4.4, the gateway device modifies the first device identifier of the access device in the payload of the first IP message into the device identifier of the gateway device and the device identifier of the access device.

[0132] The device identification index in the second IP message may be the device identification index in the first IP message. For specific implementation, reference may be made to the device identification index in the first IP message, which will not be described in detail here.

[0133] The gateway device may process the content identified by the device identification index in the first IP message through an application level gateway (ALG) to obtain the device identification of the gateway device and the device identification of the access device identified by the device identification index in the second IP message.

[0134] In this way, the connection relationship between the gateway device and the access device can be identified through the second IP message, thereby identifying the connection relationship between the gateway device and the access device, and configuring the software versions of the gateway device and the access device.

[0135] The above S402 can be implemented by an ALG unit.

[0136] S403: The gateway device sends a second IP message to the server. Correspondingly, the server receives the second IP message from the gateway device.

[0137] In a possible design scheme, the gateway device sending the second IP message to the server may include: if the gateway device determines that the MAC address in the first IP message is a preset MAC address, the gateway device sending the second IP message to the server.

[0138] In this way, the IP packets accessing the server can be screened through the gateway device to improve security.

[0139] Exemplarily, S403 may be implemented by a hardware driver layer and an uplink port.

[0140] In this case, Figure 4 The method shown may further include step 4.5.

[0141] Step 4.5: The gateway device determines whether the MAC address in the first IP message is a preset MAC address. In other words, the gateway device authenticates the access device according to the MAC address in the first IP message.

[0142] The MAC address in the first IP message is a preset MAC address, that is, the access device authentication succeeds. The MAC address in the first IP message is not a preset MAC address, that is, the access device authentication fails.

[0143] In step S403 and step 4.5, the MAC address in the first IP packet may be the source MAC address in the MAC header of the first IP packet.

[0144] Wherein, step 4.5 can be implemented by the access device management unit. If the MAC address in the first IP message is a preset MAC address, the routing policy unit can send the first IP message (i.e., the IP message of the access device that has passed the authentication) to the public network address export unit, and send it to the ALG unit through the public network address export unit, and the ALG unit executes S402.

[0145] based on Figure 4 In the communication method provided, the gateway device can receive the first IP message of the access device, construct the second IP message, and send the second IP message to the server. The payload of the first IP message includes the back-connection address index and the IP address of the access device, and the IP address of the access device is identified by the back-connection address index. The payload of the second IP message includes the back-connection address index, the public IP address of the gateway device, and the port number corresponding to the access device, and the public IP address of the gateway device and the port number corresponding to the access device are both identified by the back-connection address index. In this way, in the second IP message sent by the gateway device to the server, the address identified by the back-connection address index is modified to the public IP address of the gateway device and the port number corresponding to the access device, so that the server can parse from the payload of the second IP message to obtain the address of the server actively connecting to the access device, so as to achieve the purpose of the server actively connecting to the access device, and it can avoid setting up a separate server for address conversion, thereby reducing costs and improving adaptability.

[0146] In one possible design, Figure 4The method shown may further include step 4.6.

[0147] Step 4.6: The gateway device sends configuration information to the access device. Correspondingly, the access device receives the configuration information from the gateway device.

[0148] The configuration information comes from the server, and includes one or more of the following: a user name for the access device to access the server, a password for the access device to access the server, or a time interval for the access device to report information to the server.

[0149] Exemplarily, the gateway device may send configuration information to the access device according to the public IP address of the gateway device identified by the connection-back address index in the second IP message and the port number corresponding to the access device.

[0150] In this way, when the gateway device detects that the configuration information is updated, it can notify the access device more promptly, thereby improving communication efficiency.

[0151] In one possible design, Figure 4 The method shown may also include step 4.7 and step 4.8.

[0152] Step 4.7: The server sends a third IP message to the gateway device. Correspondingly, the gateway device receives the third IP message from the server.

[0153] The destination IP address in the IP header of the third IP message is the public IP address of the gateway device, and the UDP header or TCP header of the third IP message also includes the port number corresponding to the access device.

[0154] The third IP message is a message used for access device management.

[0155] Step 4.8: The gateway device sends a third IP message to the access device corresponding to the port number.

[0156] Optionally, step 4.8 may include: the gateway device determines the access device corresponding to the port number included in the user datagram protocol header or the transmission control protocol header of the third IP message according to the correspondence between the port number on the gateway device and the access device.

[0157] The gateway device sends a third IP message to the access device corresponding to the port number.

[0158] In this way, the server can obtain the address of the access device to which the server actively connects from the payload of the second IP message, and send a third IP message based on the address of the access device to which the server actively connects, so as to achieve the purpose of the server actively connecting to the access device.

[0159] Figure 4The method shown may also include steps 4.9 and 4.10.

[0160] Step 4.9: The gateway device allocates a port number on the gateway device to the access device to which the gateway device is connected.

[0161] Among them, different access devices have different port numbers.

[0162] Step 4.10: The gateway device stores the correspondence between the port number on the gateway device and the access device.

[0163] In addition, before S401, Figure 4 The provided communication method may also include:

[0164] In step 4.11, the access device can obtain the private IP address of the access device from the gateway device through the management interface.

[0165] In step 4.12, the access device communicates with the gateway device through the management interface to perform mutual authentication.

[0166] Step 4.13: The gateway device sends configuration information to the access device. Correspondingly, the access device receives the configuration information from the gateway device. That is, the gateway device synchronizes the configuration information to the access device.

[0167] Among them, the gateway device can synchronize configuration information to the access device through the EasyMesh protocol.

[0168] The implementation principles of steps 4.11-4.13 can be referred to the implementation principles in the existing technology, which will not be repeated here.

[0169] Combination of the above Figure 4-Figure 6 The communication method provided by the embodiment of the present application is described in detail. Figure 7-Figure 8 A communication device for executing the communication method provided in an embodiment of the present application is described in detail.

[0170] For example, Figure 7 is a schematic diagram of the structure of a communication device 700 provided in an embodiment of the present application. Figure 7 As shown, the communication device 700 includes: a processing module 701 and a transceiver module 702. For ease of description, Figure 7 Only the main components of the communication device 700 are shown.

[0171] In some embodiments, the communication device 700 may be adapted to Figure 2 In the communication system shown in FIG. , execution Figure 4 The function of the gateway device in the communication method shown in .

[0172] The processing module 701 is used to receive a first IP message from an access device through the transceiver module 702. The source IP address in the network protocol IP header of the first IP message is the IP address of the access device, and the payload of the first IP message includes a back-connection address index and the IP address of the access device, and the IP address of the access device is identified by the back-connection address index.

[0173] The processing module 701 is further used to construct a second IP message. The source IP address in the IP header of the second IP message is the public IP address of the communication device 700, and the payload of the second IP message includes a back-connection address index, the public IP address of the communication device 700, and a port number corresponding to the access device, and the public IP address of the communication device 700 and the port number corresponding to the access device are both identified by the back-connection address index.

[0174] The processing module 701 is further configured to send a second IP message to the server through the transceiver module 702 .

[0175] In a possible design scheme, the processing module 701 can be specifically used to send the second IP message to the server through the transceiver module 702 when it is determined that the MAC address in the source IP of the first IP message is a preset MAC address.

[0176] In a possible design, the payload of the second IP message may further include a device identification index, a device identification of the communication device 700, and a device identification of the access device. The device identification index is used to indicate the device identification of the communication device 700 and the device identification of the access device.

[0177] In one possible design scheme, the processing module 701 can also be used to send configuration information to the access device through the transceiver module 702; wherein the configuration information comes from the server, and the configuration information includes one or more of the following: the user name of the access device to access the server, the password of the access device to access the server, or the time interval for the access device to report information to the server.

[0178] In a possible design scheme, the processing module 701 may also be used to receive a third IP message from the server through the transceiver module 702. The destination IP address in the IP header of the third IP message is the public network IP address of the communication device 700, and the user datagram protocol header or the transmission control protocol header of the third IP message also includes the port number corresponding to the access device. The processing module 701 may also be used to send the third IP message to the access device corresponding to the port number through the transceiver module 702.

[0179] Optionally, the processing module 701 may be specifically configured to determine an access device corresponding to a port number included in a user datagram protocol header or a transmission control protocol header of the third IP message according to a correspondence between a port number and an access device on the communication device 700. The processing module 701 is further configured to send the third IP message to the access device corresponding to the port number through the transceiver module 702.

[0180] Furthermore, the processing module 701 may also be used to allocate a port number on the communication device 700 to an access device to which the communication device 700 is connected.

[0181] The processing module 701 is further used to store the correspondence between the port number on the communication device 700 and the access device.

[0182] Optionally, the transceiver module 702 may include a receiving module and a sending module. The transceiver module 702 is used to implement Figure 4 The transmission function and the reception function of the communication device 700 are shown.

[0183] Optionally, the communication device 700 may further include a storage module, which stores a program or instruction. When the processing module 701 executes the program or instruction, the communication device 700 may execute Figure 4 The communication method shown.

[0184] It should be understood that the processing module 701 involved in the communication device 700 can be implemented by a processor or a processor-related circuit component, which can be a processor or a processing unit; the transceiver module 702 can be implemented by a transceiver or a transceiver-related circuit component, which can be a transceiver or a transceiver unit.

[0185] It should be noted that the communication device 700 can be a gateway device, or a chip (system) or other parts or components that can be set in the gateway device, or a device that includes a gateway device, which is not limited in this application.

[0186] In addition, the technical effects of the communication device 700 can be referred to Figure 4 The technical effects of the communication method shown will not be repeated here.

[0187] In some other embodiments, the communication device 700 may be suitable for Figure 2 In the communication system shown in FIG. , execution Figure 4 The function of the server in the communication method shown in .

[0188] Wherein, the processing module 701 is used to receive a second IP message from the gateway device through the transceiver module 702. Wherein, the second IP message is obtained after the gateway device processes the first IP message, and the source IP address in the IP header of the second IP message is the public IP address of the gateway device. The payload of the second IP message includes the back-connection address index, the public IP address of the gateway device and the port number corresponding to the access device. The public IP address of the gateway device and the port number corresponding to the access device are both identified by the back-connection address index. The processing module 701 is also used to send a third IP message to the gateway device through the transceiver module 702. Wherein, the destination IP address in the IP header of the third IP message includes the public IP address of the gateway device and the port number corresponding to the access device.

[0189] Optionally, the transceiver module 702 may include a receiving module and a sending module. The transceiver module 702 is used to implement Figure 4 The transmission function and the reception function of the communication device 700 are shown.

[0190] Optionally, the communication device 700 may further include a storage module, which stores a program or instruction. When the processing module 701 executes the program or instruction, the communication device 700 may execute Figure 4 The communication method shown.

[0191] It should be understood that the processing module 701 involved in the communication device 700 can be implemented by a processor or a processor-related circuit component, which can be a processor or a processing unit; the transceiver module 702 can be implemented by a transceiver or a transceiver-related circuit component, which can be a transceiver or a transceiver unit.

[0192] It should be noted that the communication device 700 can be a gateway device, or a chip (system) or other parts or components that can be set in the gateway device, or a device that includes a gateway device, which is not limited in this application.

[0193] In addition, the technical effects of the communication device 700 can be referred to Figure 4 The technical effects of the communication method shown will not be repeated here.

[0194] For example, Figure 8 This is a schematic diagram of the structure of another communication device provided in an embodiment of the present application. The communication device may be a terminal device or a network device, or may be a chip (system) or other components or assemblies that can be set in the terminal device or the network device. Figure 8 As shown, the communication device 800 may include a processor 801. Optionally, the communication device 800 may further include a memory 802 and / or a transceiver 803. The processor 801 is coupled with the memory 802 and the transceiver 803, such as being connected via a communication bus.

[0195] Combine the following Figure 8 The components of the communication device 800 are described in detail:

[0196] The processor 801 is the control center of the communication device 800, and may be a processor or a general term for multiple processing elements. For example, the processor 801 is one or more central processing units (CPUs), or may be an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application, such as one or more digital signal processors (DSPs), or one or more field programmable gate arrays (FPGAs).

[0197] Optionally, the processor 801 may perform various functions of the communication device 800 by running or executing a software program stored in the memory 802 and calling data stored in the memory 802 .

[0198] In a specific implementation, as an embodiment, the processor 801 may include one or more CPUs, such as Figure 8 CPU0 and CPU1 are shown in FIG.

[0199] In a specific implementation, as an embodiment, the communication device 800 may also include multiple processors, such as Figure 8 801 and processor 804 are shown in FIG. Each of these processors may be a single-core processor (single-CPU) or a multi-core processor (multi-CPU). A processor herein may refer to one or more devices, circuits, and / or processing cores for processing data (e.g., computer program instructions).

[0200] The memory 802 is used to store the software program for executing the solution of the present application, and the execution is controlled by the processor 801. The specific implementation method can refer to the above method embodiment, which will not be repeated here.

[0201] Optionally, the memory 802 may be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, a random access memory (RAM) or other types of dynamic storage devices that can store information and instructions, or an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical disc, laser disc, optical disc, digital versatile disc, Blu-ray disc, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory 802 may be integrated with the processor 801, or may exist independently and be communicated to the processor 801 through the interface circuit ( Figure 8 (not shown) is coupled to the processor 801, which is not specifically limited in the embodiment of the present application.

[0202] The transceiver 803 is used for communication with other communication devices. For example, if the communication device 800 is a terminal device, the transceiver 803 can be used to communicate with a network device, or with another terminal device. For another example, if the communication device 800 is a network device, the transceiver 803 can be used to communicate with a terminal device, or with another network device.

[0203] Optionally, the transceiver 803 may include a receiver and a transmitter ( Figure 8 The receiver is used to implement a receiving function, and the transmitter is used to implement a sending function.

[0204] Optionally, the transceiver 803 may be integrated with the processor 801, or may exist independently and communicate with the processor 801 through the interface circuit ( Figure 8 (not shown) is coupled to the processor 801, which is not specifically limited in the embodiment of the present application.

[0205] It should be noted that Figure 8 The structure of the communication device 800 shown in the figure does not constitute a limitation on the communication device. The actual communication device may include more or fewer components than those shown in the figure, or combine certain components, or arrange the components differently.

[0206] In addition, the technical effects of the communication device 800 can refer to the technical effects of the communication method described in the above method embodiment, and will not be repeated here.

[0207] It should be understood that the processor in the embodiments of the present application may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0208] It should also be understood that the memory in the embodiments of the present application may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of random access memory (RAM) are available, such as static RAM (SRAM), dynamic random access memory (DRAM), synchronous DRAM (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct rambus RAM (DR RAM).

[0209] The above embodiments can be implemented in whole or in part by software, hardware (such as circuits), firmware or any other combination. When implemented using software, the above embodiments can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website site, computer, server or data center to another website site, computer, server or data center by wired (such as infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that contains one or more available media sets. The available medium can be a magnetic medium (for example, a floppy disk, a hard disk, a tape), an optical medium (for example, a DVD), or a semiconductor medium. The semiconductor medium can be a solid-state hard disk.

[0210] It should be understood that the term "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. A and B can be singular or plural. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship, but it may also indicate an "and / or" relationship. Please refer to the context for specific understanding.

[0211] In this application, "at least one" means one or more, and "more than one" means two or more. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can be represented by: a, b, c, ab, ac, bc, or abc, where a, b, c can be single or multiple.

[0212] It should be understood that in the various embodiments of the present application, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0213] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A communication method, characterized in that: The method comprises: The gateway device receives a first network protocol IP message from an access device; wherein the source IP address in the network protocol IP header of the first IP message is the IP address of the access device, the payload of the first IP message includes a back-connection address index and the IP address of the access device, and the IP address of the access device is identified by the back-connection address index; The gateway device stores the correspondence between the port number on the gateway device and the access device; The gateway device constructs a second IP message; wherein the source IP address in the IP header of the second IP message is the public IP address of the gateway device, and the payload of the second IP message includes the back-connection address index, the public IP address of the gateway device, and the port number corresponding to the access device, and the public IP address of the gateway device and the port number corresponding to the access device are both identified by the back-connection address index; The gateway device sends the second IP message to the server.

2. The method according to claim 1, characterized in that: The gateway device sends a second IP message to the server, including: If the gateway device determines that the media access control MAC address in the first IP message is a preset MAC address, it sends the second IP message to the server.

3. The method according to claim 1 or 2, characterized in that: The payload of the second IP message also includes a device identification index, the device identification of the gateway device, and the device identification of the access device; wherein the device identification index is used to indicate the device identification of the gateway device and the device identification of the access device.

4. The method according to claim 1 or 2, characterized in that: The method further comprises: The gateway device sends configuration information to the access device; wherein the configuration information comes from the server, and the configuration information includes one or more of the following: a user name for the access device to access the server, a password for the access device to access the server, or a time interval for the access device to report information to the server.

5. The method according to claim 1 or 2, characterized in that: The method further comprises: The gateway device receives a third IP message from the server; wherein the destination IP address in the IP header of the third IP message is the public IP address of the gateway device, and the user datagram protocol header or the transmission control protocol header of the third IP message also includes the port number corresponding to the access device; The gateway device sends the third IP message to the access device corresponding to the port number.

6. The method according to claim 5, characterized in that The gateway device sends the third IP message to the access device corresponding to the port number, including: The gateway device determines, according to the correspondence between the port number on the gateway device and the access device, the access device corresponding to the port number included in the user datagram protocol header or the transmission control protocol header of the third IP message; The gateway device sends the third IP message to the access device corresponding to the port number.

7. The method according to claim 6, characterized in that The method further comprises: The gateway device allocates a port number on the gateway device to an access device connected to the gateway device; The gateway device stores the correspondence between the port number on the gateway device and the access device.

8. A communication method, characterized in that: The method comprises: The server receives a second IP message from the gateway device; wherein the second IP message is obtained after the gateway device processes the first IP message, the source IP address in the IP header of the second IP message is the public IP address of the gateway device, and the payload of the second IP message includes the back-connection address index, the public IP address of the gateway device, and the port number corresponding to the access device, and the public IP address of the gateway device and the port number corresponding to the access device are both identified by the back-connection address index; the public IP address of the gateway device and the port number corresponding to the access device in the payload of the second IP message are determined according to the correspondence between the port number on the gateway device and the access device stored in the gateway device; The server sends a third IP message to the gateway device; wherein the destination IP address in the IP header of the third IP message includes the public IP address of the gateway device and the port number corresponding to the access device.

9. A communication device, characterized in that: The communication device comprises: a processing module and a transceiver module; The processing module is configured to receive a first network protocol IP message from an access device through a transceiver module; wherein a source IP address in a network protocol IP header of the first IP message is an IP address of the access device, and a payload of the first IP message includes a backlink address index and the IP address of the access device, and the IP address of the access device is identified by the backlink address index; The processing module is further used to store the corresponding relationship between the port number on the gateway device and the access device; The processing module is further used to construct a second IP message; wherein the source IP address in the IP header of the second IP message is the public IP address of the communication device, and the payload of the second IP message includes the back-connection address index, the public IP address of the communication device, and the port number corresponding to the access device, and the public IP address of the communication device and the port number corresponding to the access device are both identified by the back-connection address index; The processing module is further used to send the second IP message to the server through the transceiver module.

10. The device according to claim 9, characterized in that The processing module is specifically configured to send the second IP message to the server through the transceiver module when it is determined that the media access control MAC address in the first IP message is a preset MAC address.

11. The device according to claim 9 or 10, characterized in that The payload of the second IP message also includes a device identification index, the device identification of the communication device and the device identification of the access device; wherein the device identification index is used to indicate the device identification of the communication device and the device identification of the access device.

12. The device according to claim 9 or 10, characterized in that The processing module is also used to send configuration information to the access device through the transceiver module; wherein the configuration information comes from the server, and the configuration information includes one or more of the following: a user name for the access device to access the server, a password for the access device to access the server, or a time interval for the access device to report information to the server.

13. The device according to claim 9 or 10, characterized in that The processing module is further configured to receive a third IP message from the server through the transceiver module; wherein the destination IP address in the IP header of the third IP message is the public network IP address of the communication device, and the user datagram protocol header or the transmission control protocol header of the third IP message also includes the port number corresponding to the access device; The processing module is further used to send the third IP message to the access device corresponding to the port number through the transceiver module.

14. The device according to claim 13, characterized in that The processing module is specifically used to determine the access device corresponding to the port number included in the user datagram protocol header or the transmission control protocol header of the third IP message according to the correspondence between the port number on the communication device and the access device; The processing module is further used to send the third IP message to the access device corresponding to the port number through the transceiver module.

15. The device according to claim 14, characterized in that The processing module is further used to allocate a port number on the communication device to an access device connected to the communication device; The processing module is further used to store the correspondence between the port number on the communication device and the access device.

16. A communication device, characterized in that: The communication device comprises: a processing module and a transceiver module; The processing module is used to receive a second IP message from the gateway device through the transceiver module; wherein the second IP message is obtained after the gateway device processes the first IP message, the source IP address in the IP header of the second IP message is the public IP address of the gateway device, and the payload of the second IP message includes the back-connection address index, the public IP address of the gateway device and the port number corresponding to the access device, and the public IP address of the gateway device and the port number corresponding to the access device are both identified by the back-connection address index; the public IP address of the gateway device and the port number corresponding to the access device in the payload of the second IP message are determined according to the correspondence between the port number on the gateway device and the access device stored in the gateway device; The processing module is also used to send a third IP message to the gateway device through the transceiver module; wherein the destination IP address in the IP header of the third IP message includes the public IP address of the gateway device and the port number corresponding to the access device.

17. A communication device, characterized in that: include: Processor and memory; The memory is used to store computer instructions. When the processor executes the instructions, the communication device executes the communication method according to any one of claims 1 to 8.

18. A communication device, characterized in that: include: processor and interface circuit; wherein, The interface circuit is used to receive code instructions and transmit them to the processor; The processor is configured to run the code instructions to execute the communication method according to any one of claims 1 to 8.

19. A communication device, characterized in that: The communication device includes a processor and a transceiver, the transceiver is used for information exchange between the communication device and other communication devices, and the processor executes program instructions to perform the communication method according to any one of claims 1-8.

20. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a computer program or an instruction. When the computer program or the instruction is executed on a computer, the computer is caused to execute the communication method according to any one of claims 1 to 8.

21. A computer program product, characterized in that The computer program product comprises: a computer program or instructions, and when the computer program or instructions are executed on a computer, the computer is caused to execute the communication method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • System and method for allocating an anchoring point for a mobile terminal

    US20090022124A1

  • Mobile communication system, gateway device, base station device, control method of gateway device, and computer-readable medium

    US20120196600A1