Network query method, apparatus and medium
By obtaining the dedicated APN name and query parameters, the query progression relationship of network devices is determined, and query commands are sent sequentially. This solves the problem of low query efficiency in existing technologies and realizes automated one-click query and rapid fault location.
Patent Information
- Application Number
- CN202411455687.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-17
- Publication Date
- 2025-11-11
- Estimated Expiration
- 2044-10-17
AI Technical Summary
Existing online query tools require manual login to network elements to extract information, resulting in low query efficiency and an inability to achieve one-click query.
A network query method is provided, which determines the progressive relationship between network devices by obtaining the dedicated APN name and query parameters, and sends query commands sequentially until the final result is obtained. The method achieves automated querying by using a modular structure and programming techniques.
It enables automatic determination of progressive relationships in queries, allowing for one-click and efficient querying of network device information, helping users quickly locate faults and improving query efficiency and accuracy.
Smart Images

Figure CN119420668B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates at least to the field of network technology, and in particular to a network query method, a network query device, and a computer-readable storage medium. Background Technology
[0002] By querying network devices, information about those devices can be obtained. This information can be used to determine the network status, such as locating network faults based on the network information.
[0003] Current online query tools cannot achieve one-click query. They often require manual login to network elements to extract information and analyze and judge information from multiple network elements, resulting in low query efficiency. Summary of the Invention
[0004] The technical problem to be solved by this disclosure is to provide a network query method, a network query device, and a computer-readable storage medium to address the above-mentioned shortcomings, so as to solve the problem of how to efficiently query network device information.
[0005] Firstly, this disclosure provides a method for online querying, the method comprising:
[0006] Retrieve the name of the private APN to be queried and the query parameters to be queried;
[0007] Based on the dedicated APN name and the query parameters, determine the query progression relationship between the network device to be queried and the network device;
[0008] By sequentially combining the query results of the previous query on the network device in the progressive query relationship with the query parameters, each query instruction of each network device is obtained, and each query instruction is sequentially sent to each network device until the final query result is obtained;
[0009] APN stands for Access Point Name.
[0010] Further, obtain the private APN name to be queried and the query parameters to be queried, specifically including:
[0011] Receive fault report information from IoT users, and establish a dedicated line connection between the user-side equipment of the IoT user and the core network-side equipment based on GRE tunnel, L2TP tunnel or direct fiber optic connection;
[0012] Obtain the dedicated APN name of the IoT user and the query parameters to be queried for processing the fault report information;
[0013] GRE stands for General Router Encapsulation, and L2TP stands for Layer 2 Tunneling Protocol.
[0014] Further, the dedicated APN name of the IoT user and the query parameters to be queried for processing the fault report information are obtained, specifically including:
[0015] The dedicated APN name of the IoT user can be obtained directly from the fault report information, or the dedicated APN name of the IoT user can be obtained based on the MSISDN obtained from the fault report information;
[0016] The fault type of the IoT user is obtained based on the fault report information. The query parameters to be queried are determined based on the fault type, including at least one of the following: leased line type query, online user query, whitelist user query, speed limit query, and GRE leased line test.
[0017] MSISDN stands for International Mobile Subscriber Identity.
[0018] Furthermore, among which:
[0019] In response to the fault type being that a specified user cannot access the service, the query parameters to be queried are determined to include leased line type query and whitelist user query.
[0020] In response to the fault type being that all users cannot access the site, the query parameters to be queried are determined to include leased line type query and online user query.
[0021] In response to the fault type being slow network speed, the query parameters to be queried are determined to include dedicated line type query and speed limit query.
[0022] In response to the leased line type query, which returned GRE leased line, the query parameters to be queried include GRE leased line testing.
[0023] Further, based on the dedicated APN name and the query parameters, the progressive relationship between the network device to be queried and the network device is determined, specifically including:
[0024] Determine all core network-side devices and user-side devices involved in the dedicated APN name. The core network-side devices include SMF network elements and UPF network elements. In response to the leased line type being GRE leased line, the core network-side devices also include large customer switches.
[0025] Based on the query parameters, among all the core network side devices and user side devices, several network devices that need to be queried for joint debugging and the progressive query relationship between the network devices are determined;
[0026] SMF stands for Service Management Function, and UPF stands for User Port Function.
[0027] Furthermore, based on the query parameters, among all core network-side devices and user-side devices, several network devices requiring joint debugging queries and the progressive query relationships between these network devices are determined, specifically including:
[0028] Determine the first query order for each of the query parameters, and the query information to be obtained for each of the query parameters;
[0029] Determine the dependencies between the various query information items, and determine the second query order of the various query information items based on the dependencies;
[0030] Based on the first query order and the second query order, determine the network device where each query information is located and the order of the network device in the query progressive relationship.
[0031] Furthermore, among which:
[0032] The first query order of each query parameter is: leased line type query and other parameters. The query information to be obtained for the leased line type query is the leased line type. The network device where the leased line type is located is the SMF network element. The SMF network element that performs the leased line type query based on the dedicated APN name is determined as the first step query network device in the query progressive relationship.
[0033] In response to the remaining parameters including at least one of online user query, whitelist user query, or rate limit query, the UPF network element that performs at least one of online user query, whitelist user query, or rate limit query based on the leased line type and the dedicated APN name is determined as the second-step query network device in the query progressive relationship;
[0034] In response to the remaining parameters, including the GRE leased line test, the UPF network element that performs the GRE tunnel number query based on the leased line type and the dedicated APN name is identified as the second-step query network device in the query progressive relationship.
[0035] The UPF network element that performs the IP address lookup based on the leased line type, the dedicated APN name, and the GRE tunnel number is identified as the network device queried in the third step of the query progressive relationship.
[0036] The UPF network element and user-side device used for IP address reachability testing from the UPF network element to the user-side device based on the leased line type, the dedicated APN name, the GRE tunnel number, and the IP address are identified as the network devices to be queried in the fourth step.
[0037] In response to the UPF network element being reachable from the user-side device IP address, the UPF network element for which the inner address lookup is performed based on the leased line type, the dedicated APN name, and the GRE tunnel number is identified as the network device queried in the fifth step of the query progressive relationship.
[0038] The network devices identified in the sixth step of the query are the UPF network elements, large customer switches, and user-side devices for inner address reachability testing from the UPF network element to the large customer switch and from the large customer switch to the user-side device, based on the leased line type, the dedicated APN name, the GRE tunnel number, and the inner address.
[0039] Furthermore, by sequentially combining the query results of the previous query on the network device in the progressive query relationship with the query parameters, each query instruction of the network device is obtained, and each query instruction is sequentially sent to the network device until the final query result is obtained. Specifically, this includes:
[0040] Step 1: Inquiry
[0041] Send a first-step query command including the dedicated APN name to the core network SMF element to obtain the leased line type corresponding to the dedicated APN name. The leased line type includes GRE, L2TP or direct fiber connection.
[0042] The following steps will be required for the query:
[0043] The leased line type and the dedicated APN name are obtained as the first key information for the next query instruction. Based on the query progression relationship, the second key information for the next query instruction is extracted from the query results of the previous step of querying network devices. Finally, the third key information for the next query instruction is obtained based on the query parameters and the query progression relationship.
[0044] The first, second, and third key information are combined into a next-step query instruction, which is then sent to the next-step query network device to obtain its query results.
[0045] Repeat the above process until network fault location information is obtained, and use the network fault location information as the final query result.
[0046] Secondly, this disclosure provides a network query device, the device comprising:
[0047] The acquisition module is used to obtain the name of the dedicated APN to be queried and the query parameters to be queried;
[0048] A progressive module, connected to the acquisition module, is used to determine the progressive relationship between the network device to be queried and the network device based on the dedicated APN name and the query parameters.
[0049] The query module, connected to the progressive module, is used to sequentially combine the query results of the previous query network device in the progressive query relationship with the query parameters to obtain each query instruction of each network device, and sequentially send each query instruction to each network device until the final query result is obtained.
[0050] APN stands for Access Point Name.
[0051] Thirdly, this disclosure provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the network query method described above.
[0052] This disclosure provides a network query method, a network query device, and a computer-readable storage medium. Based on a dedicated APN name and query parameters to be queried, the method determines the network device to be queried and the query progression relationship between the network devices, and obtains query instructions sequentially based on the progression relationship. The query is completed sequentially according to the query instructions until the final query result is obtained. By automatically determining the query progression relationship, network device information can be queried efficiently with one click. One application of the final query result is to help users with dedicated APN names quickly locate faults. Attached Figure Description
[0053] Figure 1 This is a flowchart of a network query method according to an embodiment of this disclosure;
[0054] Figure 2 This is an architecture diagram of an Internet of Things (IoT) according to an embodiment of this disclosure;
[0055] Figure 3 This is an architecture diagram of a network query system according to an embodiment of this disclosure;
[0056] Figure 4 This is a schematic diagram of an Internet of Things (IoT) connection according to an embodiment of this disclosure;
[0057] Figure 5 This is a schematic diagram of query parameters for a network query method according to an embodiment of this disclosure;
[0058] Figure 6 This is a schematic diagram of the GRE test results of a web query method according to an embodiment of this disclosure;
[0059] Figure 7 This is a schematic diagram of the whitelist details of a network query method according to an embodiment of this disclosure;
[0060] Figure 8 This is a schematic diagram of the structure of a network query device according to an embodiment of the present disclosure. Detailed Implementation
[0061] To enable those skilled in the art to better understand the technical solutions of this disclosure, the embodiments of this disclosure will be further described in detail below with reference to the accompanying drawings.
[0062] It is understood that the specific embodiments and accompanying drawings described herein are for illustrative purposes only and are not intended to limit the scope of this disclosure.
[0063] It is understood that, without conflict, the various embodiments and features in the embodiments of this disclosure can be combined with each other.
[0064] It is understood that, for ease of description, only the parts relevant to this disclosure are shown in the accompanying drawings, while parts unrelated to this disclosure are not shown in the drawings.
[0065] It is understood that each unit or module involved in the embodiments of this disclosure may correspond to only one entity structure, or may be composed of multiple entity structures, or multiple units or modules may be integrated into one entity structure.
[0066] It is understood that, without conflict, the functions and steps marked in the flowcharts and block diagrams of this disclosure may occur in a different order than that marked in the accompanying drawings.
[0067] It is understood that the flowcharts and block diagrams of this disclosure illustrate the architecture, functions, and operations of possible implementations of systems, apparatuses, devices, and methods according to various embodiments of this disclosure. Each block in a flowchart or block diagram may represent a unit, module, program segment, or code, containing executable instructions for implementing the specified function. Furthermore, each block or combination of blocks in the block diagrams and flowcharts may be implemented using a hardware-based system to implement the specified function, or using a combination of hardware and computer instructions.
[0068] It is understood that the units and modules involved in the embodiments of this disclosure can be implemented by software or by hardware, for example, the units and modules can be located in a processor.
[0069] Example 1:
[0070] like Figure 1 As shown, this disclosure provides a network query method, the method comprising:
[0071] S1. Obtain the name of the private APN to be queried and the query parameters to be queried;
[0072] S2. Based on the dedicated APN name and the query parameters, determine the progressive relationship between the network device to be queried and the network device;
[0073] S3. By combining the query results of the previous query on the network device in the progressive query relationship with the query parameters, obtain each query instruction of each network device, and send each query instruction to each network device in sequence until the final query result is obtained.
[0074] APN stands for Access Point Name.
[0075] In this embodiment, for a specific query purpose, the network information to be retrieved often has an interdependent progressive relationship. This is especially true for users with dedicated APN names, who are associated with specific network devices. Progressively retrieving information from these devices yields the final query result for the desired purpose. Therefore, this method determines the query progressive relationship between the network devices to be queried and the network devices based on the dedicated APN name and the query parameters to be queried. Based on this progressive relationship, query instructions are obtained sequentially, and the query is completed according to these instructions until the final query result is obtained. By automatically determining the query progressive relationship, network device information can be retrieved efficiently with a single click. One application of the final query result is to help users with dedicated APN names quickly locate faults.
[0076] Specifically, this embodiment can provide a tool and method for one-click querying of network information, and the tool can be applied to, for example... Figure 2 In the IoT architecture shown, users access the IoT network through a customized APN (Access Point Name). The user's IoT terminal registers with the operator's core network via a base station. The base station can connect to the core network via 2G, 3G, 4G, and 5G (2nd / 3rd / 4th / 5th Generation Mobile Communication Technology). The 4G core network connects to the user side via an SGW (Serving Gateway) / PGW (Packet Data Network Gateway) router. The 5G core network connects to the user's network via a UPF (User Port Function). Routing from the IoT terminal to the user's network is established through GRE tunnels or L2TP. The overall architecture of the provided tool is as follows: Figure 3As shown, the system includes a front-end one-click query page 101, developed using the Flask framework (a lightweight web application framework written in Python), and a server 102, which receives commands from the one-click query page 101. After the one-click query page 101 submits a command via Flask, the server 102 receives the corresponding verification APN name and parameters, translates the command, and sends it to the core network device 103. The server 102 receives the data returned by the core network device 103, performs anonymization processing and translation, and then sends it to the front-end one-click query page 101 for display. By using this tool, the process of performing a series of operations step-by-step based on the results returned by the preceding commands and then based on the key information obtained from the query to proceed to the next command can be automated, greatly improving query efficiency.
[0077] For example, such as Figure 3 This document describes a one-click location query tool for low-to-medium speed IoT devices. It enables rapid queries of low-to-medium speed IoT services. Users input options (query parameters) and APN on the front-end one-click query page 101, which is then sent to the back-end server 102. The server 102 translates the corresponding content and sends commands to IoT core network devices 103, such as SMF (Service Management Function), UPF, and PGW, for querying. Upon receiving the feedback, the server 102 outputs the results to the front-end one-click query page 101. The front-end can be implemented using the Flask framework, while the server-side can utilize Python for command sending and result receiving.
[0078] In one embodiment, S1, obtaining the private APN name to be queried and the query parameters to be queried, specifically includes:
[0079] Receive fault report information from IoT users, and establish a dedicated line connection between the user-side equipment of the IoT user and the core network-side equipment based on GRE tunnel, L2TP tunnel or direct fiber optic connection;
[0080] Obtain the dedicated APN name of the IoT user and the query parameters to be queried for processing the fault report information;
[0081] GRE stands for General Router Encapsulation, and L2TP stands for Layer 2 Tunneling Protocol.
[0082] In this embodiment, the main types of leased lines for the Internet of Things (IoT) include GRE (Generic Routing Encapsulation), L2TP (Layer 2 Tunneling Protocol), and direct fiber optic connections, such as... Figure 4The diagram shows an IoT connection. The customer router 201 connects to the core network device 103 via an L2TP tunnel 202, and the IoT card can access the user's intranet through a GRE tunnel.
[0083] More specifically, this embodiment provides a tool and method for one-click rapid fault location and diagnosis in low-to-medium speed IoT systems. For example, when a customer manager or frontline maintenance personnel receive a fault report from a user, they can first use the number of online PDPs under the APN to determine whether the service impact is as described by the user, and then check the details of the blacklist and whitelist APNs to determine whether the abnormal access address mentioned by the user is included in the previously applied Layer 3 and Layer 7 address lists. Combining the number of online users can help determine whether the fault is a single user terminal or the entire user's APN is down, which can help locate the fault point or determine whether it is a false report by the user.
[0084] In one embodiment, obtaining the IoT user's dedicated APN name and the query parameters to be queried for processing the fault report information specifically includes:
[0085] The dedicated APN name of the IoT user can be obtained directly from the fault report information, or the dedicated APN name of the IoT user can be obtained based on the MSISDN obtained from the fault report information;
[0086] The fault type of the IoT user is obtained based on the fault report information. The query parameters to be queried are determined based on the fault type, including at least one of the following: leased line type query, online user query, whitelist user query, speed limit query, and GRE leased line test.
[0087] MSISDN stands for International Mobile Subscriber Identity.
[0088] In this embodiment, as Figure 5 As shown, this tool allows parameter selection via dropdown menus on the accompanying front-end page. Common query parameters include leased line type (in IoT, leased lines mainly refer to GRE and L2TP leased lines), number of online PDPs (Packet Data Protocol) under the APN, blacklist / whitelist of users, rate limit query, and GRE leased line connectivity detection. A PDP can be simply understood as the number of online user terminals; generally, one user corresponds to one PDP. IoT users typically only have data PDPs, with some users also creating a voice PDP. The dedicated APN name can be obtained from the MSISDN (Mobile Station International Subscriber Directory Number).
[0089] In one embodiment, wherein:
[0090] In response to the fault type being that a specified user cannot access the service, the query parameters to be queried are determined to include leased line type query and whitelist user query.
[0091] In response to the fault type being that all users cannot access the site, the query parameters to be queried are determined to include leased line type query and online user query.
[0092] In response to the fault type being slow network speed, the query parameters to be queried are determined to include dedicated line type query and speed limit query.
[0093] In response to the leased line type query, which returned GRE leased line, the query parameters to be queried include GRE leased line testing.
[0094] In this embodiment, GRE leased line connectivity testing mainly includes ping tests (a network diagnostic tool) on the interface address and inner address, used to rule out transmission bearer problems or GRE inner link problems, respectively. An example of the test results is shown below. Figure 6 The Output section is shown below. In 4G communication, PDP activation refers to a mobile device requesting the network to allocate an IP address and establish a data communication channel. In 4G LTE (Long Term Evolution) networks, the PDP context (also known as PDP Context) refers to the data communication connection established between a mobile device (such as a mobile phone or wireless communication module) and the network. It contains all the configuration information required for data transmission, including APN, QoS (Quality of Service), PDP type (usually IP), and PDP address (the device's IP address). Blacklists and whitelists are a type of dedicated APN. Each whitelisted APN provides a set of restricted IP addresses or URLs during application. This is mainly used to determine whether the address a user wants to access is within the restricted access list provided during the initial application and is already configured on the current network when a user reports a fault. Figure 7 The Output section shows the query results for Layer 3 IP (Internet Protocol) addresses and Layer 7 URLs.
[0095] In one embodiment, S2, based on the dedicated APN name and the query parameters, determines the progressive relationship between the network device to be queried and the network device, specifically including:
[0096] Determine all core network-side devices and user-side devices involved in the dedicated APN name. The core network-side devices include SMF network elements and UPF network elements. In response to the leased line type being GRE leased line, the core network-side devices also include large customer switches.
[0097] Based on the query parameters, among all the core network side devices and user side devices, several network devices that need to be queried for joint debugging and the progressive query relationship between the network devices are determined;
[0098] SMF stands for Service Management Function, and UPF stands for User Port Function.
[0099] In this embodiment, the dedicated APN name for IoT corresponds to the user. Most large IoT users have a dedicated APN name. Depending on the APN type, certain core network devices are involved. For example, GRE users are involved in the data configuration of core network devices such as SMF / UPF / PGW / large customer switches, while L2TP and whitelisted users are involved in the data configuration of SMF / UPF / PGW devices. The interface number can be queried through the large customer switch, which involves transmission configuration. L2TP and whitelisted users are not involved in this device. L2TP is directly connected to the operator's UPF, and the user-side equipment is more complex. L2TP users can customize more functions, while operators can check less. This tool does not currently support deeper queries such as L2TP fault location, but it can perform some relatively simple queries. Whitelisted users do not require equipment; only their Layer 3 or Layer 7 address accessibility is involved, which can be directly pinged within the operator's network.
[0100] The IoT GRE circuit is a new type of communication network. Locating IoT GRE faults requires logging into multiple core network nodes, which is time-consuming. This embodiment's rapid fault location tool can reduce fault diagnosis time to minutes, allowing frontline engineers to identify fault points more quickly and intuitively. It primarily utilizes programming to enable the front end to receive data and the back end to automatically log into core network elements for verification. Verification data is automatically anonymized, simplifying maintenance personnel's work and improving the efficiency of frontline verification. Based on the APN name entered by the engineer, the program automatically executes a series of related query commands. Based on the results of the previous command, the program extracts key information needed for the next query operation, executing step-by-step until the final result is obtained. The anonymized data is then converted into easily understandable text and fed back to the front end. This automated information processing saves significant time.
[0101] In one embodiment, based on the query parameters, several network devices requiring joint debugging queries and the progressive query relationships between these network devices are determined from all core network-side devices and user-side devices. Specifically, this includes:
[0102] Determine the first query order for each of the query parameters, and the query information to be obtained for each of the query parameters;
[0103] Determine the dependencies between the various query information items, and determine the second query order of the various query information items based on the dependencies;
[0104] Based on the first query order and the second query order, determine the network device where each query information is located and the order of the network device in the query progressive relationship.
[0105] In this embodiment, the tool adopts a modular structure during its development and compilation, and the modules can be combined and called by each other. When a new query requirement is added, only the new module needs to be compiled. The tool receives the parameters selected by the user on the front-end page through the RESTful (a design style for defining Web API interfaces) interface program developed and deployed with it, and selects the corresponding query module. The information to be queried is converted into a series of system instructions, which are sent to the device network management system for execution. The tool also uses regular expressions and other methods to extract the key information needed from the results returned by the network management system, or directly outputs it after de-identification, or further converts it into the next system instructions as needed and sends them to the device network management system for further execution until the required query result is obtained, and then outputs it after de-identification.
[0106] In one embodiment, wherein:
[0107] The first query order of each query parameter is: leased line type query and other parameters. The query information to be obtained for the leased line type query is the leased line type. The network device where the leased line type is located is the SMF network element. The SMF network element that performs the leased line type query based on the dedicated APN name is determined as the first step query network device in the query progressive relationship.
[0108] In response to the remaining parameters including at least one of online user query, whitelist user query, or rate limit query, the UPF network element that performs at least one of online user query, whitelist user query, or rate limit query based on the leased line type and the dedicated APN name is determined as the second-step query network device in the query progressive relationship;
[0109] In response to the remaining parameters, including the GRE leased line test, the UPF network element that performs the GRE tunnel number query based on the leased line type and the dedicated APN name is identified as the second-step query network device in the query progressive relationship.
[0110] The UPF network element that performs the IP address lookup based on the leased line type, the dedicated APN name, and the GRE tunnel number is identified as the network device queried in the third step of the query progressive relationship.
[0111] The UPF network element and user-side device used for IP address reachability testing from the UPF network element to the user-side device based on the leased line type, the dedicated APN name, the GRE tunnel number, and the IP address are identified as the network devices to be queried in the fourth step.
[0112] In response to the UPF network element being reachable from the user-side device IP address, the UPF network element for which the inner address lookup is performed based on the leased line type, the dedicated APN name, and the GRE tunnel number is identified as the network device queried in the fifth step of the query progressive relationship.
[0113] The network devices identified in the sixth step of the query are the UPF network elements, large customer switches, and user-side devices for inner address reachability testing from the UPF network element to the large customer switch and from the large customer switch to the user-side device, based on the leased line type, the dedicated APN name, the GRE tunnel number, and the inner address.
[0114] In this embodiment, low-to-medium speed IoT can be implemented based on GRE user tunnels. GRE and L2TP are two different tunneling protocols, each with its own applications and characteristics in network communication. GRE is a network layer tunneling protocol that can encapsulate multiple network layer protocols, such as IP or IPX (Internet Work Packet Exchange), and transmit them within another network layer protocol. GRE supports point-to-point or point-to-multipoint communication and is often used to build APNs. GRE itself does not provide encryption, but it can be combined with encryption protocols such as IPSec (Internet Protocol Security) to provide security. GRE can encapsulate multiple protocols, supports multicast, and can be used to build flexible APN solutions. This tool does not currently cover the precise location of L2TP tunnel user APN faults.
[0115] Specifically, for GRE type APN users, the query progression includes: First, sending a command to the SMF to query the basic information of the APN to obtain its type. Based on the type keyword, the next query step is determined. For example, the first step is performed in the SMF, sending a query with the APN name as the keyword to obtain the APN type. Then, the next query command corresponding to that type of APN is sent. For example, sending a command to the UPF to query the tunnel number (GRE tunnel number) of the GRE type APN, obtaining the tunnel number through regular expression matching. The next command will input the APN name and the tunnel number obtained in the previous step to send the next query command. For example, based on the results returned by the device, the IP addresses of the operator-side and user-side device interfaces configured for the GRE type APN are obtained through regular expression matching, using the built-in Python re module (…). The module for processing regular expressions defines rules and extracts different rules for various keywords, which are then executed on the UPF. The first step involves sending a ping test command with the carrier-side interface IP address as the source address (usually the board on the UPF used for GRE services) and the user-side device interface IP address as the destination address to determine if the interface address is reachable. This step can pinpoint problems in the transport layer. If reachable, the next step involves querying the inner layer addresses of the carrier's core network (usually the board on the UPF used for GRE services) and the user side based on the tunnel number, configured with GRE-type APNs. This is for subsequent fault location test command issuance to the UPF and the large customer switch. The large customer switch is first pinged to the user-side interface address, and then the UPF is pinged to the user-side inner layer address. Below are examples of code for extracting the destination address and matching APN names. The matching process uses Python programming language to match rule actions.
[0116] ipv4_pattern=r′\b(?:[0-9]{1,3}\.){3}[0-9]{1,3}\b′
[0117] vpn_name_pattern=r′Destination VPN name\s*=\s*([^\s]+)′
[0118] ipv4_addresses=re.findall(ipv4_pattern, output3)
[0119] vpn_narne=re.search(vpn_name_pattern, output3)
[0120] In one embodiment, S3, by sequentially combining the query results of the previous query on the network device in the progressive query relationship with the query parameters, each query instruction of each network device is obtained, and each query instruction is sequentially sent to each network device until the final query result is obtained, specifically including:
[0121] Step 1: Inquiry
[0122] Send a first-step query command including the dedicated APN name to the core network SMF element to obtain the leased line type corresponding to the dedicated APN name. The leased line type includes GRE, L2TP or direct fiber connection.
[0123] The following steps will be required for the query:
[0124] The leased line type and the dedicated APN name are obtained as the first key information for the next query instruction. Based on the query progression relationship, the second key information for the next query instruction is extracted from the query results of the previous step of querying network devices. Finally, the third key information for the next query instruction is obtained based on the query parameters and the query progression relationship.
[0125] The first, second, and third key information are combined into a next-step query instruction, which is then sent to the next-step query network device to obtain its query results.
[0126] Repeat the above process until network fault location information is obtained, and use the network fault location information as the final query result.
[0127] In this embodiment, key information mainly includes several IP addresses and device information configured by core network personnel for joint debugging with user-side devices. This information is configured by core network maintenance personnel in the SMF, UPF, large customer switches, and user-side devices when the GRE leased line service is activated. The specific implementation methods for the corresponding configurations of other types of leased lines may differ. L2TP involves more user-configured information, which may not accurately pinpoint faults, but preliminary fault analysis can still be performed. The system sequentially queries the devices using several progressively changing device commands, and then continues with subsequent queries based on the results returned by these commands. For example, first, the APN type is obtained by querying the APN name. Then, the next query command for that type of APN is sent and executed. For instance, a command is sent to query the tunnel number of a GRE type APN. Based on the tunnel number, the next query command is sent to obtain the user-side device interface address configured for the GRE type APN. The first step, a ping test, is then performed to determine if the interface address is reachable. This step can locate whether there is a problem with the transport layer. If it is reachable, the next query is performed. The inner layer address of the China Unicom core network side and the user side configured for the GRE type APN is then queried based on the tunnel number, so as to issue subsequent fault location test commands.
[0128] The above progressive device commands are a complete progressive query process determined by the program itself based on the query parameters. The goal of the query is to perform fault location testing, including: First, querying the APN type from the SMF based on the APN name; second, querying the tunnel number from the UPF based on the result of the first step; third, querying the device interface IP address from the GRE interface configuration based on the result of the second step; fourth, testing the network reachability of the user equipment based on the result of the third step; if the network is reachable, further confirming whether there are other faults in the network, and then testing whether the inner link is normal, such as the fifth step, which is generally to query the inner address of the Unicom side and the user side from the GRE interface configuration module again; sixth, pinging again. If it is still normal, maintenance personnel need to contact the user for more in-depth troubleshooting, which generally involves signaling tracing.
[0129] In the tool, the query results of the previous device will affect the query instructions of the next device. It is necessary to extract the key information required for the next instruction based on the result information returned by the previous instruction. The key information is mainly obtained through matching methods such as regular expressions. It can realize one-click query of functions such as user APN type, whitelist details, number of online users, GRE type, and whether speed limit is applied. It can automatically log in to network elements to extract information, form a fault diagnosis approach based on the query route, and analyze and judge the information of multiple network elements.
[0130] The tool in this embodiment, besides helping users quickly locate GRE faults, can also handle IoT complaints based on other situations. For example, if a user reports that a certain address is inaccessible, these are usually whitelisted APN users. By entering the user's APN name, the whitelist details configured on the current network can be obtained with one click. This information is then compared with the address complained about by the user, and further compared with the address actually accessed by the user's terminal obtained through signaling tracing, to make a preliminary judgment and location of the fault. As another example, a user might say that their network is completely down. Online user queries can initially determine whether the user's report is true. Combining this with call detail records (CDRs) and traffic queries from the IoT platform can further pinpoint the fault location and determine the actual scope of impact. This tool is built on a B / S (Browser / Server) architecture. Based on the parameters of the one-click query page 101, users can select parameters such as GRE leased line connectivity detection, number of online PDPs under APN, and blacklist / whitelist of users. The server 102 then issues commands to the core network elements (core network device 103) to collect data and perform channel detection. It can make logical judgments based on the input information and output comprehensive results to help frontline personnel quickly handle faults and solve problems.
[0131] The tool provided in this embodiment, in a large-scale regional IoT environment with numerous IoT users based on GRE tunnels, can quickly locate the cause of IoT failures. Following the tool's workflow, users can perform tests using the modules to obtain results for verifying IoT failures. On the tool's accompanying front-end page, users can select the IoT card's APN and parameters to perform one-click information verification, quickly locating the cause of IoT failures and shortening fault verification and handling time. Frontline personnel can perform independent verification, enhancing their verification capabilities. Furthermore, the data has been anonymized and processed to prevent leakage of network element and user data; it only assists personnel in fault location and verification. Programmatic front-end and back-end connectivity is achieved, avoiding manual login for network element verification and incorrect command input.
[0132] Example 2:
[0133] like Figure 8 As shown, this disclosure provides a network query device, the device comprising:
[0134] Module 1 is used to obtain the name of the private APN to be queried and the query parameters to be queried;
[0135] Progressive module 2, connected to acquisition module 1, is used to determine the progressive relationship between the network device to be queried and the network device based on the dedicated APN name and the query parameters;
[0136] The query module 3, connected to the progressive module 2, is used to sequentially combine the query results of the previous query network device in the progressive query relationship with the query parameters to obtain each query instruction of each network device, and sequentially send each query instruction to each network device until the final query result is obtained.
[0137] APN stands for Access Point Name.
[0138] In one embodiment, the acquisition module 1 specifically includes:
[0139] The receiving unit is used to receive fault report information from IoT users. The user-side equipment of the IoT users and the core network-side equipment establish a dedicated line connection based on GRE tunnel, L2TP tunnel or direct fiber optic connection.
[0140] The acquisition unit, connected to the receiving unit, is used to acquire the dedicated APN name of the IoT user and the query parameters to be queried for processing the fault report information;
[0141] GRE stands for General Router Encapsulation, and L2TP stands for Layer 2 Tunneling Protocol.
[0142] In one embodiment, the acquisition unit specifically includes:
[0143] The APN name acquisition unit is used to directly obtain the dedicated APN name of the IoT user from the fault report information, or to obtain the dedicated APN name of the IoT user based on the MSISDN obtained from the fault report information.
[0144] The query parameter acquisition unit is used to obtain the fault type of the IoT user based on the fault report information, and determine the query parameters to be queried based on the fault type, including at least one of the following: dedicated line type query and online user query, whitelist user query, speed limit query, and GRE dedicated line test.
[0145] MSISDN stands for International Mobile Subscriber Identity.
[0146] In one embodiment, the query parameter acquisition unit is specifically used for:
[0147] In response to the fault type being that a specified user cannot access the service, the query parameters to be queried are determined to include leased line type query and whitelist user query.
[0148] In response to the fault type being that all users cannot access the site, the query parameters to be queried are determined to include leased line type query and online user query.
[0149] In response to the fault type being slow network speed, the query parameters to be queried are determined to include dedicated line type query and speed limit query.
[0150] In response to the leased line type query, which returned GRE leased line, the query parameters to be queried include GRE leased line testing.
[0151] In one embodiment, the progressive module 2 specifically includes:
[0152] The device determination unit is used to determine all core network-side devices and user-side devices involved in the dedicated APN name. The core network-side devices include SMF network elements and UPF network elements. In response to the leased line type being GRE leased line, the core network-side devices also include large customer switches.
[0153] The sequence determination unit, connected to the device determination unit, is used to determine, based on the query parameters, several network devices that need to be queried for joint debugging and the query progressive relationship between the network devices among all core network side devices and user side devices;
[0154] SMF stands for Service Management Function, and UPF stands for User Port Function.
[0155] In one embodiment, the sequence determination unit specifically includes:
[0156] The first order determination unit is used to determine the first query order of each query parameter and the query information to be obtained for each query parameter;
[0157] The second order determination unit, connected to the first order determination unit, is used to determine the dependency relationship between each of the query information and to determine the second query order of each of the query information according to the dependency relationship.
[0158] An incremental relationship determination unit, connected to a second order determination unit, is used to determine the network device where each query information is located and the order of the network devices in the query incremental relationship according to a first query order and a second query order.
[0159] In one embodiment, the sequence determination unit includes:
[0160] The first query order of each query parameter is: leased line type query and other parameters. The query information to be obtained for the leased line type query is the leased line type. The network device where the leased line type is located is the SMF network element. The SMF network element that performs the leased line type query based on the dedicated APN name is determined as the first step query network device in the query progressive relationship.
[0161] In response to the remaining parameters including at least one of online user query, whitelist user query, or rate limit query, the UPF network element that performs at least one of online user query, whitelist user query, or rate limit query based on the leased line type and the dedicated APN name is determined as the second-step query network device in the query progressive relationship;
[0162] In response to the remaining parameters, including the GRE leased line test, the UPF network element that performs the GRE tunnel number query based on the leased line type and the dedicated APN name is identified as the second-step query network device in the query progressive relationship.
[0163] The UPF network element that performs the IP address lookup based on the leased line type, the dedicated APN name, and the GRE tunnel number is identified as the network device queried in the third step of the query progressive relationship.
[0164] The UPF network element and user-side device used for IP address reachability testing from the UPF network element to the user-side device based on the leased line type, the dedicated APN name, the GRE tunnel number, and the IP address are identified as the network devices to be queried in the fourth step.
[0165] In response to the UPF network element being reachable from the user-side device IP address, the UPF network element for which the inner address lookup is performed based on the leased line type, the dedicated APN name, and the GRE tunnel number is identified as the network device queried in the fifth step of the query progressive relationship.
[0166] The network devices identified in the sixth step of the query are the UPF network elements, large customer switches, and user-side devices for inner address reachability testing from the UPF network element to the large customer switch and from the large customer switch to the user-side device, based on the leased line type, the dedicated APN name, the GRE tunnel number, and the inner address.
[0167] In one embodiment, the query module 3 specifically includes:
[0168] The first query unit is used to send a first-step query instruction including the dedicated APN name to the core network SMF network element to obtain the leased line type corresponding to the dedicated APN name. The leased line type includes GRE, L2TP or direct fiber connection.
[0169] The subsequent query units are connected sequentially, including:
[0170] The instruction information extraction unit is used to obtain the leased line type and the dedicated APN name as the first key information for the next query instruction, extract the second key information for the next query instruction from the query results of the previous query of network devices according to the query progression relationship, and obtain the third key information for the next query instruction according to the query parameters and the query progression relationship.
[0171] The instruction transceiver unit, connected to the instruction information extraction unit, is used to combine the first key information, the second key information, and the third key information into a next-step query instruction, and send the next-step query instruction to the next-step query network device to obtain the query results from the next-step query network device.
[0172] The loop control unit, connected to the command transceiver unit, is used to repeat the above process until network fault location information is obtained, and the network fault location information is used as the final query result.
[0173] Example 3:
[0174] Embodiment 3 of this disclosure provides a computer-readable storage medium storing a computer program. When the computer program is run by a processor, it implements the network query method as described in Embodiment 1, or the network query device as described in Embodiment 2.
[0175] The computer-readable storage medium includes volatile or non-volatile, removable or non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, computer program modules, or other data). Computer-readable storage media include, but are not limited to, RAM (Random Access Memory), ROM (Read-Only Memory), EEPROM (Electrically Erasable Programmable Read-Only Memory), flash memory or other memory technologies, CD-ROM (Compact Disc Read-Only Memory), DVD or other optical disc storage, cartridges, magnetic tapes, disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and is accessible to a computer.
[0176] In addition, this disclosure may also provide a computer device including a memory and a processor, wherein the memory stores a computer program, and when the processor runs the computer program stored in the memory, the processor executes the network query method as described in Embodiment 1, and the computer device may be the network query device as described in Embodiment 2.
[0177] The memory is connected to the processor. The memory can be flash memory, read-only memory or other types of memory. The processor can be a central processing unit or a microcontroller.
[0178] Embodiments 1-3 of this disclosure provide a network query method, a network query device, and a computer-readable storage medium. Based on the dedicated APN name and the query parameters to be queried, the method determines the network device to be queried and the query progression relationship between the network devices, and obtains query instructions sequentially based on the progression relationship. The query is completed sequentially according to the query instructions until the final query result is obtained. By automatically determining the query progression relationship, network device information can be queried efficiently with one click. One of the uses of the final query result is to help users with dedicated APN names quickly locate faults.
[0179] It is understood that the above embodiments are merely exemplary embodiments used to illustrate the principles of this disclosure, and this disclosure is not limited thereto. For those skilled in the art, various modifications and improvements can be made without departing from the spirit and substance of this disclosure, and these modifications and improvements are also considered to be within the scope of protection of this disclosure.
Claims
1. A network query method, characterized in that, The method includes: Retrieve the name of the private APN to be queried and the query parameters to be queried; Based on the dedicated APN name and the query parameters, the progressive relationship between the network device to be queried and the network device is determined, wherein: The first query order of each query parameter is: leased line type query and other parameters. The query information to be obtained for the leased line type query is the leased line type. The network device where the leased line type is located is the SMF network element. The SMF network element that performs the leased line type query based on the dedicated APN name is determined as the first step query network device in the query progressive relationship. In response to the remaining parameters including at least one of online user query, whitelist user query, or rate limit query, the UPF network element that performs at least one of online user query, whitelist user query, or rate limit query based on the leased line type and the dedicated APN name is determined as the second-step query network device in the query progressive relationship; In response to the remaining parameters, including the GRE leased line test, the UPF network element that performs the GRE tunnel number query based on the leased line type and the dedicated APN name is identified as the second-step query network device in the query progressive relationship. The UPF network element that performs the IP address lookup based on the leased line type, the dedicated APN name, and the GRE tunnel number is identified as the network device queried in the third step of the query progressive relationship. The UPF network element and user-side device used for IP address reachability testing from the UPF network element to the user-side device based on the leased line type, the dedicated APN name, the GRE tunnel number, and the IP address are identified as the network devices to be queried in the fourth step. In response to the UPF network element being reachable from the user-side device IP address, the UPF network element for which the inner address lookup is performed based on the leased line type, the dedicated APN name, and the GRE tunnel number is identified as the network device queried in the fifth step of the query progressive relationship. The network devices, large customer switches and user-side devices for which the inner address reachability test of UPF network element to large customer switch and large customer switch to user-side device is performed based on leased line type, the dedicated APN name, GRE tunnel number and inner address are identified as the network devices to be queried in step six. By sequentially combining the query results of the previous query on the network device in the progressive query relationship with the query parameters, each query instruction of each network device is obtained, and each query instruction is sequentially sent to each network device until the final query result is obtained; APN stands for Access Point Name.
2. The method according to claim 1, characterized in that, Retrieve the name of the private APN to be queried and the query parameters, specifically including: Receive fault report information from IoT users, and establish a dedicated line connection between the user-side equipment of the IoT user and the core network-side equipment based on GRE tunnel, L2TP tunnel or direct fiber optic connection; Obtain the dedicated APN name of the IoT user and the query parameters to be queried for processing the fault report information; GRE stands for General Router Encapsulation, and L2TP stands for Layer 2 Tunneling Protocol.
3. The method according to claim 2, characterized in that, Obtain the dedicated APN name of the IoT user and the query parameters to be queried for processing the fault report information, specifically including: The dedicated APN name of the IoT user can be obtained directly from the fault report information, or the dedicated APN name of the IoT user can be obtained based on the MSISDN obtained from the fault report information; The fault type of the IoT user is obtained based on the fault report information. The query parameters to be queried are determined based on the fault type, including at least one of the following: leased line type query, online user query, whitelist user query, speed limit query, and GRE leased line test. MSISDN stands for International Mobile Subscriber Identity.
4. The method according to claim 3, characterized in that, in: In response to the fault type being that a specified user cannot access the service, the query parameters to be queried are determined to include leased line type query and whitelist user query. In response to the fault type being that all users cannot access the site, the query parameters to be queried are determined to include leased line type query and online user query. In response to the fault type being slow network speed, the query parameters to be queried are determined to include dedicated line type query and speed limit query. In response to the leased line type query, which retrieved the leased line type as GRE leased line, it was determined that the query parameters to be queried included GRE leased line testing.
5. The method according to claim 1, characterized in that, By sequentially combining the query results of the previous query on the network device in the progressive query relationship with the query parameters, each query instruction of the network device is obtained, and each query instruction is sequentially sent to the network device until the final query result is obtained. Specifically, this includes: Step 1: Inquiry Send a first-step query command including the dedicated APN name to the core network SMF element to obtain the leased line type corresponding to the dedicated APN name. The leased line type includes GRE, L2TP or direct fiber connection. The following steps will be required for the query: The leased line type and the dedicated APN name are obtained as the first key information for the next query instruction. Based on the query progression relationship, the second key information for the next query instruction is extracted from the query results of the previous step of querying network devices. Finally, the third key information for the next query instruction is obtained based on the query parameters and the query progression relationship. The first, second, and third key information are combined into a next-step query instruction, which is then sent to the next-step query network device to obtain its query results. Repeat the above process until network fault location information is obtained, and use the network fault location information as the final query result.
6. A network query device, characterized in that, The device includes: The acquisition module is used to obtain the name of the dedicated APN to be queried and the query parameters to be queried; A progressive module, connected to the acquisition module, is used to determine the progressive relationship between the network device to be queried and the network device based on the dedicated APN name and the query parameters, wherein: The first query order of each query parameter is: leased line type query and other parameters. The query information to be obtained for the leased line type query is the leased line type. The network device where the leased line type is located is the SMF network element. The SMF network element that performs the leased line type query based on the dedicated APN name is determined as the first step query network device in the query progressive relationship. In response to the remaining parameters including at least one of online user query, whitelist user query, or rate limit query, the UPF network element that performs at least one of online user query, whitelist user query, or rate limit query based on the leased line type and the dedicated APN name is determined as the second-step query network device in the query progressive relationship; In response to the remaining parameters, including the GRE leased line test, the UPF network element that performs the GRE tunnel number query based on the leased line type and the dedicated APN name is identified as the second-step query network device in the query progressive relationship. The UPF network element that performs the IP address lookup based on the leased line type, the dedicated APN name, and the GRE tunnel number is identified as the network device queried in the third step of the query progressive relationship. The UPF network element and user-side device used for IP address reachability testing from the UPF network element to the user-side device based on the leased line type, the dedicated APN name, the GRE tunnel number, and the IP address are identified as the network devices to be queried in the fourth step. In response to the UPF network element being reachable from the user-side device IP address, the UPF network element for which the inner address lookup is performed based on the leased line type, the dedicated APN name, and the GRE tunnel number is identified as the network device queried in the fifth step of the query progressive relationship. The network devices, large customer switches and user-side devices for which the inner address reachability test of UPF network element to large customer switch and large customer switch to user-side device is performed based on leased line type, the dedicated APN name, GRE tunnel number and inner address are identified as the network devices to be queried in step six. The query module, connected to the progressive module, is used to sequentially combine the query results of the previous query network device in the progressive query relationship with the query parameters to obtain each query instruction of each network device, and sequentially send each query instruction to each network device until the final query result is obtained. APN stands for Access Point Name.
7. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the network query method as described in any one of claims 1-5.
Citation Information
Patent Citations
Method for inquiring gateway and system thereof
CN102480714A
Network element selection method and device based on PDU session, and storage medium
CN111107666A