Information acquisition method and device, communication equipment and readable storage medium
By parsing the mirror domain name to obtain the IP address and analyzing the TCP handshake information, the problem of inaccurate information collection caused by insufficient memory capacity of the gateway is solved, and the accuracy and efficiency of information collection are improved.
Patent Information
- Application Number
- CN202410826359.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-25
- Publication Date
- 2024-10-18
- Estimated Expiration
- 2044-06-25
AI Technical Summary
When existing gateways collect network service transmission quality information, they store information such as Internet Protocol (IP) addresses and packet timestamps, resulting in insufficient memory capacity, resulting in low accuracy of collected information.
Obtain the IP address by parsing the mirror domain name, and analyze and collect statistics on the TCP handshake information of each IP address. Only the statistical information is stored, avoiding the storage of original messages, thereby improving the accuracy of information collection.
It improves the accuracy of information collection, reduces data loss, reduces storage and forwarding load, and improves collection efficiency.
Smart Images

Figure CN118802837A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of communication technology, and specifically relates to an information collection method, device, communication equipment and readable storage medium. Background Art
[0002] In order to collect network service transmission quality information, the related art proposes to use the message mirroring method to analyze the message in real time to obtain the Transmission Control Protocol (TCP) handshake information, etc. However, in the existing gateway mirroring structure, a large number of Internet Protocol (IP) addresses and message timestamps need to be stored to analyze the message. In this case, since the memory capacity of the gateway is generally small, the stored information will be easily lost, resulting in low accuracy of the message collection information. Summary of the invention
[0003] The purpose of the embodiments of the present application is to provide an information collection method, apparatus, communication device and readable storage medium to solve the problem of low accuracy of information collected from messages in the related art.
[0004] In order to solve the above technical problems, this application is implemented as follows:
[0005] In a first aspect, an information collection method is provided, comprising:
[0006] The first device receives first information, where the first information is used to configure a mirror domain name;
[0007] The first device parses the message of the mirror domain name to obtain at least one Internet Protocol IP address corresponding to the mirror domain name;
[0008] The first device analyzes the mirrored transmission control protocol TCP message of each of the IP addresses to obtain TCP handshake information of each of the IP addresses;
[0009] The first device sends the correspondence between the mirror domain name and the at least one IP address and the TCP handshake information of each IP address to the second device.
[0010] In a second aspect, an information collection method is provided, comprising:
[0011] The second device sends first information to the first device, where the first information is used to configure the mirror domain name;
[0012] The second device receives the correspondence between the mirror domain name and at least one IP address and TCP handshake information of each IP address sent by the first device; wherein the at least one IP address is obtained by parsing the message of the mirror domain name;
[0013] The second device obtains TCP handshake information of at least one IP address corresponding to the mirror domain name according to the correspondence between the mirror domain name and at least one IP address and the TCP handshake information of each IP address.
[0014] In a third aspect, an information collection device is provided, comprising:
[0015] A first receiving module, used to receive first information, where the first information is used to configure a mirror domain name;
[0016] A parsing module, used to parse the message of the mirror domain name and obtain at least one IP address corresponding to the mirror domain name;
[0017] An analysis module, used for analyzing the mirror TCP message of each IP address to obtain the TCP handshake information of each IP address;
[0018] The first sending module is used to send the corresponding relationship between the mirror domain name and the at least one IP address and the TCP handshake information of each IP address to the second device.
[0019] In a fourth aspect, an information collection device is provided, comprising:
[0020] A second sending module, configured to send first information to the first device, where the first information is used to configure a mirror domain name;
[0021] A second receiving module is used to receive the correspondence between the mirror domain name and at least one IP address and TCP handshake information of each IP address sent by the first device; wherein the at least one IP address is obtained by parsing the message of the mirror domain name;
[0022] The processing module is used to obtain TCP handshake information of at least one IP address corresponding to the mirror domain name according to the corresponding relationship between the mirror domain name and at least one IP address and the TCP handshake information of each IP address.
[0023] In a fifth aspect, a communication device is provided, comprising a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein when the program or instruction is executed by the processor, the steps of the method described in the first aspect or the steps of the method described in the second aspect are implemented.
[0024] In a sixth aspect, a readable storage medium is provided, on which a program or instruction is stored. When the program or instruction is executed by a processor, the steps of the method described in the first aspect or the steps of the method described in the second aspect are implemented.
[0025] In a seventh aspect, a computer program product is provided, comprising computer instructions, which, when executed by a processor, implement the steps of the method described in the first aspect or the steps of the method described in the second aspect.
[0026] In an embodiment of the present application, a first device may receive first information, wherein the first information is used to configure a mirror domain name, and parse a message of the mirror domain name, obtain at least one IP address corresponding to the mirror domain name, and analyze the mirror TCP message of each IP address to obtain TCP handshake information of each IP address, and send the correspondence between the mirror domain name and the at least one IP address and the TCP handshake information of each IP address to a second device. Thus, the first device may directly analyze and count the mirror TCP message, so that only the statistical information is stored, and the original message is no longer stored, thereby avoiding data loss due to excessive storage, thereby improving the accuracy of the collected information. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] Figure 1 This is a schematic diagram of the architecture of the information collection system in the embodiment of the present application;
[0028] Figure 2 is a flow chart of an information collection method provided by an embodiment of the present application;
[0029] Figure 3 is a flow chart of another information collection method provided by an embodiment of the present application;
[0030] Figure 4 It is a structural schematic diagram of an information collection device provided in an embodiment of the present application;
[0031] Figure 5 It is a structural schematic diagram of an information collection device provided in an embodiment of the present application;
[0032] Figure 6 It is a structural diagram of a communication device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0033] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0034] The terms "first", "second", etc. in the specification and claims of this application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the terms used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described herein, and the objects distinguished by "first", "second", etc. are generally of the same type, and the number of objects is not limited. For example, the first object can be one or more.
[0035] In order to solve the problem of low accuracy of message collection information in the related art, an information collection system is proposed in the embodiment of the present application, such as Figure 1 As shown, the system at least includes: gateway hardware 11, gateway software entity 12 and gateway application 13; the functions of each part are described as follows:
[0036] (1) Gateway hardware 11:
[0037] The gateway hardware 11 at least includes message forwarding hardware 111, which can receive the configured forwarding rules from the gateway software entity 12; and receive messages sent by the content delivery network (Content Delivery Network, CDN), such as data messages such as video content and game content, and forward messages that meet the hard forwarding characteristics to the next node according to the configured forwarding rules, and forward messages that do not meet the hard forwarding characteristics to the gateway software entity 12 for processing. The hard forwarding feature can be set based on actual needs, and this embodiment is not limited to this.
[0038] (2) Gateway software entity 12:
[0039] The gateway software entity 12 at least includes a message processing module 121, a forwarding rule learning module 122, a message forwarding control module 123, a message mirroring interface 124, a Domain Name System (DNS) monitoring module 125, a message mirroring module 126, etc. The functions of each part are described as follows:
[0040] - The message processing module 121 can receive messages that do not meet the hard forwarding characteristics from the message forwarding hardware 111, process the received messages, and send the messages with unknown rules to the forwarding rule learning module 122 for learning;
[0041] - The forwarding rule learning module 122 can learn the received messages (generally control messages), record the TCP handshake time, TCP handshake delay (such as the delay between the second handshake and the first handshake, the delay between the third handshake and the second handshake), etc., and set the message forwarding rules based on the recorded information, and send the set forwarding rules to the message forwarding control module 123; in addition, the forwarding rule learning module 122 can also mark / add timestamps to the mirrored TCP three-way handshake messages based on the configured mirrored IP address, and send the messages with / adding timestamps to the message mirroring module 126 for analysis and statistics by the message mirroring module 126;
[0042] -The message forwarding control module 123 may send the configured forwarding rules to the message forwarding hardware 111;
[0043] -The DNS monitoring module 125 can receive configuration information from the gateway application 13 through the message mirroring interface 124. The configuration information can be used to configure at least one mirror domain name and assign an index to each mirror domain name, which is used to identify the domain name to which the IP address belongs; in addition, the DNS monitoring module 125 can also parse the messages of each domain name, monitor the IP address of the mirror domain name, and store the correspondence / mapping relationship between the mirror domain name and the IP address. When the same domain name is resolved multiple times during the statistical period, the last resolution shall prevail; if the IP address resolved by the previous DNS generates TCP traffic, the IP address needs to be added to the end of the IP address list resolved by the latest domain name. The index of the IP address in the IP address list can be used for TCP handshake information statistics. For example, the number of IP addresses in the IP address list can exceed 10, with a maximum of 20.
[0044] Optionally, for the message mirroring interface 124, the message of the device under the port mirroring can be added according to the remote address. For the mirroring rule with the domain name as the destination address, it is necessary to establish a correspondence between the domain name and the IP address through the DNS monitoring module 125, which may be a one-to-many relationship, that is, one domain name corresponds to multiple IP addresses. For the mirroring rule with the domain name as the destination address or the destination address being empty, it can support the simultaneous mirroring of the IPv4 and IPv6 messages of the device under the destination IP address.
[0045] In an optional embodiment, Figure 1 The DNS monitoring module 125 can report the DNS information and the correspondence / mapping relationship between the mirror domain name and at least one IP address to the message processing function module 132 in the gateway application 13 through the message domain name query interface. For example, the DNS monitoring module 125 can perform the reporting operation based on the query request of the message processing function module 132.
[0046] -The message mirroring module 126 can analyze and count TCP three-way handshake messages that meet the mirroring rules and are timestamped, obtain and store the TCP handshake information of each IP address; the TCP handshake information includes, but is not limited to, the time offset value of the first handshake, the delay between the second handshake and the first handshake, and the delay between the third handshake and the second handshake; wherein, the time offset value of the first handshake is the difference between the first TCP handshake time monitored and the first message time of the corresponding domain name; the delay between the second handshake and the first handshake is the difference between the time point of the second handshake and the time point of the first handshake in the TCP three-way handshake; the delay between the third handshake and the second handshake is the difference between the time point of the third handshake and the time point of the second handshake in the TCP three-way handshake. TCP handshake information can be counted based on the index of the IP address (which can be abbreviated as: IP index).
[0047] In an optional embodiment, Figure 1 As described above, the message mirror module 126 can report the TCP handshake information obtained through statistics to the message processing function module 132 in the gateway application 13 through the message mirror query interface.
[0048] (3) Gateway application 13:
[0049] The gateway application 13 may use deep packet inspection (DPI) technology, and at least includes a message capture control module 131 and a message processing function module 132, etc. The functions of each part are described as follows:
[0050] - The message capture control module 131 can set the mirror message and the corresponding mirror rule, wherein each mirror rule corresponds to a mirror task, for example, a maximum of 255 mirror tasks can be set; a corresponding mirror domain name can be configured for each mirror task; the message capture control module 131 can configure the mirror task and the corresponding mirror domain name to the DNS monitoring module 125 through the message mirror interface 124;
[0051] -The message processing function module 132 can obtain DNS information and the correspondence between the mirror domain name and the IP address from the DNS monitoring module 125 through the message domain name query interface, and perform at least one of the following: restore the DNS resolution time, resolve the address of the DNS server (such as the IP address), and determine the DNS resolution delay; at the same time, the message processing function module 132 can also obtain TCP handshake information from the message mirror module 126 through the message mirror query interface, and the TCP handshake information is counted based on the index of the IP address; thereafter, the TCP handshake information of each domain name can be obtained according to the DNS domain name index and the TCP handshake information and reported to the collection platform, etc.
[0052] Optionally, the solution in this application is applicable to low-consumption gateway services, etc.
[0053] The information collection method, apparatus, communication device and readable storage medium provided in the embodiments of the present application are described in detail below with reference to the accompanying drawings through specific embodiments and their application scenarios.
[0054] See also Figure 2 , Figure 2 is a flowchart of an information collection method provided in an embodiment of the present application, the method is applied to a first device, the first device is, for example, the above-mentioned Figure 1 The gateway software entity in the system or other embedded devices, edge devices, etc. that can achieve similar functions. Figure 2 As shown, the method comprises the following steps:
[0055] Step 21: The first device receives first information, where the first information is used to configure a mirror domain name;
[0056] Step 22: The first device parses the message of the mirror domain name to obtain at least one IP address corresponding to the mirror domain name;
[0057] Step 23: The first device analyzes the mirrored TCP message of each IP address to obtain TCP handshake information of each IP address;
[0058] Step 24: The first device sends the correspondence between the mirror domain name and the at least one IP address and the TCP handshake information of each IP address to the second device.
[0059] In the embodiment of the present application, the second device is, for example, the above-mentioned Figure 1 Gateway applications in or other soft probe plug-ins that can achieve similar functions.
[0060] Optionally, the first device (such as a gateway software entity) may receive first information for configuring a mirror domain name from a second device (such as a gateway application) via an application programming interface (Application Programming Interface, API).
[0061] Optionally, the correspondence between the mirror domain name and the IP address may be a one-to-one relationship, ie, one domain name corresponds to one IP address; or a one-to-many relationship, ie, one domain name corresponds to multiple IP addresses.
[0062] Optionally, the mirrored TCP message is specifically a mirrored TCP three-way handshake message. The method for identifying the TCP three-way handshake message may adopt the existing technology, which is not limited in this embodiment.
[0063] Optionally, the TCP handshake information may include but is not limited to at least one of the following: the time offset value of the first handshake, the delay between the second handshake and the first handshake, the delay between the third handshake and the second handshake, etc. Among them, the time offset value of the first handshake is the difference between the monitored first TCP handshake time and the first message time of the corresponding domain name, so that the complete timestamp of the first message of each domain name can be stored, and the subsequent messages only need to store the offset value, thereby reducing more than half of the time information; after the stored data is read, all information is reset. The delay between the second handshake and the first handshake is the difference between the time point of the second handshake in the TCP three-way handshake and the time point of the first handshake. The delay between the third handshake and the second handshake is the difference between the time point of the third handshake in the TCP three-way handshake and the time point of the second handshake. If there are multiple TCP handshake information for the same IP address, the first two-way handshake delay (i.e., the delay between the second handshake and the first handshake) and the second three-way handshake delay (i.e., the delay between the third handshake and the second handshake) are averaged.
[0064] Optionally, analyzing the mirrored TCP message of each IP address to obtain the TCP handshake information of each IP address may include: analyzing the mirrored TCP message of each IP address, and using the index of each IP address to count the TCP handshake information obtained by the analysis to obtain the TCP handshake information of each IP address. In this way, the message information can be counted using the index of the IP address, thereby improving the statistical efficiency.
[0065] Optionally, when sending TCP handshake information for each IP address, the TCP handshake information can be counted based on the index of the IP address (which can be abbreviated as: IP index), and the corresponding format is, for example: "IP index 1: [{time offset value of the first handshake, first and second handshake delays, second and third handshake delays}, {time offset value of the first handshake, first and second handshake delays, second and third handshake delays}...]"; for example, up to 50 arrays can be supported.
[0066] In an embodiment of the present application, a first device may receive first information, wherein the first information is used to configure a mirror domain name, and parse a message of the mirror domain name, obtain at least one IP address corresponding to the mirror domain name, and analyze the mirror TCP message of each IP address to obtain TCP handshake information of each IP address, and send the correspondence between the mirror domain name and the at least one IP address and the TCP handshake information of each IP address to a second device. Thus, the first device may directly analyze and count the mirror TCP message, so that only the statistical information is stored, and the original message is no longer stored, thereby avoiding data loss due to excessive storage, thereby improving the accuracy of the collected information.
[0067] In addition, by adopting the solution in the present application, the parsing information / statistical information can be sent directly to the second device without forwarding a large number of TCP messages, thereby avoiding excessive central processing unit CPU load caused by forwarding a large number of TCP messages.
[0068] In addition, by adopting the solution in the present application, the edge computing capability of the first device (such as a gateway) can be used to perform information statistics without affecting the accuracy of DNS information and TCP handshake delay data and without losing key data, and the original message can be converted into extremely simple high-value data, thereby reducing the storage and forwarding of data.
[0069] In the embodiment of the present application, in order to improve the accuracy of information statistics, a timestamp can be introduced into the mirror TCP message, and the timestamp is the time point when the message receiver receives the message. Before analyzing the mirror TCP message of each IP address, the information collection method can also include:
[0070] The first device adds a timestamp to the mirrored TCP three-way handshake message of each IP address; this adding of timestamp may also be referred to as timestamping.
[0071] The analysis of the mirrored TCP message of each IP address to obtain the TCP handshake information of each IP address may include: the first device analyzes the TCP three-way handshake message after adding the timestamp to obtain the TCP handshake information of each IP address. Since there are a large number of messages, message forwarding / mirroring is often delayed or even lost, so by adding the timestamp, the receiving time accuracy of the relevant messages can be greatly improved, thereby improving the accuracy of the obtained TCP handshake information.
[0072] In an embodiment of the present application, it is possible to support the resolution of multiple domain names. The first information can be specifically used to configure multiple mirror domain names and the domain name index of each mirror domain name. Correspondingly, the above step 22 may include: the first device resolves the message of each mirror domain name to obtain at least one IP address corresponding to each mirror domain name. In this way, compared with the related art that only supports a single domain name, the efficiency of collecting TCP handshake information can be improved.
[0073] See also Figure 3 , Figure 3 is a flowchart of an information collection method provided in an embodiment of the present application, the method is applied to a second device, the second device is, for example, the above-mentioned Figure 1 Gateway applications in or other soft probe plug-ins that can achieve similar functions. Figure 3 As shown, the method comprises the following steps:
[0074] Step 31: The second device sends first information to the first device, where the first information is used to configure a mirror domain name;
[0075] Step 32: The second device receives the correspondence between the mirror domain name and at least one IP address and TCP handshake information of each IP address sent by the first device; the at least one IP address is obtained by parsing the message of the mirror domain name;
[0076] Step 33: The second device obtains TCP handshake information of at least one IP address corresponding to the mirror domain name according to the correspondence between the mirror domain name and at least one IP address and the TCP handshake information of each IP address.
[0077] In the embodiment of the present application, the first device is, for example, the above Figure 1 The gateway software entity in or other embedded devices, edge devices, etc. that can achieve similar functions.
[0078] Optionally, the second device (such as a gateway application) may send first information for configuring the mirror domain name to the first device (such as a gateway software entity) through an API.
[0079] Optionally, the correspondence between the mirror domain name and the IP address may be a one-to-one relationship, ie, one domain name corresponds to one IP address; or a one-to-many relationship, ie, one domain name corresponds to multiple IP addresses.
[0080] Optionally, the TCP handshake information may include but is not limited to at least one of the following: the time offset value of the first handshake, the delay between the second handshake and the first handshake, the delay between the third handshake and the second handshake, etc. Among them, the time offset value of the first handshake is the difference between the monitored first TCP handshake time and the first message time of the corresponding domain name, so that the complete timestamp of the first message of each domain name can be stored, and the subsequent messages only need to store the offset value, thereby reducing more than half of the time information; after the stored data is read, all information is reset. The delay between the second handshake and the first handshake is the difference between the time point of the second handshake in the TCP three-way handshake and the time point of the first handshake. The delay between the third handshake and the second handshake is the difference between the time point of the third handshake in the TCP three-way handshake and the time point of the second handshake. If there are multiple TCP handshake information for the same IP address, the first two-way handshake delay (i.e., the delay between the second handshake and the first handshake) and the second three-way handshake delay (i.e., the delay between the third handshake and the second handshake) are averaged.
[0081] Optionally, the TCP handshake information can be counted based on the index of the IP address (which can be abbreviated as: IP index), and the corresponding format is, for example: "IP index 1: [{time offset value of the first handshake, first and second handshake delays, second and third handshake delays}, {time offset value of the first handshake, first and second handshake delays, second and third handshake delays}...]"; for example, up to 50 arrays can be supported.
[0082] In an embodiment of the present application, the first device can directly analyze and count the mirrored TCP messages, so that only the statistical information needs to be stored and the original messages are no longer stored, thus avoiding data loss due to excessive storage, thereby improving the accuracy of the collected information; and the second device can obtain the TCP handshake information of the domain name based on the obtained parsing information and statistical information.
[0083] In an embodiment of the present application, it is possible to support resolution of multiple domain names. The first information can be specifically used to configure multiple mirror domain names and a domain name index of each mirror domain name. Correspondingly, step 32 may include: the second device receives the correspondence between each mirror domain name and at least one IP address and the TCP handshake information of each IP address sent by the first device.
[0084] The step 33 may include: the second device obtains the TCP handshake information of at least one IP address corresponding to each mirror domain name according to the correspondence between each mirror domain name and at least one IP address and the TCP handshake information of each IP address. In this way, compared with the related art that only supports a single domain name, the efficiency of collecting TCP handshake information can be improved.
[0085] Optionally, the information collection method in the embodiment of the present application may further include:
[0086] The second device receives the DNS information sent by the first device; the DNS information can be understood as relevant information when resolving the domain name;
[0087] The second device performs at least one of the following according to the DNS information: determining the DNS resolution time, resolving the address (such as the IP address) of the DNS server, and determining the DNS resolution delay. In this way, the relevant information of the DNS resolution can be directly obtained.
[0088] In an optional embodiment, the DNS information may include DNS resolution time, address of the DNS server and / or DNS resolution delay, etc.
[0089] It should be noted that the information collection method provided in the embodiment of the present application can be executed by an information collection device or a control module in the information collection device for executing the information collection method. In the embodiment of the present application, the information collection device provided in the embodiment of the present application is described by taking the information collection device executing the information collection method as an example.
[0090] See also Figure 4 , Figure 4 is a schematic diagram of the structure of an information collection device provided in an embodiment of the present application, the device is applied to a first device, the first device is, for example, the above-mentioned Figure 1 Gateway software entity in or other embedded devices, edge devices, etc. that can achieve similar functions; such as Figure 4 As shown, the information collection device 40 includes:
[0091] A first receiving module 41 is used to receive first information, where the first information is used to configure a mirror domain name;
[0092] A parsing module 42, configured to parse the message of the mirror domain name and obtain at least one IP address corresponding to the mirror domain name;
[0093] An analysis module 43 is used to analyze the mirror TCP message of each IP address to obtain TCP handshake information of each IP address;
[0094] The first sending module 44 is configured to send the correspondence between the mirror domain name and the at least one IP address and the TCP handshake information of each IP address to the second device.
[0095] Optionally, the information collection device 40 includes:
[0096] An adding module is used to add a timestamp to the mirrored TCP three-way handshake message of each IP address before analyzing the mirrored TCP message of each IP address;
[0097] The analysis module 43 is specifically used to analyze the TCP three-way handshake message after adding the timestamp, and obtain the TCP handshake information of each IP address.
[0098] Optionally, the TCP handshake information includes at least one of the following:
[0099] The time offset value of the first handshake;
[0100] The delay between the second handshake and the first handshake;
[0101] The delay between the third handshake and the second handshake.
[0102] Optionally, the first information is specifically used to configure multiple mirror domain names and a domain name index of each of the mirror domain names; the parsing module 42 is specifically used to: parse the message of each of the mirror domain names to obtain at least one IP address corresponding to each of the mirror domain names.
[0103] Optionally, the analysis module 43 is specifically used to: analyze the mirror TCP message of each IP address, and use the index of each IP address to count the TCP handshake information obtained from the analysis to obtain the TCP handshake information of each IP address.
[0104] The information collection device 40 of the embodiment of the present application can realize the above Figure 2 The various processes of the method embodiment shown can achieve the same technical effect, and will not be described again here to avoid repetition.
[0105] See also Figure 5 , Figure 5 is a schematic diagram of the structure of an information collection device provided in an embodiment of the present application, the device is applied to a second device, the second device is, for example, the above-mentioned Figure 1 Gateway applications in or other soft probe plug-ins that can achieve similar functions; such as Figure 5 As shown, the information collection device 50 includes:
[0106] A second sending module 51 is used to send first information to the first device, where the first information is used to configure a mirror domain name;
[0107] A second receiving module 52 is used to receive the correspondence between the mirror domain name and at least one IP address and TCP handshake information of each IP address sent by the first device; the at least one IP address is obtained by parsing the message of the mirror domain name;
[0108] The processing module 53 is used to obtain the TCP handshake information of at least one IP address corresponding to the mirror domain name according to the correspondence between the mirror domain name and at least one IP address and the TCP handshake information of each IP address.
[0109] Optionally, the first information is specifically used to configure multiple mirror domain names and a domain name index of each of the mirror domain names;
[0110] The second receiving module 52 is specifically used to: receive the correspondence between each mirror domain name and at least one IP address and the TCP handshake information of each IP address sent by the first device;
[0111] The processing module 53 is specifically used to obtain TCP handshake information of at least one IP address corresponding to each mirror domain name according to the correspondence between each mirror domain name and at least one IP address and the TCP handshake information of each IP address.
[0112] Optionally, the TCP handshake information includes at least one of the following:
[0113] The time offset value of the first handshake;
[0114] The delay between the second handshake and the first handshake;
[0115] The delay between the third handshake and the second handshake.
[0116] Optionally, the information collection device 50 further includes:
[0117] A third receiving module, used to receive the domain name system DNS information sent by the first device;
[0118] An execution module is used to execute at least one of the following according to the DNS information: determine the DNS resolution time, resolve the address of the DNS server, and determine the DNS resolution delay.
[0119] The information collection device 50 of the embodiment of the present application can realize the above Figure 3 The various processes of the method embodiment shown can achieve the same technical effect, and will not be described again here to avoid repetition.
[0120] Optional, such as Figure 6 As shown, the embodiment of the present application also provides a communication device 60, including a processor 61, a memory 62, a program or instruction stored in the memory 62 and executable on the processor 61, and the program or instruction is executed by the processor 61 to implement the above Figure 2 or Figure 3 The various processes of the method embodiment shown can achieve the same technical effect, and will not be described again here to avoid repetition.
[0121] The present application also provides a computer program product, including computer instructions, which can achieve the above-mentioned Figure 2 or Figure 3 The various processes of the method embodiment shown can achieve the same technical effect, and to avoid repetition, they will not be described again here.
[0122] The embodiment of the present application also provides a readable storage medium on which a program or instruction is stored. When the program or instruction is executed by a processor, the various processes of the above-mentioned information collection method embodiment can be implemented and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0123] Computer readable media include permanent and non-permanent, removable and non-removable media, and can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0124] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0125] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0126] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for enabling a service classification device (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in each embodiment of the present application.
[0127] The above is only a preferred embodiment of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. An information collection method, characterized in that: include: The first device receives first information, where the first information is used to configure a mirror domain name; The first device parses the message of the mirror domain name to obtain at least one Internet Protocol IP address corresponding to the mirror domain name; The first device analyzes the mirrored transmission control protocol TCP message of each of the IP addresses to obtain TCP handshake information of each of the IP addresses; The first device sends the correspondence between the mirror domain name and the at least one IP address and the TCP handshake information of each IP address to the second device.
2. The method according to claim 1, characterized in that Before analyzing the mirror TCP message of each IP address, the method further includes: The first device adds a timestamp to the mirrored TCP three-way handshake message of each of the IP addresses; The first device analyzes the mirrored TCP message of each IP address to obtain TCP handshake information of each IP address, including: The first device analyzes the TCP three-way handshake message after adding the timestamp to obtain TCP handshake information of each IP address.
3. The method according to claim 1 or 2, characterized in that: The TCP handshake information includes at least one of the following: The time offset value of the first handshake; The delay between the second handshake and the first handshake; The delay between the third handshake and the second handshake.
4. The method according to claim 1, characterized in that: The first information is specifically used to configure multiple mirror domain names and a domain name index of each of the mirror domain names; The first device parses the message of the mirror domain name to obtain at least one Internet Protocol IP address corresponding to the mirror domain name, including: The first device parses the message of each of the mirror domain names to obtain at least one IP address corresponding to each of the mirror domain names.
5. The method according to claim 1, characterized in that The analyzing the mirror TCP message of each IP address to obtain the TCP handshake information of each IP address includes: The mirror TCP message of each IP address is analyzed, and the TCP handshake information obtained by the analysis is counted using the index of each IP address to obtain the TCP handshake information of each IP address.
6. An information collection method, characterized in that: include: The second device sends first information to the first device, where the first information is used to configure the mirror domain name; The second device receives the correspondence between the mirror domain name and at least one IP address and TCP handshake information of each IP address sent by the first device; wherein the at least one IP address is obtained by parsing the message of the mirror domain name; The second device obtains TCP handshake information of at least one IP address corresponding to the mirror domain name according to the correspondence between the mirror domain name and at least one IP address and the TCP handshake information of each IP address.
7. The method according to claim 6, characterized in that The first information is specifically used to configure multiple mirror domain names and a domain name index of each of the mirror domain names; The second device receives the correspondence between the mirror domain name and at least one IP address and the TCP handshake information of each IP address sent by the first device, including: The second device receives the correspondence between each of the mirror domain names and at least one IP address and TCP handshake information of each of the IP addresses sent by the first device; The second device obtains TCP handshake information of at least one IP address corresponding to the mirror domain name according to the correspondence between the mirror domain name and at least one IP address and the TCP handshake information of each IP address, including: The second device obtains TCP handshake information of at least one IP address corresponding to each mirror domain name according to the correspondence between each mirror domain name and at least one IP address and the TCP handshake information of each IP address.
8. The method according to claim 6 or 7, characterized in that: The TCP handshake information includes at least one of the following: The time offset value of the first handshake; The delay between the second handshake and the first handshake; The delay between the third handshake and the second handshake.
9. The method according to claim 6, characterized in that The method further comprises: The second device receives the domain name system DNS information sent by the first device; The second device performs at least one of the following according to the DNS information: determining the DNS resolution time, resolving the address of the DNS server, and determining the DNS resolution delay.
10. An information collection device, characterized in that: include: A first receiving module, used to receive first information, where the first information is used to configure a mirror domain name; A parsing module, used to parse the message of the mirror domain name and obtain at least one IP address corresponding to the mirror domain name; An analysis module, used for analyzing the mirror TCP message of each IP address to obtain the TCP handshake information of each IP address; The first sending module is used to send the corresponding relationship between the mirror domain name and the at least one IP address and the TCP handshake information of each IP address to the second device.
11. An information collection device, characterized in that: include: A second sending module, configured to send first information to the first device, where the first information is used to configure a mirror domain name; A second receiving module is used to receive the correspondence between the mirror domain name and at least one IP address and TCP handshake information of each IP address sent by the first device; wherein the at least one IP address is obtained by parsing the message of the mirror domain name; The processing module is used to obtain TCP handshake information of at least one IP address corresponding to the mirror domain name according to the corresponding relationship between the mirror domain name and at least one IP address and the TCP handshake information of each IP address.
12. A communication device, characterized in that: The method comprises a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction, when executed by the processor, implements the steps of the method according to any one of claims 1 to 5, or the steps of the method according to any one of claims 6 to 9.
13. A readable storage medium, characterized in that: The readable storage medium stores a program or instruction, and when the program or instruction is executed by a processor, the steps of the method according to any one of claims 1 to 5, or the steps of the method according to any one of claims 6 to 9 are implemented.
14. A computer program product, characterized in that The method comprises computer instructions, which, when executed by a processor, implement the steps of the method according to any one of claims 1 to 5, or the steps of the method according to any one of claims 6 to 9.
Citation Information
Patent Citations
Message processing method, device and equipment and computer readable storage medium
CN111404765A
Domain name system monitoring method and device, server and storage medium
CN115134332A
