Movatterモバイル変換


[0]ホーム

URL:


CN118057860A - Address translation method, address translation device, communication equipment and readable storage medium - Google Patents

Address translation method, address translation device, communication equipment and readable storage medium
Download PDF

Info

Publication number
CN118057860A
CN118057860ACN202211446009.6ACN202211446009ACN118057860ACN 118057860 ACN118057860 ACN 118057860ACN 202211446009 ACN202211446009 ACN 202211446009ACN 118057860 ACN118057860 ACN 118057860A
Authority
CN
China
Prior art keywords
address
message
network identifier
addresses
pool
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211446009.6A
Other languages
Chinese (zh)
Inventor
于天意
张龙
邓伟
孙朝
程锦霞
邢源日
曾凯越
王昕怡
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Mobile Communications Group Co Ltd
Research Institute of China Mobile Communication Co Ltd
Original Assignee
China Mobile Communications Group Co Ltd
Research Institute of China Mobile Communication Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Mobile Communications Group Co Ltd, Research Institute of China Mobile Communication Co LtdfiledCriticalChina Mobile Communications Group Co Ltd
Priority to CN202211446009.6ApriorityCriticalpatent/CN118057860A/en
Publication of CN118057860ApublicationCriticalpatent/CN118057860A/en
Pendinglegal-statusCriticalCurrent

Links

Classifications

Landscapes

Abstract

The application discloses an address conversion method, an address conversion device, communication equipment and a readable storage medium, and belongs to the technical field of wireless communication. The address conversion method in the embodiment of the application comprises the following steps: the base station acquires a first network identifier corresponding to an IP message to be shunted; encapsulating the first network identifier into the IP message to be shunted to obtain a first IP message; and sending the first IP message to address conversion equipment, wherein the first network identifier is used for converting the source IP address of the first IP message. Therefore, the mapping of multiple IP addresses to the IP messages of the same terminal according to different sessions and services can be realized, and the requirement that the same terminal accesses multiple networks simultaneously is met.

Description

Translated fromChinese
地址转换方法、装置、通信设备及可读存储介质Address conversion method, device, communication equipment and readable storage medium

技术领域Technical Field

本申请属于无线通信技术领域,具体涉及一种地址转换方法、装置、通信设备及可读存储介质。The present application belongs to the field of wireless communication technology, and specifically relates to an address conversion method, device, communication equipment and readable storage medium.

背景技术Background technique

在基站分流场景下,数据分流不被核心网感知,无法通过核心网中的协议数据单元(Protocol Data Unit,PDU)会话建立来区分不同业务不同会话。对于一些静态互联网协议(Internet Protocol,IP)地址配置需求,现有解决方案是根据终端的唯一标识进行静态IP地址的绑定。但是这种绑定对于一个终端只能映射一个IP地址,造成无法根据不同会话及业务进行多IP地址的映射,无法满足同一终端同时访问多个网络的需求。In the base station offload scenario, data offload is not perceived by the core network, and different services and sessions cannot be distinguished through the establishment of the Protocol Data Unit (PDU) session in the core network. For some static Internet Protocol (IP) address configuration requirements, the existing solution is to bind the static IP address according to the unique identifier of the terminal. However, this binding can only map one IP address to a terminal, making it impossible to map multiple IP addresses according to different sessions and services, and unable to meet the needs of the same terminal to access multiple networks at the same time.

发明内容Summary of the invention

本申请实施例的目的是提供一种地址转换方法、装置、通信设备及可读存储介质,以解决目前无法满足同一终端同时访问多个网络的需求的问题。The purpose of the embodiments of the present application is to provide an address conversion method, apparatus, communication device and readable storage medium to solve the problem that the demand for the same terminal to access multiple networks at the same time cannot be met at present.

为了解决上述技术问题,本申请是这样实现的:In order to solve the above technical problems, this application is implemented as follows:

第一方面,提供了一种地址转换方法,包括:In a first aspect, an address conversion method is provided, comprising:

基站获取待分流的IP报文对应的第一网络标识;The base station obtains a first network identifier corresponding to the IP message to be diverted;

所述基站将所述第一网络标识封装进所述待分流的IP报文,获得第一IP报文;The base station encapsulates the first network identifier into the IP message to be split to obtain a first IP message;

所述基站将所述第一IP报文发送给地址转换设备,其中,所述第一网络标识用于对所述第一IP报文的源IP地址进行转换。The base station sends the first IP message to an address translation device, wherein the first network identifier is used to translate a source IP address of the first IP message.

可选的,所述第一网络标识包括以下至少一项:Optionally, the first network identifier includes at least one of the following:

切片信息;Slice information;

服务质量流标识QFI。Quality of service flow identifier QFI.

第二方面,提供了一种地址转换方法,包括:In a second aspect, an address conversion method is provided, comprising:

地址转换设备接收基站发送的第一IP报文,其中,所述第一IP报文是将第一网络标识封装进待分流的IP报文获得,所述第一网络标识与所述待分流的IP报文对应;The address translation device receives a first IP message sent by a base station, wherein the first IP message is obtained by encapsulating a first network identifier into an IP message to be split, and the first network identifier corresponds to the IP message to be split;

所述地址转换设备根据所述第一网络标识,对所述第一IP报文的源IP地址进行转换。The address translation device translates the source IP address of the first IP message according to the first network identifier.

作为一种可选的实施方式,所述根据所述第一网络标识,对所述第一IP报文的源IP地址进行转换,包括:As an optional implementation manner, converting the source IP address of the first IP packet according to the first network identifier includes:

所述地址转换设备构建所述第一网络标识下的第一IP地址池,所述第一IP地址池中包括与所述第一IP报文的目的IP地址同网段的预设个IP地址;The address translation device constructs a first IP address pool under the first network identifier, wherein the first IP address pool includes a preset number of IP addresses in the same network segment as the destination IP address of the first IP message;

所述地址转换设备从所述第一IP地址池中选择第一IP地址;The address translation device selects a first IP address from the first IP address pool;

所述地址转换设备将第一IP报文的源IP地址转换为所述第一IP地址。The address translation device translates the source IP address of the first IP packet into the first IP address.

作为一种可选的实施方式,所述根据所述第一网络标识,对所述第一IP报文的源IP地址进行转换,包括:As an optional implementation manner, converting the source IP address of the first IP packet according to the first network identifier includes:

所述地址转换设备确定所述第一网络标识下为第一终端配置的固定IP地址,所述第一终端为所述第一IP报文对应的终端;The address conversion device determines a fixed IP address configured for a first terminal under the first network identifier, the first terminal being a terminal corresponding to the first IP message;

所述地址转换设备将所述第一IP报文的源IP地址转换为所述固定IP地址。The address translation device translates the source IP address of the first IP message into the fixed IP address.

作为一种可选的实施方式,所述第一网络标识包括以下至少一项:As an optional implementation manner, the first network identifier includes at least one of the following:

切片信息;Slice information;

服务质量流标识QFI。Quality of service flow identifier QFI.

作为一种可选的实施方式,在构建所述第一网络标识下的第一IP地址池之后,且从所述第一IP地址池中选择第一IP地址之前,所述方法还包括:As an optional implementation manner, after constructing the first IP address pool under the first network identifier and before selecting the first IP address from the first IP address pool, the method further includes:

所述地址转换设备判断所述第一IP地址池中是否包括已占用IP地址;The address conversion device determines whether the first IP address pool includes an occupied IP address;

当所述第一IP地址池中包括已占用IP地址时,所述地址转换设备从所述第一IP地址池中剔除所述已占用IP地址,并添加同网段的新的未占用IP地址至所述第一IP地址池。When the first IP address pool includes occupied IP addresses, the address conversion device removes the occupied IP addresses from the first IP address pool and adds new unoccupied IP addresses in the same network segment to the first IP address pool.

作为一种可选的实施方式,所述判断所述第一IP地址池中是否包括已占用IP地址,包括:As an optional implementation manner, the determining whether the first IP address pool includes an occupied IP address includes:

所述地址转换设备对所述第一IP地址池中的预设个IP地址与预设地址表中的IP地址进行比对,所述预设地址表由已占用IP地址组成;The address conversion device compares the preset IP addresses in the first IP address pool with the IP addresses in a preset address table, where the preset address table consists of occupied IP addresses;

其中,若所述第一IP地址池中包括存在于所述预设地址表中的IP地址,则所述第一IP地址池中包括已占用IP地址;或者,若所述第一IP地址池中不包括存在于所述预设地址表中的IP地址,则所述第一IP地址池中不包括已占用IP地址。Among them, if the first IP address pool includes IP addresses existing in the preset address table, then the first IP address pool includes occupied IP addresses; or if the first IP address pool does not include IP addresses existing in the preset address table, then the first IP address pool does not include occupied IP addresses.

第三方面,提供了一种地址转换装置,应用于基站,包括:In a third aspect, an address conversion device is provided, which is applied to a base station, and includes:

获取模块,用于获取待分流的IP报文对应的第一网络标识;An acquisition module, used to acquire a first network identifier corresponding to the IP message to be diverted;

封装模块,用于将所述第一网络标识封装进所述待分流的IP报文,获得第一IP报文;An encapsulation module, used for encapsulating the first network identifier into the IP message to be diverted to obtain a first IP message;

发送模块,用于将所述第一IP报文发送给地址转换设备,其中,所述第一网络标识用于对所述第一IP报文的源IP地址进行转换。A sending module is used to send the first IP message to an address translation device, wherein the first network identifier is used to translate the source IP address of the first IP message.

第四方面,提供了一种地址转换装置,应用于地址转换设备,包括:In a fourth aspect, an address conversion device is provided, which is applied to an address conversion device, including:

接收模块,用于接收基站发送的第一IP报文,其中,所述第一IP报文是将第一网络标识封装进待分流的IP报文获得,所述第一网络标识与所述待分流的IP报文对应;A receiving module, configured to receive a first IP message sent by a base station, wherein the first IP message is obtained by encapsulating a first network identifier into an IP message to be shunted, and the first network identifier corresponds to the IP message to be shunted;

转换模块,用于根据所述第一网络标识,对所述第一IP报文的源IP地址进行转换。A conversion module is used to convert the source IP address of the first IP message according to the first network identifier.

第五方面,提供了一种基站,包括处理器、存储器及存储在所述存储器上并可在所述处理器上运行的程序或指令,所述程序或指令被所述处理器执行时实现如第一方面所述的方法的步骤,或者实现如第二方面所述的方法的步骤。In the fifth aspect, a base station is provided, comprising a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein when the program or instruction is executed by the processor, the steps of the method described in the first aspect are implemented, or the steps of the method described in the second aspect are implemented.

第六方面,提供了一种可读存储介质,所述可读存储介质上存储程序或指令,所述程序或指令被处理器执行时实现如第一方面所述的方法的步骤,或者实现如第二方面所述的方法的步骤。In a sixth aspect, a readable storage medium is provided, on which a program or instruction is stored. When the program or instruction is executed by a processor, the steps of the method described in the first aspect are implemented, or the steps of the method described in the second aspect are implemented.

在本申请实施例中,基站获取待分流的IP报文对应的第一网络标识后,可以将第一网络标识封装进待分流的IP报文,获得第一IP报文,并将第一IP报文发送给地址转换设备,从而使得地址转换设备根据此第一网络标识,对第一IP报文即待分流的IP报文的源IP地址进行转换,这样由于不同网络标识能够区分不同会话及业务,因此可以实现根据不同会话及业务对同一终端的IP报文进行多IP地址的映射,进而满足同一终端同时访问多个网络的需求。In an embodiment of the present application, after the base station obtains the first network identifier corresponding to the IP message to be diverted, it can encapsulate the first network identifier into the IP message to be diverted, obtain the first IP message, and send the first IP message to the address conversion device, so that the address conversion device converts the source IP address of the first IP message, i.e., the IP message to be diverted, according to the first network identifier. In this way, since different network identifiers can distinguish different sessions and services, it is possible to map multiple IP addresses for IP messages of the same terminal according to different sessions and services, thereby meeting the needs of the same terminal accessing multiple networks at the same time.

附图说明BRIEF DESCRIPTION OF THE DRAWINGS

图1是本申请实施例提供的一种地址转换方法的流程图;FIG1 is a flow chart of an address conversion method provided by an embodiment of the present application;

图2是本申请实施例中基站的示意图;FIG2 is a schematic diagram of a base station in an embodiment of the present application;

图3是本申请实施例中包含网络标识的IP报文的示意图;FIG3 is a schematic diagram of an IP message including a network identifier in an embodiment of the present application;

图4是本申请实施例提供的另一种地址转换方法的流程图;FIG4 is a flow chart of another address conversion method provided in an embodiment of the present application;

图5是本申请实施例中的防IP地址碰撞检测过程的示意图;FIG5 is a schematic diagram of an anti-IP address collision detection process in an embodiment of the present application;

图6A是本申请实例中的基站分流示意图;FIG6A is a schematic diagram of base station traffic distribution in an example of the present application;

图6B是本申请实例中业务1所对应的IP报文示意图;FIG6B is a schematic diagram of an IP message corresponding to service 1 in the example of the present application;

图6C是本申请实例中业务2所对应的IP报文示意图;FIG6C is a schematic diagram of an IP message corresponding to service 2 in the present application example;

图7是本申请实施例提供的一种地址转换装置的结构示意图;FIG7 is a schematic diagram of the structure of an address conversion device provided in an embodiment of the present application;

图8是本申请实施例提供的另一种地址转换装置的结构示意图;FIG8 is a schematic diagram of the structure of another address conversion device provided in an embodiment of the present application;

图9是本申请实施例提供的一种通信设备的结构示意图。FIG. 9 is a schematic diagram of the structure of a communication device provided in an embodiment of the present application.

具体实施方式Detailed ways

下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

本申请的说明书和权利要求书中的术语“第一”、“第二”等是用于区别类似的对象,而不用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便本申请的实施例能够以除了在这里图示或描述的那些以外的顺序实施,且“第一”、“第二”等所区分的对象通常为一类,并不限定对象的个数,例如第一对象可以是一个,也可以是多个。The terms "first", "second", etc. in the specification and claims of this application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the terms used in this way can be interchangeable under appropriate circumstances, so that the embodiments of this application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more.

需指出的,本申请实施例适用的场景包括但不限于同一终端进行多个子网同时访问的场景,在这种场景下,同一终端的不同业务属于不同子网,比如移动终端同时访问不同网段、且相互隔离的研发内网和办公内网。It should be pointed out that the scenarios to which the embodiments of the present application are applicable include but are not limited to scenarios in which the same terminal accesses multiple subnets at the same time. In this scenario, different services of the same terminal belong to different subnets, such as a mobile terminal simultaneously accessing different network segments and isolated R&D intranets and office intranets.

为了解决目前无法满足同一终端同时访问多个网络的需求的问题,本申请提供了一种在基站分流场景下基于网络标识的网络地址转换(Network Address Translation,NAT)方案,可以根据网络标识进行IP地址转换,从而实现根据不同会话及业务进行多IP地址的映射,进而满足同一终端同时访问多个网络的需求。In order to solve the problem that the demand for the same terminal to access multiple networks at the same time cannot be met at present, the present application provides a network address translation (NAT) solution based on network identifier in a base station diversion scenario, which can perform IP address conversion according to the network identifier, thereby realizing the mapping of multiple IP addresses according to different sessions and services, thereby meeting the demand for the same terminal to access multiple networks at the same time.

可选的,本申请实施例中的网络标识可以为5G蜂窝网络标识。Optionally, the network identifier in the embodiment of the present application may be a 5G cellular network identifier.

下面结合附图,通过具体的实施例及其应用场景对本申请实施例提供的地址转换方法、装置、通信设备及可读存储介质进行详细地说明。The address conversion method, apparatus, communication device and readable storage medium provided in the embodiments of the present application are described in detail below with reference to the accompanying drawings through specific embodiments and their application scenarios.

请参见图1,图1是本申请实施例提供的一种地址转换方法的流程图,该方法应用于基站,如图1所示,该方法包括如下步骤:Please refer to FIG. 1, which is a flow chart of an address conversion method provided in an embodiment of the present application. The method is applied to a base station. As shown in FIG. 1, the method includes the following steps:

步骤11:基站获取待分流的IP报文对应的第一网络标识;Step 11: The base station obtains a first network identifier corresponding to the IP message to be diverted;

步骤12:基站将所述第一网络标识封装进待分流的IP报文,获得第一IP报文;Step 12: The base station encapsulates the first network identifier into the IP message to be split, and obtains a first IP message;

步骤13:基站将第一IP报文发送给地址转换设备,所述第一网络标识用于对第一IP报文的源IP地址进行转换。Step 13: The base station sends the first IP message to the address translation device, and the first network identifier is used to translate the source IP address of the first IP message.

这里,上述对第一IP报文的源IP地址进行转换可理解为对相应待分流的IP报文的源IP地址进行转换。在进行地址转换之后,即可按照分流规则对相应数据进行分流。Here, the conversion of the source IP address of the first IP message can be understood as the conversion of the source IP address of the corresponding IP message to be diverted. After the address conversion is performed, the corresponding data can be diverted according to the diversion rule.

上述地址转换设备可选为服务器、防火墙设备、网络侧的除基站外的其他设备等,只要实现IP地址转换即可。地址转换设备在接收到第一IP报文后,即可根据其中携带的第一网络标识,对第一IP报文即待分流的IP报文的源IP地址进行转换。The above-mentioned address conversion device can be selected as a server, a firewall device, other devices on the network side except the base station, etc., as long as it realizes IP address conversion. After receiving the first IP message, the address conversion device can convert the source IP address of the first IP message, i.e., the IP message to be diverted, according to the first network identifier carried therein.

可选的,所述第一网络标识可以包括但不限于以下至少一项:Optionally, the first network identifier may include but is not limited to at least one of the following:

切片信息,比如切片标识ID、Slice information, such as slice ID,

服务质量流标识(QoS Flow Identifier,QFI)等。Quality of Service Flow Identifier (QFI), etc.

一些实施例中,基站可以从服务数据适配协议(Service Data AdaptationProtocol,SDAP)头(header)中提取待分流的IP报文对应的切片ID、QFI等网络标识。而这些网络标识可以通过用户签约或重配过程,由核心网下发给基站和终端。In some embodiments, the base station can extract the slice ID, QFI and other network identifiers corresponding to the IP message to be diverted from the Service Data Adaptation Protocol (SDAP) header. These network identifiers can be sent to the base station and the terminal by the core network through the user signing or reconfiguration process.

本申请实施例的地址转换方法,基站获取待分流的IP报文对应的第一网络标识后,可以将第一网络标识封装进待分流的IP报文,获得第一IP报文,并将第一IP报文发送给地址转换设备,从而使得地址转换设备根据此第一网络标识,对第一IP报文即待分流的IP报文的源IP地址进行转换,这样由于不同网络标识能够区分不同会话及业务,因此可以实现根据不同会话及业务对同一终端的IP报文进行多IP地址的映射,进而满足同一终端同时访问多个网络的需求。In the address conversion method of the embodiment of the present application, after the base station obtains the first network identifier corresponding to the IP message to be diverted, it can encapsulate the first network identifier into the IP message to be diverted, obtain the first IP message, and send the first IP message to the address conversion device, so that the address conversion device converts the source IP address of the first IP message, i.e., the IP message to be diverted, according to the first network identifier. In this way, since different network identifiers can distinguish different sessions and services, it is possible to map multiple IP addresses for IP messages of the same terminal according to different sessions and services, thereby meeting the need for the same terminal to access multiple networks at the same time.

进一步的,由于网络标识可以包括切片ID和/或QFI等信息,因此可以实现多粒度灵活的NAT转换,简化NAT转换时所需配置,使整体NAT转换过程更加自动化。Furthermore, since the network identifier can include information such as slice ID and/or QFI, multi-granularity flexible NAT conversion can be achieved, simplifying the configuration required for NAT conversion and making the overall NAT conversion process more automated.

可选的,上述的待分流的IP报文可以包括一个或多个IP报文。在待分流的IP报文包括多个IP报文时,该多个IP报文可以分别对应不同的网络标识,此时将不同的网络标识分别封装进对应的IP报文。比如,待分流的IP报文包括IP报文1和IP报文2,且IP报文1对应切片ID 1,IP报文2对应切片ID2;之后,将切片ID 1封装进IP报文1,和将切片ID 2封装进IP报文2。Optionally, the above-mentioned IP message to be diverted may include one or more IP messages. When the IP message to be diverted includes multiple IP messages, the multiple IP messages may correspond to different network identifiers respectively, and the different network identifiers are respectively encapsulated into corresponding IP messages. For example, the IP message to be diverted includes IP message 1 and IP message 2, and IP message 1 corresponds to slice ID 1, and IP message 2 corresponds to slice ID 2; then, slice ID 1 is encapsulated into IP message 1, and slice ID 2 is encapsulated into IP message 2.

一些实施例中,上述待分流的IP报文包括多个IP报文,该多个IP报文分别对应不同的网络标识,且该多个IP报文为待分流给同一终端的IP报文。这时,借助本实施例中的地址转换方法,可以根据此不同的网络标识,分别对同一终端的多个IP报文中的源IP地址进行转换,从而实现根据不同会话及业务对同一终端的IP报文进行多IP地址的映射,进而满足同一终端同时访问多个网络的需求。In some embodiments, the IP message to be diverted includes multiple IP messages, each of which corresponds to a different network identifier, and the multiple IP messages are IP messages to be diverted to the same terminal. At this time, with the help of the address conversion method in this embodiment, the source IP addresses in the multiple IP messages of the same terminal can be converted according to the different network identifiers, thereby realizing the mapping of multiple IP addresses for the IP messages of the same terminal according to different sessions and services, thereby meeting the needs of the same terminal to access multiple networks at the same time.

如图2所示,基站的协议栈包括SDAP层、分组数据汇聚协议(Packet DataConvergence Protocol,PDCP)层、无线链路控制(Radio Link Control,RLC)层、媒体接入控制(Medium Access Control,MAC)层和物理层(Physical Layer,PHY)。本实施例中,在此基础上,可以新增基站分流模块,用于将网络标识封装进对应的IP报文等。As shown in Figure 2, the protocol stack of the base station includes the SDAP layer, the Packet Data Convergence Protocol (PDCP) layer, the Radio Link Control (RLC) layer, the Medium Access Control (MAC) layer and the Physical Layer (PHY). In this embodiment, on this basis, a base station diversion module can be added to encapsulate the network identifier into the corresponding IP message, etc.

一些实施例中,在将网络标识封装进对应的IP报文时,网络标识在IP报文中的具体位置可以如图3所示,即在IP报文的包头中新增一选项用于承载网络标识,使得IP报文除了具备自身寻址的IP五元组以外,还具有网络标识,比如切片ID、QFI等。其中新增选项的大小比如为32。In some embodiments, when the network identifier is encapsulated into the corresponding IP message, the specific position of the network identifier in the IP message can be as shown in FIG. 3, that is, a new option is added in the header of the IP message to carry the network identifier, so that the IP message has a network identifier in addition to the IP five-tuple for its own addressing, such as a slice ID, QFI, etc. The size of the new option is, for example, 32.

请参见图4,图4是本申请实施例提供的一种地址转换方法的流程图,该方法应用于地址转换设备,该地址转换设备可选为服务器、防火墙设备、网络侧的除基站外的其他设备等。如图4所示,该方法包括如下步骤:Please refer to Figure 4, which is a flow chart of an address translation method provided in an embodiment of the present application. The method is applied to an address translation device, which can be a server, a firewall device, or other devices on the network side other than a base station. As shown in Figure 4, the method includes the following steps:

步骤41:地址转换设备接收基站发送的第一IP报文,所述第一IP报文是将第一网络标识封装进待分流的IP报文获得,所述第一网络标识与待分流的IP报文对应;Step 41: The address translation device receives a first IP message sent by a base station, where the first IP message is obtained by encapsulating a first network identifier into an IP message to be split, and the first network identifier corresponds to the IP message to be split;

步骤42:地址转换设备根据第一网络标识,对第一IP报文的源IP地址进行转换。Step 42: The address translation device translates the source IP address of the first IP message according to the first network identifier.

这里,上述对第一IP报文的源IP地址进行转换可理解为对相应待分流的IP报文的源IP地址进行转换。在进行地址转换之后,即可按照分流规则对相应数据进行分流。Here, the conversion of the source IP address of the first IP message can be understood as the conversion of the source IP address of the corresponding IP message to be diverted. After the address conversion is performed, the corresponding data can be diverted according to the diversion rule.

可选的,所述第一网络标识可以包括但不限于以下至少一项:Optionally, the first network identifier may include but is not limited to at least one of the following:

切片信息,比如切片标识ID、Slice information, such as slice ID,

服务质量流标识(QoS Flow Identifier,QFI)等。Quality of Service Flow Identifier (QFI), etc.

可选的,上述的待分流的IP报文可以包括一个或多个IP报文。在待分流的IP报文包括多个IP报文时,该多个IP报文可以分别对应不同的网络标识,此时将不同的网络标识分别封装进对应的IP报文。比如,待分流的IP报文包括IP报文1和IP报文2,且IP报文1对应切片ID 1,IP报文2对应切片ID2;之后,将切片ID 1封装进IP报文1,和将切片ID 2封装进IP报文2。Optionally, the above-mentioned IP message to be diverted may include one or more IP messages. When the IP message to be diverted includes multiple IP messages, the multiple IP messages may correspond to different network identifiers respectively, and the different network identifiers are encapsulated into corresponding IP messages respectively. For example, the IP message to be diverted includes IP message 1 and IP message 2, and IP message 1 corresponds to slice ID 1, and IP message 2 corresponds to slice ID 2; then, slice ID 1 is encapsulated into IP message 1, and slice ID 2 is encapsulated into IP message 2.

一些实施例中,上述地址转换设备包含NAT模块,该NAT模块用于在接收到包含网络标识的IP报文后,根据本地配置规则进行IP地址转换,以及根据该网络标识对相应IP报文进行IP地址转换。In some embodiments, the address translation device includes a NAT module, which is used to perform IP address translation according to local configuration rules after receiving an IP message including a network identifier, and to perform IP address translation on the corresponding IP message according to the network identifier.

本申请实施例的地址转换方法,地址转换设备可以根据接收到的第一IP报文中的第一网络标识,对第一IP报文即待分流的IP报文的源IP地址进行转换,这样由于不同网络标识能够区分不同会话及业务,因此可以实现根据不同会话及业务对同一终端的IP报文进行多IP地址的映射,进而满足同一终端同时访问多个网络的需求,保证多个网络互通。In the address conversion method of the embodiment of the present application, the address conversion device can convert the source IP address of the first IP message, i.e., the IP message to be diverted, according to the first network identifier in the received first IP message. In this way, since different network identifiers can distinguish different sessions and services, it is possible to map multiple IP addresses for the IP message of the same terminal according to different sessions and services, thereby meeting the needs of the same terminal to access multiple networks at the same time and ensuring the interconnection of multiple networks.

本申请实施例中,地址转换设备可以根据网络标识进行免配置的IP地址转换,也可以结合网络标识与终端唯一标识进行静态NAT转换,说明如下。In an embodiment of the present application, the address translation device can perform configuration-free IP address translation based on the network identifier, or can perform static NAT translation in combination with the network identifier and the terminal unique identifier, as described below.

可选的,当根据网络标识进行免配置的IP地址转换时,上述根据第一网络标识,对第一IP报文的源IP地址进行转换的过程可以包括:Optionally, when configuration-free IP address conversion is performed according to the network identifier, the process of converting the source IP address of the first IP message according to the first network identifier may include:

地址转换设备构建第一网络标识下的第一IP地址池,所述第一IP地址池中包括与所述第一IP报文的目的IP地址(即待分流的IP报文的目的IP地址)同网段的预设个IP地址;其中,该预设个IP地址的个数可以基于实际情况而定,比如为20个等,对此不作限定;The address translation device constructs a first IP address pool under the first network identifier, wherein the first IP address pool includes a preset number of IP addresses in the same network segment as the destination IP address of the first IP message (i.e., the destination IP address of the IP message to be diverted); wherein the number of the preset number of IP addresses may be determined based on actual conditions, such as 20, etc., and is not limited thereto;

地址转换设备从所述第一IP地址池中选择第一IP地址;比如,可以随机从所述第一IP地址池中选择第一IP地址,即第一IP地址可以为第一IP地址池中的任一IP地址;The address translation device selects a first IP address from the first IP address pool; for example, the first IP address may be randomly selected from the first IP address pool, that is, the first IP address may be any IP address in the first IP address pool;

地址转换设备将所述第一IP报文的源IP地址转换为所述第一IP地址,即将待分流的IP报文的源IP地址转换为所述第一IP地址。The address conversion device converts the source IP address of the first IP packet into the first IP address, that is, converts the source IP address of the IP packet to be diverted into the first IP address.

这样,可以在无需本地配置的情况下,基于网络标识动态的对IP报文进行NAT转换。In this way, NAT conversion can be performed dynamically on IP packets based on network identifiers without local configuration.

需指出的,上述免配置转换时的基于的网络标识可选为切片ID或者QFI,相应执行的转换过程相同,仅是基于的网络标识的颗粒度不同。除了上述网络标识之外,也可采用其他可获得网络标识执行源IP地址转换过程。It should be noted that the network identifier based on the above configuration-free conversion can be selected as a slice ID or QFI, and the corresponding conversion process is the same, only the granularity of the network identifier is different. In addition to the above network identifier, other available network identifiers can also be used to perform the source IP address conversion process.

例如,以网络标识为切片ID为例,NAT模块识别接收到的IP报文中的切片ID之后,可以自主顺位选择与该IP报文的目的IP地址同网段的20个IP地址组成该切片ID下的IP地址池,并从该切片ID下的IP地址池中选择一个IP地址对该IP报文的源IP地址进行NAT转换。For example, taking the network identifier as a slice ID, after the NAT module identifies the slice ID in the received IP message, it can autonomously select 20 IP addresses in the same network segment as the destination IP address of the IP message to form an IP address pool under the slice ID, and select an IP address from the IP address pool under the slice ID to perform NAT conversion on the source IP address of the IP message.

又例如,以网络标识为QFI为例,NAT模块识别接收到的IP报文中的QFI之后,可以自主顺位选择与该IP报文的目的IP地址同网段的20个IP地址组成该QFI下的IP地址池,并从该QFI下的地址池中选择一个IP地址对该IP报文的源IP地址进行NAT转换。For another example, taking the network identifier as QFI, after the NAT module identifies the QFI in the received IP message, it can autonomously select 20 IP addresses in the same network segment as the destination IP address of the IP message to form an IP address pool under the QFI, and select an IP address from the address pool under the QFI to perform NAT conversion on the source IP address of the IP message.

可选的,当结合网络标识与终端唯一标识进行静态NAT转换时,上述根据第一网络标识,对第一IP报文的源IP地址进行转换的过程可以包括:Optionally, when static NAT conversion is performed in combination with the network identifier and the terminal unique identifier, the process of converting the source IP address of the first IP packet according to the first network identifier may include:

地址转换设备确定第一网络标识下为第一终端配置的固定IP地址,所述第一终端为第一IP报文对应的终端;比如,可以根据第一终端的唯一标识,为第一终端配置该固定IP地址,该固定IP地址为第一网络标识下静态映射的IP地址,比如为基站本地配置的固定IP地址;The address conversion device determines a fixed IP address configured for a first terminal under a first network identifier, where the first terminal is a terminal corresponding to the first IP message; for example, the fixed IP address can be configured for the first terminal according to the unique identifier of the first terminal, where the fixed IP address is a statically mapped IP address under the first network identifier, such as a fixed IP address locally configured for the base station;

地址转换设备将第一IP报文的源IP地址转换为所述固定IP地址。The address translation device translates the source IP address of the first IP message into the fixed IP address.

这样,可以针对同一终端,借助本地配置的固定IP地址,根据不同业务需求进行不同IP地址映射。In this way, for the same terminal, different IP address mappings can be performed according to different business requirements using the locally configured fixed IP address.

需指出的,上述静态转换时的基于的网络标识可选为切片ID或者QFI,相应执行的转换过程相同,仅是基于的网络标识的颗粒度不同。除了上述网络标识之外,也可采用其他可获得网络标识执行源IP地址转换过程。It should be noted that the network identifier based on the above static conversion can be selected as a slice ID or QFI, and the corresponding conversion process is the same, only the granularity of the network identifier is different. In addition to the above network identifier, other available network identifiers can also be used to perform the source IP address conversion process.

例如,以网络标识为切片ID为例,NAT模块识别接收到的IP报文中的切片ID之后,可以先确定该切片ID下为该IP报文对应的终端配置的固定IP地址,然后将该IP报文中的源IP地址转换为该固定IP地址。For example, taking the network identifier as a slice ID, after the NAT module identifies the slice ID in the received IP message, it can first determine the fixed IP address configured for the terminal corresponding to the IP message under the slice ID, and then convert the source IP address in the IP message into the fixed IP address.

又例如,以网络标识为QFI为例,NAT模块识别接收到的IP报文中的QFI之后,可以先确定该QFI下为该IP报文对应的终端配置的固定IP地址,然后将该IP报文中的源IP地址转换为该固定IP地址。For another example, taking the network identifier as QFI, after the NAT module identifies the QFI in the received IP message, it can first determine the fixed IP address configured for the terminal corresponding to the IP message under the QFI, and then convert the source IP address in the IP message into the fixed IP address.

一些实施例中,可以基于目的IP地址实现动态NAT转换,无需进行本地配置。NAT模块自主识别目的IP地址的网段,并自主选择同网段的20个地址组成映射地址池,实现动态NAT功能。In some embodiments, dynamic NAT conversion can be implemented based on the destination IP address without local configuration. The NAT module autonomously identifies the network segment of the destination IP address and autonomously selects 20 addresses in the same network segment to form a mapping address pool to implement the dynamic NAT function.

本申请实施例中,当动态进行NAT转换时,可以新增IP地址防碰撞机制,如在NAT模块中新增IP地址防碰撞机制,防止自主分配的IP地址与其他已分配的IP地址或局域网内的其他主机的IP地址重合。In an embodiment of the present application, when NAT conversion is performed dynamically, a new IP address collision prevention mechanism can be added, such as adding a new IP address collision prevention mechanism in the NAT module to prevent the autonomously assigned IP address from overlapping with other assigned IP addresses or IP addresses of other hosts in the local area network.

可选的,上述构建第一网络标识下的第一IP地址池之后,且从第一IP地址池中选择第一IP地址之前,本实施例中的地址转换方法还可以包括:Optionally, after constructing the first IP address pool under the first network identifier and before selecting the first IP address from the first IP address pool, the address conversion method in this embodiment may further include:

地址转换设备判断所述第一IP地址池中是否包括已占用IP地址(即已占用的IP地址);The address translation device determines whether the first IP address pool includes an occupied IP address (i.e., an occupied IP address);

当所述第一IP地址池中包括已占用IP地址时,地址转换设备从所述第一IP地址池中剔除已占用IP地址,并添加同网段的新的未占用IP地址至所述第一IP地址池。比如,若从第一IP地址池中剔除x个已占用IP地址,可以相应添加x个新的未占用IP地址至第一IP地址池,以保证第一IP地址池中具有足够的未占用地址供选择。When the first IP address pool includes occupied IP addresses, the address translation device removes the occupied IP addresses from the first IP address pool and adds new unoccupied IP addresses in the same network segment to the first IP address pool. For example, if x occupied IP addresses are removed from the first IP address pool, x new unoccupied IP addresses can be added to the first IP address pool accordingly to ensure that there are enough unoccupied addresses in the first IP address pool for selection.

其中,当第一IP地址池中不包括已占用IP地址时,无需对第一IP地址池进行更新。When the first IP address pool does not include occupied IP addresses, there is no need to update the first IP address pool.

这样,可以保证第一IP地址池中的IP地址都为未被占用的地址,从而防止从第一IP地址池中选择的IP地址与其他占用的IP地址重合,进而保证正常分流。In this way, it can be ensured that the IP addresses in the first IP address pool are all unoccupied addresses, thereby preventing the IP address selected from the first IP address pool from overlapping with other occupied IP addresses, thereby ensuring normal traffic diversion.

可选的,上述判断所述第一IP地址池中是否包括已占用IP地址的方式可以为:对所述第一IP地址池中的预设个IP地址与预设地址表中的IP地址进行比对,所述预设地址表由已占用IP地址组成;其中,若第一IP地址池中包括存在于所述预设地址表中的IP地址,则第一IP地址池中包括已占用IP地址;或者,若第一IP地址池中不包括存在于所述预设地址表中的IP地址,则第一IP地址池中不包括已占用IP地址。这样,借助由已占用IP地址组成预设地址表,可以便捷判断出第一IP地址池中是否包括已占用地址。Optionally, the above-mentioned method for determining whether the first IP address pool includes occupied IP addresses can be: comparing the preset IP addresses in the first IP address pool with the IP addresses in the preset address table, the preset address table consisting of occupied IP addresses; wherein, if the first IP address pool includes IP addresses existing in the preset address table, the first IP address pool includes occupied IP addresses; or, if the first IP address pool does not include IP addresses existing in the preset address table, the first IP address pool does not include occupied IP addresses. In this way, with the help of the preset address table consisting of occupied IP addresses, it is possible to conveniently determine whether the first IP address pool includes occupied addresses.

需指出的,在每次做完NAT转换且没有释放转换后IP地址时,需将转换使用的IP地址加入上述预设地址表,参与下次防IP地址碰撞检测,同时递补一位顺位IP地址在新增地址池中。It should be noted that each time NAT conversion is completed and the converted IP address is not released, the IP address used for the conversion needs to be added to the above-mentioned preset address table to participate in the next IP address collision detection, and at the same time, a priority IP address is added to the newly added address pool.

例如,可以在NAT模块维护局域网内的一张IP地址占用表,初始配置时,将局域网内服务器占用的IP地址均导入。NAT模块识别某IP报文中的网络标识之后,在后续选择IP地址池时进行的防IP地址碰撞检测过程可以如图5所示,包括如下步骤:For example, a table of IP address occupation in the local area network can be maintained in the NAT module, and the IP addresses occupied by the servers in the local area network are all imported during the initial configuration. After the NAT module identifies the network identifier in an IP message, the anti-IP address collision detection process performed when the IP address pool is subsequently selected can be shown in Figure 5, including the following steps:

S1:选择与目的IP地址同网段的预设个IP地址组成地址池1;S1: Select the preset IP addresses in the same network segment as the destination IP address to form address pool 1;

S2:对地址池1中的预设个IP地址与预配置的IP地址占用表中的IP地址进行碰撞比对,判断地址池1中是否包括已占用IP地址;S2: performing a collision comparison between the preset IP addresses in the address pool 1 and the IP addresses in the pre-configured IP address occupation table to determine whether the address pool 1 includes an occupied IP address;

S3:当地址池1中包括已占用IP地址时,从地址池1中剔除已占用IP地址,并顺位加入同网段的下一IP地址至地址池1;S3: When address pool 1 includes an occupied IP address, remove the occupied IP address from address pool 1 and add the next IP address in the same network segment to address pool 1 in sequence;

之后,可以重复执行S2和S3,直至地址池1中不包括已占用IP地址,并执行S4。Afterwards, S2 and S3 may be repeatedly executed until the address pool 1 does not include occupied IP addresses, and S4 is executed.

S4:更新IP地址占用表,并存储地址池1以用于NAT转换。S4: Update the IP address occupation table and store address pool 1 for NAT conversion.

下面结合具体实例对本申请进行说明。The present application is described below with reference to specific examples.

假设对于某终端,以5G系统为例,如图6A所示,在基站分流场景下进行两种典型业务:Assume that for a certain terminal, taking a 5G system as an example, as shown in FIG6A , two typical services are performed in a base station offload scenario:

业务1:对应数据网络名称DNN1,签约切片1,访问研发内网,采取记录的固定IP地址172.10.1.140,由服务端下行主动寻找,目的IP地址IP1为172.10.1.126;Service 1: Corresponding to the data network name DNN1, contracting slice 1, accessing the R&D intranet, using the recorded fixed IP address 172.10.1.140, the server actively searches for the destination IP address IP1 as 172.10.1.126;

业务2:对应DNN2,签约切片2,访问办公内网,只需要正常的访问来获取数据,目的IP地址IP2为117.10.1.135。Service 2: corresponds to DNN2, signed slice 2, accesses the office intranet, and only requires normal access to obtain data. The destination IP address IP2 is 117.10.1.135.

此时在NAT模块上可进行灵活配置,切片ID 1(对应切片1)为静态NAT模式,且映射静态IP地址为172.10.1.140;切片ID 2(对应切片2)为动态NAT模式。At this time, flexible configuration can be performed on the NAT module. Slice ID 1 (corresponding to slice 1) is in static NAT mode, and the mapped static IP address is 172.10.1.140; slice ID 2 (corresponding to slice 2) is in dynamic NAT mode.

对于业务1,基站分流模块可将切片ID 1封装进IP报文,如在网络出口将业务1的IP报文包头封装为图6B所示。之后,NAT模块解析包含切片ID1的IP报文后,可将第1连接的IP报文中的源IP地址192.168.1.100映射为固定IP地址172.10.1.140。此外,也可将第2连接的IP报文中的源IP地址192.168.1.158和第2连接的IP报文中的源IP地址192.168.1.169映射为固定IP地址172.10.1.140。For service 1, the base station traffic diversion module can encapsulate the slice ID 1 into the IP message, such as encapsulating the IP message header of service 1 at the network exit as shown in Figure 6B. After that, after the NAT module parses the IP message containing slice ID 1, the source IP address 192.168.1.100 in the IP message of the first connection can be mapped to the fixed IP address 172.10.1.140. In addition, the source IP address 192.168.1.158 in the IP message of the second connection and the source IP address 192.168.1.169 in the IP message of the second connection can also be mapped to the fixed IP address 172.10.1.140.

对于业务2,基站分流模块可将切片ID 2封装进IP报文,如在网络出口将业务2的IP报文包头封装为图6C所示。之后,NAT模块解析包含切片ID2的IP报文后,可按照目的IP地址117.10.1.135的网段,按需选取20个IP地址构成地址池{117.10.1.100,117.10.1.101,......,117.10.1.119},并进行防IP地址碰撞检测;若检测到此20个IP地址均不在已占用IP地址列表内,则记录此地址池为切片ID2下的地址池。后续在遇到切片ID2的地址转换还可以采用此地址池进行映射。假设本次映射选择了IP地址117.10.1.104进行动态地址转换,则将IP报文中的源IP地址192.168.2.100修改为117.10.1.104,并且在切片ID2的地址池中删除IP地址117.10.1.104,新增IP地址117.10.1.120,检测是否在已占用IP地址列表内,如没有,更新新的地址池。For service 2, the base station diversion module can encapsulate slice ID 2 into the IP message, such as encapsulating the IP message header of service 2 at the network exit as shown in Figure 6C. After that, after the NAT module parses the IP message containing slice ID2, it can select 20 IP addresses as needed to form an address pool {117.10.1.100, 117.10.1.101, ..., 117.10.1.119} according to the network segment of the destination IP address 117.10.1.135, and perform anti-IP address collision detection; if it is detected that these 20 IP addresses are not in the list of occupied IP addresses, then this address pool is recorded as the address pool under slice ID2. This address pool can also be used for mapping when encountering address conversion of slice ID2 in the future. Assuming that IP address 117.10.1.104 is selected for dynamic address translation in this mapping, the source IP address 192.168.2.100 in the IP packet is modified to 117.10.1.104, and the IP address 117.10.1.104 is deleted from the address pool of slice ID2, and the IP address 117.10.1.120 is added. Check whether it is in the list of occupied IP addresses. If not, update the new address pool.

需要说明的是,本申请实施例提供的地址转换方法,执行主体可以为地址转换装置,或者该地址转换装置中的用于执行地址转换方法的控制模块。本申请实施例中以地址转换装置执行地址转换方法为例,说明本申请实施例提供的地址转换装置。It should be noted that the address conversion method provided in the embodiment of the present application can be executed by an address conversion device or a control module in the address conversion device for executing the address conversion method. In the embodiment of the present application, the address conversion device provided in the embodiment of the present application is described by taking the address conversion method executed by the address conversion device as an example.

请参见图7,图7是本申请实施例提供的一种地址转换装置的结构示意图,该装置应用于基站,如图7所示,地址转换装置70包括:Please refer to FIG. 7, which is a schematic diagram of the structure of an address conversion device provided in an embodiment of the present application. The device is applied to a base station. As shown in FIG. 7, the address conversion device 70 includes:

获取模块71,用于获取待分流的IP报文对应的第一网络标识;An acquisition module 71 is used to acquire a first network identifier corresponding to the IP packet to be diverted;

封装模块72,用于将所述第一网络标识封装进所述待分流的IP报文,获得第一IP报文;An encapsulation module 72, configured to encapsulate the first network identifier into the IP message to be diverted, to obtain a first IP message;

发送模块73,用于将所述第一IP报文发送给地址转换设备,其中,所述第一网络标识用于对所述第一IP报文的源IP地址进行转换。The sending module 73 is used to send the first IP message to an address translation device, wherein the first network identifier is used to translate the source IP address of the first IP message.

可选的,所述第一网络标识包括以下至少一项:Optionally, the first network identifier includes at least one of the following:

切片信息;Slice information;

服务质量流标识QFI。Quality of service flow identifier QFI.

本申请实施例的地址转换装置70,可以实现上述图1所示的方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。The address conversion device 70 of the embodiment of the present application can implement each process of the method embodiment shown in FIG. 1 above, and can achieve the same technical effect. To avoid repetition, it will not be described here.

请参见图8,图8是本申请实施例提供的一种地址转换装置的结构示意图,该装置应用于地址转换设备,该地址转换设备可选为服务器、防火墙设备、网络侧的除基站外的其他设备等。如图8所示,地址转换装置80包括:Please refer to Figure 8, which is a schematic diagram of the structure of an address translation device provided in an embodiment of the present application. The device is applied to an address translation device, which can be a server, a firewall device, or other devices on the network side other than a base station. As shown in Figure 8, the address translation device 80 includes:

接收模块81,用于接收基站发送的第一IP报文,其中,所述第一IP报文是将第一网络标识封装进待分流的IP报文获得,所述第一网络标识与所述待分流的IP报文对应;A receiving module 81, configured to receive a first IP message sent by a base station, wherein the first IP message is obtained by encapsulating a first network identifier into an IP message to be split, and the first network identifier corresponds to the IP message to be split;

转换模块82,用于根据所述第一网络标识,对所述第一IP报文的源IP地址进行转换。The conversion module 82 is used to convert the source IP address of the first IP message according to the first network identifier.

可选的,所述转换模块82包括:Optionally, the conversion module 82 includes:

构建单元,用于构建所述第一网络标识下的第一IP地址池,所述第一IP地址池中包括与所述第一IP报文的目的IP地址同网段的预设个IP地址;A construction unit, configured to construct a first IP address pool under the first network identifier, wherein the first IP address pool includes a preset number of IP addresses in the same network segment as the destination IP address of the first IP message;

选择单元,用于从所述第一IP地址池中选择第一IP地址;A selection unit, configured to select a first IP address from the first IP address pool;

第一转换单元,用于将所述第一IP报文的源IP地址转换为所述第一IP地址。The first conversion unit is used to convert the source IP address of the first IP message into the first IP address.

可选的,所述转换模块82包括:Optionally, the conversion module 82 includes:

确定单元,用于确定所述第一网络标识下为第一终端配置的固定IP地址,所述第一终端为所述第一IP报文对应的终端;a determining unit, configured to determine a fixed IP address configured for a first terminal under the first network identifier, the first terminal being a terminal corresponding to the first IP message;

第二转换单元,用于将所述第一IP报文的源IP地址转换为所述固定IP地址。The second conversion unit is used to convert the source IP address of the first IP message into the fixed IP address.

可选的,所述第一网络标识包括以下至少一项:Optionally, the first network identifier includes at least one of the following:

切片信息;Slice information;

服务质量流标识QFI。Quality of service flow identifier QFI.

可选的,地址转换装置80还包括:Optionally, the address conversion device 80 further includes:

判断模块,用于在构建所述第一网络标识下的第一IP地址池之后,且从所述第一IP地址池中选择第一IP地址之前,判断所述第一IP地址池中是否包括已占用IP地址;A judgment module, configured to judge whether the first IP address pool includes an occupied IP address after constructing the first IP address pool under the first network identifier and before selecting the first IP address from the first IP address pool;

更新模块,用于当所述第一IP地址池中包括已占用IP地址时,从所述第一IP地址池中剔除所述已占用IP地址,并添加同网段的新的未占用IP地址至所述第一IP地址池。An update module is used to remove occupied IP addresses from the first IP address pool when the first IP address pool includes occupied IP addresses, and to add new unoccupied IP addresses in the same network segment to the first IP address pool.

可选的,所述判断模块具体用于:对所述第一IP地址池中的预设个IP地址与预设地址表中的IP地址进行比对,所述预设地址表由已占用IP地址组成;其中,若所述第一IP地址池中包括存在于所述预设地址表中的IP地址,则所述第一IP地址池中包括已占用IP地址;或者,若所述第一IP地址池中不包括存在于所述预设地址表中的IP地址,则所述第一IP地址池中不包括已占用IP地址。Optionally, the judgment module is specifically used to: compare the preset IP addresses in the first IP address pool with the IP addresses in the preset address table, and the preset address table consists of occupied IP addresses; wherein, if the first IP address pool includes IP addresses existing in the preset address table, then the first IP address pool includes occupied IP addresses; or, if the first IP address pool does not include IP addresses existing in the preset address table, then the first IP address pool does not include occupied IP addresses.

本申请实施例的地址转换装置80,可以实现上述图4所示的方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。The address conversion device 80 of the embodiment of the present application can implement each process of the method embodiment shown in FIG. 4 above, and can achieve the same technical effect. To avoid repetition, it will not be described again here.

可选的,如图9所示,本申请实施例还提供一种通信设备90,包括处理器91,存储器92,存储在存储器92上并可在所述处理器91上运行的程序或指令,例如,通信设备90为基站时,该程序或指令被处理器91执行时实现上述图1所示的地址转换方法实施例的各个过程,且能达到相同的技术效果;或者,通信设备90为地址转换设备时,该程序或指令被处理器91执行时实现上述图4所示的地址转换方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。Optionally, as shown in Figure 9, an embodiment of the present application further provides a communication device 90, including a processor 91, a memory 92, and a program or instruction stored in the memory 92 and executable on the processor 91. For example, when the communication device 90 is a base station, the program or instruction is executed by the processor 91 to implement the various processes of the address conversion method embodiment shown in Figure 1 above, and can achieve the same technical effect; or, when the communication device 90 is an address conversion device, the program or instruction is executed by the processor 91 to implement the various processes of the address conversion method embodiment shown in Figure 4 above, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

本申请实施例还提供了一种可读存储介质,其上存储有程序或指令,所述程序或指令被处理器执行时可实现上述图1或图4所示的地址转换方法实施例的各个过程且能达到相同的技术效果,为避免重复,这里不再赘述。An embodiment of the present application also provides a readable storage medium on which a program or instruction is stored. When the program or instruction is executed by a processor, the various processes of the address conversion method embodiment shown in the above-mentioned Figure 1 or Figure 4 can be implemented and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

计算机可读介质包括永久性和非永久性、可移动和非可移动媒体,可以由任何方法或技术来实现信息存储。信息可以是计算机可读指令、数据结构、程序的模块或其他数据。计算机的存储介质的例子包括,但不限于相变内存(PRAM)、静态随机存取存储器(SRAM)、动态随机存取存储器(DRAM)、其他类型的随机存取存储器(RAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、快闪记忆体或其他内存技术、只读光盘只读存储器(CD-ROM)、数字多功能光盘(DVD)或其他光学存储、磁盒式磁带,磁带磁磁盘存储或其他磁性存储设备或任何其他非传输介质,可用于存储可以被计算设备访问的信息。按照本文中的界定,计算机可读介质不包括暂存电脑可读媒体(transitory media),如调制的数据信号和载波。Computer readable media include permanent and non-permanent, removable and non-removable media, and can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.

上述本申请实施例序号仅仅为了描述,不代表实施例的优劣。The serial numbers of the embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.

通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台服务分类设备(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本申请各个实施例所述的方法。Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, disk, CD), and includes a number of instructions for enabling a service classification device (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in each embodiment of the present application.

以上所述仅是本申请的优选实施方式,应当指出,对于本技术领域的普通技术人员来说,在不脱离本申请原理的前提下,还可以做出若干改进和润饰,这些改进和润饰也应视为本申请的保护范围。The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.

Claims (12)

CN202211446009.6A2022-11-182022-11-18Address translation method, address translation device, communication equipment and readable storage mediumPendingCN118057860A (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN202211446009.6ACN118057860A (en)2022-11-182022-11-18Address translation method, address translation device, communication equipment and readable storage medium

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN202211446009.6ACN118057860A (en)2022-11-182022-11-18Address translation method, address translation device, communication equipment and readable storage medium

Publications (1)

Publication NumberPublication Date
CN118057860Atrue CN118057860A (en)2024-05-21

Family

ID=91068631

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN202211446009.6APendingCN118057860A (en)2022-11-182022-11-18Address translation method, address translation device, communication equipment and readable storage medium

Country Status (1)

CountryLink
CN (1)CN118057860A (en)

Similar Documents

PublicationPublication DateTitle
KR101119454B1 (en)Automatic selection of a home agent
CN112788644B (en)Edge distribution system and method for service data in mobile network
KR100750370B1 (en) Address acquisition
US6501746B1 (en)Mobile IP dynamic home address resolution
US9882866B2 (en)Address allocating method, apparatus, and system
CN113497754B (en)Forwarding path establishing method and device and computer readable storage medium
US20090113073A1 (en)Remote access system and its ip address assigning method
US7760666B2 (en)Method of generating and managing connection identifiers for supporting multicast for each group in IPv6-based wireless network and network interface using the method
JP2011515945A (en) Method and apparatus for communicating data packets between local networks
CN113364660B (en)Data packet processing method and device in LVS load balancing
CN114124618A (en)Message transmission method and electronic equipment
CN116886588A (en) A communication method, device and system
WO2022143395A1 (en)Redundant path creating method, apparatus, and system
CN102959906A (en) Routing method and device for host in multi-homing site
US20200267076A1 (en)Data routing in a customer-premises equipment using link aggregation
CN114785756B (en)Information sending method, device and equipment
CN102726075A (en)Business by-pass method, access network device and secure gateway
CN115643222A (en)Message transmission method, device and storage medium
CN113472913B (en)Communication method and device
US7203761B1 (en)Method and apparatus for routing data to/from a mobile user
US20070253351A1 (en)Automatically Discovering Devices Of A Wimax Network System
CN118057860A (en)Address translation method, address translation device, communication equipment and readable storage medium
CN116488958A (en)Gateway processing method, virtual access gateway, virtual service gateway and related equipment
CN114501680B (en) Local area network implementation method, core network equipment and terminal
CN113973045B (en)Message transmission method and device

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination

[8]ページ先頭

©2009-2025 Movatter.jp