WO2021248971A1 - Network access method, electronic device, and storage medium - Google Patents

Network access method, electronic device, and storage medium Download PDF

Info

Publication number
WO2021248971A1
WO2021248971A1 PCT/CN2021/081903 CN2021081903W WO2021248971A1 WO 2021248971 A1 WO2021248971 A1 WO 2021248971A1 CN 2021081903 W CN2021081903 W CN 2021081903W WO 2021248971 A1 WO2021248971 A1 WO 2021248971A1
Authority
WO
WIPO (PCT)
Prior art keywords
terminal
address
correspondence
actual
message
Prior art date
Application number
PCT/CN2021/081903
Other languages
French (fr)
Chinese (zh)
Inventor
刘领
卢学锋
Original Assignee
中兴通讯股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2021248971A1 publication Critical patent/WO2021248971A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W8/00Network data management
    • H04W8/26Network addressing or numbering for mobility support
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W48/00Access restriction; Network selection; Access point selection
    • H04W48/16Discovering, processing access restriction or access information

Definitions

  • the embodiments of the present application relate to the field of communication technologies, and in particular, to a network access method, electronic equipment, and storage medium.
  • the purpose of the embodiments of the present application is to provide a network access method, electronic equipment, and storage medium. Through a new network access method, IP resources are saved and provisioning costs are saved.
  • the embodiment of the present application provides a network access method for connecting a terminal to a network to which an application server belongs, including: receiving a first message from the terminal, and determining the first message according to the first message A correspondence relationship; wherein the first correspondence relationship at least indicates the correspondence relationship between the identification information of the terminal and the actual Internet Protocol IP address of the terminal; according to the first correspondence relationship and the preset second correspondence relationship, the third correspondence relationship is determined so that Based on the third correspondence, the terminal and the application server forward the message; where the second correspondence at least indicates the correspondence between the identification information of the terminal and the fixed IP address of the terminal, and the third correspondence at least indicates the actual IP address of the terminal and the terminal’s fixed IP address. Correspondence between fixed IP addresses.
  • the embodiment of the present application also provides an electronic device for connecting the terminal to the network to which the application server belongs, including: a user plane gateway module and an address mapping service module; the user plane gateway module is used to: receive the first message of the terminal , And determine the first correspondence relationship according to the first message; wherein the first correspondence relationship at least indicates the correspondence relationship between the identification information of the terminal and the actual Internet Protocol IP address of the terminal; the address mapping service module is used to: according to the first correspondence relationship , And the preset second correspondence relationship, determine the third correspondence relationship, so that the electronic device forwards the message for the terminal and the application server based on the third correspondence relationship; wherein, the second correspondence relationship at least indicates the identification information of the terminal and the fixed IP of the terminal The correspondence between addresses, and the third correspondence at least indicates the correspondence between the actual IP address of the terminal and the fixed IP address of the terminal.
  • the embodiment of the present application also provides a server, including: at least one processor; The processor executes, so that at least one processor can execute the aforementioned network access method.
  • the embodiment of the present application also provides a computer-readable storage medium that stores a computer program, and the computer program is executed by a processor to implement the above-mentioned network access method.
  • Fig. 1 is a flowchart of a network access method according to the first embodiment of the present application
  • FIG. 2 is a flowchart of a method for setting a fixed IP address of a terminal by an application server in the first embodiment of the present application
  • FIG. 3 is a schematic diagram of the connection relationship between the terminal, the network access device, the electronic device, and the application server in the first embodiment of the present application;
  • Fig. 4 is a schematic diagram of interaction among a terminal, a network access device, an electronic device, and an application server according to the first embodiment of the present application;
  • Fig. 5 is a flowchart of a network access method according to a second embodiment of the present application.
  • Fig. 6 is a schematic diagram of the connection relationship among cameras, eNB/gNB, MEC equipment, 5GC/EPC, and application server in the second embodiment of the present application;
  • FIG. 7 is a schematic diagram of the connection relationship of temperature control 1, temperature control 2, AGV equipment, CPE, eNB/gNB, MEC equipment, 5GC/EPC, application server 1 and application server 2 in the second embodiment of the present application;
  • Fig. 8 is a schematic structural diagram of an electronic device in a third embodiment according to the present application.
  • FIG. 9 is another schematic diagram of the structure of the electronic device in the third embodiment according to the present application.
  • Fig. 10 is a schematic structural diagram of an electronic device in a fourth embodiment according to the present application.
  • the allocation method of the IP address of the terminal in the mobile network cannot meet the requirements for the IP address of the terminal in the enterprise campus scenario.
  • the IP address of the terminal is dynamically allocated by the operator, and generally cannot be fixed.
  • the terminal's IP address will change.
  • CPE Customer Premise Equipment
  • the first embodiment of the present application relates to a network access method for connecting a terminal to a network to which an application server belongs, including: receiving a first message from the terminal, and determining a first correspondence relationship based on the first message; where , The first correspondence relationship at least indicates the correspondence relationship between the identification information of the terminal and the actual Internet Protocol IP address of the terminal; according to the first correspondence relationship and the preset second correspondence relationship, the third correspondence relationship is determined so as to be based on the third correspondence relationship Forward messages for the terminal and the application server; wherein the second correspondence relationship at least indicates the correspondence relationship between the terminal's identification information and the terminal's fixed IP address, and the third correspondence relationship at least indicates the correspondence between the terminal's actual IP address and the terminal's fixed IP address relation.
  • the electronic device can construct the actual IP address of the terminal and the terminal based on the corresponding relationship between the configured terminal identification information and the fixed IP address of the terminal, and the corresponding relationship between the terminal identification information and the terminal's actual IP address
  • the fixed IP address of the terminal can be obtained by mapping based on the actual IP address of the terminal, so that the fixed IP address of the terminal is satisfied by the application server.
  • the network access method does not require the operator to fix the IP address of the terminal, saving IP resources, the application server does not perceive the change of the terminal's IP address, and there is no need to modify the application server, which reduces the activation cost. There is no need to add new equipment, saving startup costs and maintenance costs.
  • the network access method in this embodiment is applied to an electronic device.
  • the electronic device may be a device that connects a terminal to a network to which an application server belongs.
  • it may be a Multi-access Edge Compute (MEC) device.
  • MEC Multi-access Edge Compute
  • Step 101 Receive a first message from a terminal, and determine a first correspondence relationship according to the first message.
  • the first message carries the identification information of the terminal and the actual Internet Protocol (IP) address of the terminal, so that the electronic device can determine the first correspondence based on the information carried in the first message.
  • the first correspondence at least indicates the correspondence between the identification information of the terminal and the actual Internet Protocol IP address of the terminal.
  • the actual IP address refers to the IP address dynamically allocated by the mobile network for the terminal.
  • the identification information of the terminal is information that can uniquely identify the terminal.
  • it can be a mobile subscriber’s international ISDN/PSTN number (Mobile Subscriber International ISDN/PSTN number, MSISDN), and an International Mobile Subscriber identification code (International Mobile Subscriber).
  • IMSI International Mobile Subscriber identification code
  • ID Internet of Things identity
  • the first message may be a message for requesting access to the network to which the application server belongs (referred to as an access message for short), that is, when the terminal needs to access the application server, it first sends an access message to Electronic equipment, so that the electronic equipment can determine the correspondence between the actual IP address of the terminal and the fixed IP address based on the network access method mentioned in this embodiment.
  • the first message is automatically sent by the terminal.
  • the terminal automatically sends the first message to the electronic device after the terminal is powered on, or after the terminal re-establishes a connection with the mobile network, or after every interval of time.
  • the first message can be manually triggered by the user.
  • the terminal provides controls for connecting electronic devices. The user clicks this control when it is determined that it needs to access the application server. After determining that the control is triggered, the terminal sends the first message to the electronic device.
  • the sending timing and sending mode of the first message can be set as required, and this embodiment does not limit it.
  • Step 102 Determine a third correspondence relationship according to the first correspondence relationship and the preset second correspondence relationship, so as to forward packets for the terminal and the application server based on the third correspondence relationship.
  • the second correspondence relationship at least indicates the correspondence relationship between the identification information of the terminal and the fixed IP address of the terminal
  • the third correspondence relationship at least indicates the correspondence relationship between the actual IP address of the terminal and the fixed IP address of the terminal.
  • the electronic device obtains the second correspondence in advance, and generates the third correspondence according to the business scenario.
  • the fixed IP address refers to the IP address of the terminal in the network to which the application server belongs.
  • the fixed IP address is configured by the management network element or the application server, and will not change when the terminal goes offline on the network to which the application server belongs.
  • the content contained in the first correspondence, the second correspondence, and the third correspondence will be illustrated below with examples in combination with different business scenarios.
  • the port number of the service is not limited. For example, if you may access multiple ports such as 8080 and 553, you need to configure the mapping relationship between the terminal's identification information and the fixed IP address.
  • the first correspondence is the correspondence between the identification information of the terminal and the actual IP address of the terminal
  • the second correspondence is the correspondence between the identification information of the terminal and the fixed IP address of the terminal.
  • the electronic device searches for the fixed IP address corresponding to the identification information in the second correspondence relationship according to the identification information of the terminal, thereby establishing the correspondence relationship between the actual IP address of the terminal and the corresponding fixed IP address, that is, the third correspondence relationship.
  • the service of the port of the service needs to be restricted, and the mapping relationship from (terminal identification information + actual port) to (fixed IP address of the terminal + fixed port) needs to be configured.
  • the first correspondence indicates the correspondence between the identification information of the terminal, the actual IP address of the terminal, and the actual port of the terminal;
  • the second correspondence indicates the identification information of the terminal, the actual port of the terminal, and the actual port of the terminal.
  • the third correspondence indicates the correspondence between the actual IP address of the terminal and the fixed IP address of the terminal, and the correspondence between the actual port of the terminal and the fixed port of the terminal.
  • the actual port refers to the port actually used by a certain service of the terminal, and the fixed port is the port allocated for a certain service of the terminal by the network to which the application server belongs.
  • the third correspondence also indicates the correspondence between the actual port of the terminal and the fixed port of the terminal, so that the network access method can be applied to scenarios where service ports need to be limited, so that multiple cameras or other devices can pass through A CPE is connected to the application server, on the premise that the problem of well-known port numbers is solved, the waste of CPE resources is avoided, and the cost is reduced.
  • the first correspondence indicates the correspondence between the identification information of the terminal, the actual IP address of the terminal, and the actual port number of the terminal;
  • the second correspondence indicates the identification information of the terminal, the actual port number of the terminal, The correspondence between the fixed IP address of the terminal and the fixed port number of the terminal;
  • the third correspondence indicates the correspondence between the actual IP address of the terminal and the fixed IP address of the terminal, as well as the actual port number of the terminal and the fixed port of the terminal Correspondence between numbers.
  • the service port is dynamically allocated during the power-on process, and the server will use the terminal's IP address as the verification of the user identification in the uplink and downlink data.
  • the mapping relationship between (terminal identification information + actual port segment) and (terminal fixed IP address + fixed port segment) needs to be configured.
  • the first correspondence indicates the correspondence between the identification information of the terminal, the actual IP address of the terminal, and the actual port segment of the terminal;
  • the second correspondence indicates the identification information of the terminal, the actual port segment of the terminal, and the terminal The corresponding relationship between the fixed IP address of the terminal and the fixed port segment of the terminal;
  • the third correspondence indicates the corresponding relationship between the actual IP address of the terminal and the fixed IP address of the terminal, as well as the actual port segment of the terminal and the fixed port segment of the terminal The corresponding relationship.
  • the second correspondence is set by the management network element of the electronic device.
  • the second correspondence is set by the application server after calling the interface of the electronic device.
  • the electronic device provides an open interface to the application server, so that the application server can set the fixed IP address of the terminal through the interface.
  • the second correspondence can be configured by the application server, which makes the configuration of the second correspondence more convenient.
  • the process of setting the second correspondence relationship by the application server is described below with an example. Specifically, for enterprise campus networks, companies often hope that they can control the fixed IP addresses of terminals. If the fixed IP address of the terminal is still configured through the management network element, it is not convenient for the enterprise.
  • MEC equipment can set the fixed IP address of the terminal to the application server of the enterprise by means of the capability open interface, which is convenient for the enterprise to use.
  • the application server registers in the open interface module of the MEC device in advance to obtain the user name and password.
  • the process of setting the fixed IP address of the terminal by the application server is shown in Figure 2. It includes the following steps:
  • Step 201 The application server invokes the authentication interface provided by the open interface module of the MEC device for user authentication. After the authentication is successful, the application server obtains the token allocated by the open interface module of the MEC device to the application server.
  • the application server is allowed to call the interface after successful authentication to ensure the security of the interface.
  • Step 202 The application server calls the interface provided by the MEC device, sets the second correspondence, and sends the second correspondence and the acquired token to the open interface module of the MEC device.
  • the application server fills in the API interface input parameters, which includes at least identification information and a fixed IP address corresponding to the identification information.
  • the input parameter further includes a fixed port corresponding to the identification information.
  • the entry may also include related information such as device name, service area, and protocol, and no examples are given here.
  • Step 203 The open interface module of the MEC device verifies the data received by the interface.
  • Step 204 If the verification is successful, send the data to the address mapping service for subsequent processing.
  • the data includes at least the mapping relationship between the identification information and the actual IP address.
  • Step 205 The address mapping service module of the MEC device receives the data, and establishes a third correspondence relationship based on the mapping relationship between the identification information and the actual IP address.
  • Step 206 The address mapping service module returns the result to the open interface module.
  • the address mapping service module if the third correspondence setting is successful, the address mapping service module returns information indicating that the configuration is successful to the open interface module, and if the third correspondence setting fails, the address mapping service module returns information indicating that the configuration failed to Open interface module.
  • Step 207 The open interface module returns the result to the application server.
  • the open interface module sends the information returned by the address mapping service module indicating the configuration is successful or the configuration failed to the application server, so that the tester can understand the configuration result.
  • the application server of the enterprise park can conveniently set the fixed IP address of the terminal, eliminating the need for the original operator's lengthy approval process, taking into account data security, and having better serviceability.
  • the electronic device forwards the message to the terminal and the application server based on the third correspondence.
  • the third correspondence is the correspondence between the actual IP address of the terminal and the corresponding fixed IP address.
  • the electronic device receives the second message sent by the terminal, and the second message Includes the actual IP address of the terminal; according to the third correspondence, replaces the actual IP address in the second message with a fixed IP address corresponding to the actual IP address; forwards the replaced second message to the application server; or ,
  • the electronic device receives the third message sent by the application server; according to the third correspondence, replaces the fixed IP address in the third message with the actual IP address corresponding to the fixed IP address; replaces the fixed IP address according to the corresponding actual IP address
  • the subsequent third message is forwarded to the terminal corresponding to the actual IP address corresponding to the fixed IP address in the third message.
  • the third correspondence indicates the correspondence between the actual IP address of the terminal and the fixed IP address of the terminal, and the correspondence between the actual port of the terminal and the fixed port of the terminal.
  • the electronic device receives the information sent by the terminal.
  • the second message includes the actual IP address of the terminal and the actual port of the terminal; according to the third correspondence, the actual IP address in the second message is replaced with a fixed IP address corresponding to the actual IP address , Replace the actual port in the second message with a fixed port corresponding to the actual port; forward the replaced second message to the application server; or, the electronic device receives the third message sent by the application server;
  • Three correspondences replace the fixed IP address in the third message with the actual IP address corresponding to the fixed IP address, and replace the fixed port in the third message with the actual port corresponding to the fixed port; according to the corresponding The actual IP address and the corresponding actual port forward the replaced third message to the corresponding actual port of the terminal corresponding to the corresponding actual IP address.
  • connection relationship between the terminal 301, the network access device 302, the electronic device 303, and the application server 304 is shown in FIG. 3, where the terminal 301 accesses the wireless network through the network access device.
  • the electronic device includes a user plane gateway module, a subscription publishing service module, and an address mapping service module.
  • the user plane gateway module is configured to: receive the first message of the terminal, and determine a first corresponding relationship according to the first message;
  • the subscription publishing service module is configured to: receive the user plane gateway module Determine the first correspondence relationship, and publish the first correspondence relationship to the address mapping service module;
  • the address mapping service module is configured to: according to the first correspondence relationship and a preset second correspondence relationship, The third correspondence is determined, so that the electronic device forwards the message for the terminal and the application server based on the third correspondence.
  • the interaction diagram of the terminal, the network access device, the electronic device, and the application server is shown in Figure 4, including the following steps:
  • Step 401 The terminal accesses the wireless network through the network access device, that is, connects to the user plane gateway.
  • Step 402 The user plane gateway obtains the identification information and the actual IP address of the terminal, and determines the first correspondence.
  • Step 403 The address mapping service module obtains the second correspondence.
  • Step 404 The user plane gateway publishes the first corresponding relationship to the subscription publishing service module.
  • Step 405 The address mapping service module subscribes to the first correspondence from the subscription service publishing module, and the subscription service publishing module sends the first correspondence to the address mapping service module.
  • Step 406 The address mapping service module establishes a correspondence between the actual IP address of the terminal and the fixed IP address of the terminal based on the first correspondence and the second correspondence, that is, the third correspondence.
  • step 403 is set after step 402. In practical applications, step 403 can be executed in any step before step 406, and this embodiment does not limit it.
  • Step 407 The terminal sends an uplink message to the user plane gateway.
  • Step 408 User plane gateway matching rule.
  • the user plane gateway may store preset shunt rules, and the shunt rules include the IP address of the application server.
  • the user plane gateway determines whether the destination IP address of the uplink packet is the same as the IP address of the application server, and if it is determined so, it is considered that the uplink packet conforms to the offloading rule. If it is determined that the destination IP address of the uplink packet is not the IP address of the application server, it is deemed that the uplink packet does not comply with the offloading rule, and no subsequent operations are performed.
  • Step 409 The user plane gateway sends the uplink message to the address mapping service module.
  • Step 410 Based on the third correspondence, the address mapping service module maps the actual IP address in the uplink message to a fixed IP address corresponding to the actual IP address.
  • Step 411 The address mapping service module forwards the mapped uplink message to the application server.
  • Step 412 The application server accesses the terminal based on the fixed IP address and the fixed port.
  • Step 413 The application server sends a downlink message to the address mapping service module.
  • Step 414 The address mapping service module maps the fixed IP address of the terminal in the downlink message to the actual IP address of the terminal based on the third correspondence.
  • Step 415 The address mapping service sends the mapped downlink message to the user plane gateway.
  • Step 416 The user plane gateway sends the mapped downlink message to the terminal.
  • the electronic device replaces the IP address in the message to be forwarded based on the third correspondence, so that the IP of the terminal seen by the application server is fixed, or the IP and port of the terminal are fixed. It can solve the problem of the terminal's real IP address change under the mobile communication network.
  • this embodiment provides a network access method, because the electronic device can be based on the correspondence between the configured terminal identification information and the fixed IP address of the terminal, and the correspondence between the terminal identification information and the actual IP address of the terminal.
  • the relationship between the actual IP address of the terminal and the fixed IP address of the terminal is constructed.
  • the fixed IP address of the terminal can be obtained by mapping based on the actual IP address of the terminal, so as to satisfy The application server requires a fixed IP address of the terminal.
  • the network access method does not require the operator to fix the IP address of the terminal, saving IP resources, the application server does not perceive the change of the terminal's IP address, and there is no need to modify the application server, which reduces the activation cost. There is no need to add new equipment, saving startup costs and maintenance costs.
  • the second embodiment of the present application relates to a network access method.
  • the second embodiment is roughly the same as the first embodiment.
  • the third correspondence is updated according to the updated first correspondence; if it is determined that the second correspondence is updated, according to the updated second correspondence, Update the third correspondence.
  • the third correspondence is automatically updated, which can reduce the workload of operation and maintenance personnel.
  • FIG. 5 An example flow chart of the network access method in this embodiment is shown in FIG. 5, and includes steps 501 to 504, where step 501 and step 502 are substantially the same as step 101 and step 102, respectively, and will not be repeated here. The differences are mainly introduced below:
  • Step 501 Receive the first message of the terminal, and determine the first correspondence relationship according to the first message.
  • Step 502 Determine a third correspondence relationship according to the first correspondence relationship and the preset second correspondence relationship.
  • Step 503 If it is determined that the first correspondence relationship is updated, update the third correspondence relationship according to the updated first correspondence relationship.
  • the actual IP address of the terminal is dynamically allocated by the operator.
  • its actual IP address may change. Therefore, the electronic device can update the third correspondence in time after the actual IP address of the terminal changes.
  • the electronic device receives a fourth message from the terminal, and the fourth message carries at least the identification information of the terminal and the updated actual IP address of the terminal; according to the identification information of the terminal and the updated actual IP address of the terminal, Update the first correspondence.
  • the fourth message may be an access message, that is, the electronic device monitors whether it receives the access message of the terminal.
  • the updated actual IP address of the terminal updates the first corresponding relationship.
  • the fourth message may be a service-related message (referred to as a service message) sent by the terminal, that is, a message interacting with the application server.
  • the electronic device compares the identification information of the terminal and the actual IP address information of the terminal carried in the service message with the first corresponding relationship. If it finds the actual IP of the terminal carried in the service message If the address is different from the actual IP address of the terminal recorded in the first correspondence, it is determined that the actual IP address of the terminal has changed, and the first correspondence is updated based on the service message.
  • Step 504 If it is determined that the second correspondence is updated, update the third correspondence according to the updated second correspondence.
  • the operation and maintenance personnel may need to adjust the fixed IP address of one or more terminals in combination with the application scenario.
  • the electronic device determines that the second corresponding relationship is updated, the third corresponding relationship is updated in time, so that the operation of the operation and maintenance personnel takes effect in time.
  • the camera is connected to the mobile network and the MEC device is used to connect to the application server as an example.
  • the connected terminal is 3 cameras, namely camera 1, camera 2, and camera 3.
  • Camera 1, camera 2, and camera 3 are respectively connected to the 4G base station or 5G base station (eNR/gNB) of the wireless network.
  • eNR/gNB is connected to MEC equipment.
  • the MEC equipment is responsible for the configuration of local shunt rules, user message analysis and dynamic IP mapping.
  • the MEC device is connected to the application server, and forwards messages for the terminal and the application server.
  • 5G core network 5G core, 5GC
  • 4G evolved core network Evolved Packet Core network, EPC
  • EPC evolved Packet Core network
  • camera 1 (601), camera 2 (602), camera 3 (603), eNB/gNB (604), MEC equipment 605, 5GC/EPC (606), and application server 607 is shown in Figure 6.
  • the camera 2 and the camera 3 are respectively inserted into the mobile card, and the related information is shown in Table 1 below.
  • Terminal name Identification information Actual IP address Actual port Camera 1 12300000040 192.168.1.11 554 Camera 2 14500000030 192.168.1.12 554 Camera 3 14500000041 192.168.1.13 554
  • the identification information of each camera may be MSISDN, which is unique in the network.
  • the actual IP address of the camera is allocated by the core network and may change with the state of the terminal. In this scenario, the actual port number 554 of the application message is fixed.
  • the application server needs to configure a fixed IP address for each camera.
  • MEC equipment In order to meet the requirements of the application server, MEC equipment needs to be configured as follows:
  • the business process and data processing process of MEC equipment are as follows:
  • Each camera is connected to the wireless network, and the user plane gateway of the MEC device parses the message to obtain the identification information of each camera, the actual IP address, and the first correspondence between the actual port, that is, the content of Table 1.
  • the user plane gateway of the MEC device publishes the first correspondence to the subscription publishing service module.
  • the user plane gateway perceives the terminal (each camera) status or IP address change, and after the actual IP address changes, it publishes the updated first correspondence.
  • the address mapping service module subscribes to the first correspondence relationship, and combines the pre-configured data (ie, the second correspondence relationship) to associate through identification information to generate the mapping relationship between the actual IP address and the fixed IP address, that is, the first
  • the three correspondences are stored in the address mapping data area.
  • the third correspondence can be stored in the address mapping data area in a table form, as shown in Table 3.
  • the destination address of the message is 10.1.2.3
  • the source address of the message is the actual IP address of camera 1 (192.168.1.11)
  • the port of the message is the actual port of camera 1 (554 ).
  • Camera 1 sends the message to the user plane gateway of the MEC device. Because the target address meets the pre-configured shunt rules, the message needs to be forwarded through the local port, that is, the message is forwarded to the address mapping service module.
  • the address mapping service module searches in the address mapping data area, and the match succeeds, and maps the source address of the message to the fixed IP address of camera 1 (172.167.0.1) .
  • the port is mapped to a fixed port (544), that is, 192.168.1.11:554 is mapped to 172.167.0.1:554, and the message is sent to the application server through the local port of the MEC device.
  • the application server is pre-configured with the fixed IP address of camera 1 and the corresponding application message port (ie, fixed port). After receiving the message from camera 1, it matches the locally configured IP address of camera 1 successfully.
  • the destination address of the message is the fixed IP address of camera 1 (172.167.0.1), and the message port is the fixed port of camera 1 (554).
  • the application server first sends the message to the local port of the MEC device.
  • the address mapping service module of the MEC device converts the fixed IP address to the actual IP address, that is, the target address in the message is converted to the actual IP address of camera 1 (192.168.1.11), and the port is converted to the fixed port of camera 1 (554) , That is, 172.167.0.1:554 is mapped to 192.168.1.11:554.
  • the address mapping service module sends the converted message to the user plane gateway, and then sends it to the camera 1 through the wireless network.
  • the MEC device can update the third correspondence in time to ensure the message quality Send it correctly.
  • the MEC device processing process is as follows:
  • the actual IP address of camera 1 is redistributed, and the user plane gateway of the MEC device obtains the updated actual IP address, that is, the first correspondence has changed as follows.
  • the actual IP address of the terminal with the identification information of 12300000040 is changed from 192.168. 1.11 is converted to 192.168.1.30.
  • the user plane gateway of the MEC device publishes the correspondence between the latest identification information and IP to the subscription publishing service module.
  • the address mapping service subscribes to the first correspondence between the new identification information and the actual IP address, and updates the data area.
  • the destination address of the message is 10.1.2.3
  • the source address of the message is 192.168.1.30
  • the message port is 554.
  • the user plane gateway of the MEC device forwards the message to the address mapping service module.
  • the address mapping service module searches the address mapping data area according to the source address and the message port (192.168.1.30:554), and the match succeeds, maps the source address and port of the message to 172.167.0.1:554, and reports
  • the text is sent to the application server through the local port of the MEC device.
  • the application server is pre-configured with the fixed IP address of the camera 1 and the corresponding fixed port.
  • the edge application server receives the packet sent by camera 1, and it matches the fixed IP address of camera 1 configured locally.
  • the destination address is 172.167.0.1:554, and it is sent to the local port of the MEC device.
  • the address mapping service module of the MEC device converts the fixed IP address to the actual IP address, that is, converts the target address in the message to 192.168.1.11:554, and then sends it to the user plane gateway, and then sends it to the camera 1 through the wireless network.
  • the connected terminal includes AGV equipment, temperature control 1 and temperature control 2, and the available application servers include application server 1 and application server 2.
  • the AGV equipment is connected to the wireless network gNR/eNB, and the temperature control 1 and the temperature control 2 are connected to the wireless network through the CPE.
  • the MEC equipment is responsible for the configuration of local shunt rules, user message analysis, and dynamic IP mapping.
  • the core network 5GC/EPC is a standard network element for wireless terminal access, and will not be repeated here.
  • Temperature control 1 (701), temperature control 2 (702), AGV equipment 703, CPE (704), eNB/gNB (705), MEC equipment 706, 5GC/EPC (707), application server 1 (708) and application server
  • the connection relationship of 2(709) is shown in Figure 7.
  • the relevant information of AGV equipment, temperature control 1 and temperature control 2 are shown in Table 4.
  • Temperature control 1 15500000030 10.10.10.1 800-900 Temperature control 2 15500000030 10.10.10.1 1000-1100
  • the identification information may be an Internet of Things ID, which is unique in the network.
  • the actual IP address of the AGV device can be allocated by the core network, and the actual port number cannot be fixed, and there may be multiple ports.
  • Temperature control 1 and temperature control 2 are connected to the wireless network through the CPE.
  • the IP address of the CPE is allocated by the core network and the address will change.
  • the small network IP addresses (actual IP addresses) of temperature control 1 and temperature control 2 are configured by the CPE, and the service ports (ie actual ports) of temperature control 1 and temperature control 2 are dynamically allocated within the range of 100-200.
  • CPE maps the business of temperature control 1 to the port segment of 800-900 and the business of temperature control 2 to the port segment of 1000-1100 through port mapping.
  • Application server 1 needs to actively access the AGV equipment, and needs a fixed IP address, and the port range is not limited.
  • Application server 2 needs to actively access temperature control 1 and temperature control 2.
  • the two devices correspond to different fixed IP addresses, and the port range is 100-200.
  • MEC In order to meet the requirements of the application server, MEC needs to be configured:
  • the API interface or management network element configure a fixed IP address and fixed port for each AGV device, temperature control 1 and temperature control 2, and associate it with the identification information of the AGV device, temperature control 1 and temperature control 2, namely configuration
  • the second correspondence indicates the correspondence between the identification information, the fixed IP address, and the fixed port, as shown in Table 5.
  • the business process and data processing process of MEC equipment are as follows:
  • Terminals are connected to the wireless network, and the user plane gateway of the MEC equipment obtains the identification information of each terminal, the actual IP address and the first of the actual port by parsing the message.
  • the user plane gateway of the MEC equipment obtains the identification information of each terminal, the actual IP address and the first of the actual port by parsing the message.
  • the user plane gateway of the MEC device publishes the first correspondence to the subscription publishing service module.
  • the user plane gateway perceives the status of each terminal or the change of the actual IP address, and after the actual IP address changes, publishes the updated first correspondence.
  • the address mapping service module subscribes to the first correspondence relationship, and combines the pre-configured data (ie the second correspondence relationship) to associate through identification information to generate the mapping relationship between the actual IP address and the fixed IP address, and the actual port
  • the mapping relationship with the fixed port that is, the third corresponding relationship, is stored in the address mapping data area.
  • the third correspondence relationship may be stored in the address mapping data area in the form of a table, as shown in Table 6.
  • the message processing process of the AGV device is as follows:
  • the destination address of the message is the IP address of application server 1 (10.99.2.3), and the source address of the message is the actual IP address of the AGV device (10.10.9.1).
  • the AGV device sends the message to the user plane gateway of the MEC device, and the user plane gateway determines that it meets the pre-configured offloading rules, and forwards the message through the local port. Forward the message to the address mapping service module.
  • the address mapping service module searches the address mapping data area according to the source address (10.10.9.1), and the match succeeds, maps the source address of the message to the fixed IP address of the AGV device (172.167.0.1), and passes the message through the MEC
  • the local port of the device is sent to the edge application server 1.
  • the application server 1 is pre-configured with the fixed IP address of the AGV device. After receiving the AGV message, it matches the locally configured IP address successfully.
  • the destination address is the fixed IP address (172.167.0.1) of the AGV device, and the port is not limited.
  • the application server 1 first sends the message to the local port of the MEC device.
  • the address mapping service module of the MEC device converts the fixed IP address to the actual IP address, that is, converts the target address in the message to 10.10.9.1, and then sends the converted message to the user plane gateway, and then sends it to the user plane through the wireless network.
  • AGV equipment converts the fixed IP address to the actual IP address, that is, converts the target address in the message to 10.10.9.1, and then sends the converted message to the user plane gateway, and then sends it to the user plane through the wireless network.
  • temperature control 1 Taking temperature control 1 as an example, the processing of temperature control messages is as follows:
  • the destination address of the message is the IP address of application server 2 (10.99.2.5)
  • the source address of the message is the actual IP address of temperature control 1 (10.10.10.1)
  • the port is Any value within the range of actual port (800-900) of temperature control 1.
  • the temperature control 1 sends the message to the user plane gateway of the MEC device.
  • the user plane gateway determines that the message meets the pre-configured shunt rules, and forwards the message through the local port, that is, forwards the message to the address mapping service module.
  • the address mapping service module searches the address mapping data area according to the source address (10.10.10.1) and port (any value within 800-900, such as 801), and the match is successful, and the source address of the message is mapped to temperature control 1
  • the fixed IP address (172.167.0.2)
  • the source port is mapped to the fixed port of temperature control 1 (any value within 100-200, such as 101)
  • the message is sent to the application server 2 through the local port of the MEC device.
  • Application server 2 receives the message of temperature control 1 and performs verification, which is consistent with the fixed IP address of temperature control 1, and the match is successful.
  • the destination address is the fixed IP address of the temperature control 1 (172.167.0.2), and the port is the fixed port of the temperature control 1 (such as 101).
  • the application server sends the message to the local port of the MEC device.
  • the address mapping service module of the MEC device converts the fixed IP address to the actual IP address, that is, the target address in the message is converted to the actual IP address of temperature control 1 (10.10.10.1), and the destination port is mapped to the fixed port of temperature control 1 (801), that is, 172.167.0.2:101 is mapped to 10.10.10.1:801.
  • the address mapping service module sends the converted message to the user plane gateway, and then sends it to the CPE through the wireless network, and the CPE finally sends it to the temperature control 1 device through port mapping.
  • temperature control 2 is similar to that of temperature control 1, and can refer to the related description of temperature control 1 to understand the message transmission and reception between temperature control 2 and application server 2.
  • the MEC equipment needs to be updated in time. Corresponding relationship, the message can be sent correctly, and the application server does not perceive the process.
  • the processing flow of the MEC device is similar to the processing flow of the MEC device when the actual IP address of the camera changes in the first example. Do not repeat it here.
  • this embodiment provides a network access method, because the electronic device can be based on the correspondence between the configured terminal identification information and the fixed IP address of the terminal, and the correspondence between the terminal identification information and the actual IP address of the terminal.
  • the relationship between the actual IP address of the terminal and the fixed IP address of the terminal is constructed.
  • the fixed IP address of the terminal can be obtained by mapping based on the actual IP address of the terminal, so as to satisfy The application server requires a fixed IP address of the terminal.
  • the network access method does not require the operator to fix the IP address of the terminal, saving IP resources, the application server does not perceive the change of the terminal's IP address, and there is no need to modify the application server, which reduces the activation cost. There is no need to add new equipment, which saves startup and maintenance costs.
  • the third correspondence is updated in time, so that the operations of the operation and maintenance personnel can take effect in time.
  • the third embodiment of this application relates to an electronic device, as shown in FIG.
  • the user plane gateway module 801 is configured to: receive the first message of the terminal, and determine the first correspondence according to the first message; wherein the first correspondence at least indicates the identification information of the terminal and the actual Internet Protocol IP address of the terminal Correspondence.
  • the address mapping service module 802 is configured to: determine a third correspondence relationship according to the first correspondence relationship and the preset second correspondence relationship, so that the electronic device forwards the message for the terminal and the application server based on the third correspondence relationship;
  • the correspondence relationship at least indicates the correspondence relationship between the identification information of the terminal and the fixed IP address of the terminal, and the third correspondence relationship at least indicates the correspondence relationship between the actual IP address of the terminal and the fixed IP address of the terminal.
  • the electronic device further includes: a subscription publishing service module; the subscription publishing service module is used to: receive the first correspondence determined by the user plane gateway module, and publish the first correspondence to the address mapping service module.
  • the electronic device further includes: an open interface module; the open interface module is used to: provide an interface for the application server, so that the application server sets the second correspondence on the electronic device through the interface.
  • the electronic device includes: a user plane gateway module 801, an address mapping service module 802, a subscription publishing service module 803, and an open interface module 804.
  • a user plane gateway module 801 For the function of each module, please refer to the relevant description above, which will not be repeated here.
  • this embodiment is a device embodiment corresponding to the first or second embodiment, and this embodiment can be implemented in cooperation with the first or second embodiment.
  • the related technical details mentioned in the first or second embodiment are still valid in this embodiment, and in order to reduce repetition, they will not be repeated here.
  • the related technical details mentioned in this embodiment can also be applied in the first or second embodiment.
  • modules involved in this embodiment are all logical modules.
  • a logical unit can be a physical unit, a part of a physical unit, or multiple physical units. The combination of units is realized.
  • the present embodiment does not introduce a unit that is not closely related to solving the technical problem proposed by the present application, but this does not indicate that there are no other units in the present embodiment.
  • the fourth embodiment of the present application relates to a server. As shown in FIG. 10, it includes: at least one processor 901; and a memory 902 communicatively connected with the at least one processor 901; The instructions executed by the processor 901 are executed by the at least one processor 901, so that the at least one processor 901 can execute the above-mentioned electronic seal application method.
  • the memory and the processor are connected in a bus mode
  • the bus may include any number of interconnected buses and bridges, and the bus connects one or more processors and various circuits of the memory together.
  • the bus can also connect various other circuits such as peripheral devices, voltage regulators, power management circuits, etc., which are all known in the art, and therefore, no further description will be given herein.
  • the bus interface provides an interface between the bus and the transceiver.
  • the transceiver may be one element or multiple elements, such as multiple receivers and transmitters, providing a unit for communicating with various other devices on the transmission medium.
  • the data processed by the processor is transmitted on the wireless medium through the antenna, and further, the antenna also receives the data and transmits the data to the processor.
  • the processor is responsible for managing the bus and general processing. It can also provide various functions, including timing, peripheral interfaces, voltage regulation, power management, and other control functions.
  • the memory can be used to store data used by the processor when performing operations.
  • the fifth embodiment of the present application relates to a computer-readable storage medium storing a computer program.
  • the computer program is executed by the processor, the above method embodiment is realized.
  • the program is stored in a storage medium and includes several instructions to enable a device ( It may be a single-chip microcomputer, a chip, etc.) or a processor (processor) that executes all or part of the steps of the methods described in the embodiments of the present application.
  • the aforementioned storage media include: U disk, mobile hard disk, Read-Only Memory (ROM, Read-Only Memory), Random Access Memory (RAM, Random Access Memory), magnetic disks or optical disks and other media that can store program codes.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Databases & Information Systems (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

Embodiments of the present application relate to the technical field of communications. Disclosed are a network access method, an electronic device, and a storage medium. In some embodiments of the present application, the network access method is used for a terminal to access a network to which an application server belongs, and comprises: receiving a first packet of a terminal, and determining a first correspondence according to the first packet, wherein the first correspondence at least indicates the correspondence between identification information of the terminal and an actual Internet protocol (IP) address of the terminal; and determining a third correspondence according to the first correspondence and a preset second correspondence, so as to forward the packet for the terminal and the application server on the basis of the third correspondence, wherein the second correspondence at least indicates the correspondence between the identification information of the terminal and a fixed IP address of the terminal, and the third correspondence at least indicates the correspondence between the actual IP address of the terminal and the fixed IP address of the terminal.

Description

网络接入方法、电子设备及存储介质Network access method, electronic equipment and storage medium
相关申请的交叉引用Cross-references to related applications
本申请基于申请号为202010535779.2、申请日为2020年06月12日的中国专利申请提出,并要求该中国专利申请的优先权,该中国专利申请的全部内容在此以引入方式并入本申请。This application is filed based on a Chinese patent application whose application number is 202010535779. 2, and the filing date is June 12, 2020, and claims the priority of the Chinese patent application. The entire content of the Chinese patent application is hereby incorporated into this application by way of introduction.
技术领域Technical field
本申请实施例涉及通信技术领域,特别涉及一种网络接入方法、电子设备及存储介质。The embodiments of the present application relate to the field of communication technologies, and in particular, to a network access method, electronic equipment, and storage medium.
背景技术Background technique
随着5G技术的蓬勃发展以及边缘计算的广泛应用,移动通信技术和工业的结合越来越深入。通过多接入边缘计算技术,打造企业园区专网的需求变得越来越强烈。目前,企业园区场景中,终端通常采用有线、企业专网、WIFI等技术接入到企业服务器,网络接入制式多,维护非常的复杂。企业迫切需要一种能够接入网络,并能够实现原有的业务需求的接入方法。With the vigorous development of 5G technology and the widespread application of edge computing, the combination of mobile communication technology and industry is getting deeper and deeper. Through multi-access edge computing technology, the demand for building a private network for enterprise campuses has become stronger and stronger. At present, in the enterprise park scenario, the terminal usually uses wired, enterprise private network, WIFI and other technologies to connect to the enterprise server. There are many network access modes and maintenance is very complicated. Enterprises urgently need an access method that can access the network and fulfill the original business requirements.
发明内容Summary of the invention
本申请实施例的目的在于提供一种网络接入方法、电子设备及存储介质,通过新的网络接入方法,节省了IP资源,节省了开通成本。The purpose of the embodiments of the present application is to provide a network access method, electronic equipment, and storage medium. Through a new network access method, IP resources are saved and provisioning costs are saved.
为解决上述技术问题,本申请的实施例提供了一种网络接入方法,用于将终端接入应用服务器所属网络,包括:接收终端的第一报文,并根据第一报文,确定第一对应关系;其中,第一对应关系至少指示终端的标识信息和终端的实际互联网协议IP地址的对应关系;根据第一对应关系,以及预先设置的第二对应关系,确定第三对应关系,以便基于第三对应关系为终端和应用服务器转发 报文;其中,第二对应关系至少指示终端的标识信息和终端的固定IP地址的对应关系,第三对应关系至少指示终端的实际IP地址和终端的固定IP地址的对应关系。In order to solve the above technical problem, the embodiment of the present application provides a network access method for connecting a terminal to a network to which an application server belongs, including: receiving a first message from the terminal, and determining the first message according to the first message A correspondence relationship; wherein the first correspondence relationship at least indicates the correspondence relationship between the identification information of the terminal and the actual Internet Protocol IP address of the terminal; according to the first correspondence relationship and the preset second correspondence relationship, the third correspondence relationship is determined so that Based on the third correspondence, the terminal and the application server forward the message; where the second correspondence at least indicates the correspondence between the identification information of the terminal and the fixed IP address of the terminal, and the third correspondence at least indicates the actual IP address of the terminal and the terminal’s fixed IP address. Correspondence between fixed IP addresses.
本申请的实施例还提供了一种电子设备,用于将终端接入应用服务器所属网络,包括:用户面网关模块和地址映射服务模块;用户面网关模块用于:接收终端的第一报文,并根据第一报文,确定第一对应关系;其中,第一对应关系至少指示终端的标识信息和终端的实际互联网协议IP地址的对应关系;地址映射服务模块用于:根据第一对应关系,以及预先设置的第二对应关系,确定第三对应关系,以便电子设备基于第三对应关系为终端和应用服务器转发报文;其中,第二对应关系至少指示终端的标识信息和终端的固定IP地址的对应关系,第三对应关系至少指示终端的实际IP地址和终端的固定IP地址的对应关系。The embodiment of the present application also provides an electronic device for connecting the terminal to the network to which the application server belongs, including: a user plane gateway module and an address mapping service module; the user plane gateway module is used to: receive the first message of the terminal , And determine the first correspondence relationship according to the first message; wherein the first correspondence relationship at least indicates the correspondence relationship between the identification information of the terminal and the actual Internet Protocol IP address of the terminal; the address mapping service module is used to: according to the first correspondence relationship , And the preset second correspondence relationship, determine the third correspondence relationship, so that the electronic device forwards the message for the terminal and the application server based on the third correspondence relationship; wherein, the second correspondence relationship at least indicates the identification information of the terminal and the fixed IP of the terminal The correspondence between addresses, and the third correspondence at least indicates the correspondence between the actual IP address of the terminal and the fixed IP address of the terminal.
本申请的实施例还提供了一种服务器,包括:至少一个处理器;以及,与至少一个处理器通信连接的存储器;其中,存储器存储有可被至少一个处理器执行的指令,指令被至少一个处理器执行,以使至少一个处理器能够执行上述的网络接入方法。The embodiment of the present application also provides a server, including: at least one processor; The processor executes, so that at least one processor can execute the aforementioned network access method.
本申请的实施例还提供了一种计算机可读存储介质,存储有计算机程序,计算机程序被处理器执行时实现上述的网络接入方法。The embodiment of the present application also provides a computer-readable storage medium that stores a computer program, and the computer program is executed by a processor to implement the above-mentioned network access method.
附图说明Description of the drawings
一个或多个实施例通过与之对应的附图中的图片进行示例性说明,这些示例性说明并不构成对实施例的限定。One or more embodiments are exemplified by the pictures in the corresponding drawings, and these exemplified descriptions do not constitute a limitation on the embodiments.
图1是根据本申请的第一实施例中的网络接入方法流程图;Fig. 1 is a flowchart of a network access method according to the first embodiment of the present application;
图2是根据本申请的第一实施例中的应用服务器设置终端的固定IP地址的方法流程图;2 is a flowchart of a method for setting a fixed IP address of a terminal by an application server in the first embodiment of the present application;
图3是根据本申请的第一实施例中的终端、网络接入设备、电子设备和应用服务器的连接关系的示意图;3 is a schematic diagram of the connection relationship between the terminal, the network access device, the electronic device, and the application server in the first embodiment of the present application;
图4是根据本申请的第一实施例中的终端、网络接入设备、电子设备和应 用服务器的交互示意图;Fig. 4 is a schematic diagram of interaction among a terminal, a network access device, an electronic device, and an application server according to the first embodiment of the present application;
图5是根据本申请的第二实施例中的网络接入方法流程图;Fig. 5 is a flowchart of a network access method according to a second embodiment of the present application;
图6是根据本申请的第二实施例中的各摄像头、eNB/gNB、MEC设备、5GC/EPC和应用服务器的连接关系的示意图;Fig. 6 is a schematic diagram of the connection relationship among cameras, eNB/gNB, MEC equipment, 5GC/EPC, and application server in the second embodiment of the present application;
图7是根据本申请的第二实施方式中的温控1、温控2、AGV设备、CPE、eNB/gNB、MEC设备、5GC/EPC、应用服务器1和应用服务器2的连接关系的示意图;7 is a schematic diagram of the connection relationship of temperature control 1, temperature control 2, AGV equipment, CPE, eNB/gNB, MEC equipment, 5GC/EPC, application server 1 and application server 2 in the second embodiment of the present application;
图8是根据本申请的第三实施例中的电子设备的结构示意图;Fig. 8 is a schematic structural diagram of an electronic device in a third embodiment according to the present application;
图9是根据本申请的第三实施例中的电子设备的另一结构示意图;FIG. 9 is another schematic diagram of the structure of the electronic device in the third embodiment according to the present application;
图10是根据本申请的第四实施例中的电子设备的结构示意图。Fig. 10 is a schematic structural diagram of an electronic device in a fourth embodiment according to the present application.
具体实施方式detailed description
为使本申请实施例的目的、技术方案和优点更加清楚,下面将结合附图对本申请的各实施例进行详细的阐述。然而,本领域的普通技术人员可以理解,在本申请各实施例中,为了使读者更好地理解本申请而提出了许多技术细节。但是,即使没有这些技术细节和基于以下各实施例的种种变化和修改,也可以实现本申请所要求保护的技术方案。以下各个实施例的划分是为了描述方便,不应对本申请的具体实现方式构成任何限定,各个实施例在不矛盾的前提下可以相互结合相互引用。In order to make the objectives, technical solutions, and advantages of the embodiments of the present application clearer, the various embodiments of the present application will be described in detail below in conjunction with the accompanying drawings. However, a person of ordinary skill in the art can understand that in each embodiment of the present application, many technical details are proposed for 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 solution claimed in this application can be realized. The following division of the various embodiments is for convenience of description, and should not constitute any limitation on the specific implementation manner of the present application, and the various embodiments may be combined with each other without contradiction.
采用4G LTE(Long Term Evolution,长期演进)或5G NR(New Radio,新空口)无线接入技术,结合多接入边缘计算(Multi-access Edge Compute,MEC)就是一个非常好的选择。然而,移动网络中终端的IP地址的分配方式无法满足企业园区场景对终端的IP地址的要求。具体的说,移动网络中,终端的IP地址由运营商进行动态分配,一般是不能固定的。移动网络中,终端下线或发生其他情况时,终端的IP地址会发生变化。而对于企业园区,对终端的IP地址和业务端口是有要求的。例如,企业园区的业务比较复杂,有很多场景是由服务端发起,有些业务要求终端的IP地址固定,有些业务要求终端的IP地址和端口都固定。还有些业务把终端的IP地址作为设备标识进行校验,如果终端IP 地址不固定,业务将无法进行。又如,企业园区的知名端口号问题。如摄像头接入场景,服务端拉流场景等,这些场景要求每个终端都使用固定的IP地址和端口号和服务端进行通信。如果多个摄像头通过客户前置设备(Customer Premise Equipment,CPE)接入企业园区的网络,端口号会发生变化,这样服务端无法按照知名端口号访问各个摄像头进行拉流。Using 4G LTE (Long Term Evolution) or 5G NR (New Radio) wireless access technology, combined with Multi-access Edge Computing (MEC) is a very good choice. However, the allocation method of the IP address of the terminal in the mobile network cannot meet the requirements for the IP address of the terminal in the enterprise campus scenario. Specifically, in the mobile network, the IP address of the terminal is dynamically allocated by the operator, and generally cannot be fixed. In the mobile network, when the terminal goes offline or other situations occur, the terminal's IP address will change. For enterprise parks, there are requirements for terminal IP addresses and service ports. For example, the business of an enterprise park is more complicated. Many scenarios are initiated by the server. Some businesses require a fixed IP address of the terminal, and some businesses require both the IP address and port of the terminal to be fixed. There are also services that use the terminal's IP address as the device identification for verification. If the terminal's IP address is not fixed, the service will not be possible. Another example is the problem of well-known port numbers in enterprise parks. For example, camera access scenarios, server streaming scenarios, etc., these scenarios require each terminal to use a fixed IP address and port number to communicate with the server. If multiple cameras are connected to the network of the corporate campus through Customer Premise Equipment (CPE), the port number will change, so that the server cannot access each camera according to the well-known port number for streaming.
为了满足企业园区场景下对IP地址的要求,通常采用的方法如下:In order to meet the requirements for IP addresses in the enterprise campus scenario, the usual methods are as follows:
(1)为终端分配固定IP地址。然而,由于终端数量很多,该方案对于运营商来说是IP资源的浪费,且每次企业增加终端,都需要运营商针对次用户规定IP地址。因此该方案一般行不通。(1) Assign a fixed IP address to the terminal. However, due to the large number of terminals, this solution is a waste of IP resources for operators, and every time an enterprise adds terminals, the operator needs to specify IP addresses for secondary users. Therefore, this scheme generally does not work.
(2)在终端和园区服务器间打通层二隧道方式。然而,该方式需要新增特定交换设备,增加了开通成本。(2) Open up a layer two tunnel mode between the terminal and the park server. However, this method requires the addition of specific switching equipment, which increases the cost of activation.
本申请的第一实施例涉及一种网络接入方法,用于将终端接入应用服务器所属网络,包括:接收终端的第一报文,并根据第一报文,确定第一对应关系;其中,第一对应关系至少指示终端的标识信息和终端的实际互联网协议IP地址的对应关系;根据第一对应关系,以及预先设置的第二对应关系,确定第三对应关系,以便基于第三对应关系为终端和应用服务器转发报文;其中,第二对应关系至少指示终端的标识信息和终端的固定IP地址的对应关系,第三对应关系至少指示终端的实际IP地址和终端的固定IP地址的对应关系。该实施例中,由于电子设备可以基于已配置的终端的标识信息和终端的固定IP地址的对应关系,以及终端的标识信息和终端的实际IP地址的对应关系,构建终端的实际IP地址和终端的固定IP地址的对应关系,电子设备在将终端的报文发送至应用服务器时,可以基于终端的实际IP地址,映射得到终端的固定IP地址,使得满足应用服务器对终端的IP地址固定的这一要求。此外,该网络接入方法无需运营商固定终端的IP地址,节省了IP资源,应用服务器不感知终端的IP地址的变化,无需对应用服务器进行改造,减少了开通成本。不需要增加新的设备,节省了开通成本和维护成本。The first embodiment of the present application relates to a network access method for connecting a terminal to a network to which an application server belongs, including: receiving a first message from the terminal, and determining a first correspondence relationship based on the first message; where , The first correspondence relationship at least indicates the correspondence relationship between the identification information of the terminal and the actual Internet Protocol IP address of the terminal; according to the first correspondence relationship and the preset second correspondence relationship, the third correspondence relationship is determined so as to be based on the third correspondence relationship Forward messages for the terminal and the application server; wherein the second correspondence relationship at least indicates the correspondence relationship between the terminal's identification information and the terminal's fixed IP address, and the third correspondence relationship at least indicates the correspondence between the terminal's actual IP address and the terminal's fixed IP address relation. In this embodiment, since the electronic device can construct the actual IP address of the terminal and the terminal based on the corresponding relationship between the configured terminal identification information and the fixed IP address of the terminal, and the corresponding relationship between the terminal identification information and the terminal's actual IP address When the electronic device sends the message of the terminal to the application server, the fixed IP address of the terminal can be obtained by mapping based on the actual IP address of the terminal, so that the fixed IP address of the terminal is satisfied by the application server. One requirement. In addition, the network access method does not require the operator to fix the IP address of the terminal, saving IP resources, the application server does not perceive the change of the terminal's IP address, and there is no need to modify the application server, which reduces the activation cost. There is no need to add new equipment, saving startup costs and maintenance costs.
下面对本实施例的网络接入方法的实现细节进行说明,以下内容仅为方便理解而提供的实现细节,并非实施本方案的必须。The following describes the implementation details of the network access method of this embodiment. The following content is provided only for ease of understanding and is not necessary for implementing this solution.
本实施例中的网络接入方法应用于电子设备,该电子设备可以是将终端接 入应用服务器所属网络的设备,例如,可以是多接入边缘计算(Multi-access Edge Compute,MEC)设备。本实施例的具体流程如图1所示,具体包括以下步骤:The network access method in this embodiment is applied to an electronic device. The electronic device may be a device that connects a terminal to a network to which an application server belongs. For example, it may be a Multi-access Edge Compute (MEC) device. The specific process of this embodiment is shown in Figure 1, and specifically includes the following steps:
步骤101:接收终端的第一报文,并根据第一报文,确定第一对应关系。Step 101: Receive a first message from a terminal, and determine a first correspondence relationship according to the first message.
具体的说,第一报文中携带有终端的标识信息和终端的实际互联网协议(Internet Protocol,IP)地址,以供电子设备基于第一报文携带的信息,确定第一对应关系。第一对应关系至少指示终端的标识信息和终端的实际互联网协议IP地址的对应关系。其中,实际IP地址是指由移动网络为终端动态分配的IP地址。Specifically, the first message carries the identification information of the terminal and the actual Internet Protocol (IP) address of the terminal, so that the electronic device can determine the first correspondence based on the information carried in the first message. The first correspondence at least indicates the correspondence between the identification information of the terminal and the actual Internet Protocol IP address of the terminal. Among them, the actual IP address refers to the IP address dynamically allocated by the mobile network for the terminal.
需要说明的是,终端的标识信息是可以唯一标识该终端的信息,例如,可以是移动用户国际ISDN/PSTN号码(Mobile Subscriber International ISDN/PSTN number,MSISDN),国际移动用户识别码(International Mobile Subscriber Identity,IMSI),物联网身份标识(Identity Document,ID)等,此处不做限定。It should be noted that the identification information of the terminal is information that can uniquely identify the terminal. For example, it can be a mobile subscriber’s international ISDN/PSTN number (Mobile Subscriber International ISDN/PSTN number, MSISDN), and an International Mobile Subscriber identification code (International Mobile Subscriber). Identity, IMSI), Internet of Things identity (Identity Document, ID), etc., are not limited here.
在一个例子中,第一报文可以是用于请求接入应用服务器所属网络的报文(简称为接入报文),即终端在需要接入应用服务器时,先发一个接入报文至电子设备,以便电子设备基于本实施方式提及的网络接入方法,确定该终端的实际IP地址和固定IP地址的对应关系。In an example, the first message may be a message for requesting access to the network to which the application server belongs (referred to as an access message for short), that is, when the terminal needs to access the application server, it first sends an access message to Electronic equipment, so that the electronic equipment can determine the correspondence between the actual IP address of the terminal and the fixed IP address based on the network access method mentioned in this embodiment.
在一个例子中,第一报文由终端自动发送。例如,终端根据预设的网络连接规则,在终端开机后,或者,在终端与移动网络重新建立连接后,或者,每间隔一端时间后,终端自动发送第一报文至该电子设备。In an example, the first message is automatically sent by the terminal. For example, according to a preset network connection rule, the terminal automatically sends the first message to the electronic device after the terminal is powered on, or after the terminal re-establishes a connection with the mobile network, or after every interval of time.
在另一个例子中,第一报文可以由用户手动触发。例如,终端提供连接电子设备的控件。用户在确定需要接入应用服务器时,点击该控件。终端在确定该控件被触发后,发送第一报文至电子设备。In another example, the first message can be manually triggered by the user. For example, the terminal provides controls for connecting electronic devices. The user clicks this control when it is determined that it needs to access the application server. After determining that the control is triggered, the terminal sends the first message to the electronic device.
需要说明的是,本领域技术人员可以理解,在实际应用中,第一报文的发送时机和发送方式可以根据需要设置,本实施方式不做限制。It should be noted that those skilled in the art can understand that in practical applications, the sending timing and sending mode of the first message can be set as required, and this embodiment does not limit it.
步骤102:根据第一对应关系,以及预先设置的第二对应关系,确定第三对应关系,以便基于第三对应关系为终端和应用服务器转发报文。Step 102: Determine a third correspondence relationship according to the first correspondence relationship and the preset second correspondence relationship, so as to forward packets for the terminal and the application server based on the third correspondence relationship.
在一个实施例中,第二对应关系至少指示终端的标识信息和终端的固定IP地址的对应关系,第三对应关系至少指示终端的实际IP地址和终端的固定IP地址的对应关系。电子设备预先获取了第二对应关系,根据业务场景,生成第 三对应关系。其中,固定IP地址是指终端在应用服务器所属网络中的IP地址。一般情况下,固定IP地址由管理网元或应用服务器配置,不会因为终端在应用服务器所属网络下线而改变。In one embodiment, the second correspondence relationship at least indicates the correspondence relationship between the identification information of the terminal and the fixed IP address of the terminal, and the third correspondence relationship at least indicates the correspondence relationship between the actual IP address of the terminal and the fixed IP address of the terminal. The electronic device obtains the second correspondence in advance, and generates the third correspondence according to the business scenario. Among them, the fixed IP address refers to the IP address of the terminal in the network to which the application server belongs. Generally, the fixed IP address is configured by the management network element or the application server, and will not change when the terminal goes offline on the network to which the application server belongs.
以下结合不同业务场景,对第一对应关系、第二对应关系和第三对应关系所包含的内容进行举例说明。The content contained in the first correspondence, the second correspondence, and the third correspondence will be illustrated below with examples in combination with different business scenarios.
对于应用服务端访问终端,不限定业务的端口号的业务,比如可能会访问8080和553等多个端口,则需要配置终端的标识信息和固定IP地址的映射关系。该业务场景下,第一对应关系为终端的标识信息和终端的实际IP地址的对应关系,第二对应关系为终端的标识信息和终端的固定IP地址的对应关系。电子设备根据终端的标识信息,在第二对应关系查找与该标识信息对应的固定IP地址,从而建立终端的实际IP地址和对应的固定IP地址的对应关系,即第三对应关系。For applications that access the terminal on the application server, the port number of the service is not limited. For example, if you may access multiple ports such as 8080 and 553, you need to configure the mapping relationship between the terminal's identification information and the fixed IP address. In this business scenario, the first correspondence is the correspondence between the identification information of the terminal and the actual IP address of the terminal, and the second correspondence is the correspondence between the identification information of the terminal and the fixed IP address of the terminal. The electronic device searches for the fixed IP address corresponding to the identification information in the second correspondence relationship according to the identification information of the terminal, thereby establishing the correspondence relationship between the actual IP address of the terminal and the corresponding fixed IP address, that is, the third correspondence relationship.
对于应用服务器访问终端,需要限制业务的端口的业务,需要配置(终端的标识信息+实际端口)到(终端的固定IP地址+固定端口)的映射关系。该业务场景下,第一对应关系指示终端的标识信息、终端的实际IP地址和终端的实际端口三者之间的对应关系;第二对应关系指示终端的标识信息、终端的实际端口、终端的固定IP地址和终端的固定端口四者之间的对应关系;第三对应关系指示终端的实际IP地址和终端的固定IP地址的对应关系,以及终端的实际端口和终端的固定端口的对应关系。其中,实际端口是指终端的某一业务实际使用的端口,固定端口是应用服务器所属网络为该终端的某一业务分配的端口。For the application server to access the terminal, the service of the port of the service needs to be restricted, and the mapping relationship from (terminal identification information + actual port) to (fixed IP address of the terminal + fixed port) needs to be configured. In this business scenario, the first correspondence indicates the correspondence between the identification information of the terminal, the actual IP address of the terminal, and the actual port of the terminal; the second correspondence indicates the identification information of the terminal, the actual port of the terminal, and the actual port of the terminal. The correspondence between the fixed IP address and the fixed port of the terminal; the third correspondence indicates the correspondence between the actual IP address of the terminal and the fixed IP address of the terminal, and the correspondence between the actual port of the terminal and the fixed port of the terminal. Wherein, the actual port refers to the port actually used by a certain service of the terminal, and the fixed port is the port allocated for a certain service of the terminal by the network to which the application server belongs.
值得一提的是,第三对应关系还指示终端的实际端口和终端的固定端口的对应关系,使得该网络接入方法可以应用于需要限定业务端口的场景,使得多个摄像头或其他设备可以通过一个CPE接入应用服务器,在解决了知名端口号的问题的前提下,避免了CPE资源的浪费,降低了成本。It is worth mentioning that the third correspondence also indicates the correspondence between the actual port of the terminal and the fixed port of the terminal, so that the network access method can be applied to scenarios where service ports need to be limited, so that multiple cameras or other devices can pass through A CPE is connected to the application server, on the premise that the problem of well-known port numbers is solved, the waste of CPE resources is avoided, and the cost is reduced.
例如,对于服务端访问终端,需要指定终端的IP地址和端口号的情况的业务,需要配置(终端的标识信息+实际端口号)到(终端的固定IP地址+固定端口号)的映射关系。该业务场景下,第一对应关系指示终端的标识信息、终端的实际IP地址和终端的实际端口号三者之间的对应关系;第二对应关系指示终端的标识信息、终端的实际端口号、终端的固定IP地址和终端的固定端口号四 者之间的对应关系;第三对应关系指示终端的实际IP地址和终端的固定IP地址的对应关系,以及终端的实际端口号和终端的固定端口号的对应关系。For example, for a service that needs to specify the IP address and port number of the terminal when the server accesses the terminal, a mapping relationship from (terminal identification information + actual port number) to (fixed IP address of the terminal + fixed port number) needs to be configured. In this business scenario, the first correspondence indicates the correspondence between the identification information of the terminal, the actual IP address of the terminal, and the actual port number of the terminal; the second correspondence indicates the identification information of the terminal, the actual port number of the terminal, The correspondence between the fixed IP address of the terminal and the fixed port number of the terminal; the third correspondence indicates the correspondence between the actual IP address of the terminal and the fixed IP address of the terminal, as well as the actual port number of the terminal and the fixed port of the terminal Correspondence between numbers.
又如,对于终端上驻留的业务,业务的端口是在上电过程中动态分配的,服务端会把终端的IP地址作为上下行数据中用户标识的校验。当多个终端通过CPE接入到无线网络,需要配置(终端标识信息+实际端口段)和(终端的固定IP地址+固定端口段)的映射关系。该情况下,第一对应关系指示终端的标识信息、终端的实际IP地址和终端的实际端口段三者之间的对应关系;第二对应关系指示终端的标识信息、终端的实际端口段、终端的固定IP地址和终端的固定端口段四者之间的对应关系;第三对应关系指示终端的实际IP地址和终端的固定IP地址的对应关系,以及终端的实际端口段和终端的固定端口段的对应关系。For another example, for the services that reside on the terminal, the service port is dynamically allocated during the power-on process, and the server will use the terminal's IP address as the verification of the user identification in the uplink and downlink data. When multiple terminals access the wireless network through the CPE, the mapping relationship between (terminal identification information + actual port segment) and (terminal fixed IP address + fixed port segment) needs to be configured. In this case, the first correspondence indicates the correspondence between the identification information of the terminal, the actual IP address of the terminal, and the actual port segment of the terminal; the second correspondence indicates the identification information of the terminal, the actual port segment of the terminal, and the terminal The corresponding relationship between the fixed IP address of the terminal and the fixed port segment of the terminal; the third correspondence indicates the corresponding relationship between the actual IP address of the terminal and the fixed IP address of the terminal, as well as the actual port segment of the terminal and the fixed port segment of the terminal The corresponding relationship.
以下对第二对应关系的配置方式进行举例说明。The configuration method of the second correspondence is described below with an example.
在一个例子中,第二对应关系由电子设备的管理网元设置。In an example, the second correspondence is set by the management network element of the electronic device.
在另一个例子中,第二对应关系由应用服务器在调用电子设备的接口后设置。具体的说,电子设备提供开放的接口给应用服务器,以便应用服务器通过该接口设置终端的固定IP地址。In another example, the second correspondence is set by the application server after calling the interface of the electronic device. Specifically, the electronic device provides an open interface to the application server, so that the application server can set the fixed IP address of the terminal through the interface.
值得一提的是,第二对应关系可以通过应用服务器配置,使得第二对应关系的配置更为便利。It is worth mentioning that the second correspondence can be configured by the application server, which makes the configuration of the second correspondence more convenient.
以下对应用服务器设置第二对应关系的过程进行举例说明。具体地,对于企业园区网络,企业往往希望自己可以管控终端的固定IP地址。如果终端的固定IP地址仍然通过管理网元配置,对于企业来说不太方便。MEC设备作为边缘计算平台,可以将终端的固定IP地址的设置功能,通过能力开放接口的方式,给企业的应用服务器调用,方便企业使用。当终端的固定IP地址的设置功能通过接口(API)开放时,应用服务器预先在MEC设备的开放接口模块注册,获取用户名和密码,应用服务器设置终端的固定IP地址的过程如图2所示,包括以下步骤:The process of setting the second correspondence relationship by the application server is described below with an example. Specifically, for enterprise campus networks, companies often hope that they can control the fixed IP addresses of terminals. If the fixed IP address of the terminal is still configured through the management network element, it is not convenient for the enterprise. As an edge computing platform, MEC equipment can set the fixed IP address of the terminal to the application server of the enterprise by means of the capability open interface, which is convenient for the enterprise to use. When the fixed IP address setting function of the terminal is opened through the interface (API), the application server registers in the open interface module of the MEC device in advance to obtain the user name and password. The process of setting the fixed IP address of the terminal by the application server is shown in Figure 2. It includes the following steps:
步骤201:应用服务器调用MEC设备的开放接口模块提供的鉴权接口做用户鉴权,鉴权成功后,应用服务器获取MEC设备的开放接口模块为应用服务器分配的令牌(token)。Step 201: The application server invokes the authentication interface provided by the open interface module of the MEC device for user authentication. After the authentication is successful, the application server obtains the token allocated by the open interface module of the MEC device to the application server.
值得一提的是,应用服务器鉴权成功后被允许应用服务器调用接口,保障接口的安全性。It is worth mentioning that the application server is allowed to call the interface after successful authentication to ensure the security of the interface.
步骤202:应用服务器调用MEC设备提供的接口,设置第二对应关系,将第二对应关系和获取的token,发送到MEC设备的开放接口模块。Step 202: The application server calls the interface provided by the MEC device, sets the second correspondence, and sends the second correspondence and the acquired token to the open interface module of the MEC device.
在一个实施方式中,应用服务器填写API接口入参,至少包括:标识信息和与标识信息对应的固定IP地址。在一个实施方式中,入参还包括标识信息对应的固定端口。In one embodiment, the application server fills in the API interface input parameters, which includes at least identification information and a fixed IP address corresponding to the identification information. In one embodiment, the input parameter further includes a fixed port corresponding to the identification information.
需要说明的时,本领域技术人员可以理解,入参还可以包括设备名称、服务区域和协议等相关信息,此处不一一举例。When it needs to be clarified, those skilled in the art can understand that the entry may also include related information such as device name, service area, and protocol, and no examples are given here.
步骤203:MEC设备的开放接口模块对接口接收到的数据进行校验。Step 203: The open interface module of the MEC device verifies the data received by the interface.
步骤204:若校验成功,将该数据发送给地址映射服务进行后续处理。其中,该数据至少包括标识信息和实际IP地址的映射关系。Step 204: If the verification is successful, send the data to the address mapping service for subsequent processing. Wherein, the data includes at least the mapping relationship between the identification information and the actual IP address.
步骤205:MEC设备的地址映射服务模块接收数据,基于标识信息和实际IP地址的映射关系,建立第三对应关系。Step 205: The address mapping service module of the MEC device receives the data, and establishes a third correspondence relationship based on the mapping relationship between the identification information and the actual IP address.
步骤206:地址映射服务模块返回结果给开放接口模块。Step 206: The address mapping service module returns the result to the open interface module.
在一示例性实施例中,若第三对应关系设置成功,地址映射服务模块返回指示配置成功的信息至开放接口模块,若第三对应关系设置失败,地址映射服务模块返回指示配置失败的信息至开放接口模块。In an exemplary embodiment, if the third correspondence setting is successful, the address mapping service module returns information indicating that the configuration is successful to the open interface module, and if the third correspondence setting fails, the address mapping service module returns information indicating that the configuration failed to Open interface module.
步骤207:开放接口模块返回结果给应用服务器。Step 207: The open interface module returns the result to the application server.
在一示例性实施例中,开放接口模块将地址映射服务模块返回指示配置成功或配置失败的信息发送至应用服务器,以便测试人员了解配置结果。In an exemplary embodiment, the open interface module sends the information returned by the address mapping service module indicating the configuration is successful or the configuration failed to the application server, so that the tester can understand the configuration result.
通过上述流程,企业园区的应用过服务器可以方便的进行终端的固定IP地址的设置,不在需要原有运营商冗长的审批流程,同时兼顾了数据安全性,具有较好的可服务性。Through the above process, the application server of the enterprise park can conveniently set the fixed IP address of the terminal, eliminating the need for the original operator's lengthy approval process, taking into account data security, and having better serviceability.
在一个实施例中,在根据第一对应关系,以及预先设置的第二对应关系,确定第三对应关系之后,电子设备基于第三对应关系,为终端和应用服务器转发报文。在一个示例中,对于不限制业务的端口号的业务,第三对应关系为终端的实际IP地址和对应的固定IP地址的对应关系,电子设备接收终端发送的第二报文,第二报文中包括终端的实际IP地址;根据第三对应关系,将第二报 文中的实际IP地址替换为与实际IP地址对应的固定IP地址;将替换后的第二报文转发至应用服务器;或者,电子设备接收应用服务器发送的第三报文;根据第三对应关系,将第三报文中的固定IP地址替换为与固定IP地址对应的实际IP地址;根据对应的实际IP地址,将替换后的第三报文转发至与第三报文中的固定IP地址对应的实际IP地址所对应的终端。对于需要限制业务的端口号的业务,第三对应关系指示终端的实际IP地址和终端的固定IP地址的对应关系,以及终端的实际端口和终端的固定端口的对应关系,电子设备接收终端发送的第二报文,第二报文中包括终端的实际IP地址和终端的实际端口;根据第三对应关系,将第二报文中的实际IP地址替换为与该实际IP地址对应的固定IP地址,将第二报文中的实际端口替换为与该实际端口对应的固定端口;将替换后的第二报文转发至应用服务器;或者,电子设备接收应用服务器发送的第三报文;根据第三对应关系,将第三报文中的固定IP地址替换为与该固定IP地址对应的实际IP地址,将第三报文中的固定端口替换为与该固定端口对应的实际端口;根据对应的实际IP地址和对应的实际端口,将替换后的第三报文转发至与对应的实际IP地址对应的终端的对应的实际端口。In one embodiment, after the third correspondence is determined according to the first correspondence and the preset second correspondence, the electronic device forwards the message to the terminal and the application server based on the third correspondence. In an example, for services that do not limit the port number of the service, the third correspondence is the correspondence between the actual IP address of the terminal and the corresponding fixed IP address. The electronic device receives the second message sent by the terminal, and the second message Includes the actual IP address of the terminal; according to the third correspondence, replaces the actual IP address in the second message with a fixed IP address corresponding to the actual IP address; forwards the replaced second message to the application server; or , The electronic device receives the third message sent by the application server; according to the third correspondence, replaces the fixed IP address in the third message with the actual IP address corresponding to the fixed IP address; replaces the fixed IP address according to the corresponding actual IP address The subsequent third message is forwarded to the terminal corresponding to the actual IP address corresponding to the fixed IP address in the third message. For services that need to limit the port number of the service, the third correspondence indicates the correspondence between the actual IP address of the terminal and the fixed IP address of the terminal, and the correspondence between the actual port of the terminal and the fixed port of the terminal. The electronic device receives the information sent by the terminal. The second message, the second message includes the actual IP address of the terminal and the actual port of the terminal; according to the third correspondence, the actual IP address in the second message is replaced with a fixed IP address corresponding to the actual IP address , Replace the actual port in the second message with a fixed port corresponding to the actual port; forward the replaced second message to the application server; or, the electronic device receives the third message sent by the application server; Three correspondences: replace the fixed IP address in the third message with the actual IP address corresponding to the fixed IP address, and replace the fixed port in the third message with the actual port corresponding to the fixed port; according to the corresponding The actual IP address and the corresponding actual port forward the replaced third message to the corresponding actual port of the terminal corresponding to the corresponding actual IP address.
在一个示例中,终端301、网络接入设备302、电子设备303和应用服务器304的连接关系如图3所示,其中,终端301通过网络接入设备接入到无线网络中。电子设备包括用户面网关模块、订阅发布服务模块和地址映射服务模块。所述用户面网关模块用于:接收所述终端的第一报文,并根据所述第一报文,确定第一对应关系;所述订阅发布服务模块用于:接收所述用户面网关模块确定的第一对应关系,并将所述第一对应关系发布至所述地址映射服务模块;所述地址映射服务模块用于:根据所述第一对应关系,以及预先设置的第二对应关系,确定第三对应关系,以便所述电子设备基于所述第三对应关系为所述终端和应用服务器转发报文。终端、网络接入设备、电子设备和应用服务器的交互示意图如图4所示,包括以下步骤:In an example, the connection relationship between the terminal 301, the network access device 302, the electronic device 303, and the application server 304 is shown in FIG. 3, where the terminal 301 accesses the wireless network through the network access device. The electronic device includes a user plane gateway module, a subscription publishing service module, and an address mapping service module. The user plane gateway module is configured to: receive the first message of the terminal, and determine a first corresponding relationship according to the first message; the subscription publishing service module is configured to: receive the user plane gateway module Determine the first correspondence relationship, and publish the first correspondence relationship to the address mapping service module; the address mapping service module is configured to: according to the first correspondence relationship and a preset second correspondence relationship, The third correspondence is determined, so that the electronic device forwards the message for the terminal and the application server based on the third correspondence. The interaction diagram of the terminal, the network access device, the electronic device, and the application server is shown in Figure 4, including the following steps:
步骤401:终端通过网络接入设备接入无线网络,即与用户面网关连接。Step 401: The terminal accesses the wireless network through the network access device, that is, connects to the user plane gateway.
步骤402:用户面网关获取终端的标识信息和实际IP地址,确定第一对应关系。Step 402: The user plane gateway obtains the identification information and the actual IP address of the terminal, and determines the first correspondence.
步骤403:地址映射服务模块获取第二对应关系。Step 403: The address mapping service module obtains the second correspondence.
步骤404:用户面网关发布第一对应关系至订阅发布服务模块。Step 404: The user plane gateway publishes the first corresponding relationship to the subscription publishing service module.
步骤405:地址映射服务模块从订阅服务发布模块订阅第一对应关系,订阅服务发布模块将第一对应关系发至地址映射服务模块。Step 405: The address mapping service module subscribes to the first correspondence from the subscription service publishing module, and the subscription service publishing module sends the first correspondence to the address mapping service module.
步骤406:地址映射服务模块基于第一对应关系和第二对应关系,建立终端的实际IP地址和终端的固定IP地址的对应关系,即第三对应关系。Step 406: The address mapping service module establishes a correspondence between the actual IP address of the terminal and the fixed IP address of the terminal based on the first correspondence and the second correspondence, that is, the third correspondence.
需要说明的是,本实施方式中,为阐述清楚,将步骤403设置在步骤402之后,实际应用中,步骤403可以在步骤406之前的任意步骤执行,本实施例不做限制。It should be noted that in this embodiment, for clarity of explanation, step 403 is set after step 402. In practical applications, step 403 can be executed in any step before step 406, and this embodiment does not limit it.
步骤407:终端发送上行报文至用户面网关。Step 407: The terminal sends an uplink message to the user plane gateway.
步骤408:用户面网关匹配规则。在一个示例中,用户面网关中可以存储预设的分流规则,分流规则中包括应用服务器的IP地址。用户面网关确定上行报文的目标IP地址是否为与应用服务器的IP地址,若确定是,则认为该上行报文符合分流规则。如果确定上行报文的目标IP地址不是与应用服务器的IP地址,认为该上行报文不符合分流规则,不进行后续操作。Step 408: User plane gateway matching rule. In an example, the user plane gateway may store preset shunt rules, and the shunt rules include the IP address of the application server. The user plane gateway determines whether the destination IP address of the uplink packet is the same as the IP address of the application server, and if it is determined so, it is considered that the uplink packet conforms to the offloading rule. If it is determined that the destination IP address of the uplink packet is not the IP address of the application server, it is deemed that the uplink packet does not comply with the offloading rule, and no subsequent operations are performed.
步骤409:用户面网关将上行报文发送至地址映射服务模块。Step 409: The user plane gateway sends the uplink message to the address mapping service module.
步骤410:地址映射服务模块基于第三对应关系,将上行报文中的实际IP地址映射为与该实际IP地址对应的固定IP地址。Step 410: Based on the third correspondence, the address mapping service module maps the actual IP address in the uplink message to a fixed IP address corresponding to the actual IP address.
步骤411:地址映射服务模块将映射后的上行报文转发至应用服务器。Step 411: The address mapping service module forwards the mapped uplink message to the application server.
步骤412:应用服务器基于固定IP地址和固定端口访问终端。Step 412: The application server accesses the terminal based on the fixed IP address and the fixed port.
步骤413:应用服务器发送下行报文至地址映射服务模块。Step 413: The application server sends a downlink message to the address mapping service module.
步骤414:地址映射服务模块基于第三对应关系,将下行报文中终端的固定IP地址映射为终端的实际IP地址。Step 414: The address mapping service module maps the fixed IP address of the terminal in the downlink message to the actual IP address of the terminal based on the third correspondence.
步骤415:地址映射服务将映射后的下行报文发送至用户面网关。Step 415: The address mapping service sends the mapped downlink message to the user plane gateway.
步骤416:用户面网关将映射后的下行报文发送至终端。Step 416: The user plane gateway sends the mapped downlink message to the terminal.
值得一提的是,电子设备基于第三对应关系,对待转发的报文中的IP地址进行替换,使得应用服务器看到的终端的IP固定不变,或者,终端的IP和端口固定不变,可以解决移动通讯网络下,终端的真实IP地址变化的问题。It is worth mentioning that the electronic device replaces the IP address in the message to be forwarded based on the third correspondence, so that the IP of the terminal seen by the application server is fixed, or the IP and port of the terminal are fixed. It can solve the problem of the terminal's real IP address change under the mobile communication network.
由此,本实施例提供了一种网络接入方法,由于电子设备可以基于已配置的终端的标识信息和终端的固定IP地址的对应关系,以及终端的标识信息和终 端的实际IP地址的对应关系,构建终端的实际IP地址和终端的固定IP地址的对应关系,电子设备在将终端的报文发送至应用服务器时,可以基于终端的实际IP地址,映射得到终端的固定IP地址,使得满足应用服务器对终端的IP地址固定的这一要求。此外,该网络接入方法无需运营商固定终端的IP地址,节省了IP资源,应用服务器不感知终端的IP地址的变化,无需对应用服务器进行改造,减少了开通成本。不需要增加新的设备,节省了开通成本和维护成本。Therefore, this embodiment provides a network access method, because the electronic device can be based on the correspondence between the configured terminal identification information and the fixed IP address of the terminal, and the correspondence between the terminal identification information and the actual IP address of the terminal. The relationship between the actual IP address of the terminal and the fixed IP address of the terminal is constructed. When the electronic device sends the message of the terminal to the application server, the fixed IP address of the terminal can be obtained by mapping based on the actual IP address of the terminal, so as to satisfy The application server requires a fixed IP address of the terminal. In addition, the network access method does not require the operator to fix the IP address of the terminal, saving IP resources, the application server does not perceive the change of the terminal's IP address, and there is no need to modify the application server, which reduces the activation cost. There is no need to add new equipment, saving startup costs and maintenance costs.
本申请的第二实施例涉及一种网络接入方法,第二实施例与第一实施例大致相同,在本实施例中,在根据第一对应关系,以及预先设置的第二对应关系,确定第三对应关系后,电子设备若确定第一对应关系被更新,根据更新后的第一对应关系,更新第三对应关系;若确定第二对应关系被更新,根据更新后的第二对应关系,更新第三对应关系。该实施例中,自动更新第三对应关系,可以减少运维人员的工作量。The second embodiment of the present application relates to a network access method. The second embodiment is roughly the same as the first embodiment. In this embodiment, according to the first correspondence and the preset second correspondence, it is determined After the third correspondence, if the electronic device determines that the first correspondence is updated, the third correspondence is updated according to the updated first correspondence; if it is determined that the second correspondence is updated, according to the updated second correspondence, Update the third correspondence. In this embodiment, the third correspondence is automatically updated, which can reduce the workload of operation and maintenance personnel.
本实施例中的网络接入方法的示例流程图如图5所示,包括步骤501至步骤504,其中,步骤501和步骤502分别与步骤101和步骤102大致相同,此处不再赘述。下面主要介绍不同之处:An example flow chart of the network access method in this embodiment is shown in FIG. 5, and includes steps 501 to 504, where step 501 and step 502 are substantially the same as step 101 and step 102, respectively, and will not be repeated here. The differences are mainly introduced below:
步骤501:接收终端的第一报文,并根据第一报文,确定第一对应关系。Step 501: Receive the first message of the terminal, and determine the first correspondence relationship according to the first message.
步骤502:根据第一对应关系,以及预先设置的第二对应关系,确定第三对应关系。Step 502: Determine a third correspondence relationship according to the first correspondence relationship and the preset second correspondence relationship.
步骤503:若确定第一对应关系被更新,根据更新后的第一对应关系,更新第三对应关系。Step 503: If it is determined that the first correspondence relationship is updated, update the third correspondence relationship according to the updated first correspondence relationship.
在一个示例中,终端的实际IP地址是运营商动态分配的,当终端下线时,其实际IP地址可能会发生变化。因此,电子设备可以在终端的实际IP地址变化后,及时更新第三对应关系。In an example, the actual IP address of the terminal is dynamically allocated by the operator. When the terminal goes offline, its actual IP address may change. Therefore, the electronic device can update the third correspondence in time after the actual IP address of the terminal changes.
在一个例子中,电子设备接收终端的第四报文,第四报文中至少携带有终端的标识信息和终端更新后的实际IP地址;根据终端的标识信息和终端更新后的实际IP地址,更新第一对应关系。其中,第四报文可以是接入报文,即电子设备监控是否接收到终端的接入报文,若接收到接入报文,则根据该接入报文中携带的终端的标识信息和终端更新后的实际IP地址,更新第一对应关系。第四报文可以是终端发送的与业务相关的报文(简称业务报文),即与应用服务器 交互的报文。电子设备针对终端发送的每个业务报文,将业务报文中携带的终端的标识信息和终端的实际IP地址信息与第一对应关系进行比较,若发现业务报文中携带的终端的实际IP地址,与第一对应关系中记录的终端的实际IP地址不同,则确定终端的实际IP地址发生了变化,基于该业务报文,更新第一对应关系。In an example, the electronic device receives a fourth message from the terminal, and the fourth message carries at least the identification information of the terminal and the updated actual IP address of the terminal; according to the identification information of the terminal and the updated actual IP address of the terminal, Update the first correspondence. Among them, the fourth message may be an access message, that is, the electronic device monitors whether it receives the access message of the terminal. The updated actual IP address of the terminal updates the first corresponding relationship. The fourth message may be a service-related message (referred to as a service message) sent by the terminal, that is, a message interacting with the application server. For each service message sent by the terminal, the electronic device compares the identification information of the terminal and the actual IP address information of the terminal carried in the service message with the first corresponding relationship. If it finds the actual IP of the terminal carried in the service message If the address is different from the actual IP address of the terminal recorded in the first correspondence, it is determined that the actual IP address of the terminal has changed, and the first correspondence is updated based on the service message.
步骤504:若确定第二对应关系被更新,根据更新后的第二对应关系,更新第三对应关系。Step 504: If it is determined that the second correspondence is updated, update the third correspondence according to the updated second correspondence.
在一个示例中,应用过程中,运维人员可能需要结合应用场景,对某个或多个终端的固定IP地址进行调整。当电子设备确定第二对应关系被更新后,及时更新第三对应关系,以便运维人员的操作及时生效。In an example, during the application process, the operation and maintenance personnel may need to adjust the fixed IP address of one or more terminals in combination with the application scenario. When the electronic device determines that the second corresponding relationship is updated, the third corresponding relationship is updated in time, so that the operation of the operation and maintenance personnel takes effect in time.
以下结合各种场景,对本实施例提及的网络接入方法的实施过程进行举例说明。The following describes the implementation process of the network access method mentioned in this embodiment with examples in combination with various scenarios.
在一个例子中,以摄像头接入到移动网络,通过MEC设备对接应用服务器为例进行举例说明。假设,接入的终端为3个摄像头,分别为摄像头1、摄像头2和摄像头3。摄像头1、摄像头2和摄像头3分别接入到无线网络的4G基站或5G基站(eNR/gNB)中。eNR/gNB与MEC设备连接。MEC设备负责本地分流规则配置,用户报文解析和动态IP映射。MEC设备与应用服务器连接,为终端和应用服务器转发报文。5G核心网(5G core,5GC)/4G演进核心网(Evolved Packet Core network,EPC)是无线终端接入的标准网元,在此处不做赘述。摄像头1(601)、摄像头2(602)、摄像头3(603)、eNB/gNB(604)、MEC设备605、5GC/EPC(606)和应用服务器607的连接关系如图6所示摄像头1、摄像头2和摄像头3分别***移动卡,其相关信息如下表1所示。In an example, the camera is connected to the mobile network and the MEC device is used to connect to the application server as an example. Assume that the connected terminal is 3 cameras, namely camera 1, camera 2, and camera 3. Camera 1, camera 2, and camera 3 are respectively connected to the 4G base station or 5G base station (eNR/gNB) of the wireless network. eNR/gNB is connected to MEC equipment. The MEC equipment is responsible for the configuration of local shunt rules, user message analysis and dynamic IP mapping. The MEC device is connected to the application server, and forwards messages for the terminal and the application server. 5G core network (5G core, 5GC)/4G evolved core network (Evolved Packet Core network, EPC) is a standard network element for wireless terminal access, and will not be described here. The connection relationship between camera 1 (601), camera 2 (602), camera 3 (603), eNB/gNB (604), MEC equipment 605, 5GC/EPC (606), and application server 607 is shown in Figure 6. The camera 2 and the camera 3 are respectively inserted into the mobile card, and the related information is shown in Table 1 below.
表1Table 1
终端名称Terminal name 标识信息Identification information 实际IP地址Actual IP address 实际端口Actual port
摄像头1Camera 1 1230000004012300000040 192.168.1.11192.168.1.11 554554
摄像头2Camera 2 1450000003014500000030 192.168.1.12192.168.1.12 554554
摄像头3Camera 3 1450000004114500000041 192.168.1.13192.168.1.13 554554
其中,各摄像头的标识信息可以是MSISDN,该标识在网络中唯一。摄像头的实际IP地址由核心网进行分配,可能会随着终端的状态变化。在此场景中, 应用报文的实际端口号554固定。Wherein, the identification information of each camera may be MSISDN, which is unique in the network. The actual IP address of the camera is allocated by the core network and may change with the state of the terminal. In this scenario, the actual port number 554 of the application message is fixed.
假设,针对该应用场景,有如下要求:Suppose, for this application scenario, there are the following requirements:
(1)应用服务器需要给每个摄像头配置固定的IP地址。(1) The application server needs to configure a fixed IP address for each camera.
(2)应用服务器要求报文收发的端口号为554。(2) The application server requires that the port number for sending and receiving messages is 554.
为了满足应用服务器的要求,MEC设备需要如下配置:In order to meet the requirements of the application server, MEC equipment needs to be configured as follows:
(1)通过API接口或管理网元,给每个摄像头配置固定IP地址和固定端口,并将摄像头的固定IP地址、固定端口和标识信息(该例中为唯一标识MSISDN)关联,即确定摄像头的固定IP地址、固定端口和标识信息三者的第二对应关系,如表2所示。(1) Through the API interface or management network element, configure a fixed IP address and fixed port for each camera, and associate the fixed IP address, fixed port and identification information (in this example, the unique identification MSISDN) of the camera, that is, determine the camera Table 2 shows the second correspondence between the fixed IP address, fixed port, and identification information of.
表2Table 2
标识信息Identification information 实际端口Actual port 固定IP地址Fixed IP address 固定端口Fixed port 协议protocol
1230000004012300000040 554554 172.167.0.1172.167.0.1 554554 TCPTCP
1450000003014500000030 554554 172.167.0.2172.167.0.2 554554 TCPTCP
1450000004114500000041 554554 172.167.0.3172.167.0.3 554554 TCPTCP
(2)配置访问应用服务器的分流规则,按照目的地址10.1.2.3进行分流。(2) Configure the distribution rules for accessing the application server, and perform distribution according to the destination address 10.1.2.3.
MEC设备的业务流程及数据处理过程如下:The business process and data processing process of MEC equipment are as follows:
(1)各摄像头接入到无线网络,MEC设备的用户面网关通过解析报文,获取到各摄像头的标识信息、实际IP地址及实际端口的第一对应关系,即表1内容。(1) Each camera is connected to the wireless network, and the user plane gateway of the MEC device parses the message to obtain the identification information of each camera, the actual IP address, and the first correspondence between the actual port, that is, the content of Table 1.
(2)MEC设备的用户面网关将第一对应关系发布给订阅发布服务模块。用户面网关感知终端(各摄像头)状态或IP地址变化,并在实际IP地址变化后,将更新后的第一对应关系发布出去。(2) The user plane gateway of the MEC device publishes the first correspondence to the subscription publishing service module. The user plane gateway perceives the terminal (each camera) status or IP address change, and after the actual IP address changes, it publishes the updated first correspondence.
(3)地址映射服务模块订阅到了第一对应关系,并结合预先配置的数据(即第二对应关系),通过标识信息进行关联,生成实际IP地址和固定IP地址之间的映射关系,即第三对应关系,并存储在地址映射数据区中。第三对应关系可以以表格形式存储于地址映射数据区,如表3所示。(3) The address mapping service module subscribes to the first correspondence relationship, and combines the pre-configured data (ie, the second correspondence relationship) to associate through identification information to generate the mapping relationship between the actual IP address and the fixed IP address, that is, the first The three correspondences are stored in the address mapping data area. The third correspondence can be stored in the address mapping data area in a table form, as shown in Table 3.
表3table 3
标识信息Identification information 实际IP地址Actual IP address 实际端口Actual port 固定IP地址Fixed IP address 固定端口Fixed port 协议protocol
1230000004012300000040 192.168.1.11192.168.1.11 554554 172.167.0.1172.167.0.1 554554 TCPTCP
1450000003014500000030 192.168.1.12192.168.1.12 554554 172.167.0.2172.167.0.2 554554 TCPTCP
1450000004114500000041 192.168.1.13192.168.1.13 554554 172.167.0.3172.167.0.3 554554 TCPTCP
当摄像头1发起对应用服务的访问时,报文的目的地址为10.1.2.3,报文的源地址为摄像头1的实际IP地址(192.168.1.11),报文端口为摄像头1的实际端口(554)。摄像头1将报文发送至MEC设备的用户面网关,因为目标地址满足预先配置的分流规则,需要将报文通过本地口进行转发,即将报文转发给地址映射服务模块。地址映射服务模块基于源地址和报文端口(192.168.1.11:554),在地址映射数据区中查找,匹配成功,将该报文的源地址映射成摄像头1的固定IP地址(172.167.0.1),端口映射成固定端口(544),即192.168.1.11:554映射成172.167.0.1:554,并将报文通过MEC设备的本地口发送给应用服务器。应用服务器预先配置了摄像头1的固定IP地址和对应的应用报文端口(即固定端口),在接收到摄像头1的报文后,和本地配置的摄像头1的IP地址匹配成功。When camera 1 initiates access to the application service, the destination address of the message is 10.1.2.3, the source address of the message is the actual IP address of camera 1 (192.168.1.11), and the port of the message is the actual port of camera 1 (554 ). Camera 1 sends the message to the user plane gateway of the MEC device. Because the target address meets the pre-configured shunt rules, the message needs to be forwarded through the local port, that is, the message is forwarded to the address mapping service module. Based on the source address and message port (192.168.1.11:554), the address mapping service module searches in the address mapping data area, and the match succeeds, and maps the source address of the message to the fixed IP address of camera 1 (172.167.0.1) , The port is mapped to a fixed port (544), that is, 192.168.1.11:554 is mapped to 172.167.0.1:554, and the message is sent to the application server through the local port of the MEC device. The application server is pre-configured with the fixed IP address of camera 1 and the corresponding application message port (ie, fixed port). After receiving the message from camera 1, it matches the locally configured IP address of camera 1 successfully.
当应用服务器发送报文给摄像头1时,报文的目的地址为摄像头1的固定IP地址(172.167.0.1),报文端口为摄像头1的固定端口(554)。应用服务器先将该报文发给MEC设备的本地口。MEC设备的地址映射服务模块进行固定IP地址到实际IP地址的转换,即将报文中的目标地址转换成摄像头1的实际IP地址(192.168.1.11),端口转换为摄像头1的固定端口(554),即将172.167.0.1:554映射为192.168.1.11:554。地址映射服务模块将转换后的报文发送给用户面网关,进而通过无线网络发给摄像头1。When the application server sends a message to camera 1, the destination address of the message is the fixed IP address of camera 1 (172.167.0.1), and the message port is the fixed port of camera 1 (554). The application server first sends the message to the local port of the MEC device. The address mapping service module of the MEC device converts the fixed IP address to the actual IP address, that is, the target address in the message is converted to the actual IP address of camera 1 (192.168.1.11), and the port is converted to the fixed port of camera 1 (554) , That is, 172.167.0.1:554 is mapped to 192.168.1.11:554. The address mapping service module sends the converted message to the user plane gateway, and then sends it to the camera 1 through the wireless network.
由于移动用户终端的IP地址可能会发生变化,当终端IP地址发生变化时,通过本实施例提及的更新第三对应关系的方法,MEC设备可以及时更新第三对应关系,以保证报文的正确发送。在一个示例中,当摄像头1的实际IP地址从192.168.1.11变为192.168.1.30时,MEC设备处理过程如下:Since the IP address of the mobile user terminal may change, when the terminal IP address changes, through the method of updating the third correspondence mentioned in this embodiment, the MEC device can update the third correspondence in time to ensure the message quality Send it correctly. In an example, when the actual IP address of camera 1 changes from 192.168.1.11 to 192.168.1.30, the MEC device processing process is as follows:
(1)摄像头1的实际IP地址重新分配,MEC设备的用户面网关获取到更新后的实际IP地址,即第一对应关系发生了如下变化,标识信息为12300000040的终端的实际IP地址从192.168.1.11转化为192.168.1.30。(1) The actual IP address of camera 1 is redistributed, and the user plane gateway of the MEC device obtains the updated actual IP address, that is, the first correspondence has changed as follows. The actual IP address of the terminal with the identification information of 12300000040 is changed from 192.168. 1.11 is converted to 192.168.1.30.
(2)MEC设备的用户面网关将最新的标识信息和IP的对应关系发布给订 阅发布服务模块。(2) The user plane gateway of the MEC device publishes the correspondence between the latest identification information and IP to the subscription publishing service module.
(3)地址映射服务订阅到新的标识信息和实际IP地址的第一对应关系,更新数据区。(3) The address mapping service subscribes to the first correspondence between the new identification information and the actual IP address, and updates the data area.
当摄像头1发起对应用服务的访问时,报文的目的地址10.1.2.3,报文的源地址192.168.1.30,报文端口554。报文经过MEC设备的用户面网关,确定该报文满足预先配置的分流规则,需要将报文通过本地口进行转发。MEC设备的用户面网关将报文转发给地址映射服务模块。地址映射服务模块根据源地址和报文端口(192.168.1.30:554),在地址映射数据区中查找,匹配成功,将该报文的源地址和端口映射成172.167.0.1:554,并将报文通过MEC设备的本地口发送给应用服务器。应用服务器预先配置了摄像头1的固定IP地址和对应的固定端口。边缘应用服务器收到摄像头1发送的报文,和本地配置的摄像头1的固定IP地址匹配成功。When camera 1 initiates access to the application service, the destination address of the message is 10.1.2.3, the source address of the message is 192.168.1.30, and the message port is 554. After the message passes through the user plane gateway of the MEC device, it is determined that the message satisfies the pre-configured distribution rules, and the message needs to be forwarded through the local port. The user plane gateway of the MEC device forwards the message to the address mapping service module. The address mapping service module searches the address mapping data area according to the source address and the message port (192.168.1.30:554), and the match succeeds, maps the source address and port of the message to 172.167.0.1:554, and reports The text is sent to the application server through the local port of the MEC device. The application server is pre-configured with the fixed IP address of the camera 1 and the corresponding fixed port. The edge application server receives the packet sent by camera 1, and it matches the fixed IP address of camera 1 configured locally.
当应用服务器发送报文给摄像头1时,目的地址为172.167.0.1:554,发送给MEC设备的本地口。MEC设备的地址映射服务模块进行固定IP地址到实际IP地址的转换,即将报文中的目标地址转换成192.168.1.11:554,然后发送给用户面网关,进而通过无线网络发给摄像头1。When the application server sends a message to camera 1, the destination address is 172.167.0.1:554, and it is sent to the local port of the MEC device. The address mapping service module of the MEC device converts the fixed IP address to the actual IP address, that is, converts the target address in the message to 192.168.1.11:554, and then sends it to the user plane gateway, and then sends it to the camera 1 through the wireless network.
通过上述描述可以看出,当摄像头1的实际IP地址发生变化时,应用服务器感知不到,由MEC设备自动动态进行更新。It can be seen from the above description that when the actual IP address of the camera 1 changes, the application server does not perceive it, and the MEC device automatically updates it dynamically.
在第二个例子中,以温控设备和自动导引车(Automated Guided Vehicle,AGV)接入与应用服务器为例进行举例说明。假设,接入的终端包括AGV设备、温控1和温控2,可使用的应用服务器包括应用服务器1和应用服务器2。AGV设备接入到无线网络gNR/eNB中,温控1和温控2通过CPE接入到无线网络。MEC设备负责本地分流规则配置,用户报文解析,动态IP的映射。核心网5GC/EPC是无线终端接入的标准网元,在此处不做赘述。温控1(701)、温控2(702)、AGV设备703、CPE(704)、eNB/gNB(705)、MEC设备706、5GC/EPC(707)、应用服务器1(708)和应用服务器2(709)的连接关系如图7所示。其中,AGV设备、温控1和温控2的相关信息如表4所示。In the second example, take the temperature control equipment and the automatic guided vehicle (Automated Guided Vehicle, AGV) access and application server as examples for illustration. Assume that the connected terminal includes AGV equipment, temperature control 1 and temperature control 2, and the available application servers include application server 1 and application server 2. The AGV equipment is connected to the wireless network gNR/eNB, and the temperature control 1 and the temperature control 2 are connected to the wireless network through the CPE. The MEC equipment is responsible for the configuration of local shunt rules, user message analysis, and dynamic IP mapping. The core network 5GC/EPC is a standard network element for wireless terminal access, and will not be repeated here. Temperature control 1 (701), temperature control 2 (702), AGV equipment 703, CPE (704), eNB/gNB (705), MEC equipment 706, 5GC/EPC (707), application server 1 (708) and application server The connection relationship of 2(709) is shown in Figure 7. Among them, the relevant information of AGV equipment, temperature control 1 and temperature control 2 are shown in Table 4.
表4Table 4
终端名称Terminal name 标识信息Identification information 实际IP地址Actual IP address 实际端口Actual port
AGVAGV 1230000004112300000041 10.10.9.110.10.9.1 不限Unlimited
温控1Temperature control 1 1550000003015500000030 10.10.10.110.10.10.1 800-900800-900
温控2Temperature control 2 1550000003015500000030 10.10.10.110.10.10.1 1000-11001000-1100
其中,标识信息可以是物联网ID,该标识在网络中唯一。AGV设备的实际IP地址可以由核心网进行分配,实际的端口号不能固定,可能有多个端口。温控1和温控2通过CPE接入到无线网络,CPE的IP地址由核心网分配,地址会变化。温控1和温控2的小网IP地址(实际IP地址)由CPE配置,温控1和温控2的业务端口(即实际端口)动态分配,在100-200的范围内。CPE通过端口映射,将温控1的业务映射到800-900的端口段,将温控2的业务映射到1000-1100端口段。Among them, the identification information may be an Internet of Things ID, which is unique in the network. The actual IP address of the AGV device can be allocated by the core network, and the actual port number cannot be fixed, and there may be multiple ports. Temperature control 1 and temperature control 2 are connected to the wireless network through the CPE. The IP address of the CPE is allocated by the core network and the address will change. The small network IP addresses (actual IP addresses) of temperature control 1 and temperature control 2 are configured by the CPE, and the service ports (ie actual ports) of temperature control 1 and temperature control 2 are dynamically allocated within the range of 100-200. CPE maps the business of temperature control 1 to the port segment of 800-900 and the business of temperature control 2 to the port segment of 1000-1100 through port mapping.
假设,针对该应用场景,有如下要求:Suppose, for this application scenario, there are the following requirements:
(1)应用服务器1需要主动访问AGV设备,且需要固定IP地址,端口范围不限。(1) Application server 1 needs to actively access the AGV equipment, and needs a fixed IP address, and the port range is not limited.
(2)应用服务器2需要主动访问温控1和温控2,两个设备对应不同的固定IP地址,端口范围在100-200。(2) Application server 2 needs to actively access temperature control 1 and temperature control 2. The two devices correspond to different fixed IP addresses, and the port range is 100-200.
为了满足应用服务器的要求,MEC需要做配置:In order to meet the requirements of the application server, MEC needs to be configured:
(1)通过API接口或管理网元,给每个AGV设备、温控1和温控2配置固定IP地址和固定端口,跟AGV设备、温控1和温控2的标识信息关联,即配置第二对应关系,第二对应关系指示标识信息、固定IP地址和固定端口三者之间的对应关系,如表5所示。(1) Through the API interface or management network element, configure a fixed IP address and fixed port for each AGV device, temperature control 1 and temperature control 2, and associate it with the identification information of the AGV device, temperature control 1 and temperature control 2, namely configuration The second correspondence, the second correspondence indicates the correspondence between the identification information, the fixed IP address, and the fixed port, as shown in Table 5.
表5table 5
Figure PCTCN2021081903-appb-000001
Figure PCTCN2021081903-appb-000001
(2)配置访问应用服务器1和应用服务器2的分流规则,即按照应用服务 器1和应用服务器2的目的地址(应用服务器1的IP地址为10.99.2.3,应用服务器2为10.99.2.5)进行分流。(2) Configure the distribution rules for accessing application server 1 and application server 2, that is, according to the destination address of application server 1 and application server 2 (the IP address of application server 1 is 10.99.2.3, and the application server 2 is 10.99.2.5). .
MEC设备的业务流程及数据处理过程如下:The business process and data processing process of MEC equipment are as follows:
(1)终端(AGV设备、温控1和温控2)接入到无线网络,MEC设备的用户面网关通过解析报文,获取到各终端的标识信息、实际IP地址和实际端口的第一对应关系,即表4的内容。(1) Terminals (AGV equipment, temperature control 1 and temperature control 2) are connected to the wireless network, and the user plane gateway of the MEC equipment obtains the identification information of each terminal, the actual IP address and the first of the actual port by parsing the message. Correspondence, that is, the contents of Table 4.
(2)MEC设备的用户面网关将第一对应关系发布给订阅发布服务模块。用户面网关感知各终端的状态或实际IP地址的变化,并在实际IP地址变化后,将更新后的第一对应关系发布出去。(2) The user plane gateway of the MEC device publishes the first correspondence to the subscription publishing service module. The user plane gateway perceives the status of each terminal or the change of the actual IP address, and after the actual IP address changes, publishes the updated first correspondence.
(3)地址映射服务模块订阅到了第一对应关系,并结合预先配置的数据(即第二对应关系),通过标识信息进行关联,生成实际IP地址和固定IP地址之间的映射关系,实际端口和固定端口之间的映射关系,即第三对应关系,并存储在地址映射数据区中。第三对应关系可以以表格形式存储于地址映射数据区,如表6所示。(3) The address mapping service module subscribes to the first correspondence relationship, and combines the pre-configured data (ie the second correspondence relationship) to associate through identification information to generate the mapping relationship between the actual IP address and the fixed IP address, and the actual port The mapping relationship with the fixed port, that is, the third corresponding relationship, is stored in the address mapping data area. The third correspondence relationship may be stored in the address mapping data area in the form of a table, as shown in Table 6.
表6Table 6
Figure PCTCN2021081903-appb-000002
Figure PCTCN2021081903-appb-000002
AGV设备的报文的处理过程如下:The message processing process of the AGV device is as follows:
当AGV设备发起对应用服务器的访问时,报文的目的地址为应用服务器1的IP地址(10.99.2.3),报文的源地址为AGV设备的实际IP地址(10.10.9.1)。AGV设备将报文发送至MEC设备的用户面网关,用户面网关确定其满足预先配置的分流规则,将报文通过本地口进行转发。将报文转发给地址映射服务模块。地址映射服务模块根据源地址(10.10.9.1)在地址映射数据区中查找,匹配成功,将该报文的源地址映射成AGV设备的固定IP地址(172.167.0.1),并将报文通过MEC设备的本地口发送给边缘应用服务器1。应用服务器1预先配 置了AGV设备的固定IP地址,在接收到AGV的报文后,和本地配置的IP地址匹配成功。When the AGV device initiates access to the application server, the destination address of the message is the IP address of application server 1 (10.99.2.3), and the source address of the message is the actual IP address of the AGV device (10.10.9.1). The AGV device sends the message to the user plane gateway of the MEC device, and the user plane gateway determines that it meets the pre-configured offloading rules, and forwards the message through the local port. Forward the message to the address mapping service module. The address mapping service module searches the address mapping data area according to the source address (10.10.9.1), and the match succeeds, maps the source address of the message to the fixed IP address of the AGV device (172.167.0.1), and passes the message through the MEC The local port of the device is sent to the edge application server 1. The application server 1 is pre-configured with the fixed IP address of the AGV device. After receiving the AGV message, it matches the locally configured IP address successfully.
当应用服务器1主动发送报文给AGV设备时,目的地址为AGV设备的固定IP地址(172.167.0.1),端口不限。应用服务器1先将报文发送给MEC设备的本地口。MEC设备的地址映射服务模块进行固定IP地址到实际IP地址的转换,即将报文中的目标地址转换成10.10.9.1,然后将转换后的报文发送给用户面网关,进而通过无线网络发给AGV设备。When the application server 1 actively sends a message to the AGV device, the destination address is the fixed IP address (172.167.0.1) of the AGV device, and the port is not limited. The application server 1 first sends the message to the local port of the MEC device. The address mapping service module of the MEC device converts the fixed IP address to the actual IP address, that is, converts the target address in the message to 10.10.9.1, and then sends the converted message to the user plane gateway, and then sends it to the user plane through the wireless network. AGV equipment.
以温控1为例,温控的报文的处理过程如下:Taking temperature control 1 as an example, the processing of temperature control messages is as follows:
当温控1发起对应用服务的访问,报文的目的地址为应用服务器2的IP地址(10.99.2.5),报文的源地址为温控1的实际IP地址(10.10.10.1),端口为温控1的实际端口(800-900)范围内的任意数值。温控1将报文发送至MEC设备的用户面网关。用户面网关确定报文满足预先配置的分流规则,将报文通过本地口进行转发,即将报文转发给地址映射服务模块。地址映射服务模块根据源地址(10.10.10.1)和端口(800-900内的任意数值,如801),在地址映射数据区中查找,匹配成功,将该报文的源地址映射成温控1的固定IP地址(172.167.0.2),源端口映射成为温控1的固定端口(100-200内的任意数值,如101),并将报文通过MEC设备的本地口发送给应用服务器2。应用服务器2收到温控1的报文,进行校验,和温控1的固定IP地址一致,匹配成功。When temperature control 1 initiates access to application services, the destination address of the message is the IP address of application server 2 (10.99.2.5), the source address of the message is the actual IP address of temperature control 1 (10.10.10.1), and the port is Any value within the range of actual port (800-900) of temperature control 1. The temperature control 1 sends the message to the user plane gateway of the MEC device. The user plane gateway determines that the message meets the pre-configured shunt rules, and forwards the message through the local port, that is, forwards the message to the address mapping service module. The address mapping service module searches the address mapping data area according to the source address (10.10.10.1) and port (any value within 800-900, such as 801), and the match is successful, and the source address of the message is mapped to temperature control 1 The fixed IP address (172.167.0.2), the source port is mapped to the fixed port of temperature control 1 (any value within 100-200, such as 101), and the message is sent to the application server 2 through the local port of the MEC device. Application server 2 receives the message of temperature control 1 and performs verification, which is consistent with the fixed IP address of temperature control 1, and the match is successful.
当应用服务器2主动发送报文给温控1时,目的地址为温控1的固定IP地址(172.167.0.2),端口为温控1的固定端口(如101)。应用服务器将报文发送至MEC设备的本地口。MEC设备的地址映射服务模块进行固定IP地址到实际IP地址的转换,即将报文中的目标地址转换成温控1的实际IP地址(10.10.10.1),目的端口映射为温控1的固定端口(801),即将172.167.0.2:101映射为10.10.10.1:801。地址映射服务模块将转换后的报文发送给用户面网关,进而通过无线网络发给CPE,CPE通过端口映射最终发送给温控1设备。When the application server 2 actively sends a message to the temperature control 1, the destination address is the fixed IP address of the temperature control 1 (172.167.0.2), and the port is the fixed port of the temperature control 1 (such as 101). The application server sends the message to the local port of the MEC device. The address mapping service module of the MEC device converts the fixed IP address to the actual IP address, that is, the target address in the message is converted to the actual IP address of temperature control 1 (10.10.10.1), and the destination port is mapped to the fixed port of temperature control 1 (801), that is, 172.167.0.2:101 is mapped to 10.10.10.1:801. The address mapping service module sends the converted message to the user plane gateway, and then sends it to the CPE through the wireless network, and the CPE finally sends it to the temperature control 1 device through port mapping.
需要说明的是,本领域技术人员可以理解,温控2的流程和温控1相似,可参考温控1的相关描述,理解温控2和应用服务器2之间的报文收发。It should be noted that those skilled in the art can understand that the process of temperature control 2 is similar to that of temperature control 1, and can refer to the related description of temperature control 1 to understand the message transmission and reception between temperature control 2 and application server 2.
由于AGV设备、温控1和温控2的实际IP地址可能会发生变化,当AGV设备、温控1和温控2中任意一个设备的实际IP地址发生变化时,MEC设备 需要及时更新第三对应关系,报文能正确发送,且该过程应用服务器不感知。AGV设备、温控1和温控2中任意一个设备的实际IP地址发生变化时,MEC设备的处理流程和第一个例子中摄像头的实际IP地址发生变化时的MEC设备的处理流程相似,此处不赘述。Since the actual IP addresses of AGV equipment, temperature control 1 and temperature control 2 may change, when the actual IP address of any one of the AGV equipment, temperature control 1 and temperature control 2 changes, the MEC equipment needs to be updated in time. Corresponding relationship, the message can be sent correctly, and the application server does not perceive the process. When the actual IP address of any one of the AGV device, temperature control 1 and temperature control 2 changes, the processing flow of the MEC device is similar to the processing flow of the MEC device when the actual IP address of the camera changes in the first example. Do not repeat it here.
由此,本实施例提供了一种网络接入方法,由于电子设备可以基于已配置的终端的标识信息和终端的固定IP地址的对应关系,以及终端的标识信息和终端的实际IP地址的对应关系,构建终端的实际IP地址和终端的固定IP地址的对应关系,电子设备在将终端的报文发送至应用服务器时,可以基于终端的实际IP地址,映射得到终端的固定IP地址,使得满足应用服务器对终端的IP地址固定的这一要求。此外,该网络接入方法无需运营商固定终端的IP地址,节省了IP资源,应用服务器不感知终端的IP地址的变化,无需对应用服务器进行改造,减少了开通成本。不需要增加新的设备,节省了开通成本和维护成本。此外,第二对应关系改变时,及时更新第三对应关系,使得运维人员的操作可以及时生效。Therefore, this embodiment provides a network access method, because the electronic device can be based on the correspondence between the configured terminal identification information and the fixed IP address of the terminal, and the correspondence between the terminal identification information and the actual IP address of the terminal. The relationship between the actual IP address of the terminal and the fixed IP address of the terminal is constructed. When the electronic device sends the message of the terminal to the application server, the fixed IP address of the terminal can be obtained by mapping based on the actual IP address of the terminal, so as to satisfy The application server requires a fixed IP address of the terminal. In addition, the network access method does not require the operator to fix the IP address of the terminal, saving IP resources, the application server does not perceive the change of the terminal's IP address, and there is no need to modify the application server, which reduces the activation cost. There is no need to add new equipment, which saves startup and maintenance costs. In addition, when the second correspondence is changed, the third correspondence is updated in time, so that the operations of the operation and maintenance personnel can take effect in time.
此外,本领域技术人员可以理解,上面各种方法的步骤划分,只是为了描述清楚,实现时可以合并为一个步骤或者对某些步骤进行拆分,分解为多个步骤,只要包括相同的逻辑关系,都在本专利的保护范围内;对算法中或者流程中添加无关紧要的修改或者引入无关紧要的设计,但不改变其算法和流程的核心设计都在该专利的保护范围内。In addition, those skilled in the art can understand that the division of steps in the various methods above is only for clarity of description, and can be combined into one step or some steps can be split into multiple steps in implementation, as long as the same logical relationship is included. , Are all within the scope of protection of this patent; adding insignificant modifications to the algorithm or process or introducing insignificant designs, but not changing the core design of the algorithm and process, are all within the scope of protection of the patent.
本申请的第三实施例涉及一种电子设备,如图8所示,用于将终端接入应用服务器所属网络,包括:用户面网关模块801和地址映射服务模块802。用户面网关模块801用于:接收终端的第一报文,并根据第一报文,确定第一对应关系;其中,第一对应关系至少指示终端的标识信息和终端的实际互联网协议IP地址的对应关系。地址映射服务模块802用于:根据第一对应关系,以及预先设置的第二对应关系,确定第三对应关系,以便电子设备基于第三对应关系为终端和应用服务器转发报文;其中,第二对应关系至少指示终端的标识信息和终端的固定IP地址的对应关系,第三对应关系至少指示终端的实际IP地址和终端的固定IP地址的对应关系。The third embodiment of this application relates to an electronic device, as shown in FIG. The user plane gateway module 801 is configured to: receive the first message of the terminal, and determine the first correspondence according to the first message; wherein the first correspondence at least indicates the identification information of the terminal and the actual Internet Protocol IP address of the terminal Correspondence. The address mapping service module 802 is configured to: determine a third correspondence relationship according to the first correspondence relationship and the preset second correspondence relationship, so that the electronic device forwards the message for the terminal and the application server based on the third correspondence relationship; The correspondence relationship at least indicates the correspondence relationship between the identification information of the terminal and the fixed IP address of the terminal, and the third correspondence relationship at least indicates the correspondence relationship between the actual IP address of the terminal and the fixed IP address of the terminal.
在一个例子中,电子设备还包括:订阅发布服务模块;订阅发布服务模块 用于:接收用户面网关模块确定的第一对应关系,并将第一对应关系发布至地址映射服务模块。In an example, the electronic device further includes: a subscription publishing service module; the subscription publishing service module is used to: receive the first correspondence determined by the user plane gateway module, and publish the first correspondence to the address mapping service module.
在一个例子中,电子设备还包括:开放接口模块;开放接口模块用于:为应用服务器提供接口,以使应用服务器通过接口在电子设备设置第二对应关系。In an example, the electronic device further includes: an open interface module; the open interface module is used to: provide an interface for the application server, so that the application server sets the second correspondence on the electronic device through the interface.
在一个例子中,如图9所示,电子设备包括:用户面网关模块801、地址映射服务模块802、订阅发布服务模块803和开放接口模块804。各模块作用可参考上文的相关描述,此处不再赘述。In an example, as shown in FIG. 9, the electronic device includes: a user plane gateway module 801, an address mapping service module 802, a subscription publishing service module 803, and an open interface module 804. For the function of each module, please refer to the relevant description above, which will not be repeated here.
不难发现,本实施例为与第一或第二实施例相对应的装置实施例,本实施例可与第一或第二实施例互相配合实施。第一或第二实施例中提到的相关技术细节在本实施例中依然有效,为了减少重复,这里不再赘述。相应地,本实施例中提到的相关技术细节也可应用在第一或第二实施例中。It is not difficult to find that this embodiment is a device embodiment corresponding to the first or second embodiment, and this embodiment can be implemented in cooperation with the first or second embodiment. The related technical details mentioned in the first or second embodiment are still valid in this embodiment, and in order to reduce repetition, they will not be repeated here. Correspondingly, the related technical details mentioned in this embodiment can also be applied in the first or second embodiment.
值得一提的是,本实施例中所涉及到的各模块均为逻辑模块,在实际应用中,一个逻辑单元可以是一个物理单元,也可以是一个物理单元的一部分,还可以以多个物理单元的组合实现。此外,为了突出本申请的创新部分,本实施例中并没有将与解决本申请所提出的技术问题关系不太密切的单元引入,但这并不表明本实施例中不存在其它的单元。It is worth mentioning that the modules involved in this embodiment are all logical modules. In actual applications, a logical unit can be a physical unit, a part of a physical unit, or multiple physical units. The combination of units is realized. In addition, in order to highlight the innovative part of the present application, the present embodiment does not introduce a unit that is not closely related to solving the technical problem proposed by the present application, but this does not indicate that there are no other units in the present embodiment.
本申请的第四实施例涉及一种服务器,如图10所示,包括:至少一个处理器901;以及,与至少一个处理器901通信连接的存储器902;其中,存储器902存储有可被至少一个处理器901执行的指令,指令被至少一个处理器901执行,以使至少一个处理器901能够执行上述的电子***应用方法。The fourth embodiment of the present application relates to a server. As shown in FIG. 10, it includes: at least one processor 901; and a memory 902 communicatively connected with the at least one processor 901; The instructions executed by the processor 901 are executed by the at least one processor 901, so that the at least one processor 901 can execute the above-mentioned electronic seal application method.
其中,存储器和处理器采用总线方式连接,总线可以包括任意数量的互联的总线和桥,总线将一个或多个处理器和存储器的各种电路连接在一起。总线还可以将诸如***设备、稳压器和功率管理电路等之类的各种其他电路连接在一起,这些都是本领域所公知的,因此,本文不再对其进行进一步描述。总线接口在总线和收发机之间提供接口。收发机可以是一个元件,也可以是多个元件,比如多个接收器和发送器,提供用于在传输介质上与各种其他装置通信的单元。经处理器处理的数据通过天线在无线介质上进行传输,进一步,天线还接收数据并将数据传送给处理器。Among them, the memory and the processor are connected in a bus mode, and the bus may include any number of interconnected buses and bridges, and the bus connects one or more processors and various circuits of the memory together. The bus can also connect various other circuits such as peripheral devices, voltage regulators, power management circuits, etc., which are all known in the art, and therefore, no further description will be given herein. The bus interface provides an interface between the bus and the transceiver. The transceiver may be one element or multiple elements, such as multiple receivers and transmitters, providing a unit for communicating with various other devices on the transmission medium. The data processed by the processor is transmitted on the wireless medium through the antenna, and further, the antenna also receives the data and transmits the data to the processor.
处理器负责管理总线和通常的处理,还可以提供各种功能,包括定时,外 围接口,电压调节、电源管理以及其他控制功能。而存储器可以被用于存储处理器在执行操作时所使用的数据。The processor is responsible for managing the bus and general processing. It can also provide various functions, including timing, peripheral interfaces, voltage regulation, power management, and other control functions. The memory can be used to store data used by the processor when performing operations.
本申请的第五实施例涉及一种计算机可读存储介质,存储有计算机程序。计算机程序被处理器执行时实现上述方法实施例。The fifth embodiment of the present application relates to a computer-readable storage medium storing a computer program. When the computer program is executed by the processor, the above method embodiment is realized.
即,本领域技术人员可以理解,实现上述实施例方法中的全部或部分步骤是可以通过程序来指令相关的硬件来完成,该程序存储在一个存储介质中,包括若干指令用以使得一个设备(可以是单片机,芯片等)或处理器(processor)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,RandomAccessMemory)、磁碟或者光盘等各种可以存储程序代码的介质。That is, those skilled in the art can understand that all or part of the steps in the method of the foregoing embodiments can be implemented by a program instructing relevant hardware. The program is stored in a storage medium and includes several instructions to enable a device ( It may be a single-chip microcomputer, a chip, etc.) or a processor (processor) that executes all or part of the steps of the methods described in the embodiments of the present application. The aforementioned storage media include: U disk, mobile hard disk, Read-Only Memory (ROM, Read-Only Memory), Random Access Memory (RAM, Random Access Memory), magnetic disks or optical disks and other media that can store program codes.
本领域的普通技术人员可以理解,上述各实施例是实现本申请的具体实施例,而在实际应用中,可以在形式上和细节上对其作各种改变,而不偏离本申请的精神和范围。Those of ordinary skill in the art can understand that the above-mentioned embodiments are specific embodiments for realizing the present application, and in actual applications, various changes can be made in form and details without departing from the spirit and spirit of the present application. Scope.

Claims (10)

  1. 一种网络接入方法,用于将终端接入应用服务器所属网络,包括:A network access method for connecting a terminal to a network to which an application server belongs, including:
    接收所述终端的第一报文,并根据所述第一报文,确定第一对应关系;其中,所述第一对应关系至少指示所述终端的标识信息和所述终端的实际互联网协议IP地址的对应关系;Receive a first message of the terminal, and determine a first correspondence relationship based on the first message; wherein, the first correspondence relationship at least indicates the identification information of the terminal and the actual Internet Protocol IP of the terminal Correspondence of addresses;
    根据所述第一对应关系,以及预先设置的第二对应关系,确定第三对应关系,以便基于所述第三对应关系为所述终端和应用服务器转发报文;其中,所述第二对应关系至少指示所述终端的标识信息和所述终端的固定IP地址的对应关系,所述第三对应关系至少指示所述终端的实际IP地址和所述终端的固定IP地址的对应关系。According to the first corresponding relationship and the preset second corresponding relationship, a third corresponding relationship is determined so as to forward packets for the terminal and the application server based on the third corresponding relationship; wherein, the second corresponding relationship At least indicating the correspondence between the identification information of the terminal and the fixed IP address of the terminal, and the third correspondence at least indicating the correspondence between the actual IP address of the terminal and the fixed IP address of the terminal.
  2. 根据权利要求1所述的网络接入方法,其中,所述第一对应关系指示所述终端的标识信息、所述终端的实际IP地址和所述终端的实际端口三者之间的对应关系;所述第二对应关系指示所述终端的标识信息、所述终端的实际端口、所述终端的固定IP地址和所述终端的固定端口四者之间的对应关系;所述第三对应关系还指示所述终端的实际端口和所述终端的固定端口的对应关系。The network access method according to claim 1, wherein the first correspondence indicates the correspondence between the identification information of the terminal, the actual IP address of the terminal, and the actual port of the terminal; The second correspondence indicates the correspondence between the identification information of the terminal, the actual port of the terminal, the fixed IP address of the terminal, and the fixed port of the terminal; the third correspondence is also Indicate the correspondence between the actual port of the terminal and the fixed port of the terminal.
  3. 根据权利要求1所述的网络接入方法,其中,所述网络接入方法应用于电子设备,所述第二对应关系由应用服务器在调用所述电子设备的接口后设置,或者,所述第二对应关系由所述电子设备的管理网元设置。The network access method according to claim 1, wherein the network access method is applied to an electronic device, and the second correspondence is set by an application server after calling the interface of the electronic device, or the first The two correspondence relationship is set by the management network element of the electronic device.
  4. 根据权利要求1所述的网络接入方法,其中,在所述根据所述第一对应关系,以及预先设置的第二对应关系,确定第三对应关系之后,还包括:The network access method according to claim 1, wherein after the third correspondence is determined according to the first correspondence and the preset second correspondence, the method further comprises:
    接收所述终端发送的第二报文,所述第二报文中包括所述终端的实际IP地址;根据所述第三对应关系,将所述第二报文中的实际IP地址替换为与所述实际IP地址对应的固定IP地址;将替换后的第二报文转发至应用服务器;Receive a second message sent by the terminal, where the second message includes the actual IP address of the terminal; according to the third correspondence, replace the actual IP address in the second message with The fixed IP address corresponding to the actual IP address; forwarding the replaced second message to the application server;
    或者,or,
    接收应用服务器发送的第三报文;根据所述第三对应关系,将所述第三报文中的固定IP地址替换为与所述固定IP地址对应的实际IP地址;根据所述对应的实际IP地址,将替换后的第三报文转发至与所述对应的实际IP地址对应的终端。Receive the third message sent by the application server; according to the third correspondence, replace the fixed IP address in the third message with the actual IP address corresponding to the fixed IP address; according to the corresponding actual IP address, forward the replaced third message to the terminal corresponding to the corresponding actual IP address.
  5. 根据权利要求2所述的网络接入方法,其中,在所述根据所述第一对应关系,以及预先设置的第二对应关系,确定第三对应关系之后,还包括:The network access method according to claim 2, wherein after the third correspondence is determined according to the first correspondence and the preset second correspondence, the method further comprises:
    接收所述终端发送的第二报文,所述第二报文中包括所述终端的实际IP地址和所述终端的实际端口;根据所述第三对应关系,将所述第二报文中的实际IP地址替换为与所述实际IP地址对应的固定IP地址,将所述第二报文中的实际端口替换为与所述实际端口对应的固定端口;将替换后的第二报文转发至应用服务器;Receiving a second message sent by the terminal, the second message including the actual IP address of the terminal and the actual port of the terminal; according to the third correspondence, the second message is Replace the actual IP address of with the fixed IP address corresponding to the actual IP address, replace the actual port in the second message with the fixed port corresponding to the actual port; forward the replaced second message To the application server;
    或者,or,
    接收应用服务器发送的第三报文;根据所述第三对应关系,将所述第三报文中的固定IP地址替换为与所述固定IP地址对应的实际IP地址,将所述第三报文中的固定端口替换为与所述固定端口对应的实际端口;根据所述对应的实际IP地址和所述对应的实际端口,将替换后的第三报文转发至与所述对应的实际IP地址对应的终端的所述对应的实际端口。Receive a third message sent by the application server; according to the third correspondence, replace the fixed IP address in the third message with the actual IP address corresponding to the fixed IP address, and replace the third message The fixed port in the text is replaced with the actual port corresponding to the fixed port; according to the corresponding actual IP address and the corresponding actual port, the replaced third packet is forwarded to the corresponding actual IP The corresponding actual port of the terminal corresponding to the address.
  6. 根据权利要求1至5中任一项所述的网络接入方法,其中,在所述根据所述第一对应关系,以及预先设置的第二对应关系,确定第三对应关系之后,还包括:The network access method according to any one of claims 1 to 5, wherein after the third correspondence is determined according to the first correspondence and the preset second correspondence, the method further comprises:
    若确定所述第一对应关系被更新,根据更新后的第一对应关系,更新所述第三对应关系;If it is determined that the first correspondence is updated, update the third correspondence according to the updated first correspondence;
    若确定所述第二对应关系被更新,根据更新后的第二对应关系,更新所述 第三对应关系。If it is determined that the second correspondence relationship is updated, the third correspondence relationship is updated according to the updated second correspondence relationship.
  7. 根据权利要求6所述的网络接入方法,,还包括:The network access method according to claim 6, further comprising:
    接收终端的第四报文,所述第四报文中至少携带有所述终端的标识信息和所述终端更新后的实际IP地址;Receiving a fourth message of the terminal, where the fourth message carries at least the identification information of the terminal and the updated actual IP address of the terminal;
    根据终端的标识信息和所述终端更新后的实际IP地址,更新所述第一对应关系。The first correspondence is updated according to the identification information of the terminal and the updated actual IP address of the terminal.
  8. 一种电子设备,用于将终端接入应用服务器所属网络,包括:用户面网关模块和地址映射服务模块;An electronic device for connecting a terminal to a network to which an application server belongs, including: a user plane gateway module and an address mapping service module;
    所述用户面网关模块用于:接收所述终端的第一报文,并根据所述第一报文,确定第一对应关系;其中,所述第一对应关系至少指示所述终端的标识信息和所述终端的实际互联网协议IP地址的对应关系;The user plane gateway module is configured to: receive a first message of the terminal, and determine a first corresponding relationship according to the first message; wherein the first corresponding relationship at least indicates identification information of the terminal Correspondence with the actual Internet Protocol IP address of the terminal;
    所述地址映射服务模块用于:根据所述第一对应关系,以及预先设置的第二对应关系,确定第三对应关系,以便所述电子设备基于所述第三对应关系为所述终端和应用服务器转发报文;其中,所述第二对应关系至少指示所述终端的标识信息和所述终端的固定IP地址的对应关系,所述第三对应关系至少指示所述终端的实际IP地址和所述终端的固定IP地址的对应关系。The address mapping service module is configured to: determine a third correspondence relationship according to the first correspondence relationship and a preset second correspondence relationship, so that the electronic device provides the terminal and the application based on the third correspondence relationship The server forwards the message; wherein the second correspondence relationship at least indicates the correspondence relationship between the identification information of the terminal and the fixed IP address of the terminal, and the third correspondence relationship at least indicates the actual IP address of the terminal and the fixed IP address of the terminal. The corresponding relationship of the fixed IP address of the terminal is described.
  9. 一种电子设备,包括:An electronic device including:
    至少一个处理器;以及,At least one processor; and,
    与所述至少一个处理器通信连接的存储器;其中,A memory communicatively connected with the at least one processor; wherein,
    所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行如权利要求1至7中任一项所述网络接入方法。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 any one of claims 1 to 7 The network access method.
  10. 一种计算机可读存储介质,存储有计算机程序,其中,所述计算机程 序被处理器执行时实现权利要求1至7中任一项所述的网络接入方法。A computer-readable storage medium storing a computer program, wherein the computer program implements the network access method of any one of claims 1 to 7 when the computer program is executed by a processor.
PCT/CN2021/081903 2020-06-12 2021-03-19 Network access method, electronic device, and storage medium WO2021248971A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010535779.2A CN113810900A (en) 2020-06-12 2020-06-12 Network access method, electronic device and storage medium
CN202010535779.2 2020-06-12

Publications (1)

Publication Number Publication Date
WO2021248971A1 true WO2021248971A1 (en) 2021-12-16

Family

ID=78845161

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/081903 WO2021248971A1 (en) 2020-06-12 2021-03-19 Network access method, electronic device, and storage medium

Country Status (2)

Country Link
CN (1) CN113810900A (en)
WO (1) WO2021248971A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114882631A (en) * 2022-06-06 2022-08-09 创斯达科技集团(中国)有限责任公司 Adaptive intelligent gate network configuration method and gate system

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105306612A (en) * 2014-07-15 2016-02-03 中兴通讯股份有限公司 Method for acquiring identifier of terminal in network and management network element
CN106790732A (en) * 2015-11-24 2017-05-31 中兴通讯股份有限公司 Address conversion method, apparatus and system, network identity control method and device
US20170208032A1 (en) * 2016-01-19 2017-07-20 Cisco Technology, Inc. Method and apparatus for forwarding generic routing encapsulation packets at a network address translation gateway
CN110071984A (en) * 2018-01-24 2019-07-30 中兴通讯股份有限公司 A kind of network identity mapping method and system and terminal, mark gateway

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105306612A (en) * 2014-07-15 2016-02-03 中兴通讯股份有限公司 Method for acquiring identifier of terminal in network and management network element
CN106790732A (en) * 2015-11-24 2017-05-31 中兴通讯股份有限公司 Address conversion method, apparatus and system, network identity control method and device
US20170208032A1 (en) * 2016-01-19 2017-07-20 Cisco Technology, Inc. Method and apparatus for forwarding generic routing encapsulation packets at a network address translation gateway
CN110071984A (en) * 2018-01-24 2019-07-30 中兴通讯股份有限公司 A kind of network identity mapping method and system and terminal, mark gateway

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114882631A (en) * 2022-06-06 2022-08-09 创斯达科技集团(中国)有限责任公司 Adaptive intelligent gate network configuration method and gate system

Also Published As

Publication number Publication date
CN113810900A (en) 2021-12-17

Similar Documents

Publication Publication Date Title
CN109314917B (en) Network slice selection strategy updating method and device
US11917498B2 (en) Communication method and communications apparatus
AU2021277736B2 (en) Pdu type setting method, ue policy setting method, and related entity
US11963242B2 (en) Communication method and apparatus
WO2018157439A1 (en) Service processing method and device
WO2021082715A1 (en) Direct communication processing method, device, relay terminal, and remote terminal
WO2021042398A1 (en) Communication method and apparatus, network device and terminal device
CN113891430A (en) Communication method, device and system
WO2023000935A1 (en) Data processing method, network element device, and readable storage medium
WO2020048469A1 (en) Communication method and apparatus
WO2022011883A1 (en) Method and system for docking multi-operator core network with mec
WO2022033345A1 (en) Pdu session establishment method, terminal device, and chip system
US20200228618A1 (en) Content delivery method, device, and system
WO2022052875A1 (en) Terminal cross-region communication method, network element device, and storage medium
WO2023125151A1 (en) Data migration system, method and apparatus for internet-of-things device, and storage medium
US9417887B2 (en) Method and apparatus for bootstrapping gateway in device management system
WO2021138822A1 (en) Subscription information acquisition method and device
WO2021248971A1 (en) Network access method, electronic device, and storage medium
US20230370823A1 (en) Network capability exposure method, device, and storage medium
US20240048986A1 (en) Communication method and apparatus
WO2022062071A1 (en) Method and system for communication between mec and multi-operator core network
WO2017185934A1 (en) Management device and method for managing device
US11057241B2 (en) Network interworking method, network element, and system
US20230164111A1 (en) Method and apparatus for sending domain name system request
WO2020259290A1 (en) Method and apparatus for managing user group

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21822277

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205 DATED 22/05/2023)

122 Ep: pct application non-entry in european phase

Ref document number: 21822277

Country of ref document: EP

Kind code of ref document: A1