Network access method, device, electronic device and readable storage medium

By receiving the IP session establishment request from the user terminal and determining its session type and subscription session type, it solves the problem of IPv6 single-stack users being unable to access IPv4 services in the roaming network, achieves effective channeling of user traffic and IP address matching, and improves The availability of communication services.

CN115002852BActive Publication Date: 2024-09-03CHINA TELECOM CORP LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210452198.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-27
Publication Date
2024-09-03
Estimated Expiration
2042-04-27

AI Technical Summary

Technical Problem

IPv6 single-stack users cannot access IPv4 services normally in the roaming network. This is mainly because DNS64 and NAT64 devices are not deployed in the roaming area, resulting in a mismatch between the session type of the user terminal and the contracted session type, affecting communication services.

Method used

By receiving the IP session establishment request from the user terminal, the session type and the subscription session type are determined. If they do not match, the user traffic is directed to the home network to ensure that the user terminal can obtain a matching IP address and traffic forwarding.

Benefits of technology

It solves the problem of mismatch between the session type and the contracted session type of IPv6 single-stack users in the roaming network, ensuring that user terminals can normally access the Internet, and improving the availability and efficiency of communication services.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115002852B
    Figure CN115002852B
Patent Text Reader

Abstract

The present invention provides a network access method, device, electronic device and readable storage medium, which relate to the field of communication technology. The method includes: determining the session type and user contract data corresponding to the user terminal according to the IP session establishment request sent by the user terminal; if the session type and the contract session type corresponding to the user contract data do not match the roaming network, the user traffic of the user terminal is diverted to the home network of the user terminal for exit, wherein the roaming network is the current access network of the user terminal. Therefore, it can solve the problem in the related technology that the communication service of the user terminal is affected when the session type of the roaming network does not match the contract session type.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of mobile communication technology, and in particular to a network access method, device, electronic device and readable storage medium. Background Art

[0002] Currently, when mobile terminals access the network in roaming conditions, they usually adopt the local breakout roaming mode, that is, the user's contract data and Internet access policy control data are in the home location, while the implementation of the user's Internet access policy and the user's data outbound access to the Internet are in the roaming location.

[0003] Based on the local breakout roaming mode, IPv6 single-stack users can obtain IPv6 terminal addresses normally when roaming. However, if there is no NAT64 or DNS64 device in the roaming location, IPv6 single-stack users cannot access IPv4 services normally:

[0004] An IPv6 single-stack user obtains an IPv6 terminal address in a roaming location: the IP session establishment request initiated by the terminal to the network contains the IP protocol stack type "a" of the IP session (the type of "a" can be IPv4 single stack, IPv6 single stack, IPv4 / IPv6 dual stack). At the same time, the core network session control network element in the roaming location obtains the contract information of the terminal number from the contract network element in the user's home location. The contract information contains the IP protocol stack type "b" for the current session to be established (the type of "b" can be IPv4 single stack, IPv6 single stack, IPv4 / IPv6 dual stack). The network allocates an IP address of the corresponding type to the user terminal based on the type of a∩b. When a∩b=0, the session establishment fails. The relationship between the values ​​of a and b and the session establishment status is as follows: Figure 1 The relationship table between the values ​​of a and b and the session establishment status is shown.

[0005] Depend on Figure 1 From the relationship table shown, it can be seen that there are three scenarios for IPv6 single-stack users roaming in other provinces: scenario 5, scenario 6, and scenario 8. Scenarios 5 and 6 are situations that will occur when the IPv6 network matures, and scenario 8 is the mainstream situation of the current network. The policy control network element of the provincial network where the current user belongs cannot distinguish between the three scenarios, and therefore cannot issue different policies according to different scenarios.

[0006] (2) IPv6 single-stack users cannot access IPv4 services normally in the roaming area: IPv6 single-stack users need to deploy DNS64 and NAT64 devices in the roaming area to enable IPv6 terminals to access IPv4 servers. In the scenario where DNS64 and NAT64 devices are not deployed in the roaming area, the operator network cannot resolve the server address into an IPv6 address and notify the user, nor can it convert the IPv6 packets sent by the user into IPv4 packets and send them to the IPv4 server, thus affecting the use of services by IPv6 single-stack users.

[0007] Current solution: When IPv6 single-stack users roam to other provinces, the Home Routed roaming solution is uniformly adopted to ensure that the IP session anchor point of the IPv6 terminal is the session control network element of the home location, and the user plane anchor point is the user plane network element of the home province. Although this ensures that the terminal can use the IPv6 single stack to access IPv4 resources anywhere, the Home Routed roaming solution is insufficient in terms of the large traffic and ultra-low latency of 5G. Therefore, a solution is needed to adjust the traffic diversion method of IPv6 single-stack users.

[0008] To address the above-mentioned problems, no effective technical solutions have been proposed so far. Summary of the invention

[0009] The embodiments of the present invention provide a network access method, device, electronic device and readable storage medium to solve the problem in the related art that when the session type of the user terminal in the roaming network does not match the contracted session type, the communication service of the user terminal is affected.

[0010] In order to solve the above-mentioned technical problems, the present invention is achieved as follows:

[0011] In the first aspect, an embodiment of the present invention provides a network access method, the method comprising: determining a session type and a contracted session type corresponding to the user terminal according to an IP session establishment request sent by the user terminal; if the current access network of the user terminal is a roaming network, and the contracted session type does not match the session type, the user traffic of the user terminal is diverted to the home network of the user terminal for exit.

[0012] Furthermore, determining the access network and the contracted session type of the user terminal according to the IP session request sent by the user terminal includes: receiving the IP session establishment request, the IP session establishment request including a session type field, wherein the session type field includes the session type and the session type; determining the session type and the session type according to the session type field.

[0013] Furthermore, it also includes: if the access network of the user terminal is a roaming network, and the contracted session type matches the session type, the user traffic is directed to the access network for exit.

[0014] Furthermore, the method further includes: if the access network of the user terminal is the home network, routing the user traffic to the home network for exit.

[0015] Furthermore, if the access network of the user terminal is a roaming network and the contracted session type does not match the session type, the user traffic of the user terminal is diverted to the home network of the user terminal for exit, including: if the access network of the user terminal is the roaming network and the contracted session type of the user terminal is an IPv6 single stack type, an IPv6 single stack address is allocated to the user terminal, and the user traffic is diverted to the home network for exit.

[0016] In the third aspect, an embodiment of the present invention further provides a network access device, which includes: a determination module, used to determine the session type and the contracted session type corresponding to the user terminal according to the IP session establishment request sent by the user terminal; a first routing module, used to direct the user traffic of the user terminal to the home network of the user terminal for exit if the access network of the user terminal is a roaming network and the contracted session type does not match the session type.

[0017] Furthermore, the determination module includes: a receiving submodule, used to receive the IP session establishment request, the IP session establishment request includes a session type field, wherein the session type field includes the session type and the session type; a determining submodule, used to determine the session type and the session type according to the session type field.

[0018] Furthermore, it also includes: a second routing module, which is used to guide the user traffic to the access network for exit if the access network of the user terminal is a roaming network and the contracted session type matches the session type.

[0019] Furthermore, it also includes: a third routing module, which is used to guide the user traffic to the home network for exit if the access network of the user terminal is the home network.

[0020] Furthermore, the first routing module includes: a routing unit, which is used to allocate an IPv6 single stack address to the user terminal if the access network of the user terminal is the roaming network and the contracted session type of the user terminal is an IPv6 single stack type, and to direct the user traffic to the home network for exit.

[0021] In a third aspect, an embodiment of the present invention further provides an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the computer program is executed by the processor, the steps of the network access method described in the first aspect are implemented.

[0022] In a fourth aspect, an embodiment of the present invention further provides a storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the network access method described in the first aspect are implemented.

[0023] In an embodiment of the present invention, the session type and user contract data corresponding to the user terminal are determined according to the IP session establishment request sent by the user terminal; if the session type and the contract session type corresponding to the user contract data do not match the roaming network, the user traffic of the user terminal is diverted to the user terminal's home network for exit, wherein the roaming network is the current access network of the user terminal. In this embodiment, the session type and the contract session type requested by the user terminal are determined according to the IP session establishment request sent by the user terminal. If both do not match the home network, the user traffic of the user terminal is diverted to the user terminal's home network for exit. This solves the problem in the related art that the user terminal's communication service is affected when the session type of the roaming network does not match the contract session type.

[0024] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented according to the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.

[0026] Figure 1 It is a schematic diagram of an IP session type in the prior art;

[0027] Figure 2 is a flow chart of a network access method in an embodiment of the present invention;

[0028] Figure 3 is a schematic diagram of a core network in an embodiment of the present invention;

[0029] Figure 4is a flow chart of another network access method in an embodiment of the present invention;

[0030] Figure 5 It is a structural diagram of a local area network access device in an embodiment of the present invention. DETAILED DESCRIPTION

[0031] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0032] Embodiment 1

[0033] According to an embodiment of the present invention, a network access method is provided, such as Figure 2 As shown, the method may specifically include the following steps:

[0034] S202, determining a session type and user subscription data corresponding to the user terminal according to an IP session establishment request sent by the user terminal;

[0035] In this embodiment, the user terminal UE includes but is not limited to a mobile terminal that can perform data communication based on a wireless network, such as a mobile phone, a tablet, and an Internet of Things device, etc., which is not limited in this embodiment.

[0036] The session types in this embodiment include but are not limited to IPv4 single stack, IPv6 single stack, IPv4 / IPv6 dual stack and the like, wherein IPv4 single stack means that the user terminal supports communication with terminals whose IP addresses are IPv4 addresses; IPv6 single stack means that the user terminal supports data communication with terminals whose IP addresses are IPv6 addresses; IPv4 / IPv6 dual stack means that the user terminal supports data communication with terminals whose IP addresses are either IPv4 addresses or IPv6 addresses, wherein terminals with either IPv4 addresses or IPv6 addresses can perform data communication.

[0037] In a specific application scenario, a core network includes a user subscription data storage network element, a policy control network element, a user access network element, a session management network element, a user plane network element and a base station. After the user terminal UE establishes a session with the user access control network element by accessing the mobile network of the base station, the policy control network element determines whether the user terminal is roaming access, the session type of the user terminal and the subscription session type, and then issues the Internet access policy control and billing rules for the user terminal.

[0038] In an example, Figure 3In the core network schematic diagram shown, the user terminal 300 and the user terminal 302 are located in the home area and the roaming area respectively, and the two are user terminals in the same home area. In the home network, the user terminal 300 is connected to the user plane network element 310 and the user access control network element 320 through the base station 1. The home network also includes a user subscription data storage network element 330, a policy control network element 340 and a session management network element 350; in the roaming network, the user terminal 302 is connected to the user plane network element 312 and the user access control network element 322 through the base station 2, and the roaming network also includes a session management network element 352. The user terminal 300 and the user terminal 302 are issued Internet access policy control and charging rules by the same policy control network element 340, and the subscription session type of the user terminal 300 and the user terminal 302 is stored in the user subscription data storage network element 330.

[0039] In this embodiment, after the user terminal accesses the mobile wireless network, it initiates an IP session establishment request. The session control network element sends the session key information element in the session establishment request to the policy control network element. In this embodiment, the IP session establishment request sent by the user terminal carries the user contract data of the user terminal and the session type requested by the user terminal.

[0040] Therefore, the policy control network element can directly determine whether the user terminal is located in the roaming network based on the user contract data, and whether the session type requested by the user terminal matches the session type supported by the roaming network. The policy control network element then issues the Internet access policy control and billing rules to the user terminal, and directs the user traffic of the user terminal based on the matching results.

[0041] Optionally, in this embodiment, the access network of the user terminal and the user subscription data are determined based on the IP session establishment request sent by the user terminal, including but not limited to: receiving the IP session establishment request through the session management network element, the IP session establishment request includes the session type and the user subscription data; sending a session message to the policy control network element through the session management network element, wherein the session message includes a session type field, wherein the session type field includes the session type and the user subscription data.

[0042] Specifically, in this embodiment, the session management network element receives an IP session establishment request sent by a user terminal, and obtains user subscription data of the user terminal and the session type requested by the user according to the IP session establishment request. The session management network element sends a session message to the policy control network element, and the session message includes a session type field, and the session type field includes the session type and the user subscription data, so that the policy control network element obtains the current access network of the user terminal and the user subscription data according to the user subscription data in the session type field. Among them, the user subscription data is used to indicate that the IP session type subscribed by the user terminal is stored in the user subscription data storage network element.

[0043] In a specific example, a new field pduSessionTypeDetail is added to the message from the session management network element to the policy control network element to identify the IP session type requested by the UE and the IP session type subscribed by the user subscription data storage network element for the UE. The policy control network element can obtain the subscription session type of the user terminal from the user subscription data storage network element.

[0044] Through this embodiment, an IP session establishment request is received through a session management network element, and the IP session establishment request includes a session type and user subscription data; a session message is sent to a policy control network element through the session management network element, so that the policy control network element can quickly and directly determine the session type and subscription session type of the user terminal.

[0045] S204: If the session type and the subscription session type corresponding to the user subscription data do not match the roaming network, the user traffic of the user terminal is directed to the home network of the user terminal for exit, wherein the roaming network is the current access network of the user terminal.

[0046] In a specific application scenario, the policy control network element obtains the subscription session type of the user terminal from the user subscription data storage network element. If the session type requested by the user terminal does not match the subscription session type and the user terminal currently accesses a roaming network, the user traffic of the user terminal is diverted to the user terminal's home network for exit.

[0047] For example, if the subscribed session type of the user terminal is IPv6 single stack, the current access network of the user terminal is IPv4 single stack, and the session type requested by the user terminal is IPv6 single stack, then the session type requested by the user terminal does not match the subscribed session type, and the current access network of the user terminal is a roaming network, the user traffic of the user terminal is diverted to the user terminal's home network for exit.

[0048] In actual applications, the policy control network element adds a policy rule for determining whether the user is roaming access; adds a policy rule for instructing the session control network element to allocate different types of IP to the user; and adds different policy rules for traffic forwarding actions. In this embodiment, the specific policy rules can be set according to actual experience, and this embodiment does not limit this.

[0049] In addition, after an IPv6 single-stack user terminal accesses the network from a roaming location, the roaming location network guides user traffic according to the traffic forwarding rules issued by the home location policy control network element, so that the user terminal can access the Internet normally.

[0050] Optionally, in this embodiment, it also includes but is not limited to: if the session type and the contracted session type match the roaming network, the user traffic is routed to the roaming network for exit.

[0051] In a specific application scenario, if the session type requested by the user terminal and the subscribed session type of the user terminal match the roaming network, it means that the roaming network can support the session type of the user terminal. For example, if the user's subscribed session type is IPv6 single stack and the current access network of the user terminal is IPv6 single stack, the subscribed session type matches the session type of the roaming network, an IPv6 address is allocated to the user terminal, and the user traffic of the user terminal is forwarded through the roaming network.

[0052] Optionally, in this embodiment, it also includes but is not limited to: if the current access network of the user terminal is a home network, the user traffic is routed to the home network for exit.

[0053] In a specific application scenario, if the network currently accessed by the user terminal is the home network of the user terminal, the policy control network element issues the default Internet access policy control and charging rules of the corresponding home network based on the user terminal stored in the contract data storage network element.

[0054] Optionally, in this embodiment, if the session type and the subscription session type corresponding to the user subscription data do not match the roaming network, the user traffic of the user terminal is diverted to the user terminal's home network for exit, including but not limited to: if the roaming network is an IPv4 single stack, and the subscription session type and session type of the user terminal are IPv6 single stack types, an IPv6 single stack address is allocated to the user terminal, and the user traffic is diverted to the home network for exit.

[0055] In a specific application scenario, if the roaming network only supports IPv4 single stack session type, and the user terminal's contracted session type and session type are IPv6 single stack, the policy control network element determines whether the user terminal only supports IPv6 single stack based on the pduSessionTypeDetail information element. If so, it issues policy control and charging rules to instruct the user terminal to obtain an IPv6 single stack address, and instructs the roaming network to direct user traffic back to the local area.

[0056] In a specific embodiment, the network access method in this embodiment is as follows: Figure 4 As shown, the method may specifically include the following steps:

[0057] Step S41: The user terminal accesses the mobile network and initiates an IP session establishment request;

[0058] Specifically, the session control network element sends the session establishment key information element to the policy control network element.

[0059] S42: The policy control network element determines whether the user terminal is an IPv6 single stack user;

[0060] Specifically, the policy control network element determines whether the user is an IPv6 single stack user according to the pduSessionTypeDetail information element, and if not, executes S43; if so, executes S44.

[0061] S43, the policy control network element issues the default Internet access policy control and billing rules of the province to which the number belongs.

[0062] Step S44: the policy control network element determines whether the user terminal is roaming in another place;

[0063] Specifically, the policy control network element determines whether the user terminal is roaming in a non-home location such as another province based on the user location information related information element. If not, execute S45; if so, execute S46.

[0064] S45, the policy control network element issues the default Internet access policy control and billing rules of the province to which the number belongs.

[0065] S46, the policy control network element continues to determine whether the user terminal only supports IPv6 single stack;

[0066] Specifically, the policy control network element determines whether the user terminal only supports IPv6 single stack according to the pduSessionTypeDetail information element. If not, S47 is executed; if yes, S48 is executed.

[0067] S47, the policy control network element issues policy control and charging rules, instructing the user to obtain an IPv4 / IPv6 dual-stack address, and the user data is sent out from the roaming location;

[0068] S48, the policy control network element issues policy control and charging rules, instructs the user to obtain an IPv6 single stack address, and instructs the roaming network to guide the user traffic back to the local network.

[0069] In the above example, the session control network element will send the IP protocol stack type requested / supported by the user terminal and the IP protocol stack type signed by the number to the policy control network element. The policy control network element will judge and issue different policy rules to implement the allocation of terminal IP addresses. The above example solves the current problem of IPv6 single-stack users accessing the Internet normally in roaming areas.

[0070] Through the embodiment of the present invention, the session type and user contract data corresponding to the user terminal are determined according to the IP session establishment request sent by the user terminal; if the session type and the contract session type corresponding to the user contract data do not match the roaming network, the user traffic of the user terminal is diverted to the user terminal's home network for exit, wherein the roaming network is the current access network of the user terminal. In this embodiment, the session type and the contract session type requested by the user terminal are determined according to the IP session establishment request sent by the user terminal. If both do not match the home network, the user traffic of the user terminal is diverted to the user terminal's home network for exit. This solves the problem in the related art that the user terminal's communication service is affected when the session type of the roaming network does not match the contract session type.

[0071] Embodiment 2

[0072] A network access device provided by an embodiment of the present invention is introduced in detail.

[0073] Reference Figure 5 , shows a schematic structural diagram of a network access device in an embodiment of the present invention.

[0074] The application loading device of the embodiment of the present invention includes: a determination module 50 and a processing module 52 .

[0075] The functions of each module and the interactions between them are introduced in detail below.

[0076] A determination module 50, configured to determine a session type and user subscription data corresponding to the user terminal according to an IP session establishment request sent by the user terminal;

[0077] The processing module 52 is used to guide the user traffic of the user terminal to the home network of the user terminal if the session type and the subscription session type corresponding to the user subscription data do not match the roaming network, wherein the roaming network is the current access network of the user terminal.

[0078] Optionally, in this embodiment, the determining module 50 includes:

[0079] A receiving unit, configured to receive the IP session establishment request through a session management network element, wherein the IP session establishment request includes the session type and the user subscription data;

[0080] A sending unit is used to send a session message to a policy control network element through the session management network element, wherein the session message includes a session type field, wherein the session type field includes the session type and the user subscription data.

[0081] Optionally, in this embodiment, the processing module 50 is further used for:

[0082] If the session type and the subscribed session type match the roaming network, the user traffic is directed to the roaming network for exit.

[0083] Optionally, in this embodiment, the processing module 50 is further used for:

[0084] If the current access network of the user terminal is the home network, the user traffic is directed to the home network for exit.

[0085] Optionally, in this embodiment, the processing module 50 includes:

[0086] A processing unit is used to allocate an IPv6 single stack address to the user terminal if the roaming network is an IPv4 single stack and the subscribed session type and the session type of the user terminal are IPv6 single stack types, and to guide the user traffic to the home network for exit.

[0087] Moreover, in an embodiment of the present invention, the session type and user contract data corresponding to the user terminal are determined according to the IP session establishment request sent by the user terminal; if the session type and the contract session type corresponding to the user contract data do not match the roaming network, the user traffic of the user terminal is diverted to the home network of the user terminal for exit, wherein the roaming network is the current access network of the user terminal. In this embodiment, the session type and the contract session type requested by the user terminal are determined according to the IP session establishment request sent by the user terminal. If both do not match the home network, the user traffic of the user terminal is diverted to the home network of the user terminal for exit. This solves the problem in the related art that the communication service of the user terminal is affected when the session type of the roaming network does not match the contract session type.

[0088] Embodiment 3

[0089] Preferably, an embodiment of the present invention further provides an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program implements the steps of the network access method described above when executed by the processor.

[0090] Optionally, in this embodiment, the memory is configured to store program codes for executing the following steps:

[0091] S1, determining the session type and user subscription data corresponding to the user terminal according to the IP session establishment request sent by the user terminal;

[0092] S2: If the session type and the subscription session type corresponding to the user subscription data do not match the roaming network, the user traffic of the user terminal is diverted to the home network of the user terminal for exit, wherein the roaming network is the current access network of the user terminal.

[0093] Optionally, the specific examples in this embodiment may refer to the examples described in the above-mentioned embodiment 1, and this embodiment will not be described in detail here.

[0094] Embodiment 5

[0095] The embodiment of the present invention further provides a storage medium. Optionally, in this embodiment, the readable storage medium stores a program or instruction, and when the program or instruction is executed by the processor, the steps of the local area network access method described in embodiment 1 are implemented.

[0096] Optionally, in this embodiment, the storage medium is configured to store program codes for executing the following steps:

[0097] S1, determining the session type and user subscription data corresponding to the user terminal according to the IP session establishment request sent by the user terminal;

[0098] S2: If the session type and the subscription session type corresponding to the user subscription data do not match the roaming network, the user traffic of the user terminal is diverted to the home network of the user terminal for exit, wherein the roaming network is the current access network of the user terminal.

[0099] Optionally, the storage medium is also configured to store program codes for executing the steps included in the method in the above-mentioned embodiment 1, which will not be described in detail in this embodiment.

[0100] Optionally, in this embodiment, the above-mentioned storage medium may include but is not limited to: a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and other media that can store program codes.

[0101] Optionally, the specific examples in this embodiment may refer to the examples described in the above-mentioned embodiment 1, and this embodiment will not be described in detail here.

[0102] 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.

[0103] 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 such an understanding, the technical solution of the present invention, 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, a magnetic disk, or an optical disk), and includes a number of instructions for enabling a terminal (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present invention.

[0104] The embodiments of the present invention are described above in conjunction with the accompanying drawings, but the present invention is not limited to the above-mentioned specific implementation modes, which are merely illustrative rather than restrictive. Under the guidance of the present invention, ordinary technicians in this field can also make many forms without departing from the scope of protection of the present invention and the claims, all of which are within the protection of the present invention.

[0105] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed in the embodiments of the present invention can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0106] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0107] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0108] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0109] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0110] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard disks, ROM, RAM, magnetic disks, or optical disks.

[0111] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

Claims

1. A network access method, characterized in that: The method comprises: Determine the session type and user subscription data corresponding to the user terminal according to the IP session establishment request sent by the user terminal; If the session type and the subscription session type corresponding to the user subscription data do not match the roaming network, the user traffic of the user terminal is diverted to the home network of the user terminal for exit, wherein the roaming network is the current access network of the user terminal, and the subscription session type of the user terminal is obtained from the user subscription data storage network element through the policy control network element.

2. The method according to claim 1, characterized in that Determining the access network and user subscription data of the user terminal according to the IP session request sent by the user terminal, including: Receiving the IP session establishment request through a session management network element, where the IP session establishment request includes the session type and the user subscription data; A session message is sent to a policy control network element through the session management network element, wherein the session message includes a session type field, wherein the session type field includes the session type and the user subscription data.

3. The method according to claim 1, characterized in that Also includes: If the session type and the subscribed session type match the roaming network, the user traffic is directed to the roaming network for exit.

4. The method according to claim 1, characterized in that: Also includes: If the current access network of the user terminal is the home network, the user traffic is directed to the home network for exit.

5. The method according to claim 1, characterized in that If the session type and the subscription session type corresponding to the user subscription data do not match the roaming network, the user traffic of the user terminal is directed to the home network of the user terminal for exit, including: If the roaming network is an IPv4 single stack, and the subscribed session type of the user terminal and the session type are IPv6 single stack types, an IPv6 single stack address is allocated to the user terminal, and the user traffic is directed to the home network for exit.

6. A network access device, characterized in that: The device comprises: A determination module, used to determine the session type and user subscription data corresponding to the user terminal according to the IP session establishment request sent by the user terminal; A processing module is used to guide the user traffic of the user terminal to the home network of the user terminal for exit if the session type and the subscription session type corresponding to the user subscription data do not match the roaming network, wherein the roaming network is the current access network of the user terminal, and the subscription session type of the user terminal is obtained from the user subscription data storage network element through the policy control network element.

7. The device according to claim 6, characterized in that The determination module comprises: A receiving unit, configured to receive the IP session establishment request through a session management network element, wherein the IP session establishment request includes the session type and the user subscription data; A sending unit is used to send a session message to a policy control network element through the session management network element, wherein the session message includes a session type field, wherein the session type field includes the session type and the user subscription data.

8. The device according to claim 6, characterized in that The processing module is further used for: If the session type and the subscribed session type match the roaming network, the user traffic is directed to the roaming network for exit.

9. The device according to claim 6, characterized in that The processing module is further used for: If the current access network of the user terminal is the home network, the user traffic is directed to the home network for exit.

10. The device according to claim 6, characterized in that The processing module comprises: A processing unit is used to allocate an IPv6 single stack address to the user terminal if the roaming network is an IPv4 single stack and the subscribed session type and the session type of the user terminal are IPv6 single stack types, and to guide the user traffic to the home network for exit.

11. An electronic device, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the steps of the network access method according to any one of claims 1 to 5.

12. A readable storage medium, characterized in that: The readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the network access method according to any one of claims 1 to 5 are implemented.