Cellular mobile network false connection processing method, device and system based on DNS detection
Through the DNS detection method, the processing process of fake connections of cellular mobile networks is simplified, and the problems of high user configuration and development burden and low communication reliability in the prior art are solved, thereby achieving efficient fake connection detection and recovery.
Patent Information
- Application Number
- CN202410003540.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-02
- Publication Date
- 2025-07-04
AI Technical Summary
In the prior art, the method of processing fake connection of cellular mobile networks has problems such as high user configuration burden, high development difficulty and low communication reliability. In particular, the ICMP detection scheme requires manual configuration of the detection address and insufficient reliability.
Using a DNS detection method, by saving the DNS server address assigned by the base station after the dial is successful, regularly detecting the number of messages and sending DNS probe messages to determine whether a response has been received. If no DNS response has been received continuously exceeds the threshold, re-dial is re-dial.
It realizes simple false connection detection and processing, reduces user configuration and development burden, improves communication reliability of dial-up links, and avoids repeated dialing.
Smart Images

Figure CN120263682A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of mobile communications, and in particular, to a method, device and system for processing fake connections in a cellular mobile network based on DNS detection. Background Art
[0002] A fake connection in a cellular mobile network refers to a problem where a data communication device fails to send data outwards after obtaining an IP address assigned by a base station when the device is connected to the network based on a cellular mobile network module. In this case, data communication can usually be restored to normal after re-executing a dialing process once. In the prior art, for this fake connection phenomenon, there are the following two solutions:
[0003] 1. The device manufacturer provides a mechanism for configuring ICMP detection. The user can configure one or more detection addresses. The dialing program of the device manufacturer periodically sends ICMP detection packets to the detection addresses. When the detection fails a certain number of times, the internal logic of the program triggers redialing to solve the problem of cellular fake connections. However, this solution has two drawbacks: on the one hand, the dialing application scenarios are diverse. Some customers use dedicated network cards, some use public network cards, and some use directional public network cards that can only access specific addresses. Therefore, it is impossible to fix an ICMP detection address in the program; the user needs to configure different ICMP detection addresses based on the actual usage scenario. However, various problems will occur during the process of synchronizing the method of configuring ICMP to the customer and the customer configuring the detection address; for example, the user forgets to configure ICMP detection, resulting in the inability to recover through ICMP detection when a fake connection occurs, or configures a detection address that cannot be pinged, resulting in continuous repeated dialing. On the other hand, for the ICMP detection address configured by the user, at the moment of configuration, the target device being detected is pingable, but after a period of time, the target device prohibits pinging. For example, some users configure 114.114.114.114 as the detection address, and this address was pingable earlier, but later 114.114.114.114 prohibited pinging, resulting in detection failure and continuous repeated dialing.
[0004] 2. The device manufacturer provides an interface call for redialing. The user implements the logic for judging data sending failure in their own program and then calls the interface provided by the device manufacturer to redial. This solution also has two drawbacks: on the one hand, it poses a certain requirement for the customer's development ability. Some customers focus on their own unique business fields and have less knowledge of data communication. Implementing the logic judgment of data sending failure and interface call is a great challenge for these customers. On the other hand, even if the user is familiar with data communication, they still need to spend extra time and effort on development, which increases the usage burden for the user.
[0005] It can be seen that in the prior art, there is a need for a method that can simply and accurately detect and process false connections, so as to reduce the configuration burden and development burden of users and improve the reliability of dial-up link communication. Summary of the Invention
[0006] The technical object to be achieved by the present invention is to provide a method, device and system for processing false connections in a mobile cellular network based on DNS detection. Thus, a method that can simply and accurately detect and process false connections is realized, while reducing the configuration burden and development burden of users and improving the reliability of dial-up link communication.
[0007] Based on the above technical object, the present invention provides a method for processing false connections in a mobile cellular network based on DNS detection, and the method includes:
[0008] Step S100, after successful dialing, the access device terminal saves the DNS server address assigned by the base station, and then starts the packet quantity detection program of the cellular mobile network interface;
[0009] Step S101, the packet quantity detection program includes detecting the quantity of packets received by the cellular mobile network interface at a first predetermined time length;
[0010] When the quantity of packets detected by the packet quantity detection program changes compared with the previous detection result, it is considered that no false connection occurs, and the process returns to step S101 to continue monitoring the packet quantity; when there is no change, the following step S103 is executed to further determine whether a false connection appears;
[0011] Step S103, start the DNS detection program, and send a DNS detection packet to the DNS server address at a second predetermined time length;
[0012] Step S104, after completing the sending of the DNS detection packet, monitor whether a DNS response packet returned by the DNS server is received; if the DNS response packet is received, it is determined that no false connection appears, and the process returns to step S101 to re-detect the packet quantity; if the DNS response packet is not received, the following step S105 is executed to detect the number of consecutive times of not receiving the DNS response packet;
[0013] Step S105, detect the number of consecutive times of not receiving the DNS response packet. If the number does not exceed a predetermined threshold, return to step S103 to send the DNS detection packet again; if the number exceeds the predetermined threshold, it is determined that a false connection appears, and the following step S106 is executed;
[0014] Step S106, start redialing to make the access device terminal reconnect to the cellular mobile network.
[0015] In one embodiment, the first predetermined duration is set to 1 minute, 2 minutes, or 5 minutes.
[0016] In one embodiment, the second predetermined duration is set to 10 seconds, 15 seconds, or 30 seconds.
[0017] In one embodiment, the predetermined threshold is set to 3 - 10 times.
[0018] In one embodiment, the DNS detection program is turned off by setting the DNS detection switch.
[0019] Compared with the prior art, the inventive points of the present invention described in one or more embodiments of the present invention include:
[0020] The present invention utilizes the fact that the DNS server address must be reachable for DNS communication packets, and discovers dial-up false connections by periodically sending DNS detection packets to the DNS server. In the process of implementation, the present invention realizes the consideration of traffic saving and exception handling, improves the problems of low reliability of ICMP detection and the need for manual configuration of detection addresses, and also eliminates the need for users to implement the judgment logic of false connections themselves, reducing the user's usage burden, taking into account both usability and reliability, and realizing a highly reliable cellular false connection judgment mechanism and recovery method in a user-invisible manner.
[0021] The above inventive points run through the technical solution of the present invention. At the same time, other features and advantages of the present invention will be described in the subsequent specification, and some will become obvious from the specification, or be understood by implementing the present invention. The objectives and other advantages of the present invention can be achieved and obtained through the structures specifically pointed out in the specification, claims, and drawings. Brief Description of the Drawings
[0022] The drawings are used to provide a further understanding of the present invention, and constitute a part of the specification. They are used together with the embodiments of the present invention to explain the present invention, and do not constitute a limitation to the present invention. In the drawings:
[0023] Figure 1 is a flowchart of a method for processing false connections in a cellular mobile network based on DNS detection of the present invention. Detailed Embodiments
[0024] To make the objectives, technical solutions, and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings.
[0025] Before proceeding with the following detailed description, it may be advantageous to set forth definitions of certain words and phrases used throughout this invention. The terms "coupled", "connected", and their derivatives refer to any direct or indirect communication or connection between two or more elements, regardless of whether those elements are in physical contact with each other. The terms "transmit", "receive", and "communicate", and their derivatives cover both direct and indirect communication. The terms "comprise" and "include", and their derivatives mean including but not limited to. The term "or" is inclusive, meaning and / or. The phrase "associated with", and its derivatives, mean including, included within, interconnected, containing, contained within, connected or connected to, coupled or coupled to, communicating with, cooperating with, interlacing, juxtaposed, adjacent, bound or bound to, having, having an attribute, having a relationship or having a relationship with, etc. The term "controller" refers to any device, system, or part thereof that controls at least one operation. Such a controller can be implemented in hardware, or in a combination of hardware and software and / or firmware. The functions associated with any particular controller can be centralized or distributed, whether local or remote. The phrase "at least one", when used in conjunction with a list of items, means that different combinations of one or more of the listed items can be used, and it may only require one item from the list. For example, "at least one of A, B, C" includes any one of the following combinations: A, B, C, A and B, A and C, B and C, A and B and C.
[0026] Definitions of other specific words and phrases provided throughout this invention. Those of ordinary skill in the art should understand that in many cases, if not most cases, such definitions apply to the prior and future use of the words and phrases so defined.
[0027] In this invention, the application combination of modules and the hierarchical division of sub-modules are only for illustration. Without departing from the scope of this disclosure, the application combination of modules and the hierarchical division of sub-modules can have different forms.
[0028] Embodiment
[0029] As Figure 1 shown in the flowchart of the method for processing fake connections in a cellular mobile network based on DNS detection of the present invention, the method for processing fake connections in a cellular mobile network based on DNS detection of the present invention includes:
[0030] Step S100, after successful dialing, the access device terminal saves the DNS server address assigned by the base station, and then starts the packet quantity detection program of the cellular mobile network interface.
[0031] Step S101, the packet quantity detection program includes detecting the quantity of packets received by the cellular mobile network interface at a first predetermined time length, for example, every 1 minute.
[0032] In step S102, when the number of packets detected by the packet number detection program changes compared with the previous detection result, it is considered that there is no false connection, and the process returns to step S101 to continue monitoring the number of packets; when there is no change, the following step S103 is executed to further determine whether there is a false connection.
[0033] In step S103, start the DNS detection program, and send a DNS detection packet to the DNS server address for a second predetermined duration, such as 30 seconds.
[0034] In step S104, after completing the sending of the DNS detection packet, monitor whether a DNS response packet returned by the DNS server is received; if the DNS response packet is received, it is determined that there is no false connection, and the process returns to step S101 to re-detect the number of packets; if the DNS response packet is not received, the following step S105 is executed to detect the number of consecutive times that the DNS response packet is not received.
[0035] In step S105, detect the number of consecutive times that the DNS response packet is not received. If the number does not exceed a predetermined threshold, return to step S103 to send the DNS detection packet again; if the number exceeds the predetermined threshold, it is determined that a false connection has occurred, and the following step S106 is executed. In this embodiment, the predetermined threshold is set to 5 times.
[0036] In step S106, start redialing to reconnect the network access device terminal to the cellular mobile network.
[0037] In this embodiment, the DNS detection packet adopts the DNS standard packet format, that is, the DNS standard packet format includes a basic structure part, a question part, and a resource record part.
[0038] The basic structure part includes six fields: Transaction ID, Flags, Question Count, Answer Resource Record Count, Authority Name Server Count, and Additional Resource Record Count. The flag field adopted by the basic structure part includes:
[0039] QR (Response): The flag information of the query request / response. When it is a query request, the value is 0; when it is a response, the value is 1.
[0040] Opcode: The operation code. Among them, 0 represents a standard query; 1 represents a reverse query; 2 represents a server status request.
[0041] AA (Authoritative): Authoritative answer. This field is valid in the response packet. When the value is 1, it means that the name server is an authoritative server; when the value is 0, it means that it is not an authoritative server.
[0042] TC (Truncated): Indicates whether it is truncated. When the value is 1, it means the response has exceeded 512 bytes and has been truncated, and only the first 512 bytes are returned.
[0043] RD (Recursion Desired): Desired recursion. This field can be set in a query and returned in the response. This flag tells the name server that the query must be processed, and this method is called a recursive query. If this bit is 0, and the requested name server does not have an authoritative answer, it will return a list of other name servers that can answer the query. This method is called an iterative query.
[0044] RA (Recursion Available): Available recursion. This field only appears in the response message. When the value is 1, it means the server supports recursive queries.
[0045] Z: Reserved field. In all request and response messages, its value must be 0.
[0046] rcode (Reply code): Return code field, indicating the error status of the response. When the value is 0, it means there is no error; when the value is 1, it means the message format error (Format error), and the server cannot understand the requested message; when the value is 2, it means the domain name server failure (Server failure), because of the server's reason, it is impossible to process this request; when the value is 3, it means the name error (Name Error), which is only meaningful for the authoritative domain name resolver, indicating that the resolved domain name does not exist; when the value is 4, it means the query type is not supported (Not Implemented), that is, the domain name server does not support the query type; when the value is 5, it means refused (Refused), generally the server refuses to give an answer due to the set policy, such as the server does not want to give an answer to some requesters.
[0047] The problem part refers to the Queries part in the message format. This part is used to display the problem of the DNS query request, usually there is only one problem. This part contains the information of the ongoing query, including the query name (the name of the host being queried), the query type, and the query class. The meaning of each field in this part is as follows:
[0048] Query name: Generally, it is the domain name to be queried, and sometimes it may also be an IP address for reverse query.
[0049] Query type: The resource type of the DNS query request. Usually, the query type is type A, indicating obtaining the corresponding IP address from the domain name.
[0050] Query class: Address type, usually an Internet address, with a value of 1.
[0051] The resource record section refers to the last three fields in the DNS standard message format, including the answer section field, the authoritative name server section field, and the additional information section field. These three fields all adopt a format called resource record, and the format is as shown in the figure. The meaning of each field in the resource record format is as follows:
[0052] Domain name: The domain name of the DNS request.
[0053] Type: The type of the resource record, which is the same as the query type value in the question section.
[0054] Class: Address type, which is the same as the query class value in the question section.
[0055] Time to Live: Expressed in seconds, it represents the life cycle of the resource record. Generally, it is used to determine the time for saving and using cached data when the address resolver retrieves the resource record. It can also indicate the stability of the resource record, and stable information will be assigned a very large value.
[0056] Resource data length: The length of the resource data.
[0057] Resource data: Represents the data of the relevant resource record returned according to the requirements of the query section.
[0058] The resource record section only appears in the DNS response message.
[0059] In the present invention, for a very small number of private network customers, there is a situation where the DNS server cannot be used normally. Therefore, it may not be able to respond to DNS messages normally. Based on this situation, a DNS detection switch is provided in the method of the present invention. In the very few scenarios where the DNS server is unavailable, users can configure to turn off the DNS detection function to avoid repeated dialing caused by DNS detection failure.
[0060] The present invention can be any possible system, method, and / or computer program product at the integrated technical detail level. The computer program product can include a computer-readable storage medium (or multiple media) having computer-readable program instructions thereon for causing a processor to execute various aspects of the present invention.
[0061] A computer-readable storage medium can be a tangible device that can retain and store instructions for use by an instruction execution device. The computer-readable storage medium can be, for example, but is not limited to, an electronic storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing devices. A non-exhaustive list of more specific examples of computer-readable storage media includes the following: a portable computer floppy disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disc read-only memory (CD-ROM), a digital versatile disc (DVD), a memory stick, a floppy disk, a mechanically encoded device such as a punched card or raised structures in a groove having instructions recorded thereon, and any suitable combination of the foregoing. A computer-readable storage medium, as used herein, shall not be construed to be a transitory signal per se, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagating through a waveguide or other transmission medium (e.g., an optical pulse through an optical fiber cable), or an electrical signal transmitted through a wire.
[0062] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to a corresponding computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, optical transmission fibers, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. A network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in a computer-readable storage medium within the corresponding computing / processing device.
[0063] The computer-readable program instructions for performing the operations of the present invention may be assembler instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state-setting data, configuration data for integrated circuits, or source code or object code written in any combination of one or more programming languages and procedural programming languages. The computer-readable program instructions may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on the remote computer or server. In the latter case, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may make a connection to an external computer (e.g., through the Internet using an Internet service provider). In some embodiments, an electronic circuit, including, for example, a programmable logic circuit, a field-programmable gate array (FPGA), or a programmable logic array (PLA), may execute the computer-readable program instructions by utilizing the state information of the computer-readable program instructions to personalize the electronic circuit, thereby performing various aspects of the present invention.
[0064] Aspects of the present invention are described herein with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer-readable program instructions.
[0065] These computer-readable program instructions may be provided to a processor of a computer, or to other programmable data processing apparatus, to produce a machine, such that the instructions executed via the processor of the computer or other programmable data processing apparatus create means for implementing the functions / acts specified in the flowchart and / or block Figure 1 diagrams. These computer-readable program instructions may also be stored in a computer-readable storage medium that can direct a computer, a programmable data processing apparatus, and / or other devices to function in a particular manner, such that the computer-readable storage medium storing the instructions comprises a manufacture, the manufacture including instructions for implementing aspects of the functions / acts specified in the flowchart and / or block diagrams.
[0066] The computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other devices to cause a series of operational steps to be performed on the computer, other programmable apparatus, or other devices to produce a computer-implemented process, such that the instructions executed on the computer, other programmable apparatus, or other devices implement the functions / acts specified in the flowchart and / or block diagrams.
[0067] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagram may represent a module, segment, or portion of instructions that includes one or more executable instructions for implementing the specified logical function. In some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, in fact, two consecutive blocks shown may be completed as one step, and depending on the functions involved, they may be executed concurrently, substantially concurrently, in a partially or fully time-overlapped manner, or sometimes the blocks may be executed in the reverse order. It will also be noted that each block of the block diagrams and / or flowchart illustrations, and combinations of blocks in the block diagrams and / or flowchart illustrations, can be implemented by a dedicated hardware-based system that performs the specified functions or actions or a combination of dedicated hardware and computer instructions.
[0068] Embodiments of this application are described with reference to the flowcharts and / or block diagrams of methods, apparatuses (devices), and computer program products according to embodiments of this application. It should be understood that each process and / or block in the flowchart and / or block diagram, and combinations of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, such that the instructions executed by the processor of the computer or other programmable data processing device generate a means for implementing the functions specified in Figure 1 one process or multiple processes and / or blocks Figure 1 one block or multiple blocks.
[0069] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, such that the instructions stored in the computer-readable memory generate a manufactured article including an instruction means that implements the functions specified in Figure 1 one process or multiple processes and / or blocks Figure 1 one block or multiple blocks.
[0070] These computer program instructions can also be loaded onto a computer or other programmable data processing device, such that a series of operation steps are executed on the computer or other programmable device to generate a computer-implemented process, so that the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in Figure 1 one process or multiple processes and / or blocks Figure 1 one block or multiple blocks.
[0071] As described above, it is only a specific implementation case of the present invention, and the protection scope of the present invention is not limited thereto. Any person skilled in the art who makes modifications or substitutions to the present invention within the technical specifications described in the present invention shall fall within the protection scope of the present invention.
Claims
1. A method for processing fake connections in a cellular mobile network based on DNS detection, characterized in that, The method includes: Step S100, after successful dialing, the access device terminal saves the DNS server address assigned by the base station, and then starts the packet quantity detection program of the cellular mobile network interface; Step S101, the packet quantity detection program includes detecting the quantity of packets received by the cellular mobile network interface at a first predetermined time length; Step S102, when the quantity of packets detected by the packet quantity detection program changes compared with the previous detection result, it is considered that there is no false connection, and the process returns to Step S101 to continue monitoring the packet quantity; when there is no change, the following Step S103 is executed to further determine whether there is a false connection; Step S103, start the DNS detection program, and send a DNS detection packet to the DNS server address at a second predetermined time length; Step S104, after completing the sending of the DNS detection packet, monitor whether a DNS response packet returned by the DNS server is received; if the DNS response packet is received, it is determined that there is no false connection, and the process returns to Step S101 to re-detect the packet quantity; if the DNS response packet is not received, the following Step S105 is executed to detect the number of consecutive times of not receiving the DNS response packet; Step S105, detect the number of consecutive times of not receiving the DNS response packet. If the number does not exceed a predetermined threshold, return to Step S103 to send the DNS detection packet again; if the number exceeds the predetermined threshold, it is determined that a false connection occurs, and the following Step S106 is executed; Step S106, start redialing to reconnect the access device terminal to the cellular mobile network.
2. The method for processing fake connections in a cellular mobile network based on DNS detection according to claim 1, characterized in that The first predetermined time length is set to 1 minute, 2 minutes or 5 minutes.
3. The method for processing fake connections in a cellular mobile network based on DNS detection according to claim 1, wherein The second predetermined time length is set to 10 seconds, 15 seconds or 30 seconds.
4. The method for processing fake connections in a cellular mobile network based on DNS detection according to claim 1, characterized in that The predetermined threshold is set to 3 - 10 times.
5. The method for processing fake connections in a cellular mobile network based on DNS detection according to claim 1, wherein The DNS detection program is turned off by setting a DNS detection switch.
6. A computing device, including: A memory and a processor; The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions. When the computer-executable instructions are executed by the processor, the steps of the data transmission method according to any one of claims 1 to 5 are implemented.
7. A computer-readable storage medium, which stores computer-executable instructions. When the computer-executable instructions are executed by a processor, the steps of the data transmission method according to any one of claims 1 to 5 are implemented.