A method, apparatus, and computer-readable storage medium for determining gateway information.
By acquiring and analyzing the TTL information and performance parameters of the gateway's IP packets, the problems of small coverage and low accuracy in existing technologies are solved, enabling proactive identification and management of third-party routers.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHINA MOBILE COMM LTD RES INST
- Filing Date
- 2021-11-15
- Publication Date
- 2026-04-21
AI Technical Summary
Existing technologies for determining whether a user is using a third-party router have limited coverage and low accuracy, resulting in a lack of proactive network maintenance.
By obtaining the target parameter values of the IP packets of the gateway to be analyzed, especially the TTL information, and combining them with CPU utilization and transmission traffic, the cascading information of the third-party routers is determined, and the processor and memory are used for data processing and analysis.
It improves the initiative in network maintenance, can accurately identify whether a user is using a third-party router and its cascading information, without requiring manual and passive determination, and expands the coverage area.
Smart Images

Figure CN116155651B_ABST
Abstract
Description
Technical Field
[0001] This application relates to gateway information determination technology in the field of communications, and more particularly to a gateway information determination method, device and computer-readable storage medium. Background Technology
[0002] With the rapid development of home broadband networks, the quality of home intranets has become a crucial factor affecting user experience. Surveys conducted by the provincial company indicate that whether a user uses a third-party router has a certain impact on the quality of the broadband network. Currently, the only way to determine whether a home broadband user is using a third-party router is through telephone consultation or on-site service; however, this method has a limited user coverage, low accuracy, and is a passive maintenance approach with poor initiative. Summary of the Invention
[0003] To address the aforementioned technical problems, this application aims to provide a gateway information determination method, device, and computer-readable storage medium, which solves the problems of limited user coverage and low accuracy in determining whether a user is using a third-party router in related technologies, thereby improving the initiative in network maintenance.
[0004] The technical solution of this application is implemented as follows:
[0005] A method for determining gateway information, the method comprising:
[0006] Obtain the value of the target parameter of the IP packet of the gateway to be analyzed; wherein, the target parameter characterizes the forwarding performance of the IP packet;
[0007] Based on the value of the target parameter and the target value of the target parameter, the cascading information of the third-party router corresponding to the gateway to be analyzed is determined.
[0008] In the above scheme, obtaining the value of the target parameter of the IP packet of the gateway to be analyzed includes:
[0009] Once it is determined that the operating performance of the device to be analyzed corresponding to the gateway to be analyzed meets the target conditions, the packet capture function is enabled.
[0010] Based on the packet capture function, the TTL value of the IP packet of the gateway to be analyzed sent by the device to be analyzed is received.
[0011] In the above scheme, the step of enabling the packet capture function after determining that the operating performance of the device to be analyzed corresponding to the gateway to be analyzed meets the target conditions includes:
[0012] Obtain the CPU utilization and data transfer rate of the device to be analyzed;
[0013] If the CPU utilization rate meets the first threshold and the transmission traffic meets the second threshold, the operating performance of the device to be analyzed meets the target conditions, and the packet capture function is enabled.
[0014] In the above scheme, determining the cascading information of the third-party router corresponding to the gateway to be analyzed based on the value of the target parameter and the target value of the target parameter includes:
[0015] The TTL information is processed to obtain TTL information in the target format;
[0016] Determine the target value of the TTL information of the IP packets of the gateway to be analyzed;
[0017] If the value of the TTL information in the target format is determined to be valid data based on the value of the TTL information and the target value of the TTL information, the cascading information of the third-party router corresponding to the gateway to be analyzed is determined.
[0018] In the above scheme, the step of processing the TTL information to obtain the TTL information in the target format includes:
[0019] The TTL information is encapsulated to obtain the TTL information existing in the form of a queue;
[0020] Accordingly, when determining that the value of the TTL information in the target format is valid data based on the value of the TTL information and the target value of the TTL information, determining the cascading information of the third-party router corresponding to the gateway to be analyzed includes:
[0021] Based on the value of each TTL information that exists in the form of a queue, the initial cascading depth of the third-party router corresponding to the gateway to be analyzed is determined;
[0022] For the TTL information existing in the form of a queue, based on the relationship between the value of each TTL information and the target value and the initial concatenation depth corresponding to the value of each TTL information, it is determined whether the value of each TTL information existing in the form of a queue is valid data;
[0023] If the TTL information of the target format is determined to be valid data, the cascading information of the third-party router corresponding to the gateway to be analyzed is determined.
[0024] In the above scheme, determining whether the value of each TTL information existing in the form of a queue is valid data based on the relationship between the value of each TTL information and the target value and the initial concatenation depth corresponding to the value of each TTL information includes:
[0025] For the TTL information that exists in the form of a queue, determine a first relationship between the value of each TTL information and the target value;
[0026] An intermediate value is determined based on the initial concatenation depth corresponding to the value of each TTL information and the target value;
[0027] Determine a second relationship between the value of each TTL information and the corresponding intermediate value;
[0028] If the first relationship satisfies the first target relationship and the second relationship satisfies the second target relationship, the value of the TTL information existing in the form of a queue is determined to be valid data.
[0029] In the above scheme, determining the cascading information of the third-party router corresponding to the gateway to be analyzed, when the value of the TTL information in the target format is determined to be valid data, includes:
[0030] If the value of the TTL information in the target format is determined to be valid data, it is determined whether the initial concatenation depth corresponding to the value of the TTL information existing in the form of a queue is the same within a target time period;
[0031] If the initial concatenation depths are all the same, determine the number of times the TTL information corresponding to the initial concatenation depth is determined;
[0032] Determine the third relationship between the number of times the TTL information is obtained and the data packets captured within the target time period;
[0033] If the third relationship satisfies the target relationship, the cascading depth of the third-party router corresponding to the gateway to be analyzed is determined as the initial cascading depth;
[0034] If the initial concatenation depths are not the same, the TTL information of the IP packets of the gateway to be analyzed is re-acquired until the concatenation depth of the third-party router corresponding to the gateway to be analyzed is determined.
[0035] In the above scheme, the TTL information value and corresponding count of the IP packet of the gateway to be analyzed are stored in target form.
[0036] A gateway information determining device, the device comprising: a processor, a memory, and a communication bus;
[0037] The communication bus is used to realize the communication connection between the processor and the memory;
[0038] The processor is used to execute the gateway information determination program in the memory to implement the steps of the gateway information determination method described above.
[0039] A computer-readable storage medium storing one or more programs that can be executed by one or more processors to implement the steps of the gateway information determination method described above.
[0040] The gateway information determination method, device, and computer-readable storage medium provided in this application obtain the value of the target parameter of the IP packet of the gateway to be analyzed. The target parameter characterizes the forwarding performance of the IP packet. Based on the value of the target parameter and the target value of the target parameter, the cascading information of the third-party router corresponding to the gateway to be analyzed is determined. In this way, it is possible to determine whether the gateway to be analyzed uses a third-party router and the cascading information of the third-party router by obtaining the value of the target parameter of the IP packet of the gateway to be analyzed and the target value of the target parameter. This eliminates the need for manual passive determination, solves the problem of small user coverage and low accuracy when determining whether a user is using a third-party router in related technologies, and improves the initiative of network maintenance. Attached Figure Description
[0041] Figure 1 A flowchart illustrating a gateway information determination method provided for an embodiment of this application;
[0042] Figure 2 A flowchart illustrating another gateway information determination method provided for an embodiment of this application;
[0043] Figure 3 A flowchart illustrating yet another gateway information determination method provided in an embodiment of this application;
[0044] Figure 4 A schematic diagram of the architecture of a home network in the gateway information determination method provided in the embodiments of this application;
[0045] Figure 5 A schematic diagram of the system architecture corresponding to a gateway information determination method provided in an embodiment of this application;
[0046] Figure 6 A schematic diagram of the system architecture corresponding to another gateway information determination method provided in the embodiments of this application;
[0047] Figure 7 A schematic diagram of the structure of a gateway information determination device provided for an embodiment of this application;
[0048] Figure 8 This is a schematic diagram of the structure of a gateway information determination device provided in an embodiment of this application. Detailed Implementation
[0049] The technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings.
[0050] It should be understood that the phrases "embodiments of this application" or "foreign embodiments" throughout the specification mean that a specific feature, structure, or characteristic related to an embodiment is included in at least one embodiment of this application. Therefore, "embodiments of this application" or "in the foreign embodiments" appearing throughout the specification do not necessarily refer to the same embodiment. Furthermore, these specific features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. In the various embodiments of this application, the sequence numbers of the above-described processes do not imply a sequential order of execution; the execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application. The sequence numbers of the above-described embodiments are merely descriptive and do not represent the superiority or inferiority of the embodiments.
[0051] Unless otherwise specified, any step in the embodiments of this application performed by the electronic device may be executed by the processor of the electronic device. It is also worth noting that the embodiments of this application do not limit the order in which the electronic device performs the following steps. Furthermore, the methods used to process data in different embodiments may be the same or different methods. It should also be noted that any step in the embodiments of this application can be executed independently by the electronic device; that is, when the electronic device performs any step in the following embodiments, it may not depend on the execution of other steps.
[0052] It should be understood that the specific embodiments described herein are for illustrative purposes only and are not intended to limit the scope of this application.
[0053] This application provides a method for determining gateway information, which can be applied to a gateway information determining device. (Refer to...) Figure 1 As shown, the method includes the following steps:
[0054] Step 101: Obtain the value of the target parameter of the Internet Protocol (IP) message of the gateway to be analyzed.
[0055] The target parameter characterizes the forwarding performance of IP packets.
[0056] In this embodiment, the gateway to be analyzed can be a gateway for which network quality analysis is required; in one feasible implementation, the gateway to be analyzed can refer to the gateway of a home broadband network. The target parameter can refer to the Time To Live (TTL) information of IP packets.
[0057] Step 102: Based on the value of the target parameter and the target value of the target parameter, determine the cascading information of the third-party router corresponding to the gateway to be analyzed.
[0058] In this embodiment of the application, the target value of the target parameter may refer to the value of the pre-set TTL information. The target value may be determined based on historical data and actual application scenarios. Moreover, the gateway information determination device may first determine whether the gateway to be analyzed has a third-party router based on the value of the target parameter and the target value of the target parameter. After determining that the gateway to be analyzed has a third-party router, it may further determine the cascading information of the third-party routers of the gateway to be analyzed.
[0059] The gateway information determination method provided in this application obtains the value of the target parameter of the IP packet of the gateway to be analyzed. The target parameter represents the forwarding performance of the IP packet. Based on the value of the target parameter and the target value of the target parameter, the cascading information of the third-party router corresponding to the gateway to be analyzed is determined. In this way, it is possible to determine whether the gateway to be analyzed uses a third-party router and the cascading information of the third-party router by obtaining the value of the target parameter of the IP packet of the gateway to be analyzed and the target value of the target parameter. This eliminates the need for manual passive determination, solves the problem of small user coverage and low accuracy when determining whether a user is using a third-party router in related technologies, and improves the initiative of network maintenance.
[0060] Based on the foregoing embodiments, embodiments of this application provide a method for determining gateway information, referring to... Figure 2 As shown, the method includes the following steps:
[0061] Step 201: Gateway Information Determination. Once the device determines that the operating performance of the device to be analyzed corresponding to the gateway to be analyzed meets the target conditions, it enables the packet capture function.
[0062] Here, the device to be analyzed can refer to the terminal corresponding to the gateway to be analyzed; in one feasible implementation, the device to be analyzed can refer to the terminal device corresponding to the gateway of the home broadband network. It should be noted that the operating performance of the device to be analyzed meeting the target conditions can mean that the utilization rate of the central processing unit (CPU) and the transmission traffic of the device to be analyzed meet certain requirements.
[0063] Step 202: Gateway Information Determination. The device receives the TTL value of the IP packet of the gateway to be analyzed from the device to be analyzed based on the packet capture function.
[0064] In this embodiment, the packet capture function refers to the function of capturing the TTL information value of the IP packets of the gateway to be analyzed. If the packet capture function is enabled, it means that the gateway information determining device can instruct the device to be analyzed to perform the action of capturing the TTL information value of the IP packets of the gateway to be analyzed, so that the device to be analyzed sends the captured TTL information value of the IP packets of the gateway to be analyzed to the gateway information determining device. If the packet capture function is not enabled, it means that the conditions at this time are not suitable for packet capture, and the packet capture function will be enabled only when the operating performance of the device to be analyzed meets the target conditions.
[0065] Step 203: The gateway information determination device processes the TTL information to obtain the target format TTL information.
[0066] The target format TTL information can be obtained by the gateway information determining device after converting the format of the captured TTL information.
[0067] Step 204: Gateway Information Determination. The device determines the target value of the TTL information of the IP packets of the gateway to be analyzed.
[0068] In this embodiment of the application, the target value of the TTL information of the IP packets of the gateway to be analyzed can refer to the target value of the TTL information of the IP packets of the gateway of the home broadband network.
[0069] Step 205: Gateway Information Determination. If the value of the TTL information in the target format is valid data based on the TTL information value and the target value of the TTL information, the device determines the cascading information of the third-party router corresponding to the gateway to be analyzed.
[0070] The TTL information of the IP packets of the gateway to be analyzed and the corresponding number of times are stored in target format.
[0071] In this embodiment of the application, the gateway information determining device can determine whether the value of the TTL information in the target format is valid data based on the TTL information value of the IP packet of the gateway to be analyzed and the target value of the TTL information; wherein, whether the value of the TTL information in the target format is valid data can be determined by comparing the value of the TTL information in the target format with the target value, and then comparing the value of the TTL information in the target format with the determined target value, and then determining the value based on the result of these two comparisons.
[0072] The gateway information determination method provided in this application can determine whether the gateway to be analyzed is using a third-party router and the cascading information of the third-party router by obtaining the target parameter value of the IP packet of the gateway to be analyzed and the target value of the target parameter. It does not require manual passive determination, which solves the problem of small coverage and low accuracy when determining whether a user is using a third-party router in related technologies, and improves the initiative of network maintenance.
[0073] Based on the foregoing embodiments, embodiments of this application provide a method for determining gateway information, referring to... Figure 3 As shown, the method includes the following steps:
[0074] Step 301: Determine the gateway information. The device obtains the CPU utilization and transmission traffic of the device to be analyzed corresponding to the gateway to be analyzed.
[0075] Among them, transmission traffic can refer to the traffic flow when the device being analyzed transmits data.
[0076] In one feasible implementation, multiple third-party routers can be used in the home network, or no third-party routers can be used. A specific illustration can be provided as follows: Figure 4 As shown in the image.
[0077] Step 302: Gateway Information Determination. If the CPU utilization rate meets the first threshold and the transmission traffic meets the second threshold, the device determines that the operating performance of the device to be analyzed meets the target conditions and enables the packet capture function.
[0078] In this embodiment, the first threshold and the second threshold can be different, and the first threshold and the second threshold can be determined based on the gateway performance. Specifically, "CPU utilization meeting the first threshold and transmission traffic meeting the second threshold" can mean that CPU utilization is less than the first threshold and transmission traffic is less than the second threshold. In one feasible implementation, the CPU utilization of the device under analysis can be collected at a fixed frequency. If the CPU utilization is less than the first threshold three times consecutively, it is considered that the CPU utilization is less than the first threshold. Simultaneously, transmission traffic can be collected at a fixed frequency. If the transmission traffic is less than the second threshold three times consecutively, it is considered that the transmission traffic is less than the first threshold. Here, the fixed frequency can refer to the frequency at which the device under analysis periodically reports TTL information.
[0079] It should be noted that the gateway information determination device can also obtain the average rate of gateway uplink and downlink traffic in the first three sampling periods. If the average rate of gateway uplink and downlink traffic is less than the third threshold, and the CPU utilization is less than the first threshold and the transmission traffic is less than the second threshold, then the operating performance of the device under analysis can be considered to meet the target conditions, and the packet capture function can be enabled. In other words, in addition to considering the CPU utilization and transmission traffic, the average rate of gateway uplink and downlink traffic can be further combined to determine whether to enable the packet capture function.
[0080] Step 303: Gateway Information Determination. The device receives the TTL value of the IP packet of the gateway to be analyzed from the device to be analyzed based on the packet capture function.
[0081] In this embodiment of the application, the device to be analyzed can encapsulate the TTL information value in the header data of the TCP packet; the gateway information determining device obtains the TTL information value of the period by analyzing the TCP packets of the gateway during the sampling period.
[0082] Step 304: The gateway information determination device encapsulates the TTL information to obtain TTL information in the form of a queue.
[0083] The data format of the TTL information value can be a queue format of (TTL value, number of times); all TTL information values can be recorded as (TTL1, N1), (TTL2, N2)...(TTLm, Nm).
[0084] Step 305: Gateway Information Determination. The device determines the target value of the TTL information of the IP packets of the gateway to be analyzed.
[0085] In this application embodiment, the target value of TTL information can refer to the value of the default TTL information of the home terminal. The target value of TTL information can be represented by Defi. If the default TTL information value of the home terminal includes Def1, Def2, and Def3, in a feasible implementation, Def[3] = {64, 128, 255}.
[0086] Step 306: The gateway information determination device determines the initial cascading depth of the third-party router corresponding to the gateway to be analyzed based on the value of each TTL information that exists in the form of a queue.
[0087] In this embodiment, since the initial TTL values of IP packets from home terminals are generally 128, 255, and 64, assuming the initial TTL value of the home terminal application's application is X, the TTL value intercepted on the home optical modem, the presence of a third-party router, and the number of levels of such third-party routers can be determined as follows: a) If the TTL value in the IP packet from the home optical modem is X, it indicates that there is no third-party router in the home broadband network; b) If the TTL value in the IP packet from the home optical modem is X-1, it indicates that there is one level of third-party router in the home broadband network; c) If the TTL value in the IP packet from the home optical modem is X-2, it indicates that there are two levels of third-party routers in the home broadband network. Using the method described above, the initial concatenation depth of the third-party router corresponding to the gateway to be analyzed can be determined based on the value of each TTL information and the default TTL information value; where the initial concatenation depth can be represented by K.
[0088] Step 307: The gateway information determination device determines whether the value of each TTL information existing in the queue is valid data based on the relationship between the value of each TTL information and the target value and the initial concatenation depth corresponding to the value of each TTL information.
[0089] In this embodiment of the application, the value of each TTL information existing in the form of a queue can be determined as valid data by the relationship between the value of each TTL information and the target value, and the relationship between the value of each TTL information and the initial concatenation depth corresponding to the value of each TTL information.
[0090] Step 307 can be implemented in the following way:
[0091] Step 307a: The gateway information determination device determines the first relationship between the value of each TTL information and the target value for the TTL information that exists in the form of a queue.
[0092] In this embodiment of the application, the gateway information determining device determines the size relationship between the value of each TTL information and the target value to obtain a first relationship; wherein the first relationship may include the value of the TTL information being greater than the target value, or the value of the TTL information being less than or equal to the target value.
[0093] Step 307b: The gateway information determination device determines the intermediate value based on the initial cascading depth corresponding to the value of each TTL information and the target value.
[0094] The intermediate value can be obtained by performing a certain operation on the initial concatenation depth corresponding to the value of each TTL information and the target value; in one feasible implementation, the intermediate value corresponding to the value of each TTL information can be obtained by subtracting the initial concatenation depth corresponding to the value of each TTL information from the target value.
[0095] Step 307c: The gateway information determination device determines the second relationship between the value of each TTL information and the corresponding intermediate value.
[0096] In this embodiment of the application, the gateway information determining device determines the size relationship between the value of each TTL information and the corresponding intermediate value to obtain a second relationship; wherein the second relationship may include the value of the TTL information being greater than or equal to the intermediate value, or the value of the TTL information being less than the intermediate value.
[0097] Step 307d: When the gateway information determination device determines that the value of the TTL information existing in the form of a queue is valid data, the first relationship satisfies the first target relationship and the second relationship satisfies the second target relationship.
[0098] In this embodiment, the first target relationship can refer to the value of the TTL information being less than or equal to the target value, and the second target relationship can refer to the value of the TTL information being greater than or equal to the intermediate value; that is, when the value of the TTL information is less than or equal to the target value and greater than or equal to the intermediate value, the value of the TTL information can be considered valid data. In one feasible implementation, this can be represented as Defi-K≦TTLj≦Defi.
[0099] Step 308: Gateway Information Determination. If the value of the TTL information in the target format is determined to be valid data, the device determines the cascading information of the third-party router corresponding to the gateway to be analyzed.
[0100] Step 308, which determines the cascading information of the third-party router corresponding to the gateway to be analyzed, can be achieved in the following way:
[0101] Step 308a: If the value of the TTL information in the target format is determined to be valid data, the gateway information determining device determines whether the initial concatenation depth corresponding to the value of the TTL information existing in the queue form within a target time period is the same.
[0102] In this embodiment of the application, the target time period may refer to a message data acquisition period; the gateway information determining device may determine whether all initial concatenation depths corresponding to all TTL information in the queue are the same.
[0103] Step 308b: If the initial concatenation depths are all the same, the gateway information determination device determines the number of times the TTL information corresponding to the initial concatenation depth is determined.
[0104] If all TTL information in the queue corresponds to the same initial concatenation depth, then determine the number of times the TTL information with the same initial concatenation depth appears.
[0105] Step 308c: Determine the third relationship between the number of times the gateway information determination device determines the TTL information and the data packets captured within the target time period.
[0106] In this embodiment of the application, the gateway information determining device can calculate the ratio between the number of TTL information corresponding to the initial concatenation depth and the number of data packets captured within the target time period to obtain a third relationship.
[0107] Step 308d: When the gateway information determination device determines the cascading depth of the third-party router corresponding to the gateway to be analyzed as the initial cascading depth, provided that the third relationship satisfies the target relationship.
[0108] In this embodiment of the application, if the ratio of the number of TTL information corresponding to the initial concatenation depth to the number of data packets captured within the target time period is greater than the target value, then the third relationship is considered to satisfy the target relationship; at this time, it can be assumed that there is a third-party router in the gateway to be analyzed, and the concatenation depth of the third-party router corresponding to the gateway to be analyzed is the initial concatenation depth.
[0109] Step 308e: If the initial cascading depths of the gateway information determination devices are different, re-acquire the TTL information of the IP packets of the gateway to be analyzed until the cascading depth of the third-party router corresponding to the gateway to be analyzed is determined.
[0110] If the initial concatenation depths corresponding to the TTL information values existing in the queue within a target time period are not completely the same, then it is necessary to continue to acquire TTL data to determine the TTL information values, and then execute the entire process again until the concatenation depth of the third-party router corresponding to the gateway to be analyzed is determined.
[0111] It should be noted that the gateway information determination method provided in this application corresponds to the actual test data for different home gateways, as shown in the table below:
[0112]
[0113] Based on actual network test data, most home broadband users' packets used the default TTL value, while some packets did not use the default TTL value. According to the TTL pattern, it is easy to distinguish packets that do not use the default TTL value, thereby detecting the usage status of third-party routers for all test users.
[0114] The gateway information determination method provided in this application embodiment can determine whether the gateway to be analyzed is using a third-party router and the cascading information of the third-party router by obtaining the target parameter value of the IP packet of the gateway to be analyzed and the target value of the target parameter. It does not require manual passive determination, which solves the problem of small user coverage and low accuracy when determining whether a user is using a third-party router in related technologies. It can detect the user's third-party router in advance and discover user faults in advance instead of waiting for the user to report network faults before detecting the third-party router, thereby improving the initiative of network maintenance.
[0115] Based on the foregoing embodiments, the gateway information determination method provided in this application can be applied to... Figure 5 The system shown may include a data collection and task configuration platform, a TCP packet analysis application, and a smart home gateway. The TCP packet analysis application may include functional modules and a control module. The functional modules can perform packet mirroring, latency analysis, TTL information analysis, and statistical encapsulation transmission. The control module can perform recent traffic analysis, periodic traffic analysis, CPU utilization monitoring, and configuration management. It should be noted that the data collection and task configuration platform is mainly responsible for issuing packet information collection tasks, collecting information, and analyzing TTL information; the packet analysis application is mainly responsible for controlling the activation of packet capture tasks, packet mirroring, TTL data collection, and simple statistical encapsulation; the smart home gateway is mainly responsible for providing interfaces for packet capture, traffic reading, and CPU utilization acquisition. Furthermore, as... Figure 6 As shown, the data collection and task configuration platform enables the TTL data capture function of the "packet analysis application". Then, the packet analysis application determines whether to enable the packet capture function based on CPU utilization and transmission traffic. At the same time, after enabling the packet capture function, it periodically uploads the TTL information value. After receiving the TTL data, the data collection and task configuration platform analyzes whether the data can distinguish whether the user used a third-party router and determine the cascading information of the third-party router corresponding to the gateway to be analyzed. If it can distinguish, the packet capture function stops; otherwise, it continues to capture TTL data.
[0116] Based on the foregoing embodiments, embodiments of this application provide a gateway information determination device, which can be applied to... Figures 1-3 In the corresponding embodiment, the gateway information determination method is referred to Figure 7 As shown, the device 4 may include:
[0117] The acquisition unit 41 is used to acquire the value of the target parameter of the IP packet of the gateway to be analyzed; wherein, the target parameter characterizes the forwarding performance of the IP packet;
[0118] Processing unit 42 is used to determine the cascading information of the third-party router corresponding to the gateway to be analyzed based on the value of the target parameter and the target value of the target parameter.
[0119] In other embodiments of this application, the acquisition unit 41 is also used to implement the following steps:
[0120] Once it is determined that the operating performance of the device to be analyzed corresponding to the gateway to be analyzed meets the target conditions, the packet capture function is enabled.
[0121] Based on the packet capture function, the TTL information value of the IP packets of the gateway to be analyzed sent by the device to be analyzed is received.
[0122] In other embodiments of this application, the acquisition unit 41 is also used to implement the following steps:
[0123] Obtain the CPU utilization and data transfer rate of the device to be analyzed;
[0124] Once it is determined that the CPU utilization rate meets the first threshold and the transmission traffic meets the second threshold, the operating performance of the device under analysis meets the target conditions, and the packet capture function is enabled.
[0125] In other embodiments of this application, the processing unit 42 is further configured to perform the following steps:
[0126] The TTL information is processed to obtain the TTL information in the target format;
[0127] Determine the target value of the TTL information of the IP packets of the gateway to be analyzed;
[0128] If the TTL information in the target format is determined to be valid data based on the value of the target parameter and the target value of the target parameter, the cascading information of the third-party router corresponding to the gateway to be analyzed is determined.
[0129] In other embodiments of this application, the processing unit 42 is further configured to encapsulate the TTL information to obtain TTL information existing in the form of a queue;
[0130] Accordingly, the processing unit 42 is also used to implement the following steps:
[0131] Based on the value of each TTL information that exists in the form of a queue, determine the initial concatenation depth of the third-party router corresponding to the gateway to be analyzed;
[0132] For TTL information existing in the form of a queue, based on the relationship between the value of each TTL information and the target value and the initial concatenation depth corresponding to the value of each TTL information, it is determined whether the value of each TTL information existing in the form of a queue is valid data;
[0133] If the TTL information in the target format is determined to be valid data, the cascading information of the third-party router corresponding to the gateway to be analyzed is determined.
[0134] In other embodiments of this application, the processing unit 42 is further configured to perform the following steps:
[0135] For TTL information that exists in the form of a queue, determine the first relationship between the value of each TTL information and the target value;
[0136] The intermediate value is determined based on the initial cascading depth corresponding to the value of each TTL information and the target value;
[0137] Determine a second relationship between the value of each TTL message and its corresponding intermediate value;
[0138] If the first relation satisfies the first target relation and the second relation satisfies the second target relation, the value of the TTL information existing in the form of a queue is determined to be valid data.
[0139] In other embodiments of this application, the processing unit 42 is further configured to perform the following steps:
[0140] Given that the TTL information in the target format is valid data, determine whether the concatenation depths corresponding to the TTL information values existing in the queue within a target time period are all the same;
[0141] If the initial concatenation depths are all the same, determine the number of times the TTL information corresponding to the initial concatenation depth is determined;
[0142] Determine the third relationship between the number of TTL information entries and the data packets captured within the target time period;
[0143] If the third relationship satisfies the target relationship, the cascading depth of the third-party router corresponding to the gateway to be analyzed is determined as the initial cascading depth.
[0144] If the initial concatenation depths are different, re-acquire the TTL information of the IP packets of the gateway to be analyzed until the concatenation depth of the third-party router corresponding to the gateway to be analyzed is determined.
[0145] In other embodiments of this application, the TTL information of the IP packets of the gateway to be analyzed and the corresponding number of times are stored in target format.
[0146] It should be noted that the specific implementation process of the steps performed by each unit in this embodiment can be referred to Figures 1-3 The implementation process of the gateway information confirmation method provided in the corresponding embodiment will not be described in detail here.
[0147] The gateway information determination device provided in this application embodiment can determine whether the gateway to be analyzed is using a third-party router and the cascading information of the third-party router by obtaining the value of the target parameter of the IP packet of the gateway to be analyzed and the target value of the target parameter. It does not require manual passive determination, which solves the problem of small coverage and low accuracy when determining whether a user is using a third-party router in related technologies, and improves the initiative of network maintenance.
[0148] Based on the foregoing embodiments, embodiments of this application provide a gateway information determination device, which can be applied to... Figures 1-3 In the corresponding embodiment, the gateway information determination method is referred to Figure 8 As shown, the device 5 may include: a processor 51, a memory 52, and a communication bus 53;
[0149] Communication bus 53 is used to realize the communication connection between processor 51 and memory 52;
[0150] The processor uses the gateway information in the execution memory 52 to determine the program to perform the following steps:
[0151] Obtain the values of the target parameters of the IP packets of the gateway to be analyzed; where the target parameters characterize the forwarding performance of the IP packets;
[0152] Based on the value of the target parameter and the target value of the target parameter, the cascading information of the third-party router corresponding to the gateway to be analyzed is determined.
[0153] In other embodiments of this application, the processor uses the gateway information stored in the execution memory 52 to determine the value of the target parameter for the program to obtain the IP packets of the gateway to be analyzed, in order to implement the following steps:
[0154] Once it is determined that the operating performance of the device to be analyzed corresponding to the gateway to be analyzed meets the target conditions, the packet capture function is enabled.
[0155] Based on the packet capture function, the TTL information value of the IP packets of the gateway to be analyzed sent by the device to be analyzed is received.
[0156] In other embodiments of this application, the processor uses the gateway information in the execution memory 52 to determine the packet capture function when it determines that the operating performance of the device to be analyzed corresponding to the gateway to be analyzed meets the target conditions, so as to achieve the following steps:
[0157] Obtain the CPU utilization and data transfer rate of the device to be analyzed;
[0158] Once it is determined that the CPU utilization rate meets the first threshold and the transmission traffic meets the second threshold, the operating performance of the device under analysis meets the target conditions, and the packet capture function is enabled.
[0159] In other embodiments of this application, the processor uses the gateway information stored in the execution memory 52 to determine the value of the target parameter and the target value of the target parameter of the program, and determines the cascading information of the third-party router corresponding to the gateway to be analyzed, so as to achieve the following steps:
[0160] The TTL information is processed to obtain the TTL information in the target format;
[0161] Determine the target value of the TTL information of the IP packets of the gateway to be analyzed;
[0162] If the TTL information in the target format is determined to be valid data based on the value of the target parameter and the target value of the target parameter, the cascading information of the third-party router corresponding to the gateway to be analyzed is determined.
[0163] In other embodiments of this application, the processor uses the gateway information in the execution memory 52 to determine the program's processing of TTL information to obtain TTL information in the target format, in order to implement the following steps:
[0164] The TTL information is encapsulated to obtain TTL information in the form of a queue;
[0165] Accordingly, the processor uses the gateway information in the execution memory 52 to determine the cascading information of the third-party router corresponding to the gateway to be analyzed, provided that the value of the TTL information in the target format determined based on the value of the target parameter and the target value of the target parameter is valid data. This includes:
[0166] Based on the value of each TTL information that exists in the form of a queue, determine the initial concatenation depth of the third-party router corresponding to the gateway to be analyzed;
[0167] For TTL information existing in the form of a queue, based on the relationship between the value of each TTL information and the target value and the initial concatenation depth corresponding to the value of each TTL information, it is determined whether the value of each TTL information existing in the form of a queue is valid data;
[0168] If the TTL information in the target format is determined to be valid data, the cascading information of the third-party router corresponding to the gateway to be analyzed is determined.
[0169] In other embodiments of this application, the processor uses the gateway information stored in the execution memory 52 to determine the program's TTL information existing in queue form. Based on the relationship between the value of each TTL information and the target value and the initial concatenation depth corresponding to the value of each TTL information, it determines whether the value of each TTL information existing in queue form is valid data, in order to achieve the following steps:
[0170] For TTL information that exists in the form of a queue, determine the first relationship between the value of each TTL information and the target value;
[0171] The intermediate value is determined based on the initial cascading depth corresponding to the value of each TTL information and the target value;
[0172] Determine a second relationship between the value of each TTL message and its corresponding intermediate value;
[0173] If the first relation satisfies the first target relation and the second relation satisfies the second target relation, the value of the TTL information existing in the form of a queue is determined to be valid data.
[0174] In other embodiments of this application, the processor uses the gateway information in the execution memory 52 to determine the cascading information of the third-party router corresponding to the gateway to be analyzed, provided that the value of the TTL information in the target format is valid data, in order to achieve the following steps:
[0175] Given that the TTL information in the target format is valid data, determine whether the concatenation depths corresponding to the TTL information values existing in the queue within a target time period are all the same;
[0176] If the initial concatenation depths are all the same, determine the number of times the TTL information corresponding to the initial concatenation depth is determined;
[0177] Determine the third relationship between the number of TTL information entries and the data packets captured within the target time period;
[0178] If the third relationship satisfies the target relationship, the cascading depth of the third-party router corresponding to the gateway to be analyzed is determined as the initial cascading depth.
[0179] If the initial concatenation depths are different, re-acquire the TTL information of the IP packets of the gateway to be analyzed until the concatenation depth of the third-party router corresponding to the gateway to be analyzed is determined.
[0180] In other embodiments of this application, the TTL information of the IP packets of the gateway to be analyzed and the corresponding number of times are stored in target format.
[0181] It should be noted that the specific implementation process of the steps executed by the processor in this embodiment can be referred to Figures 1-3 The implementation process of the gateway information determination method provided in the corresponding embodiment will not be described in detail here.
[0182] The gateway information determination device provided in this application embodiment can determine whether the gateway to be analyzed is using a third-party router and the cascading information of the third-party router by obtaining the value of the target parameter of the IP packet of the gateway to be analyzed and the target value of the target parameter. It does not require manual passive determination, which solves the problem of small coverage and low accuracy when determining whether a user is using a third-party router in related technologies, and improves the initiative of network maintenance.
[0183] Based on the foregoing embodiments, embodiments of this application provide a computer-readable storage medium storing one or more programs, which can be executed by one or more processors to implement... Figures 1-3 The steps of the gateway information determination method provided in the corresponding embodiment.
[0184] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of hardware embodiments, software embodiments, or embodiments combining software and hardware aspects. Furthermore, this application can take the form of a computer program product implemented on one or more computer-usable storage media (including, but not limited to, disk storage and optical storage) containing computer-usable program code.
[0185] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0186] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0187] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0188] The above description is merely a preferred embodiment of this application and is not intended to limit the scope of protection of this application.
Claims
1. A method for determining gateway information, characterized in that, The method includes: Obtain the values of target parameters for the Internet Protocol (IP) packets of the gateway to be analyzed; wherein, the target parameters characterize the forwarding performance of the IP packets; the values of the target parameters include the Time-to-Live (TTL) information. Based on the value of the target parameter and the target value of the target parameter, the cascading information of the third-party router corresponding to the gateway to be analyzed is determined; The step of determining the cascading information of the third-party router corresponding to the gateway to be analyzed based on the value of the target parameter and the target value of the target parameter includes: The TTL information is encapsulated to obtain TTL information in the form of a queue; Determine the target value of the TTL information of the IP packets of the gateway to be analyzed; If the value of the target format TTL information is determined to be valid data based on the TTL information value, the target value of the TTL information, and the initial concatenation depth of the third-party router, then the concatenation information of the third-party router corresponding to the gateway to be analyzed is determined. Whether the value of the target format TTL information is valid data is determined by comparing the value of the target format TTL information with the target value, and then comparing the value of the target format TTL information with the determined target value, and then determining the result based on the results of these two comparisons. The step of determining the cascading information of the third-party router corresponding to the gateway to be analyzed includes: Determine whether the initial concatenation depths corresponding to the values of the TTL information existing in the form of a queue are all the same within a target time period; If the initial concatenation depths are all the same, determine the number of times the TTL information corresponding to the initial concatenation depth is determined; Determine the third relationship between the number of times the TTL information is obtained and the data packets captured within the target time period; If the third relationship satisfies the target relationship, the cascading depth of the third-party router corresponding to the gateway to be analyzed is determined as the initial cascading depth; If the initial concatenation depths are not the same, the TTL information of the IP packets of the gateway to be analyzed is re-acquired until the concatenation depth of the third-party router corresponding to the gateway to be analyzed is determined.
2. The method according to claim 1, characterized in that, The process of obtaining the target parameter value of the IP packet of the gateway to be analyzed includes: Once it is determined that the operating performance of the device to be analyzed corresponding to the gateway to be analyzed meets the target conditions, the packet capture function is enabled. Based on the packet capture function, the Time-to-Live (TTL) value of the IP packets of the gateway to be analyzed sent by the device to be analyzed is received.
3. The method according to claim 2, characterized in that, The step of enabling packet capture functionality when the operating performance of the device to be analyzed corresponding to the gateway to be analyzed meets the target conditions includes: Obtain the CPU utilization and data transfer rate of the device to be analyzed; If the CPU utilization rate meets the first threshold and the transmission traffic meets the second threshold, the operating performance of the device to be analyzed meets the target conditions, and the packet capture function is enabled.
4. The method according to claim 1, characterized in that, When the value of the TTL information in the target format is determined to be valid data based on the value of the TTL information and the target value of the TTL information, the cascading information of the third-party router corresponding to the gateway to be analyzed is determined, including: Based on the value of each TTL information that exists in the form of a queue, the initial cascading depth of the third-party router corresponding to the gateway to be analyzed is determined; For the TTL information existing in the form of a queue, based on the relationship between the value of each TTL information and the target value and the initial concatenation depth corresponding to the value of each TTL information, it is determined whether the value of each TTL information existing in the form of a queue is valid data; If the TTL information of the target format is determined to be valid data, the cascading information of the third-party router corresponding to the gateway to be analyzed is determined.
5. The method according to claim 4, characterized in that, The determination of whether the value of each TTL information existing in the queue is valid data, based on the relationship between the value of each TTL information and the target value and the initial concatenation depth corresponding to the value of each TTL information, includes: For the TTL information that exists in the form of a queue, determine a first relationship between the value of each TTL information and the target value; An intermediate value is determined based on the initial concatenation depth corresponding to the value of each TTL information and the target value; Determine a second relationship between the value of each TTL information and the corresponding intermediate value; If the first relationship satisfies the first target relationship and the second relationship satisfies the second target relationship, the value of the TTL information existing in the form of a queue is determined to be valid data.
6. The method according to claim 2, characterized in that, The TTL information of the IP packets of the gateway to be analyzed and the corresponding number of times are stored in target format.
7. A gateway information determination device, characterized in that, The device includes: a processor, a memory, and a communication bus; The communication bus is used to realize the communication connection between the processor and the memory; The processor is used to execute a gateway information determination program in the memory to implement the steps of the gateway information determination method as described in any one of claims 1 to 6.
8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores one or more programs, which can be executed by one or more processors to implement the steps of the gateway information determination method as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Method and device for determining network topology structure and electronic equipment
CN113098704A