Traffic redirection method, device and system, electronic equipment and storage medium

By matching the target intranet domain name in the domain name system query message sent by the user terminal and the intranet domain name in the domain name system policy information element, and modifying the query message to direct it to the corresponding domain name system server, the problem that is difficult to satisfy in the existing technology is solved. Addressing the customer's refined DNS policy configuration requirements, flexible and adaptable DNS policy management is achieved.

CN119363709APending Publication Date: 2025-01-24CHINA TELECOM INTELLIGENT NETWORK TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411479713.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-22
Publication Date
2025-01-24

AI Technical Summary

Technical Problem

The existing technology is difficult to meet the customers' DNS policy configuration needs based on specific business needs, especially when the customer's intranet involves diversified business scenarios.

Method used

By obtaining the domain name system system sent by the user terminal, the inner network domain name carried by the target intranet domain name and domain name system strategy letter is matched, and under the condition of successful matching Modify the domain name system inquiry message to enable the business flow of the domain name in the target to guide the server corresponding to the domain name system server address.

Benefits of technology

Realize the refined DNS strategy configuration according to business needs, meet the needs of customers' independence and mutual interference between different business cluster servers, and improve the flexibility and adaptability of the DNS strategy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119363709A_ABST
    Figure CN119363709A_ABST
Patent Text Reader

Abstract

The invention discloses a traffic redirection method, device and system, electronic equipment and a storage medium. The method comprises the following steps: obtaining a domain name system query message sent by a user terminal, the domain name system query message being used for requesting to access a target intranet domain name; matching the target intranet domain name with an intranet domain name carried in the domain name system strategy cell; and under the condition that the target intranet domain name is successfully matched with the intranet domain name, modifying the domain name system query message according to a domain name system server address corresponding to the intranet domain name, the modified domain name system query message is used for enabling the service flow corresponding to the target intranet domain name to be guided to the server corresponding to the domain name system server address. According to the method and the device, the technical problem that the requirement of a customer for fine domain name system strategy configuration based on specific business requirements is difficult to meet in the related technology is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the fields of network technology and security technology, and in particular to a traffic redirection method, device, system, electronic device and storage medium. Background Art

[0002] With the promotion of 5G (5th Generation Mobile Communication Technology) customized networks, more and more customers are using edge UPF (User Plane Fuction) to build their own private networks. In order to achieve seamless access to internal and external networks, edge UPF currently usually uses DNS (Domain Name System) rewrite technology. The edge UPF will modify the DNS request of the target intranet domain name, and then match it according to the PDR (Packet Detection Rule) and forward it to the customer's designated DN (Data Network).

[0003] In the related art, a set of primary and backup DNS servers are usually configured for each DNN (Data Network Name) and a series of intranet domain name rules are set. However, when the customer's intranet involves diverse business scenarios and independent DNS servers are required to ensure that different business cluster servers are independent of each other and do not interfere with each other, the configuration methods in the related art can no longer meet the customer's needs for refined DNS policy configuration based on specific business needs.

[0004] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention

[0005] The embodiments of the present application provide a traffic redirection method, device, system, electronic device and storage medium to at least solve the technical problem in related technologies that it is difficult to meet customers' needs for refined domain name system policy configuration based on specific business needs.

[0006] According to one aspect of an embodiment of the present application, a traffic redirection method is provided, including: obtaining a domain name system query message sent by a user terminal, wherein the domain name system query message is used to request access to a target intranet domain name; matching the target intranet domain name with the intranet domain name carried in a domain name system policy information element, wherein the domain name system policy information element includes: at least one intranet domain name, and a domain name system server address corresponding to the intranet domain name; when the target intranet domain name matches the intranet domain name successfully, modifying the domain name system query message according to the domain name system server address corresponding to the intranet domain name, wherein the modified domain name system query message is used to enable the business traffic corresponding to the target intranet domain name to be directed to a server corresponding to the domain name system server address.

[0007] Optionally, the domain name system policy element is configured by the session management function network element to the user plane function network element when it detects that the user terminal initiates a session establishment request, wherein at least one domain name system policy element is configured in the user plane function network element, and each domain name system policy element corresponds to a domain name system policy.

[0008] Optionally, the session management function network element is used to: determine identification information corresponding to the user terminal that initiates a session establishment request, wherein the identification information includes at least one of the following: a tracking area code of an access base station, an international mobile user identity code; based on the identification information, determine the domain name system policy element corresponding to the user terminal, and update the domain name system policy element configured in the user plane function network element to the newly determined domain name system policy element corresponding to the user terminal.

[0009] Optionally, the customer intranet includes: a core area and a non-core area; the domain name system policy element includes: a first domain name system policy element corresponding to the core area, and a second domain name system policy element corresponding to the non-core area; when the identification information is the tracking area code of the access base station, the domain name system policy element configured in the user plane function network element is updated to the newly determined domain name system policy element corresponding to the user terminal, including: when the tracking area code corresponding to the user terminal is the tracking area code of the base station corresponding to the core area, it is determined that the user terminal is in the core area, and the domain name system policy element configured in the user plane function network element is updated to the first domain name system policy element; when the tracking area code corresponding to the user terminal is the tracking area code of the base station corresponding to the non-core area, it is determined that the user terminal is in the non-core area, and the domain name system policy element configured in the user plane function network element is updated to the second domain name system policy element.

[0010] Optionally, matching the target intranet domain name with the intranet domain name carried in the domain name system policy element includes: when a domain name system query message is received from a user terminal in a core area, determining whether the target intranet domain name corresponding to the domain name system query message exists in the first domain name system policy element, and determining that the match is successful if the target intranet domain name exists in the first domain name system policy element, wherein the intranet domain names included in the first domain name system policy element are all domain names corresponding to the core area of ​​the customer intranet; when a domain name system query message is received from a user terminal in a non-core area, determining whether the target intranet domain name corresponding to the domain name system query message exists in the second domain name system policy element, and determining that the match is successful if the target intranet domain name exists in the second domain name system policy element, wherein the intranet domain names included in the second domain name system policy element are all domain names corresponding to the non-core area of ​​the customer intranet.

[0011] Optionally, the method also includes: when the target intranet domain name does not exist in the domain name system policy information element configured in the user plane functional network element, determining that the target intranet domain name fails to match the intranet domain name; when the match fails, prohibiting the user terminal from accessing the target intranet domain name.

[0012] Optionally, after modifying the domain name system query message, the method also includes: forwarding the modified domain name system query message to the primary domain name system server and / or the backup domain name system server corresponding to the domain name system server address; forwarding the domain name system response message returned by the primary domain name system server or the backup domain name system server to the user terminal, so as to realize the transmission of upstream and downstream service traffic between the user terminal and the target intranet domain name.

[0013] According to another aspect of an embodiment of the present application, a traffic redirection device is also provided, including: an acquisition module, used to acquire a domain name system query message sent by a user terminal, wherein the domain name system query message is used to request access to a target intranet domain name; a matching module, used to match the target intranet domain name with the intranet domain name carried in a domain name system policy information element, wherein the domain name system policy information element includes: at least one intranet domain name, and a domain name system server address corresponding to the intranet domain name; a directing module, used to modify the domain name system query message according to the domain name system server address corresponding to the intranet domain name when the target intranet domain name successfully matches the intranet domain name, wherein the modified domain name system query message is used to enable the business traffic corresponding to the target intranet domain name to be directed to the server corresponding to the domain name system server address.

[0014] According to another aspect of an embodiment of the present application, a traffic redirection system is also provided, including: a session management function network element and a user plane function network element, wherein the session management function network element is used to configure the domain name system policy information element corresponding to the user terminal into the user plane function network element when it is detected that the user terminal initiates a session establishment request, wherein the domain name system policy information element includes: at least one intranet domain name, and a domain name system server address corresponding to the intranet domain name; the user plane function network element is used to obtain a domain name system query message sent by the user terminal, wherein the domain name system query message is used to request access to a target intranet domain name; match the target intranet domain name with the intranet domain name carried in the domain name system policy information element; when the target intranet domain name matches the intranet domain name successfully, modify the domain name system query message according to the domain name system server address corresponding to the intranet domain name, wherein the modified domain name system query message is used to enable the service traffic corresponding to the target intranet domain name to be directed to the server corresponding to the domain name system server address.

[0015] According to another aspect of the embodiments of the present application, there is further provided an electronic device, including: a memory and a processor, the processor being configured to run a program stored in the memory, wherein the traffic redirection method is executed when the program is run.

[0016] According to another aspect of the embodiments of the present application, a non-volatile storage medium is provided, the non-volatile storage medium includes a stored computer program, wherein the device where the non-volatile storage medium is located executes the traffic redirection method by running the computer program.

[0017] According to another aspect of the embodiments of the present application, a computer program product is provided, including a computer program, which implements the steps of the traffic redirection method when the computer program is executed by a processor.

[0018] In an embodiment of the present application, a domain name system query message sent by a user terminal is obtained, wherein the domain name system query message is used to request access to a target intranet domain name; the target intranet domain name is matched with the intranet domain name carried in a domain name system policy element, wherein the domain name system policy element includes: at least one intranet domain name, and a domain name system server address corresponding to the intranet domain name; when the target intranet domain name is successfully matched with the intranet domain name, the domain name system query message is modified according to the domain name system server address corresponding to the intranet domain name, wherein the modified domain name system query message is used to enable the business traffic corresponding to the target intranet domain name to be directed to the server corresponding to the domain name system server address, and the DNS traffic is redirected based on the extended message element, thereby achieving the purpose of fine-grained DNS policy configuration according to business needs, thereby solving the technical problem in the related art that it is difficult to meet the customer's demand for fine-grained domain name system policy configuration based on specific business needs. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0020] Figure 1 It is a schematic diagram of a DNS rewriting solution in a related technology provided according to an embodiment of the present application;

[0021] Figure 2 It is a schematic diagram of a client multi-DNS server scenario provided according to an embodiment of the present application;

[0022] Figure 3 It is a hardware structure block diagram of a computer terminal (or electronic device) for implementing a method for traffic redirection provided in an embodiment of the present application;

[0023] Figure 4 It is a schematic diagram of a method flow of traffic redirection provided according to an embodiment of the present application;

[0024] Figure 5 It is a schematic diagram of a method flow of DNS traffic redirection based on extended messages provided according to an embodiment of the present application;

[0025] Figure 6 is a structural schematic diagram of a traffic redirection device provided according to an embodiment of the present application;

[0026] Figure 7 It is a structural diagram of a traffic redirection system provided according to an embodiment of the present application. DETAILED DESCRIPTION

[0027] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.

[0028] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0029] In order to facilitate those skilled in the art to better understand the embodiments of the present application, some technical terms or nouns involved in the embodiments of the present application are explained as follows:

[0030] UPF: It is an important part of the 3GPP (Third Generation Partnership Project) 5G core network system architecture, and is mainly responsible for the routing and forwarding related functions of user plane data packets in the 5G core network.

[0031] DNN: The main function is to distinguish the access of different data networks. According to DNN, the session traffic is diverted and aggregated to different SMFs (Session Management Functions) / UPFs to achieve customer-oriented access.

[0032] In related technologies, each DNN is usually configured with a set of primary and backup DNS servers and a series of intranet domain name rules are set. The specific DNS rewriting scheme is as follows: Figure 1 As shown in the figure, after receiving the DNS query message for accessing the intranet domain name, UPF directly forwards the message to the corresponding primary / backup DNS server. However, when facing the diversified business scenarios involving the customer intranet, and the need to use independent DNS servers to ensure that different business cluster servers are independent and do not interfere with each other, for example Figure 2 In the multi-DNS server scenario shown, in addition to traffic accessing the public network, there is also traffic accessing non-core areas of the intranet and traffic accessing core areas of the intranet. In this case, the configuration methods in the relevant technologies can no longer meet the customer's needs for refined DNS policy configuration based on specific business needs.

[0033] In order to solve this problem, a relevant solution is provided in the embodiments of the present application, which is described in detail below.

[0034] According to an embodiment of the present application, a method embodiment of traffic redirection is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0035] The method embodiments provided in the embodiments of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Figure 3 The hardware structure block diagram of a computer terminal (or electronic device) for implementing a traffic redirection method is shown. Figure 3 As shown, the computer terminal 30 (or electronic device) may include one or more (302a, 302b, ..., 302n are used to illustrate) processors 302 (the processor 302 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 304 for storing data, and a transmission device 306 for communication functions. In addition, it may also include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of the BUS bus), a network interface, a power supply and / or a camera. It can be understood by those skilled in the art that Figure 3 The structure shown is only for illustration and does not limit the structure of the above electronic device. Figure 3 More or fewer components as shown, or with Figure 3 Different configurations are shown.

[0036] It should be noted that the one or more processors 302 and / or other data processing circuits described above may generally be referred to herein as "data processing circuits". The data processing circuits may be embodied in whole or in part as software, hardware, firmware, or any other combination thereof. In addition, the data processing circuit may be a single independent processing module, or may be incorporated in whole or in part into any of the other components in the computer terminal 30 (or electronic device). As described in the embodiments of the present application, the data processing circuit acts as a processor control (e.g., selection of a variable resistor terminal path connected to an interface).

[0037] The memory 304 can be used to store software programs and modules of application software, such as the program instructions / data storage device corresponding to the traffic redirection method in the embodiment of the present application. The processor 302 executes various functional applications and data processing by running the software programs and modules stored in the memory 304, that is, the above-mentioned traffic redirection method is realized. The memory 304 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 304 may further include a memory remotely arranged relative to the processor 302, and these remote memories may be connected to the computer terminal 30 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0038] The transmission device 306 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the computer terminal 30. In one example, the transmission device 306 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 306 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0039] The display may be, for example, a touch screen liquid crystal display (LCD) that enables a user to interact with a user interface of the computer terminal 30 (or electronic device).

[0040] In the above operating environment, the embodiment of the present application provides a traffic redirection method. Figure 4 is a schematic diagram of a method flow for traffic redirection provided according to an embodiment of the present application, such as Figure 4 As shown, the method can be applied to a user plane function network element, comprising the following steps:

[0041] Step S402, obtaining a domain name system query message sent by the user terminal, wherein the domain name system query message is used to request access to a target intranet domain name;

[0042] Step S404, matching the target intranet domain name with the intranet domain name carried in the domain name system policy information element, wherein the domain name system policy information element includes: at least one intranet domain name and a domain name system server address corresponding to the intranet domain name;

[0043] Step S406, when the target intranet domain name matches the intranet domain name successfully, the domain name system query message is modified according to the domain name system server address corresponding to the intranet domain name, wherein the modified domain name system query message is used to enable the business traffic corresponding to the target intranet domain name to be directed to the server corresponding to the domain name system server address.

[0044] Through the above steps, DNS traffic is redirected based on extended message elements, thereby achieving the purpose of fine-grained DNS policy configuration based on business needs, thereby solving the technical problem that related technologies are difficult to meet customers' needs for fine-grained domain name system policy configuration based on specific business needs.

[0045] The following is a further introduction to the traffic redirection method in steps S402 to S406 of the embodiment of the present application.

[0046] The embodiment of the present application adds a PFCP (Packet Forwarding Control Protocol) session information element (IE), namely, a domain name system policy information element (DNS policy "IE), which is used to indicate the DNS policy of a specific domain name. The domain name system policy information element carries a domain name list of the customer's intranet (including multiple intranet domain names) and the corresponding domain name system server address. Each domain name system policy information element corresponds to a domain name system policy. If multiple domain name system policies need to be implemented, refined management of the policies can be achieved by carrying multiple domain name system policy information elements.

[0047] In some embodiments of the present application, a domain name system policy element is configured by a session management function network element to a user plane function network element when it detects that a user terminal initiates a session establishment request, wherein at least one domain name system policy element is configured in the user plane function network element, and each domain name system policy element corresponds to a domain name system policy.

[0048] Specifically, when the client terminal session goes online (i.e., it is detected that the user terminal initiates a session establishment request), the session management function network element SMF can, according to customer needs, use the domain name system policy information element extended by the embodiment of the present application to put the intranet domain name and its corresponding domain name system server address information into the session information. The specific steps are as follows.

[0049] In some embodiments of the present application, the session management function network element is used to: determine the identification information corresponding to the user terminal that initiates the session establishment request, wherein the identification information includes at least one of the following: the tracking area code of the access base station, the international mobile user identity code; based on the identification information, determine the domain name system policy element corresponding to the user terminal, and update the domain name system policy element configured in the user plane function network element to the newly determined domain name system policy element corresponding to the user terminal.

[0050] Specifically, for customers with multiple DNS policies, SMF can implement accurate policy configuration by carrying multiple DNS policy information elements. Among them, the DNS policy of user terminals can be segmented and implemented based on multiple identification information such as access base stations, international mobile subscriber identification codes (IMSI) of mobile phone cards, and application domain names visited.

[0051] When the client terminal attempts to access the intranet domain name application, that is, when the user terminal sends a domain name system query message for requesting access to the target intranet domain name, the user plane functional network element UPF will match the intranet domain name carried in the configured domain name system policy element. If the match is successful, UPF will use the domain name system server address information corresponding to the successfully matched intranet domain name in the domain name system policy element to modify the domain name system query message to ensure that subsequent domain name application traffic can be correctly directed to the server address expected by the customer. If the match is not successful, UPF will continue to try to match the domain names in other configured domain name system policy elements. If all fail to match, the domain name system query message will not be modified, that is, if the target intranet domain name does not exist in the domain name system policy element configured by the user plane functional network element, it is determined that the target intranet domain name and the intranet domain name match failed; if the match fails, the user terminal is prohibited from accessing the target intranet domain name.

[0052] The following is a further example of the method flow in which the intranet domain name and its corresponding domain name system server address information are placed in the session information through the domain name system policy information, the UPF matches the domain name system query message according to the domain name system policy information, and uses the domain name system server address information of the domain name system policy information to modify the domain name system query message, as shown in the following example. Figure 5 shown.

[0053] First, configure the DNS policy corresponding to the core area of ​​the customer's intranet in SMF, including domain name 1 and domain name 2 used in the core area of ​​the customer's intranet, and the primary and backup DNS servers in the core area, and obtain the first domain name system policy information element corresponding to the core area. And, configure the DNS policy corresponding to the non-core area of ​​the customer's intranet in SMF, including domain name 3 used in the non-core area of ​​the customer's intranet, and the primary and backup DNS servers in the non-core area, and obtain the second domain name system policy information element corresponding to the non-core area.

[0054] In addition, in this embodiment, the Tracking Area Code (TAC) of the access base station can be used to identify and subdivide the DNS policy corresponding to the user terminal. For example, TAC1 of the access base station is used to identify core area users, and TAC2 is used to identify non-core area users.

[0055] The following is an introduction to the specific configuration and use process of the domain name system policy information element. The specific steps are as follows.

[0056] In some embodiments of the present application, the customer intranet includes: a core area and a non-core area; the domain name system policy element includes: a first domain name system policy element corresponding to the core area, and a second domain name system policy element corresponding to the non-core area; when the identification information is the tracking area code of the access base station, updating the domain name system policy element configured in the user plane function network element to the newly determined domain name system policy element corresponding to the user terminal includes the following steps: when the tracking area code corresponding to the user terminal is the tracking area code of the base station corresponding to the core area, it is determined that the user terminal is in the core area, and the domain name system policy element configured in the user plane function network element is updated to the first domain name system policy element; when the tracking area code corresponding to the user terminal is the tracking area code of the base station corresponding to the non-core area, it is determined that the user terminal is in the non-core area, and the domain name system policy element configured in the user plane function network element is updated to the second domain name system policy element.

[0057] Specifically, when the user terminal device UE-1 in the core area of ​​the private network customer initiates a PFCP session establishment request, since UE-1 initiates the request in the core area, its corresponding tracking area code is TAC1. At this time, SMF uses the first domain name system policy information element to integrate the intranet domain name and DNS server address information corresponding to the core area into the session information and update it to the user plane functional network element. If the customer needs to implement multiple DNS policies, SMF can achieve accurate configuration of the policy by embedding multiple first domain name system policy information elements.

[0058] When the user terminal device UE-2 of the private network customer in the non-core area initiates a PFCP session establishment request, since UE-2 initiates the request in the non-core area, its corresponding tracking area code is TAC2. At this time, SMF uses the second domain name system policy information element to integrate the intranet domain name and DNS server address information corresponding to the non-core area into the session information and update it to the user plane functional network element. If the customer needs to implement multiple DNS policies, SMF can achieve accurate configuration of the policy by embedding multiple second domain name system policy information elements IE.

[0059] When a user terminal attempts to access a target intranet domain name in a customer intranet, the user plane function UPF matches the domain name system policy information configured in the session. The specific steps are as follows.

[0060] In some embodiments of the present application, matching the target intranet domain name with the intranet domain name carried in the domain name system policy element includes the following steps: when a domain name system query message is received from a user terminal in a core area, determining whether the target intranet domain name corresponding to the domain name system query message exists in the first domain name system policy element, and when the target intranet domain name exists in the first domain name system policy element, determining that the match is successful, wherein the intranet domain names included in the first domain name system policy element are all domain names corresponding to the core area of ​​the customer intranet; when a domain name system query message is received from a user terminal in a non-core area, determining whether the target intranet domain name corresponding to the domain name system query message exists in the second domain name system policy element, and when the target intranet domain name exists in the second domain name system policy element, determining that the match is successful, wherein the intranet domain names included in the second domain name system policy element are all domain names corresponding to the non-core area of ​​the customer intranet.

[0061] Specifically, when UE-1 in the core area of ​​the intranet tries to access the intranet domain name application in the core area, UPF will match the domain name according to the first domain name system policy element in the session. After the match is successful, UPF can use the DNS server address information of the first domain name system policy element to modify the DNS query message to ensure that the domain name application traffic is correctly directed to the cluster server address corresponding to the core area.

[0062] When UE-2 in the non-core area of ​​the intranet tries to access the intranet domain name application in the non-core area, UPF will match the domain name according to the second domain name system policy information in the session. After the match is successful, UPF can use the DNS server address information in the second domain name system policy information to modify the DNS query message to ensure that the domain name application traffic is correctly directed to the cluster server address corresponding to the non-core area.

[0063] After modifying the domain name system query message, the method also includes the following steps: forwarding the modified domain name system query message to the primary domain name system server and / or the backup domain name system server corresponding to the domain name system server address; forwarding the domain name system response message returned by the primary domain name system server or the backup domain name system server to the user terminal, so as to realize the transmission of uplink and downlink business traffic between the user terminal and the target intranet domain name.

[0064] In addition, when the client terminal UE-1 originally located in the core area moves to the base station in the non-core area, the SMF will trigger a session update, remove the original DNS policy of the core area, and update it to the DNS policy of the non-core area, that is, the first domain name system policy element originally configured in the UPF is removed and updated to the second domain name system policy element. At this time, if UE-1 tries to access the intranet domain name application in the core area, the UPF will not be able to successfully match any intranet domain name in the second domain name system policy element, that is, the target intranet domain name does not exist in the domain name system policy element configured in the user plane functional network element, and the match fails, so the DNS query message will not be modified. In this case, the terminal UE-1 located in the non-core area will not be able to access the core area related services normally, that is, in the case of a matching failure, the user terminal is prohibited from accessing the target intranet domain name.

[0065] This application solution uses the Domain Name System Policy Information (DNS Policy IE) to carry DNS policy information of a specific domain name in the session, including the domain name list of the customer's intranet and its corresponding DNS server address, so as to realize the customized delivery of DNS policy in the PFCP session, allowing independent DNS policy to be configured for each specific domain name or each group of domain names, thus meeting the customer's demand for refined DNS policy. It also supports the segmentation and implementation of DNS policy based on multiple conditions such as access base station, IMSI of mobile phone card, and application domain name visited, providing more personalized services and better meeting the needs of different customers.

[0066] According to an embodiment of the present application, an embodiment of a traffic redirection device is also provided. Figure 6 is a schematic diagram of the structure of a traffic redirection device provided according to an embodiment of the present application. Figure 6 As shown, the device comprises:

[0067] An acquisition module 60 is used to acquire a domain name system query message sent by a user terminal, wherein the domain name system query message is used to request access to a target intranet domain name;

[0068] A matching module 62 is used to match the target intranet domain name with the intranet domain name carried in the domain name system policy information element, wherein the domain name system policy information element includes: at least one intranet domain name and a domain name system server address corresponding to the intranet domain name;

[0069] The directional module 64 is used to modify the domain name system query message according to the domain name system server address corresponding to the intranet domain name when the target intranet domain name successfully matches the intranet domain name, wherein the modified domain name system query message is used to enable the business traffic corresponding to the target intranet domain name to be directed to the server corresponding to the domain name system server address.

[0070] Optionally, the domain name system policy element is configured by the session management function network element to the user plane function network element when it detects that the user terminal initiates a session establishment request, wherein at least one domain name system policy element is configured in the user plane function network element, and each domain name system policy element corresponds to a domain name system policy.

[0071] Optionally, the session management function network element is used to: determine identification information corresponding to the user terminal that initiates a session establishment request, wherein the identification information includes at least one of the following: a tracking area code of an access base station, an international mobile user identity code; based on the identification information, determine the domain name system policy element corresponding to the user terminal, and update the domain name system policy element configured in the user plane function network element to the newly determined domain name system policy element corresponding to the user terminal.

[0072] Optionally, the customer intranet includes: a core area and a non-core area; the domain name system policy element includes: a first domain name system policy element corresponding to the core area, and a second domain name system policy element corresponding to the non-core area; when the identification information is the tracking area code of the access base station, the domain name system policy element configured in the user plane function network element is updated to the newly determined domain name system policy element corresponding to the user terminal, including: when the tracking area code corresponding to the user terminal is the tracking area code of the base station corresponding to the core area, it is determined that the user terminal is in the core area, and the domain name system policy element configured in the user plane function network element is updated to the first domain name system policy element; when the tracking area code corresponding to the user terminal is the tracking area code of the base station corresponding to the non-core area, it is determined that the user terminal is in the non-core area, and the domain name system policy element configured in the user plane function network element is updated to the second domain name system policy element.

[0073] Optionally, matching the target intranet domain name with the intranet domain name carried in the domain name system policy element includes: when a domain name system query message is received from a user terminal in a core area, determining whether the target intranet domain name corresponding to the domain name system query message exists in the first domain name system policy element, and determining that the match is successful if the target intranet domain name exists in the first domain name system policy element, wherein the intranet domain names included in the first domain name system policy element are all domain names corresponding to the core area of ​​the customer intranet; when a domain name system query message is received from a user terminal in a non-core area, determining whether the target intranet domain name corresponding to the domain name system query message exists in the second domain name system policy element, and determining that the match is successful if the target intranet domain name exists in the second domain name system policy element, wherein the intranet domain names included in the second domain name system policy element are all domain names corresponding to the non-core area of ​​the customer intranet.

[0074] Optionally, the traffic redirection device is also used to: when the target intranet domain name does not exist in the domain name system policy information element configured in the user plane functional network element, determine that the target intranet domain name fails to match the intranet domain name; when the match fails, prohibit the user terminal from accessing the target intranet domain name.

[0075] Optionally, after modifying the domain name system query message, the traffic redirection device is also used to: forward the modified domain name system query message to the primary domain name system server and / or the backup domain name system server corresponding to the domain name system server address; forward the domain name system response message returned by the primary domain name system server or the backup domain name system server to the user terminal, so as to realize the transmission of upstream and downstream business traffic between the user terminal and the target intranet domain name.

[0076] It should be noted that the various modules in the above-mentioned traffic redirection device can be program modules (for example, a set of program instructions that implement a certain specific function) or hardware modules. For the latter, it can be expressed in the following forms, but is not limited to this: the expression form of each of the above-mentioned modules is a processor, or the functions of each of the above-mentioned modules are implemented by a processor.

[0077] It should be noted that the traffic redirection device provided in this embodiment can be used to execute Figure 4 The traffic redirection method shown, therefore, the relevant explanations and instructions on the above-mentioned traffic redirection method are also applicable to the embodiments of the present application and will not be repeated here.

[0078] According to an embodiment of the present application, an embodiment of a traffic redirection system is also provided. Figure 7 Schematic diagram of a traffic redirection system provided according to an embodiment of the present application. Figure 7 As shown, the system includes:

[0079] The session management function network element 70 is used to configure the domain name system policy information element corresponding to the user terminal into the user plane function network element when detecting that the user terminal initiates a session establishment request, wherein the domain name system policy information element includes: at least one intranet domain name and a domain name system server address corresponding to the intranet domain name;

[0080] The user plane functional network element 72 is used to obtain a domain name system query message sent by a user terminal, wherein the domain name system query message is used to request access to a target intranet domain name; match the target intranet domain name with the intranet domain name carried in the domain name system policy information element; and when the target intranet domain name matches the intranet domain name successfully, modify the domain name system query message according to the domain name system server address corresponding to the intranet domain name, wherein the modified domain name system query message is used to enable the service traffic corresponding to the target intranet domain name to be directed to the server corresponding to the domain name system server address.

[0081] It should be noted that the traffic redirection system provided in this embodiment can be used to execute Figure 4 The traffic redirection method shown, therefore, the relevant explanations and instructions on the above-mentioned traffic redirection method are also applicable to the embodiments of the present application and will not be repeated here.

[0082] An embodiment of the present application also provides a non-volatile storage medium, the non-volatile storage medium includes a stored computer program, wherein the device where the non-volatile storage medium is located executes the following traffic redirection method by running the computer program: obtaining a domain name system query message sent by a user terminal, wherein the domain name system query message is used to request access to a target intranet domain name; matching the target intranet domain name with the intranet domain name carried in a domain name system policy information element, wherein the domain name system policy information element includes: at least one intranet domain name, and a domain name system server address corresponding to the intranet domain name; when the target intranet domain name matches the intranet domain name successfully, modifying the domain name system query message according to the domain name system server address corresponding to the intranet domain name, wherein the modified domain name system query message is used to enable the business traffic corresponding to the target intranet domain name to be directed to the server corresponding to the domain name system server address.

[0083] The embodiment of the present application also provides a computer program product, including a computer program, which, when executed by a processor, implements the steps of the traffic redirection method described in each embodiment of the present application: obtaining a domain name system query message sent by a user terminal, wherein the domain name system query message is used to request access to a target intranet domain name; matching the target intranet domain name with the intranet domain name carried in a domain name system policy information element, wherein the domain name system policy information element includes: at least one intranet domain name, and a domain name system server address corresponding to the intranet domain name; when the target intranet domain name successfully matches the intranet domain name, modifying the domain name system query message according to the domain name system server address corresponding to the intranet domain name, wherein the modified domain name system query message is used to enable the business traffic corresponding to the target intranet domain name to be directed to the server corresponding to the domain name system server address.

[0084] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.

[0085] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.

[0086] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units can be a logical function division. There may be other division methods in actual implementation. For example, 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 units or modules, which can be electrical or other forms.

[0087] 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 units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0088] In addition, each functional unit in each embodiment of the present application 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. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0089] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or optical disk and other media that can store program codes.

[0090] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.

Claims

1. A traffic redirection method, characterized in that: include: Acquire a domain name system query message sent by a user terminal, wherein the domain name system query message is used to request access to a target intranet domain name; Matching the target intranet domain name with the intranet domain name carried in a domain name system policy information element, wherein the domain name system policy information element includes: at least one of the intranet domain names, and a domain name system server address corresponding to the intranet domain name; In the case where the target intranet domain name successfully matches the intranet domain name, the domain name system query message is modified according to the domain name system server address corresponding to the intranet domain name, wherein the modified domain name system query message is used to enable the business traffic corresponding to the target intranet domain name to be directed to the server corresponding to the domain name system server address.

2. The traffic redirection method according to claim 1, characterized in that: The domain name system policy information element is configured by the session management function network element to the user plane function network element when it detects that the user terminal initiates a session establishment request, wherein at least one domain name system policy information element is configured in the user plane function network element, and each domain name system policy information element corresponds to a domain name system policy.

3. The traffic redirection method according to claim 2, characterized in that: The session management function network element is used to: determine the identification information corresponding to the user terminal that initiates the session establishment request, wherein the identification information includes at least one of the following: a tracking area code of an access base station, an international mobile user identity code; based on the identification information, determine the domain name system policy information element corresponding to the user terminal, and update the domain name system policy information element configured in the user plane function network element to the newly determined domain name system policy information element corresponding to the user terminal.

4. The traffic redirection method according to claim 3, characterized in that: The customer intranet includes: a core area and a non-core area; the domain name system policy information element includes: a first domain name system policy information element corresponding to the core area, and a second domain name system policy information element corresponding to the non-core area; when the identification information is a tracking area code of an access base station, updating the domain name system policy information element configured in the user plane function network element to the newly determined domain name system policy information element corresponding to the user terminal includes: When the tracking area code corresponding to the user terminal is the tracking area code of the base station corresponding to the core area, determining that the user terminal is in the core area, and updating the domain name system policy information element configured in the user plane function network element to the first domain name system policy information element; When the tracking area code corresponding to the user terminal is the tracking area code of the base station corresponding to the non-core area, it is determined that the user terminal is in the non-core area, and the domain name system policy information element configured in the user plane functional network element is updated to the second domain name system policy information element.

5. The traffic redirection method according to claim 4, characterized in that: Matching the target intranet domain name with the intranet domain name carried in the domain name system policy information element includes: When receiving the domain name system query message sent by the user terminal in the core area, determining whether the target intranet domain name corresponding to the domain name system query message exists in the first domain name system policy information element, and determining that the match is successful when the target intranet domain name exists in the first domain name system policy information element, wherein the intranet domain names included in the first domain name system policy information element are all domain names corresponding to the core area of ​​the customer intranet; When the domain name system query message is received from the user terminal in the non-core area, it is determined whether the target intranet domain name corresponding to the domain name system query message exists in the second domain name system policy information element, and when the target intranet domain name exists in the second domain name system policy information element, it is determined that the match is successful, wherein the intranet domain names included in the second domain name system policy information element are all domain names corresponding to the non-core area of ​​the customer intranet.

6. The traffic redirection method according to claim 1, characterized in that: The method further comprises: If the target intranet domain name does not exist in the domain name system policy information element configured by the user plane functional network element, determining that the target intranet domain name fails to match the intranet domain name; In case the match fails, the user terminal is prohibited from accessing the target intranet domain name.

7. The traffic redirection method according to claim 1, characterized in that: After modifying the domain name system query message, the method further includes: Forwarding the modified DNS query message to the primary DNS server and / or backup DNS server corresponding to the DNS server address; The domain name system response message returned by the primary domain name system server or the backup domain name system server is forwarded to the user terminal to realize the transmission of uplink and downlink service traffic between the user terminal and the target intranet domain name.

8. A traffic redirection device, characterized in that: include: An acquisition module, used to acquire a domain name system query message sent by a user terminal, wherein the domain name system query message is used to request access to a target intranet domain name; A matching module, configured to match the target intranet domain name with the intranet domain name carried in a domain name system policy information element, wherein the domain name system policy information element includes: at least one of the intranet domain names, and a domain name system server address corresponding to the intranet domain name; A directional module is used to modify the domain name system query message according to the domain name system server address corresponding to the intranet domain name when the target intranet domain name successfully matches the intranet domain name, wherein the modified domain name system query message is used to enable the business traffic corresponding to the target intranet domain name to be directed to the server corresponding to the domain name system server address.

9. A traffic redirection system, characterized in that: include: Session management function network element and user plane function network element, where: The session management function network element is used to detect that the user terminal initiates a session establishment request. Configuring a domain name system policy information element corresponding to the user terminal into the user plane function network element, wherein the domain name system policy information element includes: at least one intranet domain name, and a domain name system server address corresponding to the intranet domain name; The user plane functional network element is used to obtain a domain name system query message sent by a user terminal, wherein the domain name system query message is used to request access to a target intranet domain name; match the target intranet domain name with the intranet domain name carried in the domain name system policy information element; and when the target intranet domain name matches the intranet domain name successfully, modify the domain name system query message according to the domain name system server address corresponding to the intranet domain name, wherein the modified domain name system query message is used to enable the service traffic corresponding to the target intranet domain name to be directed to the server corresponding to the domain name system server address.

10. An electronic device, characterized in that: include: A memory and a processor, wherein the processor is used to run a program stored in the memory, wherein the program executes the traffic redirection method described in any one of claims 1 to 7 when running.

11. A non-volatile storage medium, characterized in that: The non-volatile storage medium includes a stored computer program, wherein the device where the non-volatile storage medium is located executes the traffic redirection method described in any one of claims 1 to 7 by running the computer program.

12. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the traffic redirection method described in any one of claims 1 to 7 are implemented.