Domain name identification method and device, equipment and medium
By obtaining and parsing DNS requests when the TCP connection fails, the historical DNS code stream of the terminal is determined to identify the domain name, which solves the problem of the inability to identify the user access domain name in the existing technology, and improves the accuracy of business statistical analysis and user perception.
Patent Information
- Application Number
- CN202311216106.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-19
- Publication Date
- 2024-10-22
- Estimated Expiration
- 2043-09-19
AI Technical Summary
In the existing technology, when the user's TCP access fails or the HTTPS access scenario occurs, the domain name of the user's access cannot be directly identified, resulting in distortion of statistical business dimension indicators.
When the TCP connection fails, the domain name system DNS request of the TCP connection is obtained, the historical DNS code stream of the terminal that initiated the DNS request is determined based on the DNS request, and the corresponding domain name is determined by parsing the historical DNS code stream, and the domain name is written into the DNS request.
By accurately determining the domain name of the TCP connection, the accuracy and completeness of business statistical analysis are improved, specific services can be identified during the user access stage, user perception is enhanced, and the mapping relationship between layer 3 faults and layer 7 data is opened to facilitate traffic management and control. and business problem positioning.
Smart Images

Figure CN118827618A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the core network and Internet of Things technology fields, and in particular to a domain name identification method, device, equipment and medium. Background Art
[0002] Among the related technologies, communication equipment is an important infrastructure in today's society. End-to-end analysis of various business network problems and improvement of network performance indicators are important means to enhance user perception.
[0003] However, the existing technology can only see the specific IP address but cannot obtain the corresponding domain name. Since business identification is mainly based on the backfill of domain name and other information, in the absence of a domain name, statistical business dimension indicators are distorted. Summary of the invention
[0004] In order to solve the above technical problems, the present disclosure provides a domain name identification method, device, equipment and medium, which effectively solves the technical problem that the domain name accessed by the user cannot be directly identified when access fails in the user transmission control protocol or in the hypertext transfer security protocol access scenario, resulting in distortion of statistical business dimension indicators.
[0005] In a first aspect, an embodiment of the present disclosure provides a domain name identification method, the method comprising:
[0006] When the Transmission Control Protocol (TCP) connection fails, obtain the Domain Name System (DNS) request of the TCP connection;
[0007] Determine the historical DNS code stream of the terminal that initiated the DNS request based on the DNS request;
[0008] The domain name corresponding to the DNS request is determined based on the historical DNS code stream, and the domain name is written into the DNS request.
[0009] In a possible implementation manner, in the method provided by the embodiment of the present invention, determining the historical DNS code stream of the terminal that initiates the DNS request based on the DNS request includes:
[0010] Determine the offset SP address and Internet Protocol IP address of the terminal within the stack segment based on the DNS request;
[0011] Determine the terminal's historical DNS code stream based on the SP address and IP address.
[0012] In a possible implementation, in the method provided by the embodiment of the present invention, determining the domain name corresponding to the DNS request based on the historical DNS code stream and writing the domain name into the DNS request includes:
[0013] Parse the historical DNS code stream and obtain at least one historical call record;
[0014] Determine the domain name corresponding to the DNS request according to information carried by at least one historical call record;
[0015] Write the domain name into the DNS request.
[0016] In a possible implementation manner, in the method provided by the embodiment of the present invention, determining the domain name of the terminal according to information carried by at least one historical call record includes:
[0017] Determine time information corresponding to each historical call record according to information carried by at least one historical call record;
[0018] Based on the time information, determine the target historical call record that matches the DNS request;
[0019] The domain name corresponding to the target historical call record is determined as the domain name corresponding to the DNS request.
[0020] In a possible implementation manner, in the method provided by the embodiment of the present invention, determining the target historical call record matching the DNS request based on the time information includes:
[0021] Based on the time information, a time-based sliding window quick sorting algorithm is used to determine, from at least one historical call record, a historical call record closest to the time of the DNS request as a target historical call record.
[0022] In a second aspect, an embodiment of the present disclosure provides a domain name identification device, the device comprising:
[0023] An acquisition unit, used for acquiring a domain name system DNS request of a transmission control protocol TCP connection when the TCP connection fails;
[0024] A determination unit, configured to determine a historical DNS code stream of a terminal that initiates a DNS request based on the DNS request;
[0025] The processing unit is used to determine the domain name corresponding to the DNS request based on the historical DNS code stream, and write the domain name into the DNS request.
[0026] In a possible implementation manner, in the device provided by the embodiment of the present invention, the determining unit is specifically configured to:
[0027] Determine the offset SP address and Internet Protocol IP address of the terminal within the stack segment based on the DNS request;
[0028] Determine the terminal's historical DNS code stream based on the SP address and IP address.
[0029] In a possible implementation manner, in the device provided by the embodiment of the present invention, the processing unit is specifically used for:
[0030] Parse the historical DNS code stream and obtain at least one historical call record;
[0031] Determine the domain name corresponding to the DNS request according to information carried by at least one historical call record;
[0032] Write the domain name into the DNS request.
[0033] In a possible implementation manner, in the device provided by the embodiment of the present invention, the processing unit is specifically used for:
[0034] Determine time information corresponding to each historical call record according to information carried by at least one historical call record;
[0035] Based on the time information, determine the target historical call record that matches the DNS request;
[0036] The domain name corresponding to the target historical call record is determined as the domain name corresponding to the DNS request.
[0037] In a possible implementation manner, in the device provided by the embodiment of the present invention, the processing unit is specifically used for:
[0038] Based on the time information, a time-based sliding window quick sorting algorithm is used to determine, from at least one historical call record, a historical call record closest to the time of the DNS request as a target historical call record.
[0039] In a third aspect, an embodiment of the present disclosure provides an electronic device, including:
[0040] Memory;
[0041] Processor; and
[0042] Computer programs;
[0043] The computer program is stored in the memory and is configured to be executed by the processor to implement the domain name identification method as described above.
[0044] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the domain name identification method as described above are implemented.
[0045] The present disclosure provides a domain name identification method, including:
[0046] First, when the transmission control protocol TCP connection fails, a domain name system DNS request of the TCP connection is obtained, and then the historical DNS code stream of the terminal that initiated the DNS request is determined based on the DNS request, and finally the domain name corresponding to the DNS request is determined based on the historical DNS code stream, and the domain name is written into the DNS request. When the TCP connection fails, the method provided by the present disclosure accurately determines the domain name of the connection from the historical DNS code stream, thereby improving the accuracy and completeness of business statistical analysis. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0048] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0049] Figure 1 A flowchart of a domain name identification method provided by an embodiment of the present disclosure;
[0050] Figure 2 A specific flow chart of a domain name identification method provided by an embodiment of the present disclosure;
[0051] Figure 3 A schematic diagram of the principle of a TCP connection method provided in an embodiment of the present disclosure;
[0052] Figure 4 A schematic diagram of another TCP connection method provided in an embodiment of the present disclosure;
[0053] Figure 5 A schematic diagram of the principle of a method for processing duplicate domain names provided in an embodiment of the present disclosure;
[0054] Figure 6 A schematic diagram of another method for processing duplicate domain names provided by an embodiment of the present disclosure;
[0055] Figure 7 A schematic diagram of the structure of a domain name identification device provided by an embodiment of the present disclosure;
[0056] Figure 8 A schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0057] In order to more clearly understand the above-mentioned objectives, features and advantages of the present disclosure, the scheme of the present disclosure will be further described below. It should be noted that the embodiments of the present disclosure and the features in the embodiments can be combined with each other without conflict.
[0058] In the following description, many specific details are set forth to facilitate a full understanding of the present disclosure, but the present disclosure may also be implemented in other ways different from those described herein; it is obvious that the embodiments in the specification are only part of the embodiments of the present disclosure, rather than all of the embodiments.
[0059] The following are explanations of some of the terms that appear in the text:
[0060] 1. In the embodiments of the present invention, the term "and / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B may represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the associated objects are in an "or" relationship.
[0061] 2. The term "TCP" in the embodiments of the present invention, namely the Transmission Control Protocol (TCP), is a connection-oriented, reliable, byte stream-based transport layer communication protocol.
[0062] 3. The term "DNS" in the embodiments of the present invention, that is, Domain Name System (DNS), is a service of the Internet. As a distributed database that maps domain names and IP addresses to each other, it enables people to access the Internet more conveniently.
[0063] 4. The term "HOST" in the embodiment of the present invention refers to the Internet network domain name, which is an internationally used top-level domain name.
[0064] 5. The term "DPI" in the embodiments of the present invention, namely deep packet inspection (DPI), is an advanced packet filtering method that works in the application layer of the open system interconnection (OSI) reference model.
[0065] 6. In the embodiments of the present invention, the term "HTTPS", namely Hypertext Transfer Protocol Secure (HTTPS), is an HTTP channel with security as its goal. It ensures the security of the transmission process through transmission encryption and identity authentication based on HTTP.
[0066] Communication equipment is an important infrastructure in today's society. End-to-end analysis of various business network problems and improvement of network performance indicators are important means to enhance user perception.
[0067] Currently, the performance monitoring of business dimensions in the market mainly comes from the IDC server side, the operator pipeline side, and the APP server side. The analysis of IDC and APP server sides has the problem of single-end indicators and local business. The operator pipeline side has the characteristics of complete data volume and includes IDC and APP server information. Accurately identifying business on the pipeline is the key to analyzing network performance indicators and monitoring network problems.
[0068] Service identification can be performed through signaling access feature identification, but the domain name of the user's access cannot be directly identified when the user's TCP access process fails or in the HTTPS access scenario. The domain name field can not only be used for service identification, but also for traffic or indicator statistics, complaint analysis, etc., which is relatively important information for analysts.
[0069] The existing domain name resolution mechanism is to directly obtain the domain name information in the code stream and fill it back into the XDR. The protocols with built-in domain names include HTTP, HTTPS, DNS, etc. There are the following disadvantages: HTTP and HTTPS protocols cannot obtain the corresponding domain name after DNS resolution is completed and TCP link establishment fails; HTTPS protocol does not carry a domain name, so it is impossible to trace which website the terminal intends to visit; the current mainstream IoT services obtain the IP address corresponding to the domain name through DNS, and then use the IP address for TCP interaction, which is convenient for unified management.
[0070] In the above three cases, only the specific IP address can be seen, and the corresponding domain name cannot be obtained. Since business identification is mainly based on the domain name and other information, there is a distortion problem in the statistical business dimension indicators without the domain name. Deep message parsing supports processing real-time message streams in the kernel. Compared with the back-end database processing mode, when the database processes one server corresponding to multiple HOSTs and accurately fills in the HOST corresponding to the terminal Internet access, the processing efficiency is lower than that of deep message parsing based on bottom-level processing.
[0071] Figure 1 A flowchart of a domain name identification method provided by an embodiment of the present disclosure specifically includes the following steps: Figure 1 The following steps S101 to S103 are shown:
[0072] S101. When a Transmission Control Protocol (TCP) connection fails, obtaining a Domain Name System (DNS) request of the TCP connection.
[0073] In specific implementation, according to the rule that when using the service, the terminal generally needs to send a DNS request to query the corresponding server IP through the domain name, so when the TCP connection fails, the domain name system DNS request of the TCP connection is obtained to subsequently determine the domain name of the DNS request.
[0074] S102: Determine the historical DNS code stream of the terminal that initiates the DNS request based on the DNS request.
[0075] In specific implementation, the offset SP address and the Internet Protocol IP address of the terminal in the stack segment are first determined based on the DNS request, and then the historical DNS code stream of the terminal is determined according to the SP address and the IP address.
[0076] S103: Determine the domain name corresponding to the DNS request based on the historical DNS code stream, and write the domain name into the DNS request.
[0077] In the specific implementation, the historical DNS code stream is first parsed to obtain at least one historical call record, and then the domain name corresponding to the DNS request is determined based on the information carried by the at least one historical call record. Finally, the domain name is written into the DNS request. When the target historical call record matching the DNS request is determined based on the time information, the time-based sliding window quick sorting algorithm can be used based on the time information to determine, from at least one historical call record, the historical call record closest to the DNS request time as the target historical call record.
[0078] Figure 2 A flowchart of another domain name identification method provided by an embodiment of the present disclosure specifically includes the following steps: Figure 2 The following steps S201 to S204 are shown:
[0079] S201. When a Transmission Control Protocol (TCP) connection fails, obtain a Domain Name System (DNS) request for the TCP connection.
[0080] In specific implementation, when using services, the terminal generally needs to send a DNS request to query the corresponding server IP through the domain name.
[0081] like Figure 3 As shown, take the normal Internet access to "baidu.com" as an example:
[0082] First, the terminal DNS requests the SPIP of the domain name (baidu.com). After receiving the request, the DNS server returns the SPIP list of the domain name. Then, after the terminal receives the SPIP list from the DNS server, it selects a SPIP to establish a TCP connection. After that, the terminal sends a Client Hello message to request an HTTPS connection, and the message carries the baidu.com domain name. Then encryption and data transmission are performed. Finally, TCP fin is completed and the connection is disconnected.
[0083] like Figure 4 As shown, when TCP establishment fails, the HTTPs call record parsed by the program does not carry the domain name.
[0084] In summary, when a TCP connection fails, a domain name system DNS request of the TCP connection is obtained to subsequently determine the domain name of the DNS request.
[0085] S202: Determine the historical DNS code stream of the terminal that initiates the DNS request based on the DNS request.
[0086] In specific implementation, the offset SP address and the Internet Protocol IP address of the terminal in the stack segment are first determined based on the DNS request, and then the historical DNS code stream of the terminal is determined according to the SP address and the IP address.
[0087] S203: parse the historical DNS code stream to obtain at least one historical call record.
[0088] In specific implementation, after the historical DNS code stream is determined in S202, the historical DNS code stream is parsed to parse the historical DNS code stream into historical call records of various protocols. In this step, a DPI decoding device can be additionally set in the system or server to parse the historical DNS code stream.
[0089] S204: Determine the domain name corresponding to the DNS request according to information carried in at least one historical call record.
[0090] During the specific implementation, the domain name corresponding to the DNS request is determined through the module algorithm according to the information carried by at least one historical call record. The specific steps are as follows: parse the terminal IP, SPIP of DNS Resp, and DNS request domain name in the historical call record, and add a cache timer to cache it in a self-developed high-efficiency key-value memory database. Then, use the terminal IP and SP IP as key values to search for the value in the key-value memory database. Finally, determine the domain name corresponding to the DNS request based on the key value transmitted from the general call record, and combine the time before and after the call record, cache timer and other factors.
[0091] In this step, there may be a situation where one IP corresponds to multiple domain names. Assuming that the same terminal IP requests different domain names from the DNS server in a short period of time, the returned SPIP is the same, and the SPIP actually requested by the terminal to these two services is also the same, it is easy for the general call record to be filled in incorrectly.
[0092] like Figure 5As shown in the figure, the terminal requests the SPIP of domain name A in 1 minute, which is the same as the SPIP of domain name B requested by the terminal in 8 minutes. At this time, domain name A may be backfilled into the general call list in the 8th minute. By setting the domain name cache timer, you can avoid the backfill cross problem, release memory, and improve program efficiency.
[0093] like Figure 6 As shown, if the time interval between two requests is very short (within 1 second), the backfill domain name can be accurately identified by utilizing a time-based sliding window quick sorting algorithm.
[0094] S205, writing the domain name into the DNS request.
[0095] During specific implementation, the terminal IP, SPIP of DNS Resp and DNS request domain name are filled in the terminal IP, SPIP and domain name information.
[0096] After using the domain name identification method provided by the embodiment of the present disclosure, the situation in which the user fails in the access stage can be identified as a specific business. Through the end-to-end business indicators, it is possible to quickly analyze and demarcate, distinguish pipeline, APP, and IDC server problems, and accurately deal with them. Improve the monitoring and handling of business indicators and enhance user perception. In particular, when counting certain business indicators, the old identification scheme cannot accurately identify the business in the case of TCP failure. This scheme can identify it, thereby improving the accuracy and completeness of business statistical analysis. At the same time, since the correspondence between the IP address and the domain name is determined, it is possible to trace back the business situation of the interaction based on the domain name, and open up the mapping relationship between the third-layer fault and the seventh-layer data, which is convenient for traffic control, business problem location, and data analysis.
[0097] Figure 7 The domain name identification device 700 provided in the embodiment of the present disclosure can execute the processing flow provided in the above-mentioned domain name identification method embodiment, such as Figure 7 As shown, the domain name identification device 700 includes an acquisition unit 701, a determination unit 702 and a processing unit 703, wherein:
[0098] An acquisition unit 701 is used to acquire a Domain Name System DNS request of a Transmission Control Protocol TCP connection when the TCP connection fails;
[0099] A determining unit 702, configured to determine a historical DNS code stream of a terminal that initiates a DNS request based on the DNS request;
[0100] The processing unit 703 is used to determine the domain name corresponding to the DNS request based on the historical DNS code stream, and write the domain name into the DNS request.
[0101] In a possible implementation manner, in the device provided by the embodiment of the present invention, the determining unit 702 is specifically configured to:
[0102] Determine the offset SP address and Internet Protocol IP address of the terminal within the stack segment based on the DNS request;
[0103] Determine the terminal's historical DNS code stream based on the SP address and IP address.
[0104] In a possible implementation manner, in the device provided by the embodiment of the present invention, the processing unit 703 is specifically used for:
[0105] Parse the historical DNS code stream and obtain at least one historical call record;
[0106] Determine the domain name corresponding to the DNS request according to information carried by at least one historical call record;
[0107] Write the domain name into the DNS request.
[0108] In a possible implementation manner, in the device provided by the embodiment of the present invention, the processing unit 703 is specifically used for:
[0109] Determine time information corresponding to each historical call record according to information carried by at least one historical call record;
[0110] Based on the time information, determine the target historical call record that matches the DNS request;
[0111] The domain name corresponding to the target historical call record is determined as the domain name corresponding to the DNS request.
[0112] In a possible implementation manner, in the device provided by the embodiment of the present invention, the processing unit 703 is specifically used for:
[0113] Based on the time information, a time-based sliding window quick sorting algorithm is used to determine, from at least one historical call record, a historical call record closest to the time of the DNS request as a target historical call record.
[0114] Figure 7 The domain name identification device of the illustrated embodiment can be used to implement the technical solution of the above method embodiment, and its implementation principle and technical effect are similar and will not be described in detail here.
[0115] In addition, combined Figure 1-Figure 7 The domain name identification method and apparatus described in the embodiments of the present application may be implemented by an electronic device. Figure 8 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application is shown.
[0116] like Figure 8As shown, the electronic device 800 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 801, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 802 or a program loaded from a storage device 808 to a random access memory (RAM) 803 to implement the domain name identification method of the embodiment described in the present disclosure. In the RAM 803, various programs and data required for the operation of the electronic device 800 are also stored. The processing device 801, the ROM 802, and the RAM 803 are connected to each other via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.
[0117] Typically, the following devices may be connected to the I / O interface 805: input devices 806 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; output devices 807 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 808 including, for example, a magnetic tape, a hard disk, etc.; and communication devices 809. The communication device 809 may allow the electronic device 800 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 8 The electronic device 800 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.
[0118] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart, thereby implementing the voice control method as described above. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 809, or installed from the storage device 808, or installed from the ROM 802. When the computer program is executed by the processing device 801, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.
[0119] It should be noted that the computer-readable medium disclosed above may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0120] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.
[0121] The computer-readable medium may be included in the electronic device, or may exist independently without being installed in the electronic device.
[0122] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device:
[0123] When the Transmission Control Protocol (TCP) connection fails, obtain the Domain Name System (DNS) request of the TCP connection;
[0124] Determine the historical DNS code stream of the terminal that initiated the DNS request based on the DNS request;
[0125] The domain name corresponding to the DNS request is determined based on the historical DNS code stream, and the domain name is written into the DNS request.
[0126] Optionally, when the above one or more programs are executed by the electronic device, the electronic device may also execute other steps described in the above embodiments.
[0127] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages or a combination thereof, including, but not limited to, object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, 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 be connected to an external computer (e.g., through the Internet using an Internet service provider).
[0128] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0129] The units involved in the embodiments described in the present disclosure may be implemented by software or hardware, wherein the name of a unit does not, in some cases, limit the unit itself.
[0130] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.
[0131] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0132] The present disclosure provides a domain name identification method, including:
[0133] First, when the transmission control protocol TCP connection fails, a domain name system DNS request of the TCP connection is obtained, and then the historical DNS code stream of the terminal that initiated the DNS request is determined based on the DNS request, and finally the domain name corresponding to the DNS request is determined based on the historical DNS code stream, and the domain name is written into the DNS request. When the TCP connection fails, the method provided by the present disclosure accurately determines the domain name of the connection from the historical DNS code stream, thereby improving the accuracy and completeness of business statistical analysis.
[0134] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0135] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0136] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0137] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0138] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the present application.
[0139] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.
Claims
1. A domain name identification method, characterized in that: The method comprises: When a Transmission Control Protocol (TCP) connection fails, obtaining a Domain Name System (DNS) request for the TCP connection; Determine, based on the DNS request, a historical DNS code stream of the terminal that initiated the DNS request; The domain name corresponding to the DNS request is determined based on the historical DNS code stream, and the domain name is written into the DNS request.
2. The method according to claim 1, characterized in that The determining, based on the DNS request, a historical DNS code stream of a terminal that initiates the DNS request comprises: Determine the offset SP address and Internet Protocol IP address of the terminal within the stack segment based on the DNS request; The historical DNS code stream of the terminal is determined according to the SP address and the IP address.
3. The method according to claim 2, characterized in that The determining the domain name corresponding to the DNS request based on the historical DNS code stream and writing the domain name into the DNS request includes: Parsing the historical DNS code stream to obtain at least one historical call record; Determine the domain name corresponding to the DNS request according to information carried by at least one of the historical call records; The domain name is written into the DNS request.
4. The method according to claim 3, characterized in that The determining the domain name of the terminal according to the information carried by at least one of the historical call records includes: Determine the time information corresponding to each of the historical call records according to the information carried by at least one of the historical call records; Based on the time information, determining a target historical call record that matches the DNS request; The domain name corresponding to the target historical call record is determined as the domain name corresponding to the DNS request.
5. The method according to claim 4, characterized in that The determining, based on the time information, a target historical call record matching the DNS request includes: Based on the time information, a time-based sliding window quick sorting algorithm is used to determine, from at least one of the historical call records, a historical call record that is closest to the time of the DNS request as the target historical call record.
6. A domain name identification device, characterized in that: The device comprises: An acquisition unit, configured to acquire a Domain Name System (DNS) request of a Transmission Control Protocol (TCP) connection when the TCP connection fails; A determining unit, configured to determine a historical DNS code stream of a terminal that initiates the DNS request based on the DNS request; The processing unit is used to determine the domain name corresponding to the DNS request based on the historical DNS code stream, and write the domain name into the DNS request.
7. The device according to claim 5, characterized in that The determining unit is specifically used for: Determine the offset SP address and Internet Protocol IP address of the terminal within the stack segment based on the DNS request; The historical DNS code stream of the terminal is determined according to the SP address and the IP address.
8. The device according to claim 7, characterized in that The processing unit is specifically used for: Parsing the historical DNS code stream to obtain at least one historical call record; Determine the domain name corresponding to the DNS request according to information carried by at least one of the historical call records; The domain name is written into the DNS request.
9. The device according to claim 8, characterized in that The processing unit is specifically used for: Determine the time information corresponding to each of the historical call records according to the information carried by at least one of the historical call records; Based on the time information, determining a target historical call record that matches the DNS request; The domain name corresponding to the target historical call record is determined as the domain name corresponding to the DNS request.
10. The device according to claim 9, characterized in that The processing unit is specifically used for: Based on the time information, a time-based sliding window quick sorting algorithm is used to determine, from at least one of the historical call records, a historical call record that is closest to the time of the DNS request as the target historical call record.
11. An electronic device, characterized in that: include: Memory; processor; as well as Computer programs; The computer program is stored in the memory and is configured to be executed by the processor to implement the domain name identification method as claimed in any one of claims 1 to 5.
12. A computer-readable storage medium having computer program instructions stored thereon, characterized in that: When the computer program instructions are executed by a processor, a domain name identification method according to any one of claims 1 to 5 is implemented.
Citation Information
Patent Citations
Address renewal time obtaining method and device
CN107864234A
Method and system for identifying access domain name
CN111200666A
Method and device for analyzing domain name
CN112804366A
Domain name resolution method and device, electronic equipment and storage medium
CN112954683A
Business processing method and device, electronic equipment and storage medium
CN113468226A
