CN118018521A - Address allocation method and device and electronic equipment - Google Patents

Address allocation method and device and electronic equipment Download PDF

Info

Publication number
CN118018521A
CN118018521A CN202410168858.2A CN202410168858A CN118018521A CN 118018521 A CN118018521 A CN 118018521A CN 202410168858 A CN202410168858 A CN 202410168858A CN 118018521 A CN118018521 A CN 118018521A
Authority
CN
China
Prior art keywords
type
equipment
target
initial
terminal
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
CN202410168858.2A
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 Telecom Corp Ltd
Original Assignee
China Telecom Corp 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 Telecom Corp Ltd filed Critical China Telecom Corp Ltd
Priority to CN202410168858.2A priority Critical patent/CN118018521A/en
Publication of CN118018521A publication Critical patent/CN118018521A/en
Pending legal-status Critical Current

Links

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The application discloses an address allocation method, an address allocation device and electronic equipment. The method comprises the following steps: acquiring a network access request of the terminal equipment, and acquiring equipment information of the terminal equipment from the network access request; determining a target equipment type of the terminal equipment according to the equipment information and a preset rule, wherein the preset rule is used for determining the target equipment type of the terminal equipment according to the equipment information; determining the communication protocol type deployed by the terminal equipment according to the target equipment type to obtain the target protocol type; and generating a communication address under the target protocol type, and distributing the communication address to the terminal equipment. The application solves the problem that partial terminal equipment cannot access the internet after distributing IPv6 single stack addresses to all the equipment due to the difference among the terminal equipment in the related technology.

Description

Address allocation method and device and electronic equipment
Technical Field
The present application relates to the field of communications, and in particular, to an address allocation method, an address allocation device, and an electronic device.
Background
With the rapid development of the mobile internet, the problem of IPv4 address exhaustion has become more and more severe, and future mobile internet will consume more IP addresses. In order to cope with the above changes and challenges, considering the advantages of the IPv6 network in aspects of security, transmission rate, user experience, etc., network construction based on IPv6 has been rapidly developed at present, service popularization is becoming mature, and scale introduction of IPv6 in a 5G mobile network environment has been primarily provided, so that various potential problems can be solved, and sustainable development of future networks and services is ensured.
In the testing stage of scale deployment of the IPv 6-only network, the core network PDN gateway can allocate IPv6 single stack addresses for all access terminals. However, although most of terminals currently support IPv 6-only access, considering a huge user base, a large number of terminals used by users still do not have IPv 6-only access capability, and at this time, after IPv6 single stack addresses are allocated to the users, the users cannot connect with the network of the IPv4 address, so that normal internet surfing services of the users are affected.
Aiming at the problem that part of terminal equipment cannot access the internet after IPv6 single stack addresses are distributed to all the equipment due to the difference among the terminal equipment in the related technology, no effective solution is proposed at present.
Disclosure of Invention
The application provides an address allocation method, an address allocation device and electronic equipment, which are used for solving the problem that part of terminal equipment cannot access the internet after IPv6 single stack addresses are allocated to all the equipment due to the difference between the terminal equipment in the related technology.
According to one aspect of the present application, there is provided an address allocation method. The method comprises the following steps: acquiring a network access request of the terminal equipment, and acquiring equipment information of the terminal equipment from the network access request; determining a target equipment type of the terminal equipment according to the equipment information and a preset rule, wherein the preset rule is used for determining the target equipment type of the terminal equipment according to the equipment information; determining the communication protocol type deployed by the terminal equipment according to the target equipment type to obtain the target protocol type; and generating a communication address under the target protocol type, and distributing the communication address to the terminal equipment.
Optionally, acquiring the device information of the terminal device from the network access request includes: identifying equipment model data carried in the network access request, and acquiring target bits in the equipment model data to obtain target bit data; identifying network element information and access point information carried in a network access request, and determining position information of terminal equipment according to the network access request; the target bit data, network element information, location information, and access point information are determined as device information.
Optionally, the device information includes device model data, and determining the target device type of the terminal device according to the device information and the preset rule includes: acquiring target bit data in equipment model data, and acquiring an initial rule table from preset rules, wherein the initial rule table comprises a plurality of pieces of equipment model data and initial equipment types corresponding to each piece of equipment model data; determining an initial equipment type corresponding to the target bit data according to the initial rule table to obtain the initial equipment type of the terminal equipment; and updating the initial equipment type according to a preset rule to obtain the target equipment type.
Optionally, updating the initial device type according to a preset rule, and obtaining the target device type includes: determining whether the terminal equipment is located in a preset area according to the position information; under the condition that the terminal equipment is located outside a preset area and the initial equipment type is a first type, changing the initial equipment type from the first type to a second type to obtain a target equipment type, wherein the first type is a single stack, and the second type is a double stack; in the case that the terminal device is located within the preset area or in the case that the terminal device is located outside the preset area and the initial device type is the second type, the initial device type is determined as the target device type.
Optionally, updating the initial device type according to a preset rule, and obtaining the target device type includes: determining whether the terminal equipment is target equipment according to the access point information; in the case that the terminal equipment is the target equipment, determining the initial equipment type as the target equipment type; under the condition that the terminal equipment is not the target equipment and the initial equipment type is the first type, changing the initial equipment type from the first type to the second type to obtain the target equipment type, wherein the first type is a single stack, and the second type is a double stack; in the case where the terminal device is not the target device and the initial device type is the second type, the initial device type is determined to be the target device type.
Optionally, updating the initial device type according to a preset rule, and obtaining the target device type includes: determining whether the network equipment connected with the terminal equipment is preset equipment according to the network element information; under the condition that the network equipment is preset equipment, determining the initial equipment type as a target equipment type; under the condition that the network equipment is not preset equipment and the initial equipment type is a first type, changing the initial equipment type from the first type to a second type to obtain a target equipment type, wherein the first type is a single stack, and the second type is a double stack; in the case that the network device is not a preset device and the initial device type is the second type, the initial device type is determined as the target device type.
Optionally, generating the communication address under the target protocol type includes: generating a single stack address and an address translator address of the terminal equipment according to the equipment information under the condition that the target protocol type is the first type; and generating a dual-stack address of the terminal equipment according to the equipment information under the condition that the target protocol type is the second type.
Optionally, the single stack address is an IPv6 single stack address, and the dual stack address is an IPv4 and IPv6 dual stack address.
According to another aspect of the present application, there is provided an address allocation apparatus. The device comprises: the acquisition unit is used for acquiring a network access request of the terminal equipment and acquiring equipment information of the terminal equipment from the network access request; the determining unit is used for determining the target equipment type of the terminal equipment according to the equipment information and a preset rule, wherein the preset rule is used for determining the target equipment type of the terminal equipment according to the equipment information; the deployment unit is used for determining the communication protocol type deployed by the terminal equipment according to the target equipment type to obtain the target protocol type; and the generating unit is used for generating the communication address under the target protocol type and distributing the communication address to the terminal equipment.
According to another aspect of the present invention, there is also provided a computer storage medium for storing a program, wherein the program when run controls a device in which the computer storage medium is located to perform an address allocation method.
According to another aspect of the present invention, there is also provided an electronic device comprising one or more processors and a memory; the memory has stored therein computer readable instructions, and the processor is configured to execute the computer readable instructions, wherein the computer readable instructions when executed perform a method of address assignment.
According to the application, the following steps are adopted: acquiring a network access request of the terminal equipment, and acquiring equipment information of the terminal equipment from the network access request; determining a target equipment type of the terminal equipment according to the equipment information and a preset rule, wherein the preset rule is used for determining the target equipment type of the terminal equipment according to the equipment information; determining the communication protocol type deployed by the terminal equipment according to the target equipment type to obtain the target protocol type; and generating a communication address under the target protocol type, and distributing the communication address to the terminal equipment. The problem that part of terminal equipment cannot surf the internet after IPv6 single stack addresses are distributed to all the equipment due to the fact that differences exist among the terminal equipment in the related technology is solved. By acquiring the equipment information of the terminal equipment and determining the type of the equipment according to the equipment information, different equipment is classified, and a communication address is allocated to each equipment according to the classification result, so that the effect of ensuring that each terminal equipment can finish internet surfing service according to the communication address is achieved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this specification, illustrate embodiments of the application and together with the description serve to explain the application. In the drawings:
FIG. 1 is a flow chart of an address assignment method provided in accordance with an embodiment of the present application;
FIG. 2 is a flow chart of an alternative address assignment method provided in accordance with an embodiment of the present application;
FIG. 3 is a schematic diagram of an address assignment device provided according to an embodiment of the present application;
fig. 4 is a schematic diagram of an electronic device according to an embodiment of the present application.
Detailed Description
It should be noted that, without conflict, the embodiments of the present application and features of the embodiments may be combined with each other. The application will be described in detail below with reference to the drawings in connection with embodiments.
In order that those skilled in the art will better understand the present application, a technical solution in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present application without making any inventive effort, shall fall within the scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present application and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate in order to describe the embodiments of the application herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
It should be noted that the address allocation method, the device and the electronic equipment determined by the present disclosure may be used in the communication field, and may also be used in any field other than the communication field, and the application fields of the address allocation method, the device and the electronic equipment determined by the present disclosure are not limited.
It should be noted that, the user information (including but not limited to user equipment information, user personal information, etc.) and the data (including but not limited to data for analysis, stored data, presented data, etc.) related to the present application are information and data authorized by the user or fully authorized by each party, and the collection, use and processing of the related data need to comply with the related regulations and standards, and are provided with corresponding operation entries for the user to select authorization or rejection. For example, an interface is provided between the system and the relevant user or institution, before acquiring the relevant information, the system needs to send an acquisition request to the user or institution through the interface, and acquire the relevant information after receiving the consent information fed back by the user or institution.
For convenience of description, the following will describe some terms or terminology involved in the embodiments of the present application:
dual stack IPv4v6 address: a dual stack IPv4v6 address is an address that contains both IPv4 and IPv6 addresses. It is typically a combination of IPv4 addresses and IPv6 addresses.
IPv4 address: is an Internet protocol version 4 (IPv 4) IP address that is used to uniquely identify a device on the Internet.
IPv6 address: is the address of internet protocol version 6 (Internet Protocol version, 6) for identifying and locating devices on the network.
Core network PDN gateway: (PACKET DATA Network Gateway) is responsible for handling data transfer between the mobile device and the internet. The PDN gateway plays a role of connecting the mobile device to the internet, and is responsible for handling forwarding, routing and security functions of IP packets. It is also responsible for providing IP address allocation, flow control, and quality of service guarantees for mobile devices.
C-plane network element: generally referred to as control plane network elements in a communication network, refer to devices or nodes in the network for controlling and managing data transmissions.
APN (Access Point Name) refers to the access point name of the mobile network, which is an identification that the mobile network uses to identify the service requested by the user. In a mobile network, a user equipment needs to connect to the mobile network and obtain internet services using the correct APN.
DNN (Data Network Name) is a data network name, which is an identification used in a mobile network to identify user data traffic. DNNs are typically associated with APNs to determine the type of service and the network to which the user data traffic belongs.
DNS addresses are abbreviations for Domain name system (Domain NAME SYSTEM), which is a distributed database system used to resolve relationships between Domain names and IP addresses. The DNS address is used to refer to an IP address of a DNS server, and the DNS address can be used to resolve a domain name into a corresponding IP address, so that communication between different devices on the internet is achieved.
According to an embodiment of the present application, there is provided an address allocation method.
Fig. 1 is a flowchart of an address allocation method according to an embodiment of the present application. As shown in fig. 1, the method comprises the steps of:
step S101, a network access request of a terminal device is obtained, and device information of the terminal device is obtained from the network access request.
Specifically, when the terminal device accesses a certain website, an access address, that is, a source address, needs to be configured for the terminal device, and when the access address is not configured and the terminal device accesses a certain website, a network access request sent by the terminal can be obtained, where the network access request may include a plurality of device information, for example, device address information, device network element information, access point information, device model, and the like, so that the devices can be classified according to the device information.
Step S102, determining the target equipment type of the terminal equipment according to the equipment information and a preset rule, wherein the preset rule is used for determining the target equipment type of the terminal equipment according to the equipment information.
Specifically, after the device information is obtained, the device information may be processed according to a preset rule, so as to determine a device type according to the device information. For example, the preset rule may include: and determining the type of the target device as a first type when the device address is the area A, and determining the type of the target device as a second type when the device address is not the area A.
Step S103, determining the communication protocol type deployed by the terminal equipment according to the target equipment type to obtain the target protocol type.
Specifically, after the device type of the terminal device is obtained, the communication protocol type can be determined according to the device type, for example, in the case that the target device type is the first type, the communication protocol type can be determined to be an IPv4/v6 dual stack, and in the case that the target device type is the second type, the communication protocol type can be determined to be an IPv6 single stack, so that after the communication protocol is allocated, each terminal device can be normally connected with a network, and can access any type of website.
Step S104, generating a communication address under the target protocol type, and distributing the communication address to the terminal equipment.
Specifically, after the target protocol type is obtained, each terminal can generate a corresponding communication address and distribute the communication address to the terminal equipment, so that the terminal equipment can complete the internet surfing operation through the communication address.
The address allocation method provided by the embodiment of the application obtains the network access request of the terminal equipment and obtains the equipment information of the terminal equipment from the network access request; determining a target equipment type of the terminal equipment according to the equipment information and a preset rule, wherein the preset rule is used for determining the target equipment type of the terminal equipment according to the equipment information; determining the communication protocol type deployed by the terminal equipment according to the target equipment type to obtain the target protocol type; and generating a communication address under the target protocol type, and distributing the communication address to the terminal equipment. The problem that part of terminal equipment cannot surf the internet after IPv6 single stack addresses are distributed to all the equipment due to the fact that differences exist among the terminal equipment in the related technology is solved. By acquiring the equipment information of the terminal equipment and determining the type of the equipment according to the equipment information, different equipment is classified, and a communication address is allocated to each equipment according to the classification result, so that the effect of ensuring that each terminal equipment can finish internet surfing service according to the communication address is achieved.
Optionally, in the address allocation method provided by the embodiment of the present application, acquiring device information of the terminal device from the network access request includes: identifying equipment model data carried in the network access request, and acquiring target bits in the equipment model data to obtain target bit data; identifying network element information and access point information carried in a network access request, and determining position information of terminal equipment according to the network access request; the target bit data, network element information, location information, and access point information are determined as device information.
The terminal equipment model, i.e., the international mobile equipment identity (International Mobile Equipment Identity, IMEI), is also described. The IMEI is used for identifying each independent mobile communication device such as a mobile phone in a mobile phone network, and is equivalent to an identity card of the mobile phone, the IMEI number is composed of 15-17 digits, the first 8 digits are type allocation codes (TAC, type Allocation Code), and the 8 digits are codes for distinguishing the brand and the model of the mobile phone. The first two digits of the TAC code are the identification (Reporting Body Identifier) of the allocation mechanism and are the codes of the authorized IMEI code allocation mechanism. Therefore, the brand and the model of the terminal can be distinguished by the first 8 of the IMEI number, so that whether the terminal model supports IPv6-only (IPv 6 only) is judged.
Specifically, when determining the device information, the device model data, that is, the first 8 bits of data in the IMEI data, may be obtained from the network access request, and the first 8 bits of data are determined as target bit data, and meanwhile, the network element information, the location information and the access point information are obtained in the network access request, so that the information is determined as the device information, and then the device type is determined according to the device information.
Optionally, in the address allocation method provided by the embodiment of the present application, the device information includes device model data, and determining, according to the device information and a preset rule, a target device type of the terminal device includes: acquiring target bit data in equipment model data, and acquiring an initial rule table from preset rules, wherein the initial rule table comprises a plurality of pieces of equipment model data and initial equipment types corresponding to each piece of equipment model data; determining an initial equipment type corresponding to the target bit data according to the initial rule table to obtain the initial equipment type of the terminal equipment; and updating the initial equipment type according to a preset rule to obtain the target equipment type.
Specifically, when determining the device type according to the device model data, the first 8 bits of data in the device model data can be acquired to obtain a device model distribution code, the device initial type corresponding to the device model distribution code is determined in an initial rule table, and the device initial type is further updated according to a preset rule, so that the target device type is obtained.
For example, the device model data of the terminal device a may be: 8691161029912920, under the condition that the target bit data is the first 8 bits, the obtained target bit data is 869116102, further, if the initial equipment type corresponding to 869116102 is determined to be the first type in the preset rule table, the equipment type of the terminal equipment is temporarily determined to be the first type, and the initial equipment type is changed according to the rest rules and the equipment information in the preset rules, so that the target equipment type is obtained.
Optionally, in the address allocation method provided by the embodiment of the present application, updating the initial device type according to a preset rule, and obtaining the target device type includes: determining whether the terminal equipment is located in a preset area according to the position information; under the condition that the terminal equipment is located outside a preset area and the initial equipment type is a first type, changing the initial equipment type from the first type to a second type to obtain a target equipment type, wherein the first type is a single stack, and the second type is a double stack; in the case that the terminal device is located within the preset area or in the case that the terminal device is located outside the preset area and the initial device type is the second type, the initial device type is determined as the target device type.
Specifically, when the initial device type is changed, the initial device type may be changed through the location information of the terminal device, first, it is determined whether the device type is located in the preset area, and if the device type is located in the preset area, the initial device type may be determined as the target device type, that is, the device type may be determined according to the device model data.
Further, in the case that the terminal device is located outside the preset area, the type distinction is not performed in the area, at this time, the device of the first type may be changed to the second type, that is, the types of all devices are the second type, that is, each device is configured with a dual stack address, so that the phenomenon that after the device which does not support only the IPv6 address is assigned to the device, the device cannot normally access the internet is avoided.
Further, in the case that the terminal device is located outside the preset area and the initial device type is the second type, since the device type is already the second type, the device type may not need to be changed, so as to ensure that the terminal device can be normally connected with the network.
Optionally, in the address allocation method provided by the embodiment of the present application, updating the initial device type according to a preset rule, and obtaining the target device type includes: determining whether the terminal equipment is target equipment according to the access point information; in the case that the terminal equipment is the target equipment, determining the initial equipment type as the target equipment type; under the condition that the terminal equipment is not the target equipment and the initial equipment type is the first type, changing the initial equipment type from the first type to the second type to obtain the target equipment type, wherein the first type is a single stack, and the second type is a double stack; in the case where the terminal device is not the target device and the initial device type is the second type, the initial device type is determined to be the target device type.
Specifically, when the initial equipment type is changed, the initial equipment type can be changed through the access point information of the terminal equipment, firstly, whether the terminal equipment is the target equipment is determined through the access point information, and if the terminal equipment is the target equipment, the equipment is characterized as the test equipment, the type of the equipment is required to be determined according to the equipment model data, namely, the initial equipment type is determined as the target equipment type.
Further, under the condition that the terminal equipment is not the target equipment, the characterization equipment is not the IPv6 test equipment, at the moment, the equipment types of all the equipment can be changed into the second type, namely the dual stack type, so that each equipment can be ensured to normally surf the internet, and the phenomenon that after the IPv6 address is distributed to the equipment which does not support only the IPv6 address, the equipment cannot surf the internet normally is avoided.
Further, in the case that the terminal device is not the target device and the initial device type is the second type, since the device type is already the second type, it is unnecessary to change the device type, thereby ensuring that the terminal device can make a normal connection with the network.
Optionally, in the address allocation method provided by the embodiment of the present application, updating the initial device type according to a preset rule, and obtaining the target device type includes: determining whether the network equipment connected with the terminal equipment is preset equipment according to the network element information; under the condition that the network equipment is preset equipment, determining the initial equipment type as a target equipment type; under the condition that the network equipment is not preset equipment and the initial equipment type is a first type, changing the initial equipment type from the first type to a second type to obtain a target equipment type, wherein the first type is a single stack, and the second type is a double stack; in the case that the network device is not a preset device and the initial device type is the second type, the initial device type is determined as the target device type.
Specifically, when the initial equipment type is changed, the initial equipment type can be changed through network element information of the terminal equipment, firstly, whether equipment connected with the terminal equipment is preset equipment is determined through the network element information, and if the equipment is the preset equipment, the equipment is characterized as test equipment, and the type of the equipment is required to be determined according to equipment model data, namely, the initial equipment type is determined as target equipment type.
Further, under the condition that the equipment connected with the terminal equipment is not preset equipment, the characterization equipment is not the IPv6 test equipment, at the moment, the equipment types of all the equipment can be changed into the second type, namely the dual stack type, so that each equipment can be ensured to normally surf the internet, and the phenomenon that after the IPv6 address is distributed to the equipment which does not support only the IPv6 address, the equipment cannot surf the internet normally is avoided.
Further, in the case that the device connected to the terminal device is not a preset device and the initial device type is the second type, since the device type is already the second type, it is not necessary to change the device type, so that the terminal device can be normally connected to the network.
Optionally, in the address allocation method provided by the embodiment of the present application, generating the communication address under the target protocol type includes: generating a single stack address and an address translator address of the terminal equipment according to the equipment information under the condition that the target protocol type is the first type; and generating a dual-stack address of the terminal equipment according to the equipment information under the condition that the target protocol type is the second type.
Specifically, in the case that the target protocol type is the first type, the device is characterized as an IPv6-only device, at this time, an IPv6 single stack address may be generated for the device, and an address translator address may be configured for the device, that is, the address translator may, when the device accesses an IPv4 address, through a DNS64 address, the IPv6-only device may use the DNS64 server to translate the IPv4 address into the IPv6 address, so as to implement access to an IPv4 service. DNS64 technology is typically used with NAT64 to achieve interoperability between IPv6 and IPv 4.
Further, in the case that the target protocol type is the second type, it is characterized that the device is not an IPv6-only device, and the address converted by the DNS64 server cannot be used to access the IPv4 address, so that a dual stack address needs to be allocated to the second type device, so that the second type device can normally access the IPv6 address and the IPv4 address.
Optionally, in the address allocation method provided by the embodiment of the present application, the single stack address is an IPv6 single stack address, and the dual stack address is an IPv4 and IPv6 dual stack address.
Fig. 2 is a flowchart of an alternative address allocation method provided according to an embodiment of the present application, as shown in fig. 2, after a session establishment request initiated by a terminal is forwarded to a PDN gateway through a control plane network element (i.e., a C plane network element), the PDN gateway matches an IMEI prefix carried in the session establishment request in a preconfigured device type classifier, and when the matching is performed, a matching rule may be set, where a first-level rule and a second-level rule are an optional rule, that is, target bit data and an APN, a location area and a network element device are optional rules, after the IMEI prefix is obtained, a device type may be determined according to a multi-layer rule set in the PDN gateway, and because the PDN gateway enables an address allocation function switch based on a device model, which indicates that the PDN gateway supports allocation of an IPv6 single stack/IPv 4v6 dual stack address for a user based on a device type, and after the device type is determined, an address may be allocated for the user through the PDN gateway.
It should be noted that, when an address is allocated, if the device type is the first type, an IPv6 single stack address may be configured, and if the device type is the second type, an IPv4/v6 single dual address may be configured, so that the address allocation operation is completed.
The whole flow can be as follows: after a session establishment request initiated by a terminal is forwarded to a PDN gateway through a control surface network element, the PDN gateway acquires IMEI prefixes, namely target bit data, carried in the session establishment request, determines equipment types according to the target bit data, APNs, location areas and network element equipment, and determines allocated address information according to the equipment types, so that address generation and address allocation operation are completed, and the effect of ensuring that each terminal equipment can normally complete internet surfing services according to the allocated communication addresses is achieved.
It should be noted that the steps illustrated in the flowcharts of the figures may be performed in a computer system such as a set of computer executable instructions, and that although a logical order is illustrated in the flowcharts, in some cases the steps illustrated or described may be performed in an order other than that illustrated herein.
The embodiment of the application also provides an address allocation device, and the address allocation device of the embodiment of the application can be used for executing the address allocation method provided by the embodiment of the application. The address allocation device provided by the embodiment of the application is described below.
Fig. 3 is a schematic diagram of an address allocation apparatus according to an embodiment of the present application. As shown in fig. 3, the apparatus includes: an acquisition unit 31, a determination unit 32, a deployment unit 33, a generation unit 34.
An obtaining unit 31, configured to obtain a network access request of the terminal device, and obtain device information of the terminal device from the network access request.
And a determining unit 32, configured to determine a target device type of the terminal device according to the device information and a preset rule, where the preset rule is used to determine the target device type to which the terminal device belongs according to the device information.
A deployment unit 33, configured to determine a communication protocol type deployed by the terminal device according to the target device type, so as to obtain the target protocol type.
And the generating unit 34 is configured to generate a communication address under the target protocol type, and allocate the communication address to the terminal device.
The address allocation device provided by the embodiment of the application is used for acquiring a network access request of a terminal device through the acquisition unit 31 and acquiring device information of the terminal device from the network access request; a determining unit 32, configured to determine a target device type of the terminal device according to the device information and a preset rule, where the preset rule is used to determine the target device type to which the terminal device belongs according to the device information; a deployment unit 33, configured to determine a communication protocol type deployed by the terminal device according to the target device type, so as to obtain the target protocol type; and the generating unit 34 is configured to generate a communication address under the target protocol type, and allocate the communication address to the terminal device. The problem that part of terminal equipment cannot surf the internet after IPv6 single stack addresses are distributed to all the equipment due to the fact that differences exist among the terminal equipment in the related technology is solved. By acquiring the equipment information of the terminal equipment and determining the type of the equipment according to the equipment information, different equipment is classified, and a communication address is allocated to each equipment according to the classification result, so that the effect of ensuring that each terminal equipment can finish internet surfing service according to the communication address is achieved.
Optionally, in the address allocation device provided in the embodiment of the present application, the obtaining unit 31 includes: the first identification module is used for identifying equipment model data carried in the network access request, and acquiring target bits in the equipment model data to obtain target bit data; the second identification module is used for identifying network element information and access point information carried in the network access request and determining the position information of the terminal equipment according to the network access request; and the first determining module is used for determining the target bit data, the network element information, the position information and the access point information as equipment information.
Optionally, in the address allocation apparatus provided in the embodiment of the present application, the device information includes device model data, and the determining unit 32 includes: the device comprises an acquisition module, a rule generation module and a rule generation module, wherein the acquisition module is used for acquiring target bit data in equipment model data and acquiring an initial rule table from preset rules, wherein the initial rule table comprises a plurality of pieces of equipment model data and initial equipment types corresponding to each piece of equipment model data; the second determining module is used for determining an initial equipment type corresponding to the target bit data according to the initial rule table to obtain the initial equipment type of the terminal equipment; and the updating module is used for updating the initial equipment type according to a preset rule to obtain the target equipment type.
Optionally, in the address allocation apparatus provided in the embodiment of the present application, the update module includes: the first determining submodule is used for determining whether the terminal equipment is located in a preset area or not according to the position information; the first changing sub-module is used for changing the initial equipment type from a first type to a second type to obtain a target equipment type when the terminal equipment is located outside a preset area and the initial equipment type is the first type, wherein the first type is a single stack and the second type is a double stack; and the second determining submodule is used for determining the initial equipment type as the target equipment type in the case that the terminal equipment is located in the preset area or the terminal equipment is located outside the preset area and the initial equipment type is the second type.
Optionally, in the address allocation apparatus provided in the embodiment of the present application, the update module includes: a third determining submodule, configured to determine whether the terminal device is a target device according to the access point information; a fourth determining submodule, configured to determine, when the terminal device is a target device, an initial device type as a target device type; the second changing sub-module is used for changing the initial equipment type from the first type to the second type to obtain the target equipment type when the terminal equipment is not the target equipment and the initial equipment type is the first type, wherein the first type is a single stack and the second type is a double stack; a fifth determining sub-module for determining the initial device type as the target device type in case the terminal device is not the target device and the initial device type is the second type.
Optionally, in the address allocation apparatus provided in the embodiment of the present application, the update module includes: a sixth determining submodule, configured to determine whether a network device connected to the terminal device is a preset device according to the network element information; a seventh determining submodule, configured to determine, when the network device is a preset device, an initial device type as a target device type; a third changing sub-module, configured to change the initial device type from a first type to a second type to obtain a target device type when the network device is not a preset device and the initial device type is the first type, where the first type is a single stack and the second type is a dual stack; an eighth determining submodule, configured to determine the initial device type as the target device type when the network device is not a preset device and the initial device type is the second type.
Optionally, in the address allocation device provided in the embodiment of the present application, the generating unit 34 includes: the first generation module is used for generating a single stack address and an address converter address of the terminal equipment according to the equipment information under the condition that the target protocol type is the first type; and the second generation module is used for generating a dual-stack address of the terminal equipment according to the equipment information under the condition that the target protocol type is the second type.
Optionally, in the address allocation apparatus provided by the embodiment of the present application, the single stack address is an IPv6 single stack address, and the dual stack address is an IPv4 and IPv6 dual stack address.
The address allocation device includes a processor and a memory, and the acquisition unit 31, the determination unit 32, the deployment unit 33, the generation unit 34, and the like are stored in the memory as program units, and the processor executes the program units stored in the memory to realize the corresponding functions.
The processor includes a kernel, and the kernel fetches the corresponding program unit from the memory. The kernel can be provided with one or more than one, and the problem that part of terminal equipment cannot surf the internet after IPv6 single stack addresses are distributed to all the equipment due to the difference among the terminal equipment in the related technology is solved by adjusting kernel parameters.
The memory may include volatile memory, random Access Memory (RAM), and/or nonvolatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM), among other forms in computer readable media, the memory including at least one memory chip.
An embodiment of the present invention provides a computer-readable storage medium having stored thereon a program which, when executed by a processor, implements the address allocation method.
The embodiment of the invention provides a processor which is used for running a program, wherein the address allocation method is executed when the program runs.
Fig. 4 is a schematic diagram of an electronic device according to an embodiment of the present application, and as shown in fig. 4, an electronic device 40 includes a processor, a memory, and a program stored on the memory and executable on the processor, where the processor implements the following steps when executing the program: acquiring a network access request of the terminal equipment, and acquiring equipment information of the terminal equipment from the network access request; determining a target equipment type of the terminal equipment according to the equipment information and a preset rule, wherein the preset rule is used for determining the target equipment type of the terminal equipment according to the equipment information; determining the communication protocol type deployed by the terminal equipment according to the target equipment type to obtain the target protocol type; and generating a communication address under the target protocol type, and distributing the communication address to the terminal equipment. The device herein may be a server, PC, PAD, cell phone, etc.
The application also provides a computer program product adapted to perform, when executed on a data processing device, a program initialized with the method steps of: acquiring a network access request of the terminal equipment, and acquiring equipment information of the terminal equipment from the network access request; determining a target equipment type of the terminal equipment according to the equipment information and a preset rule, wherein the preset rule is used for determining the target equipment type of the terminal equipment according to the equipment information; determining the communication protocol type deployed by the terminal equipment according to the target equipment type to obtain the target protocol type; and generating a communication address under the target protocol type, and distributing the communication address to the terminal equipment.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In one typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include volatile memory in a computer-readable medium, random Access Memory (RAM) and/or nonvolatile memory, etc., such as Read Only Memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.
Computer readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of storage media for a computer 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 disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by a computing device. Computer-readable media, as defined herein, does not include transitory computer-readable media (transmission media), such as modulated data signals and carrier waves.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises an element.
The foregoing is merely exemplary of the present application and is not intended to limit the present application. Various modifications and variations of the present application will be apparent to those skilled in the art. Any modification, equivalent replacement, improvement, etc. which come within the spirit and principles of the application are to be included in the scope of the claims of the present application.

Claims (10)

1. An address allocation method, comprising:
Acquiring a network access request of a terminal device, and acquiring device information of the terminal device from the network access request;
Determining a target equipment type of the terminal equipment according to the equipment information and a preset rule, wherein the preset rule is used for determining the target equipment type of the terminal equipment according to the equipment information;
determining the communication protocol type deployed by the terminal equipment according to the target equipment type to obtain a target protocol type;
And generating a communication address under the target protocol type, and distributing the communication address to the terminal equipment.
2. The method of claim 1, wherein obtaining device information for the terminal device from the network access request comprises:
identifying equipment model data carried in the network access request, and acquiring target bits in the equipment model data to obtain target bit data;
identifying network element information and access point information carried in the network access request, and determining the position information of the terminal equipment according to the network access request;
And determining the target bit data, the network element information, the position information and the access point information as the equipment information.
3. The method of claim 2, wherein the device information includes device model data,
The determining the target equipment type of the terminal equipment according to the equipment information and the preset rule comprises the following steps:
Acquiring target bit data in the equipment model data, and acquiring an initial rule table from the preset rule, wherein the initial rule table comprises a plurality of pieces of equipment model data and initial equipment types corresponding to each piece of equipment model data;
Determining an initial equipment type corresponding to the target bit data according to the initial rule table to obtain the initial equipment type of the terminal equipment;
and updating the initial equipment type according to the preset rule to obtain the target equipment type.
4. The method of claim 3, wherein updating the initial device type according to the preset rule to obtain the target device type comprises:
determining whether the terminal equipment is located in a preset area according to the position information;
Changing the initial equipment type from a first type to a second type to obtain the target equipment type when the terminal equipment is located outside a preset area and the initial equipment type is the first type, wherein the first type is a single stack and the second type is a double stack;
And determining the initial device type as the target device type in the case that the terminal device is located within a preset area or in the case that the terminal device is located outside the preset area and the initial device type is of a second type.
5. The method of claim 3, wherein updating the initial device type according to the preset rule to obtain the target device type comprises:
determining whether the terminal equipment is target equipment according to the access point information;
Determining the initial equipment type as the target equipment type under the condition that the terminal equipment is the target equipment;
Changing the initial equipment type from a first type to a second type to obtain the target equipment type when the terminal equipment is not the target equipment and the initial equipment type is the first type, wherein the first type is a single stack and the second type is a double stack;
in the case where the terminal device is not the target device and the initial device type is the second type, the initial device type is determined to be the target device type.
6. The method of claim 3, wherein updating the initial device type according to the preset rule to obtain the target device type comprises:
determining whether the network equipment connected with the terminal equipment is preset equipment according to the network element information;
Under the condition that the network equipment is the preset equipment, determining the initial equipment type as the target equipment type;
Changing the initial equipment type from a first type to a second type to obtain the target equipment type when the network equipment is not the preset equipment and the initial equipment type is the first type, wherein the first type is a single stack and the second type is a double stack;
And determining the initial device type as the target device type in the case that the network device is not the preset device and the initial device type is the second type.
7. The method of claim 1, wherein generating the communication address for the target protocol type comprises:
Generating a single stack address and an address translator address of the terminal equipment according to the equipment information under the condition that the target protocol type is a first type;
And generating a dual-stack address of the terminal equipment according to the equipment information under the condition that the target protocol type is the second type.
8. The method of claim 7, wherein the single stack address is an IPv6 single stack address and the dual stack address is an IPv4 and IPv6 dual stack address.
9. An address allocation apparatus, comprising:
An obtaining unit, configured to obtain a network access request of a terminal device, and obtain device information of the terminal device from the network access request;
The determining unit is used for determining the target equipment type of the terminal equipment according to the equipment information and a preset rule, wherein the preset rule is used for determining the target equipment type of the terminal equipment according to the equipment information;
the deployment unit is used for determining the communication protocol type deployed by the terminal equipment according to the target equipment type to obtain a target protocol type;
and the generating unit is used for generating the communication address under the target protocol type and distributing the communication address to the terminal equipment.
10. An electronic device comprising one or more processors and a memory for storing one or more programs, wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the address allocation method of any of claims 1-8.
CN202410168858.2A 2024-02-05 2024-02-05 Address allocation method and device and electronic equipment Pending CN118018521A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410168858.2A CN118018521A (en) 2024-02-05 2024-02-05 Address allocation method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410168858.2A CN118018521A (en) 2024-02-05 2024-02-05 Address allocation method and device and electronic equipment

Publications (1)

Publication Number Publication Date
CN118018521A true CN118018521A (en) 2024-05-10

Family

ID=90951513

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410168858.2A Pending CN118018521A (en) 2024-02-05 2024-02-05 Address allocation method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN118018521A (en)

Similar Documents

Publication Publication Date Title
US9350814B2 (en) Internet protocol connectivity over a service-oriented architecture bus
US8769057B1 (en) Employing a hierarchy of servers to resolve fractional IP addresses
CA2395251C (en) Allocation of a server address to a terminal
US8161135B2 (en) Device identification number based name service
JP2012161078A (en) Method and apparatus for determining server which should respond to service request
CN105075226A (en) Methods, systems, and computer readable media for using a diameter routing agent (dra) to obtain mappings between mobile subscriber identification information and dynamically assigned internet protocol (ip) addresses and for making the mappings accessible to applications
US10164934B1 (en) User device parameter allocation based on internet protocol version capabilities
CN107580079A (en) A kind of message transmitting method and device
CN112738288A (en) DNS domain name resolution method, DNS server, GSLB system and domain name resolution system
CN111031129B (en) Access request processing method, processing device, electronic equipment and storage medium
CN115460175A (en) IPv6 address generation method and device, electronic equipment and storage medium
CN104079682A (en) Address translation method and device based on domain name system (DNS)
US11108832B2 (en) Network component selection based on device identifier
CN110677512B (en) Address resolution method and device
CN104092751A (en) Service access method and device
CN118018521A (en) Address allocation method and device and electronic equipment
CN115225606A (en) Domain name access method and system of cross-network protocol of container cloud platform
US10164869B1 (en) Facilitating routing of data based on an internet protocol version capability of a user device
WO2017147840A1 (en) Message routing method and device, and diameter routing entity
CN115004657B (en) Addressing method, addressing system and addressing device
CN107547687B (en) Message transmission method and device
CN111935336A (en) IPv 6-based network management method and system
US20160330169A1 (en) Base station for ip communications with mobile terminal, and method for acquiring ip of base station
CN114731338B (en) System and method for controlling load of domain name system server
CN114285856B (en) IPV4 external link access method and device

Legal Events

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