Method for accessing network, media gateway, electronic device and storage medium
By establishing a private media channel in the media gateway and binding the user's public network transmission resources, it solves the problems of insufficient support for symmetric NAT types in STUN traversal technology and high deployment costs of TURN equipment, and realizes media communication on the user side in a NAT symmetric network. Reduces network deployment difficulty and cost.
Patent Information
- Application Number
- CN202010607277.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-06-29
- Publication Date
- 2024-09-24
- Estimated Expiration
- 2040-06-29
AI Technical Summary
Existing STUN traversal technology does not support symmetric NAT types, and TURN technology requires the deployment of additional equipment, resulting in increased network costs and difficulty, limiting the development of P2P communications.
By establishing a private media channel between the client and the target platform in the media gateway, and binding the private media channel to the user's public network transmission resources, a media link is obtained so that the target platform can perform media communication without the need to deploy additional equipment. , Reduce network deployment difficulty and cost.
It realizes the media communication of the client in the NAT symmetric network, reduces the cost and difficulty of network deployment, and relieves the limitation of the client's access to the network without changing the network structure.
Smart Images

Figure CN113949695B
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the field of communications, and in particular to a method for accessing a network, a media gateway, an electronic device and a storage medium. Background Art
[0002] With the continuous development of computer Internet technology, peer-to-peer (P2P) communication is becoming more and more common. In order to alleviate the problem of shortage of IPv4 network addresses before IPv6 is widely used, Network Address Translation (NAT) devices are widely used. NAT devices make it difficult for nodes in different intranets to communicate directly, which greatly limits the development of P2P applications. NAT traversal technology uses some technical means to enable nodes in different intranets to communicate directly. Commonly used NAT traversal technologies include Session Traversal Utilities for NAT (STUN), Traversal Using Relays around NAT (TURN), etc.
[0003] However, the current STUN traversal technology does not support symmetric NAT type traversal and has limitations in use. TURN requires the deployment of additional equipment, such as TURN servers, which increases network costs and is not suitable for expansion. Summary of the invention
[0004] The purpose of the embodiment of the present invention is to provide a method for accessing a network, so that no additional equipment needs to be deployed, the cost of network deployment is reduced, and the deployment difficulty and cost of NAT traversal are reduced.
[0005] To solve the above technical problems, an embodiment of the present invention provides a method for accessing a network, which is applied to a media gateway, including: establishing a private media channel between a user terminal and a target platform; binding the private media channel to the user's public network transmission resources after NAT conversion at the user terminal, and obtaining a media link between the user terminal and the target platform, so that the target platform can perform media communication with the user terminal through the media link.
[0006] An embodiment of the present invention also provides a method for accessing a network, which is applied to a user terminal, and includes: running a preset browser to communicate with a signaling gateway through the browser, or the user terminal communicates with a media gateway through the browser; when a media link between the user terminal and a target platform is established, establishing real-time media communication with an idle seat of the target platform through the browser.
[0007] An embodiment of the present invention further provides a media gateway, comprising: at least one processor; and
[0008] a memory communicatively connected to the at least one processor; wherein,
[0009] The memory stores instructions that can be executed by the at least one processor. The instructions are executed by the at least one processor so that the at least one processor can execute a method for accessing a network applied on a media gateway.
[0010] An embodiment of the present invention also provides an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute a method for accessing a network at a user end.
[0011] An embodiment of the present invention further provides a computer-readable storage medium storing a computer program, and when the computer program is executed by a processor, the above-mentioned method for accessing a network is implemented.
[0012] Compared with the prior art, the embodiment of the present invention is that the media gateway establishes a private media channel between the user terminal and the target platform, binds the private media channel to the user public network transmission resources corresponding to the user terminal, obtains the media link between the user terminal and the target platform, so that the target platform and the user terminal can perform media communication through the media link. The media gateway binds the user public network transmission resources to the private media channel so that the target platform can know the user public network transmission resources of the user terminal, and then can send data to the user terminal through the media link. In media communication, it is usually necessary to set up a media gateway to forward media data. A media link is established between the user terminal and the target platform through the media gateway. There is no need to deploy additional equipment or change the network structure, which reduces the difficulty and cost of network deployment. At the same time, the user terminal has corresponding user gateway transmission resources, that is, the user terminal has independent public transmission resources, so that even if the user terminal is in a NAT symmetric network, it can communicate by obtaining a media link, eliminating the limitations of the user terminal in accessing the network. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] One or more embodiments are exemplarily described by the pictures in the corresponding drawings, and these exemplary descriptions do not constitute limitations on the embodiments.
[0014] Figure 1 is a flow chart of a method for accessing a network according to a first embodiment of the present invention;
[0015] Figure 2 is a flow chart of a method for accessing a network according to a second embodiment of the present invention;
[0016] Figure 3 is an interactive schematic diagram of a method for accessing a network according to a third embodiment of the present invention;
[0017] Figure 4 is a schematic diagram of the structure of a media gateway according to a fourth embodiment of the present invention;
[0018] Figure 5 is a schematic structural diagram of an electronic device according to a fifth embodiment of the present invention. DETAILED DESCRIPTION
[0019] To make the purpose, technical scheme and advantages of the embodiments of the present invention clearer, the embodiments of the present invention will be described in detail below in conjunction with the accompanying drawings. However, it will be appreciated by those skilled in the art that in the embodiments of the present invention, many technical details are proposed in order to enable the reader to better understand the present application. However, even without these technical details and various changes and modifications based on the following embodiments, the technical scheme claimed in the present application can be implemented. The division of the following embodiments is for the convenience of description, and should not constitute any limitation on the specific implementation of the present invention. The various embodiments can be combined and referenced with each other without contradiction.
[0020] The first embodiment of the present invention relates to a method for accessing a network, the process of which is as follows: Figure 1 As shown:
[0021] Step 101: Establish a private media channel between the user terminal and the target platform.
[0022] Step 102: Bind the private media channel to the user public network transmission resources corresponding to the user terminal, and obtain the media link between the user terminal and the target platform, so that the target platform and the user terminal can perform media communication through the media link. The user public network transmission resources are the transmission resources of the local transmission resources of the user terminal after being converted by the network address translation NAT device.
[0023] Compared with the prior art, the embodiments of the present invention are as follows: the media gateway establishes a private media channel between the user terminal and the target platform, binds the private media channel to the user public network transmission resources corresponding to the user terminal, obtains the media link between the user terminal and the target platform, so that the target platform and the user terminal can perform media communication through the media link; the media gateway binds the user public network transmission resources to the private media channel, so that the target platform can know the user public network transmission resources of the user terminal, and then can send data to the user terminal through the media link; in media communication, it is usually necessary to set up a media gateway to forward media data, and establish a media link between the user terminal and the target platform through the media gateway, without deploying additional equipment or changing the network structure, thereby reducing the difficulty and cost of network deployment; at the same time, the user terminal has corresponding user gateway transmission resources, that is, the user terminal has independent public transmission resources, so that even if the user terminal is in a NAT symmetric network, it can communicate by obtaining a media link, thereby removing the limitations of the user terminal in accessing the network.
[0024] The second embodiment of the present invention relates to a method for accessing a network, which is applied to a user terminal, and the process is as follows: Figure 2 As shown:
[0025] Step 201: Run a preset browser to communicate with a signaling gateway or a media gateway through the browser.
[0026] Step 202: When the media link between the user terminal and the target platform is established, real-time media communication is established with an idle seat of the target platform through the browser.
[0027] The method for accessing the network provided in this embodiment runs a preset browser and implements communication with a signaling gateway or communication with a media gateway through the browser; when the media link between the user terminal and the target platform is established, real-time media communication is established with an idle seat of the target platform through the browser. Since there is no need to install a specific application or a specific component to access the network, the cost of real-time media communication with the target platform and the limitation of real-time media communication are reduced, and the scope of use of real-time media is expanded.
[0028] In order to better understand the first and second embodiments, the following third embodiment will be combined with the attached Figure 3 The specific process of the method of accessing the network is described in detail. Figure 3 An interactive diagram for accessing the network.
[0029] The user terminal executes step S11: sending user media negotiation information of the user terminal to the signaling gateway.
[0030] Specifically, the user terminal can be a smart phone, a personal computer (PC), a PAD, a VR device, etc. In this embodiment, the devices involved in the process of the user terminal accessing the network include: a signaling gateway, a media gateway, a user terminal and a target platform, wherein the signaling gateway is connected to the media gateway in communication, and the media gateway is connected to the target platform in communication. The target platform includes services with different functions including: a media server and other service servers, etc.
[0031] In this embodiment, the user terminal runs a preset browser to communicate with the signaling gateway through the browser, or the user terminal communicates with the media gateway through the browser; when the media link between the user terminal and the target platform is completed, real-time media communication is established with the idle seat of the target platform through the browser.
[0032] Specifically, the server of the preset browser is deployed on the public Internet, and the browser is used to provide call services for the user terminal and assist the user terminal in NAT traversal. The browser server establishes a heartbeat connection with the signaling gateway so that the browser can communicate with the signaling gateway at any time. The user terminal runs the browser, and the browser server provides a display page to the terminal. The user can operate the display page to trigger the browser to initiate a real-time media call to the media server; wherein the signaling gateway can be a real-time media signaling gateway. For example, a call control is displayed on the page displayed by the user terminal, and the user clicks the call control to trigger the browser to initiate a real-time media call to the media server. The browser can also provide other ways to initiate real-time media calls, which are not listed one by one in this embodiment.
[0033] After the browser initiates a real-time media call, the browser obtains the user media negotiation information of the user end and initiates a media negotiation request to the media server. The user media negotiation information includes: the media capabilities and parameter information supported by the user end. The media capabilities supported by the user end are the media types supported by the user end, such as: the media types of video and voice supported by the user end, and the parameter information is: sampling rate, resolution, etc. The user end sends the user media negotiation information to the signaling gateway through the browser.
[0034] It is worth mentioning that the user terminal runs a browser, which makes real-time media calls. Since the browser does not need to be downloaded, the purpose of accessing the media server at any time is achieved.
[0035] It is understandable that the user end may also initiate media negotiation to the media gateway through a designated application.
[0036] The signaling gateway executes step S12: sending the user media negotiation information to the media gateway.
[0037] The media gateway executes step S13: in response to the user media negotiation information of the user terminal sent by the signaling gateway, forwards the user media negotiation information to the target platform.
[0038] The media gateway executes step S14: in response to the target media negotiation information sent by the target platform, forwards the target media negotiation information to the signaling gateway.
[0039] Specifically, after receiving the user media negotiation information, the media server in the target platform sends the target media negotiation information of the media server to the media gateway, where the target media negotiation information includes the media capabilities and parameter information supported by the media server. The media gateway sends the target media negotiation information to the signaling gateway.
[0040] The signaling gateway executes step S15: sending the target media negotiation information to the user terminal, so that the media negotiation between the user terminal and the target platform is completed.
[0041] The client receives the target media negotiation information forwarded by the signaling gateway through the browser, and implements media negotiation with the target platform.
[0042] The media gateway executes step S16: establishing a private media channel between the user terminal and the target platform.
[0043] In one example, a target private media communication port is allocated to the target platform and a user private media communication port is allocated to the user terminal; a mapping relationship between the target private media communication port and the user private media communication port is established to form a private media channel.
[0044] Specifically, after the user terminal completes the media negotiation with the target platform, the media gateway will create a call session, allocate a target private media communication port to the target platform and allocate a user private media communication port to the user terminal. The target private media communication port can be a media communication UDP port allocated by the media gateway to the media server, and the user private media communication port can be a media communication UDP port allocated by the media gateway to the user terminal. The media gateway establishes a mapping relationship between the target private media communication port and the user private media port to form a private media channel. For example, the media gateway can allocate a media communication UDP port to the user terminal in real time, recorded as port1, and also allocate a media communication UDP port to the media server of the target platform, recorded as port2; establish a mapping relationship between port1 and port2, and the mapping relationship is associated with the created session. Then, when the session is conducted, through the mapping relationship, the data sent by the media server will flow in from port2 and out from port1.
[0045] The user terminal executes step S17: sending a NAT data packet to the media gateway.
[0046] Specifically, the NAT data packet can be a STUN data packet, and the user terminal sends the STUN data packet to the media gateway through the browser so that the media gateway can obtain the user public network transmission resources of the user terminal. The user public network transmission resources include: a NAT public network address and a NAT public network media port corresponding to the NAT public network address.
[0047] It can be understood that the user terminal itself is in the internal network. When the user terminal accesses the public network, the private network address is converted into the public network address of the NAT device and the public network port of the NAT device through the NAT device, and the public network is accessed through the converted public network address and the public network port of the NAT device. The NAT public network address in this embodiment is the public network address and the converted public network port after the private network address of the user terminal is converted by the NAT device.
[0048] The media gateway executes step S18: in response to the NAT data packet sent by the user terminal, obtains the NAT public network address and the NAT public network media port; and returns the NAT public network address and the NAT public network media port to the user terminal.
[0049] Specifically, the network environment is complex, and the user side may exist in multiple network environments. If the user is in an intranet, he accesses the public network through a NAT device. Usually, if the user is behind two levels of NAT devices, he accesses the public network through a NAT device. If the user side needs to conduct real-time media communication, NAT traversal is required, that is, the user side needs to know the converted public network address and port.
[0050] When the media gateway receives the NAT data packet sent by the user, it can obtain the NAT public network address and NAT public network media port of the user, and return the NAT public network address and NAT public network media port of the user to the user. The user receives the NAT public network address and NAT public network media port, and can complete the sending and receiving of media packets with the media server.
[0051] The media gateway executes step S19: binding the NAT public network media port with the user's private media communication port to form a media link.
[0052] Specifically, the NAT public network media port is bound to the user's private media communication port to form a media link. The media link is: the private network media port of the user end - the NAT public network media port of the user end - the user's private media communication port - the target private media communication port - the media port of the media server.
[0053] The media server can send media data to the user end through the media link to achieve real-time media communication with the user end.
[0054] The user terminal executes step S20: initiating dtls negotiation to the media gateway.
[0055] The media gateway executes step S21: responding to a data packet transport layer security protocol dtls negotiation request initiated by the user terminal, and performing dtls negotiation with the user terminal.
[0056] Specifically, in order to ensure the security of the media link, the user end sends a packet transport layer security protocol dtls negotiation request to the media gateway. In response to the packet transport layer security protocol dtls negotiation request initiated by the user end, dtls negotiation is performed with the user end to implement the encryption function of the media link and provide security of the media link.
[0057] Media link such as Figure 3 The bold double-headed arrow in indicates that after the media link is established, the target platform initiates a call to the user terminal and waits for an idle seat.
[0058] Specifically, after the media link is established, the business service center of the target platform initiates a Session Initiation Protocol (SIP) call to the user end and waits for the idle seat. The user end responds to the SIP call and establishes a real-time media call with the idle seat through the media link.
[0059] The method for accessing the network in this example establishes a media link between the user terminal and the target platform through a media gateway. After the media link is established, the media link is encrypted to improve the security of the media link. In addition, the user terminal communicates with the media gateway by running a browser to establish a media link, so that the user does not need to download additional applications on the user terminal, reducing the cost of real-time media communication between the user terminal and the target platform. The browser has strong portability, which improves the use scenarios of real-time media communication.
[0060] In addition, those skilled in the art can understand that the step division of the above methods is only for clear description. When implemented, they can be combined into one step or some steps can be split and decomposed into multiple steps. As long as they include the same logical relationship, they are all within the protection scope of this patent; adding insignificant modifications to the algorithm or process or introducing insignificant designs without changing the core design of the algorithm and process are all within the protection scope of this patent.
[0061] A fourth embodiment of the present invention relates to a media gateway, the structure of which is as follows: Figure 4As shown, it includes: at least one processor 401; and a memory 402 that is communicatively connected to the at least one processor 401; wherein the memory 402 stores instructions that can be executed by the at least one processor 401, and the instructions are executed by the at least one processor 401 so that the at least one processor 401 can execute the above-mentioned method of accessing the network.
[0062] A fifth embodiment of the present invention relates to an electronic device, the structure of which is as follows: Figure 5 As shown, it includes: at least one processor 501; and a memory 502 that is communicatively connected to the at least one processor 501; wherein the memory 502 stores instructions that can be executed by the at least one processor 501, and the instructions are executed by the at least one processor 501 so that the at least one processor 501 can execute the above-mentioned method of accessing the network.
[0063] Among them, the memory and the processor are connected in a bus manner, and the bus may include any number of interconnected buses and bridges, and the bus connects various circuits of one or more processors and memories together. The bus can also connect various other circuits such as peripherals, voltage regulators, and power management circuits, which are well known in the art and are therefore not further described herein. The bus interface provides an interface between the bus and the transceiver. The transceiver can be one element or multiple elements, such as multiple receivers and transmitters, providing a unit for communicating with various other devices on a transmission medium. The data processed by the processor is transmitted on a wireless medium via an antenna, and further, the antenna also receives data and transmits the data to the processor.
[0064] The processor is responsible for managing the bus and general processing, and can also provide various functions, including timing, peripheral interfaces, voltage regulation, power management, and other control functions. Memory can be used to store data used by the processor when performing operations.
[0065] A sixth embodiment of the present invention relates to a computer-readable storage medium storing a computer program, which implements the above-mentioned method embodiment for accessing a network when executed by a processor.
[0066] That is, those skilled in the art can understand that all or part of the steps in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a program, and the program is stored in a storage medium, including several instructions to enable a device (which can be a single-chip microcomputer, chip, etc.) or a processor to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.
[0067] Those skilled in the art will appreciate that the above embodiments are specific embodiments for implementing the present invention, and that in actual applications, various changes may be made in form and detail without departing from the spirit and scope of the present invention.
Claims
1. A method for accessing a network, characterized in that: Applicable to media gateways, including: Establish a private media channel between the user end and the target platform; Bind the private media channel to the user public network transmission resources corresponding to the user terminal, and obtain a media link between the user terminal and the target platform, so that the target platform and the user terminal can perform media communication through the media link. The user public network transmission resources are the transmission resources of the local transmission resources of the user terminal after being converted by the network address translation NAT device.
2. The method for accessing a network according to claim 1, characterized in that: The establishing of a private media channel between the user terminal and the target platform includes: Allocating a target private media communication port to the target platform and allocating a user private media communication port to the user terminal; A mapping relationship between the target private media communication port and the user private media communication port is established to form the private media channel.
3. The method for accessing a network according to claim 2, characterized in that: The user public network transmission resource includes: a NAT public network address and a NAT public network media port corresponding to the NAT public network address; The step of binding the private media channel to the user public network transmission resource corresponding to the user terminal to obtain a media link between the user terminal and the target platform so that the target platform and the user terminal perform media communication through the media link includes: The NAT public network media port is bound to the user's private media communication port to form the media link.
4. The method for accessing a network according to claim 3, characterized in that: Before binding the NAT public network media port with the user private media communication port to form the media link, the method further includes: In response to the NAT data packet sent by the user terminal, acquiring the NAT public network address and the NAT public network media port; The NAT public network address and the NAT public network media port are returned to the user terminal.
5. The method for accessing a network according to any one of claims 1 to 4, characterized in that: After binding the private media channel to the user public network transmission resource corresponding to the user terminal and obtaining the media link between the user terminal and the target platform, the method further includes: In response to a data packet transport layer security protocol dtls negotiation request initiated by the user terminal, dtls negotiation is performed with the user terminal.
6. The method for accessing a network according to any one of claims 1 to 4, characterized in that: Before establishing the private media channel between the user terminal and the target platform, the method further includes: In response to the user media negotiation information of the user terminal sent by the signaling gateway, forwarding the user media negotiation information to the target platform; In response to the target media negotiation information sent by the target platform, forwarding the target media negotiation information to the signaling gateway, and the signaling gateway sends the target media negotiation information to the user terminal, so that the user terminal and the target platform complete the media negotiation; The user terminal communicates with the signaling gateway via a browser, or the user terminal communicates with the media gateway via a browser.
7. A method for accessing a network, characterized in that: Applied to a user terminal, the method includes: Running a preset browser to communicate with a signaling gateway through the browser, or the user terminal communicates with a media gateway through the browser; When the media link between the user terminal and the target platform is built, real-time media communication is established through the browser and the idle seats of the target platform. A private media link is established between the user terminal and the target platform. The private media channel is bound to the user public network transmission resources corresponding to the user terminal. The user public network transmission resources are the transmission resources of the local transmission resources of the user terminal after being converted by the network address translation NAT device.
8. A media gateway, characterized in that: include: at least one processor; as well as, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method for accessing a network according to any one of claims 1 to 6.
9. An electronic device, characterized in that: include: at least one processor; as well as, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method for accessing a network according to claim 7.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method for accessing a network described in any one of claims 1 to 6 is implemented, or the method for accessing a network described in claim 7 is implemented.
Citation Information
Patent Citations
Method and device for updating mapping table for tracing
CN106549790A
Method and apparatus for enabling browser to access IMS network, and communication system
CN106656930A
A method and an apparatus for realizing NAT
WO2009121267A1
Method and system for video monitoring system to implement media traversing network address translation
WO2010045834A1
