Method and apparatus for locating path failure node
By receiving requests and obtaining node status in the content distribution network, and adding response codes to locate faulty nodes, the problem of low efficiency in locating path faulty nodes is solved, and fast and accurate fault identification and diagnosis are achieved.
Patent Information
- Application Number
- CN202411702014.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-26
- Publication Date
- 2025-10-14
- Estimated Expiration
- 2044-11-26
AI Technical Summary
In content distribution networks, as the number of nodes increases and the network structure becomes more complex, the efficiency of locating path fault nodes is low, and it is difficult to accurately locate the faulty nodes.
By receiving network requests and path request instructions, the status of each node is obtained, and a response code is added to the response information. The response code in the response flow information is used to locate the faulty node, form a faulty node list, and provide clear path information for rapid diagnosis and resolution of problems.
It improves the efficiency of locating path fault nodes, simplifies the fault diagnosis process, and realizes real-time monitoring of network health and rapid identification of fault nodes.
Smart Images

Figure CN119583327B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of computer, in particular to a path fault node positioning method and device thereof. BACKGROUND
[0002] In a content delivery network (CDN) system, a user's request can be redirected to the nearest service node according to the network traffic, the connection and load status of each node, the distance to the user, the response time and other comprehensive information in real time. The purpose is to enable the user to obtain the required content nearby, and improve the response speed of the user accessing the website.
[0003] The traditional CDN acceleration performs hierarchical caching on static resources, and for some frequently changing dynamic resources, the dynamic acceleration technology can be used to make the request pass through the optimized transmission network and be forwarded layer by layer to the source station. Specifically, a detection component is used to detect the nodes to obtain the network conditions between the nodes, including but not limited to the transmission round-trip delay, the first packet time, the packet loss rate and the like. The detection component calculates the weight between the nodes according to the detection data by different algorithms, and reports it to a path calculation server. The path calculation server calculates the optimal multiple paths by using the Dijkstra algorithm or the like, and then sends them to the gateway. When a user initiates a request to the edge gateway, the request will be forwarded layer by layer according to the existing path until the source station, so as to achieve the purpose of access optimization and acceleration.
[0004] However, with the increase of the number of nodes and the complexity of the network structure, once a path fault occurs, it takes a long time to locate the fault node, and it is difficult to accurately locate the fault node. Therefore, there is an urgent need for a computer method and device capable of improving the efficiency of locating the path fault node. SUMMARY
[0005] Therefore, it is necessary to provide a path fault node positioning method and device capable of improving the efficiency of locating the path fault node in view of the above technical problems.
[0006] In a first aspect, the present application provides a path fault node positioning method, which comprises:
[0007] receiving a network request and a path request instruction, and determining a path based on the path request instruction;
[0008] sending the network request based on the path, and acquiring the state of each node in the path during the sending of the network request;
[0009] adding a response code corresponding to the state of each node in the path to the response information of each node in the path based on the state of each node in the path;
[0010] Obtaining the response information and determining the response flow information of the path;
[0011] When it is determined based on the response flow information that an abnormality exists, a faulty node in the path is located according to a response code of the response flow information in the path where the abnormality exists.
[0012] In one embodiment, the response code includes an exception response code, and the locating a faulty node in the path according to the response code of the response flow information in the path where the exception exists, when determining that an exception exists based on the response flow information, includes:
[0013] In a case where the response code includes an abnormal response code, it is determined that the response of the source station in the path is abnormal.
[0014] In one embodiment, the path has a parent node, and locating a faulty node in the path based on a response code of the response flow information in the path where the abnormality exists, when determining that an abnormality exists based on the response flow information, includes:
[0015] If the response code cannot be obtained, determining that a node segment between the source station and the parent node in the path is abnormal;
[0016] and / or,
[0017] The path does not have a parent node, and the locating a fault node in the path according to a response code of the response flow information in the path where the abnormality exists, when determining that an abnormality exists based on the response flow information, includes:
[0018] If the response code cannot be obtained, it is determined that a node segment between the source station and the edge gateway in the path is abnormal.
[0019] In one embodiment, the path has a parent node, and locating a faulty node in the path based on a response code of the response flow information in the path where the abnormality exists, when determining that an abnormality exists based on the response flow information, includes:
[0020] Determine the current parent node;
[0021] Determine the previous node of the current parent node and the response code of the previous node, and record the response code of the previous node into the response code of the current parent node to form a spliced response code;
[0022] The splicing response code is obtained, and the faulty node is located in the splicing response code.
[0023] In one embodiment, obtaining the splicing response code and locating the faulty node in the splicing response code includes:
[0024] The concatenated response code is segmented based on the target separator to obtain a response code for each node.
[0025] In one embodiment, after determining that an abnormality exists based on the response flow information, locating a faulty node in the path according to a response code of the response flow information in the path where the abnormality exists, the method includes:
[0026] The fault nodes are counted and a fault node list is formed, wherein the fault nodes at least include the fault node, the fault node segment, and the fault cause.
[0027] In one embodiment, the counting of the faulty nodes and forming a faulty node list, wherein the faulty nodes at least include the faulty node, the faulty node segment, and the fault cause, further includes:
[0028] In response to a retry instruction, obtaining a retry path when the state of the current node is an edge node;
[0029] In the case that the retry path includes the faulty node in the faulty node list, the path related to the faulty node is deleted to form a new retry path.
[0030] In one embodiment, the step of responding to the retry instruction, after obtaining the retry path when the current node is in the edge node state, includes:
[0031] In a case where the retry path includes a faulty node in the faulty node list, a retry path from the current node to the source station is added.
[0032] In one embodiment, the counting of the faulty nodes and forming a faulty node list, wherein the faulty nodes at least include the faulty node, the faulty node segment, and the fault cause, further includes:
[0033] In response to a new path request instruction, acquiring multiple new paths of the new path request instruction;
[0034] When a node of the plurality of new paths is found in the fault node list, a path related to the fault node is deleted from the plurality of new paths.
[0035] In a second aspect, the present application further provides a path fault node location device, the device comprising:
[0036] A receiving module, configured to receive a network request and a path request instruction, and determine a path based on the path request instruction;
[0037] an obtaining module, configured to obtain statuses of nodes in the path based on sending the network request, and obtain the statuses of the nodes in the path in the process of sending the network request;
[0038] an adding module, configured to add response codes corresponding to the statuses of the nodes in the path in response information of the nodes in the path based on the statuses of the nodes in the path;
[0039] a determining module, configured to obtain the response information, and determine response flow information of the path;
[0040] a positioning module, configured to, based on a determination that there is an exception based on the response flow information, locate a faulty node in the path according to a response code of the response flow information in the path in which the exception exists.
[0041] In a third aspect, the present application further provides a computer device, comprising a memory and a processor, the memory stores a computer program, and the processor implements the following steps when executing the computer program:
[0042] receiving a network request and a path request instruction, and determining a path based on the path request instruction;
[0043] sending the network request based on the path, and obtaining statuses of nodes in the path in the process of sending the network request;
[0044] adding response codes corresponding to the statuses of the nodes in the path in response information of the nodes in the path based on the statuses of the nodes in the path;
[0045] obtaining the response information, and determining response flow information of the path;
[0046] based on a determination that there is an exception based on the response flow information, locating a faulty node in the path according to a response code of the response flow information in the path in which the exception exists.
[0047] In a fourth aspect, the present application further provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the following steps:
[0048] receiving a network request and a path request instruction, and determining a path based on the path request instruction;
[0049] sending the network request based on the path, and obtaining statuses of nodes in the path in the process of sending the network request;
[0050] adding response codes corresponding to the statuses of the nodes in the path in response information of the nodes in the path based on the statuses of the nodes in the path;
[0051] Obtaining the response information and determining the response flow information of the path;
[0052] When it is determined based on the response flow information that an abnormality exists, a faulty node in the path is located according to a response code of the response flow information in the path where the abnormality exists.
[0053] In a fifth aspect, the present application further provides a computer program product, comprising a computer program, which, when executed by a processor, implements the following steps:
[0054] receiving a network request and a path request instruction, and determining a path based on the path request instruction;
[0055] Sending the network request based on the path, and obtaining the status of each node in the path during the process of sending the network request;
[0056] Based on the status of each node in the path, adding a response code corresponding to the node status to the response information of each node in the path;
[0057] Obtaining the response information and determining the response flow information of the path;
[0058] When it is determined based on the response flow information that an abnormality exists, a faulty node in the path is located according to a response code of the response flow information in the path where the abnormality exists.
[0059] The above-mentioned path fault node location method and its device, computer equipment, computer-readable storage medium and computer program product determine the path through the path request instruction, thereby increasing the probability that the network request can be transmitted along the predetermined path, and also providing clearer path information for subsequent fault diagnosis, making the problem location more accurate. Moreover, while sending the network request, the node status information is collected, so that the system can monitor the health of the network in real time. Furthermore, by adding a response code to each node, the system can represent the status of the node in a standardized manner. This simplifies the fault diagnosis process. At the same time, the use of the response code also enables the system to more accurately judge the status of the node. Afterwards, based on the response code in the response flow information, the faulty node in the path can be quickly located, so that the system can quickly take measures to solve the problem. BRIEF DESCRIPTION OF THE DRAWINGS
[0060] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the following briefly introduces the drawings required for use in the embodiments of the present application or related technical descriptions. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying any creative work.
[0061] Figures 1 to 9 A flowchart of a path fault node locating method provided for different embodiments is shown in the following figure.
[0062] Figure 10 A structure block diagram of a path fault node locating apparatus provided for an embodiment is shown in the following figure.
[0063] Figure 11 An internal structure diagram of a computer device in an embodiment is shown in the following figure. DETAILED DESCRIPTION
[0064] In order to make the objects, technical solutions and advantages of the present application clearer, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and should not be used to limit the present application.
[0065] Please refer to Figures 1 to 9 The path fault node locating method provided by the embodiments of the present application can be applied in a terminal and server environment. The terminal can be, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers, Internet of Things devices, etc. The server can be a stand-alone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services.
[0066] In an embodiment, as shown in Figure 1 , Figure 2 , Figure 3 and Figure 4 , a path fault node locating method is provided. The present embodiment takes the method applied in a terminal as an example for illustration. It should be understood that the method can also be applied in a server, and can also be applied in a system including a terminal and a server, and can be realized through the interaction of the terminal and the server. In the present embodiment, the method includes the following steps:
[0067] Step S10: receiving a network request and a path request instruction, and determining a path based on the path request instruction.
[0068] Step S20: sending the network request based on the path, and acquiring the state of each node in the path in the process of sending the network request.
[0069] Step S30: adding a response code corresponding to the state of each node in the path to the response information of each node in the path based on the state of each node in the path.
[0070] Step S40: acquiring the response information, and determining the response flow information of the path.
[0071] Step S50: When it is determined that an abnormality exists based on the response flow information, the fault node in the path is located according to the response code of the response flow information in the path where the abnormality exists.
[0072] Step S10: receiving a network request and a path request instruction, and determining a path based on the path request instruction.
[0073] In step S10, the network request may be initiated by a user or by another system or service. The network request has a corresponding path request instruction. The path request instruction specifies the path that the network request follows, that is, which nodes (such as routers, switches, servers, etc.) should be passed through in the network from the edge gateway to the source station. Based on the path request instruction, the system can calculate the optimal or specified path, which is used for the transmission of the network request.
[0074] In step S20, the system starts sending a network request, and while sending the request, the system collects and records the status information of each node on the path. This status information may include whether the node responds normally, etc. As an example, the status information may include the content of a successful return response, failure to establish a successful connection (due to reasons such as abnormal service at the source station or network abnormality between the parent node and the source station), and the content of an abnormal response code (due to reasons such as inaccessible corresponding resources and no configured host).
[0075] In step S30, the system can evaluate the status of each node and, based on the evaluation results, add a response code to each node's response information. This response code can indicate the node's status. For example, the response code can be stored in a custom response header. Of course, different status information can have different response codes, which can be preset.
[0076] In step S40, the system collects the response information of all nodes (including the added response code). By analyzing these response information, the system can construct the response flow information of the entire path, that is, how the network request flows on the path and is processed by each node.
[0077] In step S50, the system can check the response code of each node. When encountering a response code indicating an abnormality or fault, the system can locate the faulty node on the path based on the abnormality or fault response code, thereby facilitating the rapid implementation of appropriate repair measures.
[0078] In the embodiment, the path is determined by the path request instruction, the probability that the network request can be transmitted according to the predetermined path is improved, clear path information is provided for subsequent fault diagnosis, and problem positioning is more accurate. Moreover, the node state information is collected while the network request is transmitted, so that the system can monitor the health status of the network in real time. Further, the embodiment adds a response code to each node, so that the system can represent the state of the node in a standardized manner. This simplifies the process of fault diagnosis. Meanwhile, the use of the response code enables the system to more accurately determine the state of the node, and then the response code in the response flow information can be used to quickly locate the fault node in the path, so that the system can quickly take measures to solve the problem.
[0079] In one embodiment, the path can include a source station, and it can be understood that the path can be connected to the source station from the edge gateway. At this time, the edge gateway and the source station can have a parent node or can not have a parent node. The response code includes an abnormal response code. The embodiment does not limit the specific form of the abnormal response code. As an example, the abnormal response code can include a combination of numbers, letters, and symbols. Correspondingly, in a first possible example, step S50 can include:
[0080] Step S51: In the case where the response code includes an abnormal response code, it is determined that the source station in the path responds abnormally.
[0081] When the system collects the response information of all nodes, the response codes are checked one by one. The normal response code indicates that the node does not have any problem in processing the request, and the abnormal response code indicates that the source station responds abnormally, which can be caused by the failure of the source station itself, insufficient resources, configuration errors, etc. Further, the abnormal response code can have different forms, and different forms represent different reasons for the abnormal response of the source station. The system can determine the fault reason through the specific abnormal response code and mark the source station. As an example, the system can record fault information, send an alarm to the administrator, try to resend the request to a backup source station, or take other recovery measures. Specifically, in the case where the current path contains a parent node or does not contain a parent node, and the response code includes an abnormal response code, it can be considered that the current source station responds abnormally.
[0082] In a second possible example, the path has a source station and a parent node, and step S50 can include:
[0083] Step S52: In the case where the response code cannot be obtained, it is determined that the node segment between the source station and the parent node in the path is abnormal.
[0084] Alternatively, the path does not have a parent node, and step S50 can include:
[0085] Step S53: In the case where the response code cannot be acquired, it is determined that the node segment between the source station and the edge gateway in the path is abnormal.
[0086] In the case where the source station and the back-to-source parent node cannot be associated, the response header is not defined, and the response header is not assigned, so that the back-to-source parent node cannot acquire the response code, and the edge node cannot acquire the content of the response header. Therefore, in the case where the response code cannot be acquired, it can be judged that the source station address (IP) and the back-to-source parent node cannot be associated, and the back-to-source parent node-source station IP can be marked. Of course, after the back-to-source parent node-source station IP is marked, the system will trigger the corresponding fault handling mechanism. This can include recording fault information, sending an alarm to the administrator, attempting to bypass the fault node segment, or using other recovery measures. In addition, if the current path does not contain the parent node, i.e., the edge directly back-to-source scenario, the condition that it is both the edge and the back-to-source node is met. In the case where the response code cannot be acquired (the upstream node has no response code), the edge and the current source station IP cannot be successfully associated.
[0087] In a third possible example, if the source station and the back-to-source parent node can be normally associated, and the source station can also return normal corresponding content to the back-to-source parent node, the back-to-source parent node can acquire the response code of the source station, and store the response code in the response header defined response header, so that the edge node can know the state of the source station. Alternatively, if the current path does not contain the parent node, i.e., the edge directly back-to-source scenario, the condition that it is both the edge and the back-to-source node is met, the state of the back-to-source IP can be known by acquiring the upstream node state information. If the upstream node information is the response code of the source station, the current source station response is normal.
[0088] In addition, after the edge node judges the state of the source station, the added response header defined response header is emptied, and the client is responded to.
[0089] The following example illustrates the specific process of this embodiment. After the network request arrives at the content distribution network node, the route is set at the edge gateway according to the selected dynamic path. If the link is unobstructed, the request will be passed to the source station node by node. After the source station responds, the response content will be returned to the edge node step by step. There are three types of source station node status: successfully returning the response content to the source parent node or edge node; unable to successfully establish the connection; responding with an abnormal response code content. If the current path contains a parent node, that is, it is not a direct return path to the source, then the current response code is obtained at the source parent node. If the response code is a specific value, it is saved in the response header custom response header (origin_status) and continuously transmitted forward until it is returned to the edge node. At this point, the edge node can judge the source station status through the response header content and mark the source station address. If the response header content is an abnormal response code, it is an abnormal response code of the source station response. The source station response is abnormal. According to the specific abnormal response code, the cause of the fault can also be judged and the source station can be marked. If the origin server and the back-to-origin parent node cannot establish a connection, the back-to-origin parent node cannot obtain a response code, and the custom response header is not assigned. Therefore, the edge node cannot obtain the response header content. This method determines that the origin server IP address and the back-to-origin parent node cannot establish a connection, and the back-to-origin parent node-origin server IP address can be marked. If the origin server and the back-to-origin parent node can establish a normal connection and the origin server can return normal content to the back-to-origin parent node, the back-to-origin parent node can obtain the origin server's response code, such as 2xx or 3xx, and store this response code in the custom response header, allowing the edge node to determine the origin server status. If the current path does not include a parent node, that is, an edge-to-origin direct back-to-origin scenario, then the edge node meets the conditions of being both an edge and a back-to-origin node. The back-to-origin IP address status can be determined by obtaining upstream node status information. If the upstream node information is 2xx or 3xx, the current origin server response is normal; if the upstream node information is an abnormal response code, the current origin server response is abnormal; if the upstream node does not have a response code, the edge node cannot establish a successful connection with the current origin server IP address. After the edge node determines the status of the source server, it clears the added custom response header and responds to the client.
[0090] In one embodiment, a path has multiple parents. For example, see Figure 4 , there is a common parent layer between the back-to-source parent layer and the common edge gateway. Figure 5 , step S50 includes:
[0091] Step S54: Determine the current parent node.
[0092] Step S55: Determine the previous parent node of the current parent node and the response code of the previous parent node, and record the response code of the previous node into the response code of the current parent node to form a concatenated response code.
[0093] Step S56: Obtain the splicing response code and locate the faulty node in the splicing response code.
[0094] In step S54, the current parent node refers to the node that directly processes the current network request. As an example, the system identifies each node on the path and determines the current parent node based on configuration information or network topology.
[0095] In step S55, the system continues tracing back to the previous parent node of the current parent node. The system then reads and records the response code of the previous parent node and adds it to the response code of the current parent node, generating a concatenated response code that contains the states of multiple nodes. The system then repeats this process until it reaches the source node.
[0096] In step S56, the concatenated response code contains status information of multiple nodes on the path. The system needs to identify which nodes' response codes indicate abnormal status. As an example, at this point, by comparing with a preset abnormal response code list or rule, the faulty node can be accurately located. Specifically, step S56 may include:
[0097] Step S561: Segment the concatenated response code based on the target delimiter to obtain the response code of each parent node.
[0098] The system first determines the target delimiter. This target delimiter can also be preset. A delimiter can be a special character or string used to distinguish response codes from different nodes when concatenating response codes. For example, if each node's response code is separated by a comma, then the comma is the target delimiter. Of course, target delimiters can also include decimals, semicolons, or slashes. After determining the target delimiter, the system uses it to split the concatenated response code. This splitting process breaks the entire concatenated response code into multiple independent strings, each representing the response code of a parent node.
[0099] The following is an example of the specific process of this embodiment. Figure 3After the network request reaches the content distribution network node, the route is set at the edge gateway according to the selected dynamic path. If the link is unobstructed, the request is passed to the source station node by node. After the source station responds, the response content is returned to the edge node step by step. In the normal response path, when the source station responds normally, the parent node back to the source can obtain the response code of the previous node as a normal response code. The response code is recorded in the parent node response header (parent_status). After the previous hop of the parent node back to the source obtains the response code of the parent node back to the source, it is spliced into the parent node response header. Similarly, at the edge node, the upstream node response code information of all nodes except the edge node can be obtained. If a node in the path fails, the edge node can split the response header content according to the added parent node response header and the exact delimiter. The split content is the upstream status of each hop. The response code of 0 or abnormal is the node with the fault and the corresponding fault cause, so that the abnormal node and its abnormal cause can be accurately located. Afterwards, because edge nodes do not perform response header splicing operations, determining the status of the parent 1 node requires obtaining the response code of the previous node. If the response code of the previous node is empty, it means that the edge failed to establish a connection with the parent 1 node; if the response code of the previous node exists but is an abnormal response code, the parent 1 node responded abnormally; if the response code of the previous node exists and is a normal response code, the parent 1 node responded normally. However, in this scenario, the parent 1 node should also obtain the response code of the previous node, and even if the connection fails, it will store 0 in the response header, so this scenario does not exist. After the edge node determines the status of the source station, it clears the added response header and the parent node response header and responds to the client.
[0100] In this embodiment, based on the aforementioned source station status and parent node status determination, the edge node obtains the entire path response flow information and quickly marks the faulty node or node segment accordingly. By tracing back the transparently transmitted response code splicing header, and determining whether a specific status is found at the end, it can quickly determine whether to mark the faulty node or node segment.
[0101] In one embodiment, see Figure 6 , after step S50, including:
[0102] Step S60: Count the fault nodes and form a fault node list. The fault nodes at least include the fault node, the fault node segment, and the fault cause.
[0103] At this point, all identified faulty nodes from the previous steps can be collected. Each faulty node can contain necessary information, such as the node identifier (e.g., IP address, device name), node type (e.g., router, switch, server), and the node's location in the network. For faults involving multiple nodes (e.g., network segment failure), the range of nodes or network segments affected by the fault can also be determined.
[0104] Afterwards, the information about all failed nodes can be compiled into a failed node list. This list can include the identifier, type, location, failed node segment, and failure cause of each failed node. Additionally, this list can include other relevant information as needed, such as the time the failure occurred, the business or service affected, and the initial measures taken.
[0105] In this embodiment, forming a list of fault nodes facilitates subsequent fault resolution and improves retry efficiency.
[0106] Exemplarily, the list of fault nodes can be shown in the following table. Among them, ID represents the fault node number, and type represents the classification of the fault node. Types may include nodes, node segments, and source stations, etc. The content can represent a specific fault node (abnormal status code or connection failure timeout, etc.). When the type of the fault node is a node, the content can be represented as the specific address of the node (for example, IP1). When the type of the fault node is a node segment, the content can be represented as the two ends of the node segment (for example, IP1-IP2). When the type of the fault node is a source station, the content can be represented as the source station IP2. Time can be used to indicate the time when the fault was first discovered. This embodiment does not impose specific restrictions on this.
[0107] ID type content state time 1 node IP1 4.3 1719479639 2 Node segment IP1-IP2 time out 1719479657 3 Origin Origin server IP 502 1719479663 ... ... ... ... ...
[0108] In one embodiment, a path filtering module can be set to filter routing and retry routing to avoid reusing failed paths. Figure 4 The path filtering module can include multiple path filtering components, each of which can be connected to a corresponding edge gateway. The dynamic path central computing service can issue paths based on network requests. The dynamic path proxy service node can perform quality detection and reporting and issue dynamic paths. It can also be connected to each ordinary edge gateway and the back-to-source edge gateway. In addition, it can also be connected to the path filtering component to obtain negative feedback. Each ordinary edge gateway and the back-to-source edge gateway can also be connected to the client to send content returned by the source station to the client.
[0109] For details, please refer to Figure 7 After step S60, the following steps may be included:
[0110] Step S70: In response to the retry instruction, when the current node is in the edge node state, a retry path is obtained.
[0111] Step S71: In the case where the retry path includes a faulty node in the faulty node list, the path related to the faulty node is deleted to form a new retry path.
[0112] In step S70, the retry instruction can be used to resend the request or data when the initial attempt fails or encounters a problem. First, the system needs to check whether the current node is in the state of the edge node. If the current node is an edge node and has received a retry instruction, the system needs to determine a new retry path. The retry path can be determined based on network topology, current network conditions, historical data, or other factors. The present embodiment does not make specific restrictions on the selection of the retry path.
[0113] In step S71, after determining the retry path, the system needs to check whether this path contains any node in the list of failed nodes. In one possible example, for a failed intermediate node, delete the node and all nodes between it and the source station to form a new retry path. In another possible example, for a failed source station, delete all paths related to the source station. In yet another possible example, for a failed node segment, delete the node segment and all nodes between it and the source station to form a new retry path. The system can again use the retry path to send network requests.
[0114] In addition, please refer to Figure 8 , after step S70, it can also include:
[0115] Step S72: In the case where the retry path includes a failed node in the list of failed nodes, add a retry path from the current node to the source station.
[0116] In the present embodiment, by adding a path filtering module, the stability and reliability of the routing system can be improved, and the number of retries and request failures caused by failed nodes can be reduced. Moreover, in the present embodiment, the system can also add a retry path that directly returns from the edge gateway to the source station, thereby providing additional opportunities for attempts when the main path fails. Specifically, for the current request when the failure path appears, since all paths have been loaded, when retrying, it is determined whether the retryable path contains a failed node in the list of failed nodes, and the position of the failed node or failed node segment in the retry path is analyzed. For a failed intermediate node, the path filtering module deletes the intermediate node and all nodes between it and the source station as a new retry path, and additionally adds an edge direct return source retry path; for a failed source station, the path filtering module deletes all paths related to the source station; for a failed node segment, the path filtering module deletes the node segment and all nodes between it and the source station as a new retry path, and additionally adds an edge direct return source retry path. In addition, when updating the path, the path filtering module adds a de-duplication process for the updated path.
[0117] In one embodiment, please refer to Figure 9 , after step S60, it can include:
[0118] Step S80: In response to the new path request instruction, a plurality of new paths of the new path request instruction are acquired.
[0119] Step S81: In the case where the nodes of the plurality of new paths are found in the fault node list, the paths related to the fault nodes are deleted from the plurality of new paths.
[0120] In step S80, the new path request instruction can be used to request one or more new transmission paths. As an example, the system calculates a plurality of possible new paths according to the network topology, the current network conditions, historical data or other factors. These paths should be able to bypass the known fault nodes.
[0121] In step S81, after the plurality of new paths are acquired, the system can check whether these paths contain any node in the fault node list. If a new path contains a node in the fault node list, this path should be deleted or marked as unavailable, so as to ensure that the data transmission does not pass through the known fault points. After the paths related to the fault nodes are deleted, the system updates the path list to only keep the paths that do not contain fault nodes, which can be used as alternative paths for data transmission.
[0122] In this embodiment, by acquiring a plurality of new paths and deleting those containing fault nodes, the reliability and efficiency of data transmission are improved. Specifically, for new requests, the path filtering module plays a role when routing distribution has not started at the beginning of routing selection, and filters the paths according to the currently maintained fault node list using the same filtering mechanism as in the retry. If there are many abnormal node segments, resulting in fewer paths after filtering, the expiration mechanism can be used for the fault node list to release. In addition, for new requests, the number threshold limit of fault nodes, source stations and node segments can be increased, that is, only when the number of fault nodes exceeds a certain threshold, the fault nodes are avoided in all requests. The survival period of the fault node list maintained by the path filtering module can be limited to the reception of the next intelligent routing result.
[0123] In one embodiment, in the case of large network fluctuations, the path filtering module maintains more fault nodes, resulting in fewer paths after filtering or even no path. At this time, a path number threshold or a path original proportion threshold can be set, which can be customized according to the scene requirements. When the threshold is less than the threshold, the path filtering module feeds back the abnormal nodes and time to the intelligent routing component, and the routing component calculates the path using the probe data after the abnormal time (to avoid issuing abnormal paths again) and reissues the path. At this time, the path filtering module resets the fault node list.
[0124] It should be understood that although the steps in the flowcharts involved in the embodiments described above are shown in sequence according to the arrows, the steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified herein, the execution of the steps is not strictly limited in sequence, and the steps can be executed in other orders. Moreover, at least some of the steps in the flowcharts involved in the embodiments described above can include multiple steps or multiple stages, which are not necessarily executed at the same time, but can be executed at different times, and the execution order of the steps or stages is not necessarily sequential, but can be alternately or alternately executed with at least part of other steps or steps or stages in other steps.
[0125] Based on the same inventive concept, the embodiments of the present application also provide a path fault node positioning device for implementing the path fault node positioning method described above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme described in the above method, so the specific limitations in one or more path fault node positioning device embodiments provided below can refer to the limitations of the path fault node positioning method described above, which will not be repeated here.
[0126] In one exemplary embodiment, as shown in Figure 10 A path fault node positioning device is provided, comprising: a receiving module, an obtaining module, an adding module, a determining module and a positioning module, wherein:
[0127] The receiving module is configured to receive a network request and a path request instruction, and determine a path based on the path request instruction.
[0128] The obtaining module is configured to send the network request based on the path, and obtain the state of each node in the path during the sending of the network request.
[0129] The adding module is configured to add a response code corresponding to the state of each node in the path to the response information of each node in the path based on the state of each node in the path.
[0130] The determining module is configured to obtain the response information and determine the response flow information of the path.
[0131] The positioning module is configured to, based on the determination that there is an abnormality based on the response flow information, locate the fault node in the path according to the response code of the response flow information in the path with the abnormality.
[0132] In one embodiment, the positioning module is configured to determine that the source station in the path is abnormal in response to the response code including an abnormal response code.
[0133] In one embodiment, the path has a parent node, and the locating module is configured to determine a node segment exception between the source station and the parent node in the path when the response code cannot be acquired.
[0134] In one embodiment, the path has no parent node, and the locating module is configured to determine a node segment exception between the source station and the edge gateway in the path when the response code cannot be acquired.
[0135] In one embodiment, the path has a parent node, and the locating module is configured to determine a current parent node, determine a previous node of the current parent node and a response code of the previous node, record the response code of the previous node into the response code of the current parent node to form a spliced response code, acquire the spliced response code, and locate a fault node in the spliced response code.
[0136] In one embodiment, the locating module is configured to split the spliced response code based on a target delimiter to acquire a response code of each node.
[0137] In one embodiment, the path fault node locating apparatus includes a counting module configured to count fault nodes and form a fault node list, the fault nodes including at least a fault node, a fault node segment, and a fault cause.
[0138] In one embodiment, the path fault node locating apparatus includes a filtering module configured to acquire a retry path when a state of a current node is an edge node in response to a retry instruction, and delete a path related to a fault node in the fault node list from the retry path to form a new retry path.
[0139] In one embodiment, the filtering module is configured to add a retry path from a current node to a source station when the retry path includes a fault node in the fault node list.
[0140] In one embodiment, the filtering module is configured to acquire a plurality of new paths of a new path request instruction in response to the new path request instruction, and delete a path related to a fault node from the plurality of new paths when the fault node is found in the fault node list.
[0141] Each of the above modules in the path fault node locating apparatus can be realized by software, hardware, or a combination thereof, in whole or in part. Each of the above modules can be embedded in or independent of a processor in a computer device in hardware form, or stored in a memory in the computer device in software form, so as to be called and executed by a processor to perform operations corresponding to each of the above modules.
[0142] In one exemplary embodiment, a computer device, which can be a server, is provided, and an internal structure diagram of the computer device can be as shown in Figure 11As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, abbreviated as I / O) and a communication interface. The processor, memory and input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and computer program in the non-volatile storage medium. The database of the computer device is used to store path fault node location data. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a path fault node location method is implemented.
[0143] Those skilled in the art will understand that Figure 11 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.
[0144] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:
[0145] Step S10: receiving a network request and a path request instruction, and determining a path based on the path request instruction.
[0146] Step S20: Send a network request based on the path, and in the process of sending the network request, obtain the status of each node in the path.
[0147] Step S30: Based on the status of each node in the path, add a response code corresponding to the node status to the response information of each node in the path.
[0148] Step S40: Acquire response information and determine the response flow information of the path.
[0149] Step S50: When it is determined that an abnormality exists based on the response flow information, the fault node in the path is located according to the response code of the response flow information in the path where the abnormality exists.
[0150] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0151] Step S51: In the case that the response code includes an abnormal response code, it is determined that the source station in the path responds abnormally.
[0152] In one embodiment, the processor, when executing the computer program, further implements the following steps:
[0153] Step S52: In the case that the response code cannot be acquired, it is determined that the node segment between the source station and the parent node in the path is abnormal.
[0154] In one embodiment, the processor, when executing the computer program, further implements the following steps:
[0155] Step S53: In the case that the response code cannot be acquired, it is determined that the node segment between the source station and the edge gateway in the path is abnormal.
[0156] In one embodiment, the processor, when executing the computer program, further implements the following steps:
[0157] Step S54: The current parent node is determined.
[0158] Step S55: The last parent node of the current parent node and the response code of the last parent node are determined, and the response code of the last node is recorded into the response code of the current parent node to form a spliced response code.
[0159] Step S56: The spliced response code is acquired, and the faulty node is located in the spliced response code.
[0160] In one embodiment, the processor, when executing the computer program, further implements the following steps:
[0161] Step S561: The spliced response code is segmented based on the target delimiter to acquire the response code of each parent node.
[0162] In one embodiment, the processor, when executing the computer program, further implements the following steps:
[0163] Step S60: The faulty node is counted, and a faulty node list is formed, the faulty node at least including the faulty node, the faulty node segment, and the faulty reason.
[0164] In one embodiment, the processor, when executing the computer program, further implements the following steps:
[0165] Step S70: In response to a retry instruction, a retry path is acquired when the state of the current node is an edge node.
[0166] Step S71: In the case that the retry path includes the faulty node in the faulty node list, the path related to the faulty node is deleted to form a new retry path.
[0167] In one embodiment, the processor, when executing the computer program, further implements the following steps:
[0168] Step S72: in case that the retry path includes a failure node in the failure node list, increasing the retry path from the current node to the source station.
[0169] In one embodiment, the computer program, when executed by the processor, further implements the following steps:
[0170] Step S80: in response to the new path request instruction, obtaining multiple new paths of the new path request instruction.
[0171] Step S81: in case that a node of the multiple new paths is found in the failure node list, deleting a path related to the failure node from the multiple new paths.
[0172] In one embodiment, a computer readable storage medium is provided, and the computer readable storage medium stores a computer program, and the computer program, when executed by the processor, implements the following steps:
[0173] Step S10: receiving a network request and a path request instruction, and determining a path based on the path request instruction.
[0174] Step S20: sending the network request based on the path, and obtaining a state of each node in the path in the process of sending the network request.
[0175] Step S30: adding a response code in response information of each node of the path based on the state of each node in the path.
[0176] Step S40: obtaining the response information, and determining response flow information of the path.
[0177] Step S50: locating a failure node in the path based on the response code in the response flow information.
[0178] In one embodiment, the computer program, when executed by the processor, further implements the following steps:
[0179] Step S51: in case that the response code includes an abnormal response code, determining that a source station in the path responds abnormally.
[0180] In one embodiment, the computer program, when executed by the processor, further implements the following steps:
[0181] Step S52: in case that the response code cannot be obtained, determining that a node segment between the source station and a parent node in the path is abnormal.
[0182] In one embodiment, the computer program, when executed by the processor, further implements the following steps:
[0183] Step S53: in case that the response code cannot be obtained, determining that a node segment between the source station and an edge gateway in the path is abnormal.
[0184] In one embodiment, the computer program, when executed by the processor, further implements the following steps:
[0185] Step S54: determining the current parent node.
[0186] Step S55: determining the last parent node of the current parent node and the response code of the last parent node, and recording the response code of the last node into the response code of the current parent node to form a spliced response code.
[0187] Step S56: obtaining the spliced response code and locating the faulty node in the spliced response code.
[0188] In one embodiment, the computer program, when executed by the processor, further implements the following steps:
[0189] Step S561: based on the target delimiter, the spliced response code is segmented to obtain the response code of each parent node.
[0190] In one embodiment, the computer program, when executed by the processor, further implements the following steps:
[0191] Step S60: counting the faulty nodes and forming a faulty node list, the faulty nodes at least including the faulty node, the faulty node segment, and the fault reason.
[0192] In one embodiment, the computer program, when executed by the processor, further implements the following steps:
[0193] Step S70: in response to a retry instruction, obtaining a retry path when the state of the current node is an edge node.
[0194] Step S71: in the case that the retry path includes the faulty node in the faulty node list, deleting the path related to the faulty node to form a new retry path.
[0195] In one embodiment, the computer program, when executed by the processor, further implements the following steps:
[0196] Step S72: in the case that the retry path includes the faulty node in the faulty node list, adding a retry path from the current node to the source station.
[0197] In one embodiment, the computer program, when executed by the processor, further implements the following steps:
[0198] Step S80: in response to a new path request instruction, obtaining multiple new paths of the new path request instruction.
[0199] Step S81: in the case that the multiple new paths find the nodes in the faulty node list, deleting the path related to the faulty node in the multiple new paths.
[0200] In one embodiment, a computer program product is provided, comprising a computer program which, when executed by a processor, implements the steps of any of the above method embodiments.
[0201] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing related hardware through a computer program. The computer program can be stored in a non-volatile computer readable storage medium, and when executed, can include the processes of the above-mentioned method embodiments. Any reference to a memory, database or other medium used in the embodiments provided in the present application can include at least one of a non-volatile memory and a volatile memory. The non-volatile memory can include a read-only memory (ROM), a magnetic tape, a floppy disk, a flash memory, an optical storage, a high-density embedded non-volatile memory, a resistive random access memory (ReRAM), a magnetoresistive random access memory (MRAM), a ferroelectric random access memory (FRAM), a phase change memory (PCM), a graphene memory, etc. The volatile memory can include a random access memory (RAM) or an external cache memory, etc. As an illustration but not limitation, the RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The database involved in the embodiments provided in the present application can include at least one of a relational database and a non-relational database. The non-relational database can include a distributed database based on a block chain, etc., without being limited thereto. The processor involved in the embodiments provided in the present application can be a general processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., without being limited thereto.
[0202] Any combination of the technical features of the above embodiments can be made. In order to make the description simple, all possible combinations of the technical features in the above embodiments have not been described, however, as long as the combination of the technical features does not exist, it should be considered as the scope of the present application.
[0203] The above-described embodiments are merely illustrative of several embodiments of the present application, and the description is relatively specific and detailed, but should not be understood as a limitation on the scope of the patent. It should be noted that for those skilled in the art, without departing from the concept of the present application, a number of modifications and improvements can be made, which are all within the scope of the present application. Therefore, the scope of protection of the present application should be subject to the appended claims.
Claims
1. A method for locating a path fault node, characterized in that: The method comprises: receiving a network request and a path request instruction, and determining a path based on the path request instruction; Sending the network request based on the path, and obtaining the status of each node in the path during the process of sending the network request; Based on the status of each node in the path, adding a response code corresponding to the node status to the response information of each node in the path; Obtaining the response information and determining the response flow information of the path; In a case where an abnormality is determined based on the response flow information, locating a faulty node in the path according to a response code of the response flow information in the path where the abnormality occurs; The path has a parent node, and the locating a fault node in the path according to a response code of the response flow information in the path where the abnormality exists, when determining that an abnormality exists based on the response flow information, includes: Determine the current parent node; Determine the previous node of the current parent node and the response code of the previous node, and record the response code of the previous node into the response code of the current parent node to form a spliced response code; The splicing response code is obtained, and the faulty node is located in the splicing response code.
2. The method for locating a path fault node according to claim 1, wherein: The response code includes an abnormal response code, and the locating a fault node in the path according to the response code of the response flow information in the path where the abnormality exists, when determining that the abnormality exists based on the response flow information, includes: In a case where the response code includes an abnormal response code, it is determined that the response of the source station in the path is abnormal.
3. The method for locating a path fault node according to claim 1, wherein: The path has a parent node, and locating a fault node in the path according to a response code of the response flow information in the path where the abnormality exists, when determining that an abnormality exists based on the response flow information, includes: If the response code cannot be obtained, determining that a node segment between the source station and the parent node in the path is abnormal; and / or, The path does not have a parent node, and the locating a fault node in the path according to a response code of the response flow information in the path where the abnormality exists, when determining that an abnormality exists based on the response flow information, includes: If the response code cannot be obtained, it is determined that a node segment between the source station and the edge gateway in the path is abnormal.
4. The method for locating a path fault node according to claim 1, wherein: The obtaining of the splicing response code and locating the faulty node in the splicing response code includes: The concatenated response code is segmented based on the target separator to obtain a response code for each node.
5. The method for locating a path fault node according to claim 1, wherein: After locating a faulty node in the path according to a response code of the response flow information in the path where the abnormality exists, when the abnormality is determined based on the response flow information, the method includes: The fault nodes are counted and a fault node list is formed, wherein the fault nodes at least include the fault node, the fault node segment, and the fault cause.
6. The method for locating a path fault node according to claim 5, characterized in that: The counting of the fault nodes and forming a fault node list, wherein the fault nodes at least include the fault node, the fault node segment, and the fault cause, includes: In response to a retry instruction, obtaining a retry path when the state of the current node is an edge node; In the case that the retry path includes the faulty node in the faulty node list, the path related to the faulty node is deleted to form a new retry path.
7. The method for locating a path fault node according to claim 6, characterized in that: The method of responding to the retry instruction and obtaining the retry path when the current node is in the edge node state includes: In a case where the retry path includes a faulty node in the faulty node list, a retry path from the current node to the source station is added.
8. The method for locating a path fault node according to claim 5, characterized in that: The counting of the fault nodes and forming a fault node list, wherein the fault nodes at least include the fault node, the fault node segment, and the fault cause, includes: In response to a new path request instruction, acquiring a plurality of new paths of the new path request instruction; When a node of the plurality of new paths is found in the fault node list, a path related to the fault node is deleted from the plurality of new paths.
9. A path fault node location device, characterized in that: The device comprises: A receiving module, configured to receive a network request and a path request instruction, and determine a path based on the path request instruction; an acquisition module, configured to send the network request based on the path, and in the process of sending the network request, acquire the status of each node in the path; An adding module, configured to add a response code corresponding to the node status to the response information of each node in the path based on the node status of each node in the path; a determination module, configured to obtain the response information and determine the response flow information of the path; a positioning module configured to, when determining that an abnormality exists based on the response flow information, locate a faulty node in the path according to a response code of the response flow information in the path where the abnormality exists; Among them, the path has a parent node, and the positioning module is used to determine the current parent node, determine the previous node of the current parent node and the response code of the previous node, and record the response code of the previous node into the response code of the current parent node to form a spliced response code, obtain the spliced response code, and locate the faulty node in the spliced response code.
10. The device according to claim 9, characterized in that The positioning module is used to determine that the source station response in the path is abnormal when the response code includes an abnormal response code.
Citation Information
Patent Citations
Data request processing method and system based on cloud distribution, medium and equipment
CN115250294A
CDN dynamic request acceleration method based on node failure state feedback optimization
CN118101523A