Link information processing method and device, electronic equipment, storage medium and program product

By using a combination of first-node sampling and abnormal node sampling based on preset sampling rates in a distributed system, the problem of insufficient link sampling efficiency and accuracy in the prior art is solved, and accurate monitoring and abnormal detection of key links are achieved.

CN119576698APending Publication Date: 2025-03-07INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411728651.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-28
Publication Date
2025-03-07

AI Technical Summary

Technical Problem

In the prior art, when monitoring links of distributed systems, full-scale link sampling consumes high performance, and the link is difficult to be sampled when abnormalities occur at non-head nodes, resulting in insufficient sampling efficiency and accuracy.

Method used

The first-node sampling method based on the preset sampling rate is adopted to collect information of P first links among the M candidate links, and when there is an abnormality in the target node, the relevant Q second links are collected, and two methods are combined to improve the efficiency and accuracy of link sampling.

Benefits of technology

Through this method, a certain proportion of transactions are ensured to be sampled, while the abnormal links are sampled, reducing the performance consumption of full link sampling on the monitoring platform, and improving the efficiency and accuracy of link sampling.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119576698A_ABST
    Figure CN119576698A_ABST
Patent Text Reader

Abstract

The invention provides a link information processing method and device, electronic equipment, a storage medium and a program product, which can be applied to the fields of Internet technology, big data technology and financial science and technology. The link information processing method comprises the steps that based on a preset sampling rate, information collection is conducted on P first links in M candidate links, first link information of the P first links is obtained, each candidate link comprises multiple nodes in a distributed system, and a service calling relation exists between the multiple nodes; in response to the abnormality of at least one target node in the plurality of nodes, performing information acquisition on Q second links related to the at least one target node in the (M-P) candidate links to obtain respective second link information of the Q second links; and based on a preset display mode, according to the P pieces of first link information and the Q pieces of second link information, displaying a link acquisition result of the distributed system on a front-end interface.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the fields of Internet technology, big data technology and financial technology, and more specifically, to a link information processing method and device, electronic equipment, storage medium and program product. Background Art

[0002] With the development of Internet technology, distributed systems have emerged. A distributed system is a system consisting of a group of networked computers, each of which is a node.

[0003] In order to monitor the calls between multiple nodes, a distributed link tracking tool can be used. A distributed link tracking tool is a tool used to monitor and diagnose the communication between services in a distributed system.

[0004] In the process of realizing the concept disclosed in the present invention, the inventors found that there are at least the following problems in the related technologies: since the full link sampling and reporting consumes a high performance of the monitoring platform, and there is also the problem that the link is difficult to sample when an abnormality occurs in the non-head node, the related technologies cannot effectively guarantee the efficiency and accuracy of link sampling. Summary of the invention

[0005] In view of this, the present disclosure provides a link information processing method and device, electronic device, storage medium and program product. According to one aspect of the present disclosure, a link information processing method is provided, including: based on a preset sampling rate, collecting information on P first links among M candidate links, and obtaining first link information of each of the P first links, wherein each of the candidate links includes multiple nodes in a distributed system, and there is a service call relationship between the multiple nodes, M and P are both positive integers, and M>P; in response to an abnormality in at least one target node among the multiple nodes, collecting information on Q second links related to the at least one target node among (MP) candidate links, and obtaining second link information of each of the Q second links, Q is a positive integer, and (MP)>Q; and, based on a preset display mode, displaying the link collection results of the distributed system on a front-end interface according to the P first link information and the Q second link information.

[0006] According to an embodiment of the present disclosure, the multiple nodes included in the above-mentioned distributed system have multiple levels; based on the preset sampling rate, information is collected for P first links among M candidate links to obtain the first link information of each of the above-mentioned P first links, including: according to the above-mentioned preset sampling rate and the sum of the number of the above-mentioned candidate links, a first number of nodes to be sampled are determined among all nodes located at the first level of the above-mentioned distributed system; for each of the above-mentioned candidate links, when a node at the first level is the above-mentioned node to be sampled, the above-mentioned candidate link is determined as the above-mentioned first link; and information is collected for each of the above-mentioned first links to obtain the above-mentioned first link information.

[0007] According to an embodiment of the present disclosure, all nodes located at the first level of the above-mentioned distributed system have a first sampling identifier, and the above-mentioned first sampling identifier indicates whether the above-mentioned node is the above-mentioned node to be sampled; when the above-mentioned first sampling identifier is a first preset value, it indicates that the above-mentioned node is the above-mentioned node to be sampled; when the above-mentioned first sampling identifier is a second preset value, it indicates that the above-mentioned node is not the above-mentioned node to be sampled; the above-mentioned first sampling identifier is transmitted to other nodes that call the above-mentioned node to be sampled based on a first preset method, wherein the above-mentioned first preset method includes at least one of the following: HTTP request header and remote procedure call.

[0008] According to an embodiment of the present disclosure, each of the above-mentioned service call relationships characterizes the service call status between nodes of different levels in the above-mentioned candidate links; in response to the existence of an abnormality in at least one target node among the above-mentioned multiple nodes, information is collected for the Q second links related to the above-mentioned at least one target node in the (MP) candidate links, and the second link information of each of the above-mentioned Q second links is obtained, including: for each of the above-mentioned target nodes, in response to the existence of an abnormality in the above-mentioned target nodes, according to the service call relationship of each of the above-mentioned candidate links, at least one of the above-mentioned second links including the above-mentioned target node is determined in the above-mentioned (MP) candidate links; and information is collected for each of the above-mentioned second links respectively to obtain the above-mentioned second link information.

[0009] According to an embodiment of the present disclosure, each of the above-mentioned target nodes has a second sampling identifier, and the above-mentioned second sampling identifier indicates that there is an abnormality in the above-mentioned node; the above-mentioned second sampling identifier is transmitted to other nodes that respond to the above-mentioned target node based on a second preset method, wherein the above-mentioned second preset method includes at least one of the following: an HTTP response header and an HTTP response result.

[0010] According to an embodiment of the present disclosure, the above-mentioned first link information represents the parent-child relationship between nodes of the second number of levels in the above-mentioned first link, and the above-mentioned second link information represents the parent-child relationship between nodes of the third number of levels in the above-mentioned second link; the above-mentioned link acquisition result of the above-mentioned distributed system is displayed on the front-end interface based on the above-mentioned preset display method according to the above-mentioned P first link information and the above-mentioned Q second link information, including: according to the parent-child relationship between the nodes of the second number of levels in each of the above-mentioned first links, and the parent-child relationship between the nodes of the third number of levels in each of the above-mentioned second links, the above-mentioned P first link information and the above-mentioned Q second link information are visualized to obtain a Gantt chart; and, according to the above-mentioned Gantt chart, the link acquisition result of the above-mentioned distributed system is determined.

[0011] According to an embodiment of the present disclosure, the Gantt chart includes a plurality of blocks in a rectangular coordinate system, each of the blocks represents the state of the node by color or pattern, and the state of the node includes normal or abnormal; in response to the state of the node being abnormal, the method further includes: based on the Gantt chart displayed on the front-end interface, displaying the text prompt at a preset position of the node whose state is abnormal.

[0012] According to an embodiment of the present disclosure, the first sampling identifier is transmitted based on a service call relationship from upstream to downstream, and the second sampling identifier is transmitted based on a service response relationship from downstream to upstream.

[0013] According to another aspect of the present disclosure, a link information processing device is provided, including: a first acquisition module, for collecting information on P first links among M candidate links based on a preset sampling rate, and obtaining first link information of each of the P first links, wherein each of the candidate links includes multiple nodes in a distributed system, and there is a service call relationship between the multiple nodes, M and P are both positive integers, and M>P; a second acquisition module, for collecting information on Q second links related to the at least one target node among (MP) candidate links in response to an abnormality in at least one target node among the multiple nodes, and obtaining second link information of each of the Q second links, Q is a positive integer, and (MP)>Q; and a display module, for displaying the link acquisition results of the distributed system on a front-end interface based on the P first link information and the Q second link information based on a preset display mode.

[0014] According to another aspect of the present disclosure, an electronic device is provided, comprising: one or more processors; and a memory for storing one or more instructions, wherein when the one or more instructions are executed by the one or more processors, the one or more processors implement the method described in the present disclosure.

[0015] According to another aspect of the present disclosure, a computer-readable storage medium is provided, on which executable instructions are stored. When the executable instructions are executed by a processor, the processor implements the method described in the present disclosure.

[0016] According to another aspect of the present disclosure, a computer program product is provided. The computer program product includes computer executable instructions. When the computer executable instructions are executed, they are used to implement the method described in the present disclosure.

[0017] According to the embodiments of the present disclosure, accurate monitoring and anomaly detection of key links are achieved by collecting information on P first links among M candidate links based on a preset sampling rate. Identification and positioning of abnormal links are achieved by collecting information on Q second links related to at least one target node with an abnormality. Based on this, by combining first-node sampling based on a preset sampling rate with abnormal sampling based on abnormal nodes, it is ensured that a certain proportion of transactions will be sampled, while ensuring that abnormal links are sampled, reducing the performance consumption of the monitoring platform for full link sampling reporting, and at the same time, links can also be sampled when abnormalities occur in non-head nodes, thereby improving the efficiency and accuracy of link sampling. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] The above and other objects, features and advantages of the present disclosure will become more apparent through the following description of the embodiments of the present disclosure with reference to the accompanying drawings, in which:

[0019] Figure 1 The system architecture to which the link information processing method according to the embodiment of the present disclosure can be applied is schematically shown;

[0020] Figure 2 A flowchart of a link information processing method according to an embodiment of the present disclosure is schematically shown;

[0021] Figure 3A A schematic diagram schematically shows an example of a process of collecting information on P first links among M candidate links based on a preset sampling rate to obtain first link information of each of the P first links according to an embodiment of the present disclosure;

[0022] Figure 3B Schematically illustrates an example schematic diagram of a process of collecting information of Q second links related to at least one target node among (MP) candidate links to obtain second link information of each of the Q second links in response to an abnormality of at least one target node among multiple nodes according to an embodiment of the present disclosure;

[0023] Figure 4An example schematic diagram of a process of displaying link collection results of a distributed system on a front-end interface based on a preset display mode and P pieces of first link information and Q pieces of second link information according to an embodiment of the present disclosure is schematically shown;

[0024] Figure 5 A block diagram schematically shows a link information processing device according to an embodiment of the present disclosure; and

[0025] Figure 6 A block diagram of an electronic device suitable for implementing a link information processing method according to an embodiment of the present disclosure is schematically shown. DETAILED DESCRIPTION

[0026] Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the present disclosure. In the following detailed description, for ease of explanation, many specific details are set forth to provide a comprehensive understanding of the embodiments of the present disclosure. However, it is apparent that one or more embodiments may also be implemented without these specific details. In addition, in the following description, descriptions of known structures and technologies are omitted to avoid unnecessary confusion of the concepts of the present disclosure.

[0027] The terms used herein are only for describing specific embodiments and are not intended to limit the present disclosure. The terms "comprise", "include", etc. used herein indicate the existence of the features, steps, operations and / or components, but do not exclude the existence or addition of one or more other features, steps, operations or components.

[0028] All terms (including technical and scientific terms) used herein have the meanings commonly understood by those skilled in the art unless otherwise defined. It should be noted that the terms used herein should be interpreted as having a meaning consistent with the context of this specification and should not be interpreted in an idealized or overly rigid manner.

[0029] When using expressions such as "at least one of A, B, and C, etc.", they should generally be interpreted according to the meaning of the expression commonly understood by those skilled in the art (for example, "a system having at least one of A, B, and C" should include but is not limited to a system having A alone, B alone, C alone, A and B, A and C, B and C, and / or A, B, C, etc.).

[0030] In the technical solution of the present invention, the user information (including but not limited to user personal information, user image information, user device information, such as location information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved are all information and data authorized by the user or fully authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of the relevant data comply with relevant laws, regulations and standards, take necessary confidentiality measures, do not violate public order and good morals, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0031] In the scenario of using personal information for automated decision-making, the methods, devices, and systems provided by the embodiments of the present invention provide users with corresponding operation portals for users to choose to agree or reject the automated decision-making results; if the user chooses to reject, the expert decision-making process will be entered. The expression "automated decision-making" here refers to the activity of automatically analyzing and evaluating an individual's behavioral habits, interests and hobbies, or economic, health, credit status, etc. through computer programs, and making decisions. The expression "expert decision-making" here refers to the activity of making decisions by people who specialize in a certain field, have specialized experience, knowledge and skills, and have reached a certain level of professionalism.

[0032] In an example, the sampling method of the distributed link tracking tool may include one of the following: first node sampling, full sampling, and sampling after full reporting, etc.

[0033] First-node sampling refers to determining whether the entire transaction chain needs to be sampled at a certain ratio at the transaction entry. However, since this method determines that sampling is not required at the first node, if an abnormality occurs at the downstream calling node, the abnormality cannot be sampled, resulting in the loss of abnormal data at the intermediate node, which is not conducive to abnormal problem troubleshooting.

[0034] Full sampling means that all requests are tracked, that is, all requests will be recorded and reported. However, this method has a great impact on applications, monitoring platform backend processing and storage, user query performance, etc.

[0035] Full reporting followed by sampling means that all requests are tracked first, and then all the tracking data is reported to the backend, which then decides which data needs to be stored and analyzed and which can be discarded based on certain rules. However, this method also has a significant impact on application performance.

[0036] In order to at least partially solve the technical problems existing in the related art, the present disclosure provides a link information processing method and device, electronic device, storage medium and program product, which can be applied to the fields of Internet technology and big data technology. The link information processing method includes: based on a preset sampling rate, collecting information on P first links in M ​​candidate links, and obtaining first link information of each of the P first links, wherein each candidate link includes multiple nodes in a distributed system, and there is a service call relationship between the multiple nodes, M and P are both positive integers, and M>P; in response to an abnormality in at least one target node in the multiple nodes, collecting information on Q second links related to at least one target node in (MP) candidate links, and obtaining second link information of each of the Q second links, Q is a positive integer, and (MP)>Q; and, based on a preset display mode, displaying the link collection results of the distributed system on the front-end interface according to the P first link information and the Q second link information.

[0037] It should be noted that the link information processing method and device provided in the embodiments of the present disclosure can be used in the fields of Internet technology and big data technology, such as link sampling in distributed systems. The link information processing method and device provided in the embodiments of the present disclosure can also be used in any field other than the Internet technology and big data technology field, such as in the field of financial technology. The application field of the link information processing method and device provided in the embodiments of the present disclosure is not limited.

[0038] Figure 1 The system architecture to which the link information processing method according to the embodiment of the present disclosure can be applied is schematically shown. It should be noted that: Figure 1 What is shown is merely an example of a system architecture to which the embodiments of the present disclosure can be applied, in order to help those skilled in the art understand the technical content of the present disclosure, but it does not mean that the embodiments of the present disclosure cannot be used in other devices, systems, environments or scenarios.

[0039] like Figure 1 As shown, the system architecture 100 according to this embodiment may include a first terminal device 101, a second terminal device 102, a third terminal device 103, a network 104 and a server 105. The network 104 is used to provide a medium for a communication link between the first terminal device 101, the second terminal device 102, the third terminal device 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.

[0040] The user may use at least one of the first terminal device 101, the second terminal device 102, and the third terminal device 103 to interact with the server 105 through the network 104 to receive or send messages, etc. Various communication client applications may be installed on the first terminal device 101, the second terminal device 102, and the third terminal device 103, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only for example).

[0041] The first terminal device 101, the second terminal device 102, and the third terminal device 103 may be various electronic devices having display screens and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, desktop computers, and the like.

[0042] The server 105 may be a server that provides various services, such as a background management server (only as an example) that provides support for websites browsed by users using the first terminal device 101, the second terminal device 102, and the third terminal device 103. The background management server may analyze and process the received data such as user requests, and feed back the processing results (such as web pages, information, or data obtained or generated according to user requests) to the terminal device.

[0043] It should be noted that the link information processing method provided in the embodiment of the present disclosure can generally be executed by the server 105. Accordingly, the link information processing device provided in the embodiment of the present disclosure can generally be set in the server 105. The link information processing method provided in the embodiment of the present disclosure can also be executed by a server or server cluster that is different from the server 105 and can communicate with the first terminal device 101, the second terminal device 102, the third terminal device 103 and / or the server 105. Accordingly, the link information processing device provided in the embodiment of the present disclosure can also be set in a server or server cluster that is different from the server 105 and can communicate with the first terminal device 101, the second terminal device 102, the third terminal device 103 and / or the server 105.

[0044] Alternatively, the link information processing method provided in the embodiment of the present disclosure may also be executed by the first terminal device 101, the second terminal device 102, or the third terminal device 103, or may also be executed by other terminal devices different from the first terminal device 101, the second terminal device 102, or the third terminal device 103. Accordingly, the link information processing apparatus provided in the embodiment of the present disclosure may also be provided in the first terminal device 101, the second terminal device 102, or the third terminal device 103, or may be provided in other terminal devices different from the first terminal device 101, the second terminal device 102, or the third terminal device 103.

[0045] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.

[0046] It should be noted that the sequence numbers of the operations in the following method are only used as representations of the operations for the purpose of description, and should not be regarded as representing the execution order of the operations. Unless explicitly stated, the method does not need to be executed completely in the order shown.

[0047] Figure 2 The flowchart of the link information processing method according to the embodiment of the present disclosure is schematically shown.

[0048] like Figure 2 As shown, the link information processing method 200 includes operations S210 to S230.

[0049] In operation S210, based on a preset sampling rate, information is collected for P first links among M candidate links to obtain first link information of each of the P first links, wherein each candidate link includes multiple nodes in a distributed system, and a service call relationship exists between the multiple nodes, M and P are both positive integers, and M>P.

[0050] In operation S220, in response to at least one target node among the multiple nodes being abnormal, information is collected for Q second links related to the at least one target node among the (MP) candidate links to obtain second link information of each of the Q second links, where Q is a positive integer and (MP)>Q.

[0051] In operation S230, based on a preset display mode, the link collection result of the distributed system is displayed on the front-end interface according to the P first link information and the Q second link information.

[0052] According to an embodiment of the present disclosure, a link information processing method can be applied to a distributed system. A node (i.e., a Node) refers to an independent unit in a distributed system. For example, a node can be a computer, a server, a virtual machine, or any computing device that can work independently. A candidate link (i.e., a Link) refers to a communication path connecting any two nodes in a distributed system. For example, a candidate link can be a physical link (such as a network cable, an optical fiber) or a logical link (such as a network protocol).

[0053] According to an embodiment of the present disclosure, the preset sampling rate refers to a parameter preset in a distributed system to balance the detail level of link sampling and system performance overhead, which can be used to control the collection amount of the link. The preset sampling rate can be configured according to actual business needs and is not limited here. For example, the preset sampling rate can be between 0 and 1, and when the preset sampling rate is 0, it means that no link is sampled, and when the preset sampling rate is 1, it means that all links are sampled.

[0054] In one example, the preset sampling rate can be adjusted according to specific business scenarios and system load conditions. For example, in a development environment, due to a small number of requests, a higher preset sampling rate can be set to collect more detailed data; in a production environment, due to a huge number of requests, a lower preset sampling rate can be set to reduce the amount of data and system overhead.

[0055] According to an embodiment of the present disclosure, each candidate link includes multiple nodes in a distributed system, and there is a service call relationship between the multiple nodes. In a distributed system, the service call relationship refers to a mode of interaction between different services through remote procedure calls or message passing.

[0056] According to an embodiment of the present disclosure, for the M candidate links in a distributed system, P first links that need to be sampled can be determined from the M candidate links according to a preset sampling rate. On this basis, information collection can be performed on the P first links respectively to obtain the first link information of each of the P first links. The first link information may include at least one of the following: link type, link status, call information, etc. The link type refers to the physical or logical attributes of the first link, such as a point-to-point link, a multi-point connection link, a unidirectional or bidirectional communication link, etc. The link status refers to the relationship between a router interface and an adjacent router interface, such as the availability, bandwidth, delay, etc. of the first link. The call information may include a parent call identifier, the start and end time of the call, etc.

[0057] According to an embodiment of the present disclosure, multiple nodes in a distributed system can be monitored to determine at least one target node with an abnormality among the multiple nodes. The specific method of monitoring can be configured according to actual business needs and is not limited here. For example, the monitoring method may include at least one of the following: a monitoring method based on an abnormal capture mechanism, a monitoring method based on logging, a monitoring method based on user feedback, and a monitoring method based on an abnormality detection tool, etc.

[0058] According to an embodiment of the present disclosure, after determining that there is at least one abnormal target node, Q second links related to at least one target node can be determined from (MP) candidate links other than P first links. On this basis, the Q second link line information can be collected to obtain the second link information of each of the Q second links. The second link information may include at least one of the following: link type, link status, call information, etc. The link type refers to the physical or logical attributes of the second link, such as a point-to-point link, a multi-point connection link, a unidirectional or bidirectional communication link, etc. The link status refers to the relationship between a router interface and an adjacent router interface, such as the availability, bandwidth, delay, etc. of the second link. The call information may include a parent call identifier, the start and end time of the call, etc.

[0059] According to the embodiments of the present disclosure, after obtaining P pieces of first link information and Q pieces of second link information, the front-end framework can be used to bind the data provided by the back-end to the front-end interface, and a preset chart library can be used to create tables, charts or other graphic elements to display the link collection results of the distributed system. In addition, the front-end interface can also prompt abnormal links and nodes through color changes, warning icons, etc.

[0060] According to the embodiments of the present disclosure, accurate monitoring and anomaly detection of key links are achieved by collecting information on P first links among M candidate links based on a preset sampling rate. Identification and positioning of abnormal links are achieved by collecting information on Q second links related to at least one target node with an abnormality. Based on this, by combining first-node sampling based on a preset sampling rate with abnormal sampling based on abnormal nodes, it is ensured that a certain proportion of transactions will be sampled, while ensuring that abnormal links are sampled, reducing the performance consumption of the monitoring platform for full link sampling reporting, and at the same time, links can also be sampled when abnormalities occur in non-head nodes, thereby improving the efficiency and accuracy of link sampling.

[0061] It should be noted that, in the embodiments of the present disclosure, before obtaining the user's information, the user's consent or authorization may be obtained. For example, before operation S210, a request to obtain the user's information may be issued to the user. When the user agrees or authorizes that the user's information may be obtained, operation S210 is performed.

[0062] In an embodiment of the present disclosure, a corresponding operation entry may be provided for the user to choose to agree or reject the automated decision result. For example, in operation S230, based on a preset display mode, the link acquisition result of the distributed system is displayed on the front-end interface according to P first link information and Q second link information. That is, before processing the P first link information and the Q second link information, an instruction to agree or refuse to process input by the user through the corresponding operation entry may be obtained. If the user agrees to process, the P first link information and the Q second link information are processed, that is, step S230 is executed. If the user refuses to process, the expert decision-making process is entered.

[0063] Reference below Figure 3A , Figure 3B and Figure 4 , the link information processing method 200 according to an embodiment of the present invention is further described.

[0064] According to an embodiment of the present disclosure, operation S210 may include the following operations.

[0065] According to the preset sampling rate and the total number of candidate links, a first number of nodes to be sampled is determined among all nodes at the first level of the distributed system. For each candidate link, when a node at the first level is a node to be sampled, the candidate link is determined as a first link. Information is collected for each first link to obtain first link information.

[0066] According to an embodiment of the present disclosure, the multiple nodes included in the distributed system have multiple levels. Each level may include multiple nodes. For example, the distributed system includes 3 levels, the first level includes 3 nodes, the second level includes 5 nodes, and the third level includes 7 nodes.

[0067] According to an embodiment of the present disclosure, for multiple levels of a distributed system, each candidate link can be determined according to the service call relationship between different nodes of each level, thereby determining the total number of candidate links included in the distributed nodes, that is, M. For example, candidate link 1 may include node 1->node 2->node 3.

[0068] According to an embodiment of the present disclosure, after the total number of candidate links is obtained, a first number of nodes to be sampled can be determined among all nodes in level 1 according to a preset sampling rate and M. For example, M is 10 and the preset sampling rate is 0.2. In this case, the first number can be determined to be 10*0.2=2.

[0069] According to an embodiment of the present disclosure, after determining the first number of nodes to be sampled, for each node to be sampled, the node of the first level can be determined as a candidate link of the node to be sampled as the first link. After obtaining P first links, information collection can be performed for each first link to obtain the first link information of each first link. The first link information may include at least one of the following: link type, link status, call information, etc.

[0070] According to the embodiments of the present disclosure, by intelligently determining the nodes to be sampled at the first level of the distributed system based on the preset sampling rate and the total number of candidate links, the randomness and representativeness of the sampling can be ensured, and by determining each first link among the M candidate links based on the determined nodes to be sampled, the effective monitoring of the performance of the distributed system based on the first node sampling method is realized. On this basis, by collecting information for each first link respectively, data support can be provided for the subsequent distributed system optimization, thereby realizing the reasonable allocation of resources and the continuous improvement of performance.

[0071] According to an embodiment of the present disclosure, all nodes at the first level of the distributed system have a first sampling identifier. The first sampling identifier is transmitted to other nodes that call the node to be sampled based on the first preset method.

[0072] According to an embodiment of the present disclosure, the first sampling identifier represents whether the node is a node to be sampled. For example, when the first sampling identifier is a first preset value, the node is represented as a node to be sampled. Alternatively, when the first sampling identifier is a second preset value, the node is not a node to be sampled. The first preset value and the second preset value can be configured according to actual business needs and are not limited here. For example, the first preset value can be 1 and the second preset value can be 0.

[0073] According to an embodiment of the present disclosure, the first sampling identifier may be transmitted based on a service call relationship from upstream to downstream, that is, when a downstream node calls an upstream node, the first sampling identifier will be transmitted to the downstream node along with the request.

[0074] In one example, when making a downstream call, the first sampling identifier can be transmitted to other nodes downstream of the node to be sampled based on the first preset method. That is, when a certain other node calls the node to be sampled, the first sampling identifier can be transmitted to other downstream nodes along with the call, so that other downstream nodes can use the sampling configuration of the upstream node, and so on.

[0075] For example, taking the first level including node 1 and node 2, the first sampling identifier corresponding to node 1 is 1, and the first sampling identifier corresponding to node 2 is 0, when node 3 of the second level calls node 1, the first sampling identifier of node 1 (i.e., 1) will be passed to node 3; when node 4 of the second level calls node 2, the first sampling identifier of node 2 (i.e., 0) will be passed to node 4.

[0076] According to an embodiment of the present disclosure, the first preset method may refer to a special field of the message. The first preset method may be configured according to actual business needs and is not limited here. For example, the first preset method may include at least one of the following: an HTTP request header and a remote procedure call (RPC). The HTTP request header is a component when a client sends a request to a server, for example, it may include client environment information, the size of the request body, and the type of compression supported by the client. Remote procedure calls are used to implement inter-process communication across networks. In one example, the first preset method may also be a combination of an HTTP request header and a remote procedure call, so that the remote procedure call can carry the necessary context information, thereby achieving effective communication between different nodes in a distributed system.

[0077] According to the embodiments of the present disclosure, by introducing a first sampling identifier in all nodes of the first level of the distributed system, and using the first sampling identifier to characterize whether a node is a node to be sampled, efficient management and tracking of the node sampling state is achieved. On this basis, through the transmission mechanism of the HTTP request header or the remote procedure call, the first sampling identifier can be transmitted to other nodes that call the node to be sampled, thereby realizing the link sampling process based on the first node sampling method.

[0078] Figure 3A An example schematic diagram of a process of collecting information on P first links among M candidate links based on a preset sampling rate to obtain first link information of each of the P first links according to an embodiment of the present disclosure is schematically shown.

[0079] like Figure 3A As shown, taking the nodes located at the first level of the distributed system including nodes N_311, N_312, N_313, N_314 and N_315, the nodes located at the second level of the distributed system including nodes N_321, node N_322, node N_323 and node N_324, and the nodes located at the third level of the distributed system including nodes N_331 and node N_332 as an example, the process of obtaining P first link information based on the first node sampling method is explained.

[0080] In 300A, there are 10 candidate links, and the preset sampling rate is 0.4. In the first node sampling method, 10*0.4=4 candidate links need to be sampled. Since the first level nodes include 5 nodes, 2 nodes to be sampled can be randomly determined from the 5 nodes. For example, the nodes to be sampled are node N_311 and node N_313.

[0081] On this basis, when the nodes of the first level are the nodes to be sampled, the candidate link can be determined as the first link. For example, the first link can include the first link 1 (node ​​N_311->node N_321->node N_331) with node N_311 as the node of the first level, and the first link 2 (node ​​N_313->node N_331) and the first link 3 (node ​​N_313->node N_323->node N_332) with node N_313 as the node of the first level. Thus, the first link 1, the first link 2 and the first link 3 can be collected respectively to obtain the three first link information.

[0082] According to an embodiment of the present disclosure, operation S220 may include the following operations.

[0083] For each target node, in response to an abnormality of the target node, at least one second link including the target node is determined from (MP) candidate links according to the service call relationship of each candidate link, and information is collected for each second link to obtain second link information.

[0084] According to an embodiment of the present disclosure, multiple nodes in a distributed system may be monitored, and an abnormal node may be determined as at least one target node. For the M candidate links, in this step, the P first links sampled in operation S210 may be eliminated to obtain (MP) candidate links.

[0085] According to an embodiment of the present disclosure, each service call relationship characterizes the service call situation between nodes of different levels in the candidate link. The service call situation may include, for example, the node level, call direction, node identifier, and service identifier. The node level refers to the position of the node in the multiple levels of the distributed system. The call direction refers to which service calls another service. The node identifier refers to the unique identifier of each node participating in the service call. The service identifier refers to the unique identifier of the service provided by each node.

[0086] According to an embodiment of the present disclosure, after determining at least one target node, for each target node, Q second links related to at least one target node can be screened out from (MP) candidate links. The second link related to the target node means that the link directly or indirectly calls the target node. On this basis, information collection can be performed for each second link to obtain the second link information of each second link. The second link information may include at least one of the following: link type, link status, call information, etc.

[0087] According to the embodiments of the present disclosure, by monitoring the target node with abnormalities among multiple nodes and accurately determining at least one second link including the target node according to the service call relationship of each candidate link, effective monitoring of the performance of the distributed system based on the abnormal sampling method is achieved. On this basis, by collecting information from each second link respectively, the rapid positioning and processing of the abnormal node is achieved.

[0088] According to an embodiment of the present disclosure, each target node has a second sampling identifier. The second sampling identifier is transmitted to other nodes that respond to the target node based on the second preset method.

[0089] According to an embodiment of the present disclosure, the second sampling identifier indicates that a node is abnormal. For example, when a node has a second sampling identifier, it indicates that the node is a target node. Alternatively, when a node does not have a second sampling identifier, it indicates that the node is not a target node. The specific value of the second sampling identifier can be configured according to actual business needs and is not limited here. The second sampling identifier can be a third preset value, and the third preset value can be 1.

[0090] According to an embodiment of the present disclosure, the second sampling identifier is transmitted based on the service response relationship from downstream to upstream, that is, when the downstream target node completes the processing and returns a response to other upstream nodes, the second sampling identifier will be transmitted back to the upstream node along with the response.

[0091] In one example, the target node can record the second sampling identifier of a transaction exception through a local cache, and when the transaction of the current target node ends and returns the transaction result to other upstream nodes for response, the current target node's exception is sampled and reported, and the second sampling identifier can be transmitted to other upstream nodes that have responded to the target node based on the second preset method. That is, when a certain other node responds to the target node, the second sampling identifier can be transmitted in reverse to other upstream nodes along with the response, so that other upstream nodes can obtain and cache the second sampling identifier, and so on. In this way, the purpose of sampling and reporting the entire link of other upstream nodes in reverse by returning values ​​step by step when an exception occurs in the downstream target node is achieved.

[0092] According to an embodiment of the present disclosure, the second preset method may refer to a special field of the message. The second preset method may be configured according to actual business needs and is not limited here. For example, the second preset method includes at least one of the following: an HTTP response header and an HTTP response result. The HTTP response header contains the server's metadata about the request, which is used to provide additional information about the request processing result. The HTTP response result refers to the response body, which contains the return data of the request.

[0093] According to an embodiment of the present disclosure, by allocating a second sampling identifier to each target node in a distributed system, and using the second sampling identifier to characterize the presence of an abnormal node, real-time monitoring and identification of the abnormal node state is achieved. On this basis, through the transmission mechanism of the HTTP response header and the HTTP response result, the second sampling identifier can be transmitted to other nodes that respond to the target node, thereby realizing a link sampling process based on the abnormal node sampling method.

[0094] Figure 3B The figure schematically shows an example process of collecting information on Q second links related to at least one target node among (MP) candidate links to obtain second link information of each of the Q second links in response to an abnormality in at least one target node among multiple nodes according to an embodiment of the present disclosure.

[0095] like Figure 3B As shown, taking nodes N_322 and N_323 located at the second level of the distributed system as target nodes with abnormalities as an example, the process of obtaining Q second link information based on the abnormal sampling method is explained. In 300A, the first link information of the first link 1 (node ​​N_311->node N_321->node N_331), the first link 2 (node ​​N_313->node N_331) and the first link 3 (node ​​N_313->node N_323->node N_332) has been obtained based on the first node sampling method.

[0096] In 300B, at least one second link including the target node can be determined among the seven candidate links according to the service call relationship of each candidate link. For example, the second link can include the second link 4 (node ​​N_312->node N_322) with node N_322, the second link 5 (node ​​N_314->node N_322), and the second link 6 (node ​​N_314->node N_323) with node N_323. Thus, the first link 4, the first link 5 and the first link 6 can be collected respectively to obtain the information of the three second links.

[0097] According to the embodiments of the present disclosure, by introducing a first sampling identifier transmitted from upstream to downstream and a second sampling identifier transmitted from downstream to upstream, bidirectional tracking of link information in a distributed system is achieved. By sampling in a manner that combines first-node sampling and exception sampling, the efficiency and accuracy of link information collection in a distributed system can be improved.

[0098] According to an embodiment of the present disclosure, operation S230 may include the following operations.

[0099] According to the parent-child relationship between the nodes of the second number of levels in each first link and the parent-child relationship between the nodes of the third number of levels in each second link, the P first link information and the Q second link information are visualized to obtain a Gantt chart. According to the Gantt chart, the link collection result of the distributed system is determined.

[0100] According to an embodiment of the present disclosure, the first link information represents the parent-child relationship between nodes of the second number of levels in the first link. For example, the first link includes node 1->node 2->node 3, then node 1 is the parent node of node 2, and node 2 is the child node of node 1; at the same time, node 2 is the parent node of node 3, and node 3 is the child node of node 2.

[0101] According to an embodiment of the present disclosure, the second link information represents the parent-child relationship between nodes of the third number of levels in the second link. For example, the second link includes node 4->node 5->node 6, then node 4 is the parent node of node 5, and node 5 is the child node of node 4; at the same time, node 5 is the parent node of node 6, and node 6 is the child node of node 5.

[0102] According to an embodiment of the present disclosure, the parent-child relationship between nodes of the second number of levels in each first link and the parent-child relationship between nodes of the third number of levels in the second link can be used to determine the service call relationship, response relationship, start time, end time, duration, etc. of nodes at each level.

[0103] According to an embodiment of the present disclosure, after all abnormal link messages are reported to the backend of the monitoring platform, the link information can be fully displayed through a customized front-end interface based on the parent-child relationship of the link. For example, a project management tool can be used to create a Gantt chart based on the parent-child relationship between the nodes of the second number of levels of each first link and the parent-child relationship between the nodes of the third number of levels of each second link, with time as the horizontal axis and the link as the vertical axis. For each node in the link, a bar chart block can be drawn to characterize the call status of each node. The bar blocks of different nodes can each have different colors or patterns. After obtaining the Gantt chart, the link acquisition results of the distributed system can be determined based on the Gantt chart.

[0104] According to an embodiment of the present disclosure, by integrating each first link information and each second link information into a Gantt chart, the visualization effect of the distributed system link collection results is significantly improved. In the Gantt chart, the node hierarchical relationship of each first link information and second link information is accurately mapped, the parent-child relationship between the nodes of the second number of levels and the parent-child relationship between the nodes of the third number of levels are represented by blocks, and the normal or abnormal state of the nodes is distinguished by color, which not only optimizes the presentation of data, but also enables users to intuitively identify key performance indicators and nodes with potential failures, enhancing user experience and interactivity.

[0105] According to an embodiment of the present disclosure, in response to the state of a node being abnormal, the link information processing method 200 may further include the following operations.

[0106] Based on the Gantt chart displayed on the front-end interface, a text prompt is displayed at the preset position of the node whose distance status is abnormal.

[0107] According to an embodiment of the present disclosure, the Gantt chart includes a plurality of blocks in a rectangular coordinate system. Each block represents the state of a node by color or pattern. The state of a node includes normal or abnormal. The specific correspondence between the color or pattern and the state can be configured according to actual business needs and is not limited here. For example, blue indicates that the state of the node is normal; red indicates that the state of the node is abnormal, etc.

[0108] According to an embodiment of the present disclosure, when the state of a node is abnormal, a text prompt may be displayed at a preset position from the node with the abnormal state. The preset position may be configured according to actual business needs and is not limited here. For example, the preset position may be 5 mm.

[0109] The text hint may be used to characterize optimization suggestions for the node.

[0110] According to the embodiments of the present disclosure, by adding a text prompt function for abnormal nodes based on the Gantt chart of the front-end interface, this intuitive and highly interactive distributed system link status visualization method not only improves the user experience, but also makes the troubleshooting and problem solving process more efficient.

[0111] Figure 4 An example schematic diagram of a process of displaying link acquisition results of a distributed system on a front-end interface based on a preset display mode and according to P first link information and Q second link information according to an embodiment of the present disclosure is schematically shown.

[0112] like Figure 4 As shown, taking the link collection result including 5 links as an example, the display process at the front-end node is explained.

[0113] In 400, taking the horizontal axis as time and the vertical axis as links as an example, the service call relationship of link 1 is node 1->node 2->node 3->node 4->node 5, the service call relationship of link 2 is node 1->node 3, the service call relationship of link 3 is node 1->node 2->node 6, the service call relationship of link 4 is node 1->node 4->node 5, and the node call relationship of link 5 is node 1->node 5. When the state of node 4 is abnormal, a text prompt "Node 4 is abnormal" can be displayed at a preset position away from node 4.

[0114] The above are only exemplary embodiments, but are not limited thereto, and may also include other link information processing methods known in the art, as long as the efficiency and accuracy of link sampling can be improved.

[0115] It should be noted that in the embodiments of the present invention, certain software, components, models and other existing solutions in the industry may be mentioned, which should be regarded as exemplary. Their purpose is only to illustrate the feasibility of implementing the technical solution of the present invention, but it does not mean that the present invention has or must use this solution.

[0116] Based on the above link information processing method, the present invention also provides a link information processing device. Figure 5 The device is described in detail.

[0117] Figure 5 A block diagram of a link information processing device according to an embodiment of the present disclosure is schematically shown.

[0118] like Figure 5 As shown, the link information processing device 500 may include a first acquisition module 510 , a second acquisition module 520 and a display module 530 .

[0119] The first acquisition module 510 is used to collect information of P first links among the M candidate links based on a preset sampling rate to obtain first link information of each of the P first links, wherein each candidate link includes multiple nodes in a distributed system, and there is a service call relationship between the multiple nodes, M and P are both positive integers, and M>P. In one embodiment, the first acquisition module 510 can be used to perform the operation S210 described above, which will not be repeated here.

[0120] The second collection module 520 is used to collect information about Q second links related to at least one target node among the multiple nodes in response to an abnormality, and obtain the second link information of each of the Q second links, where Q is a positive integer and (MP)>Q. In one embodiment, the second collection module 520 can be used to perform the operation S220 described above, which will not be repeated here.

[0121] The display module 530 is used to display the link collection results of the distributed system on the front-end interface based on the preset display mode according to the P first link information and the Q second link information. In one embodiment, the display module 530 can be used to perform the operation S230 described above, which will not be repeated here.

[0122] According to an embodiment of the present disclosure, a distributed system includes a plurality of nodes having a plurality of levels.

[0123] According to an embodiment of the present disclosure, the first acquisition module 510 may include a first determination unit, a second determination unit, and a first acquisition unit.

[0124] The first determining unit is configured to determine a first number of nodes to be sampled from among all nodes at the first level of the distributed system according to a preset sampling rate and the total number of candidate links.

[0125] The second determining unit is configured to determine, for each candidate link, when a node at the first level is a node to be sampled, the candidate link as a first link.

[0126] The first collection unit is used to collect information from each first link to obtain first link information.

[0127] According to an embodiment of the present disclosure, all nodes located at the first level of the distributed system have a first sampling identifier, and the first sampling identifier indicates whether the node is a node to be sampled; when the first sampling identifier is a first preset value, the node is represented as a node to be sampled; when the first sampling identifier is a second preset value, the node is not a node to be sampled; the first sampling identifier is transmitted to other nodes that call the node to be sampled based on a first preset method, wherein the first preset method includes at least one of the following: an HTTP request header and a remote procedure call.

[0128] According to an embodiment of the present disclosure, each service calling relationship represents a service calling situation between nodes at different levels in a candidate link.

[0129] According to an embodiment of the present disclosure, the second acquisition module 520 may include a third determination unit and a second acquisition unit.

[0130] The third determining unit is configured to determine, for each target node, in response to an abnormality in the target node, and according to the service call relationship of each candidate link, at least one second link including the target node among the (MP) candidate links.

[0131] The second collection unit is used to collect information from each second link to obtain second link information.

[0132] According to an embodiment of the present disclosure, each target node has a second sampling identifier, which indicates that the node is abnormal; the second sampling identifier is transmitted to other nodes that respond to the target node based on a second preset method, wherein the second preset method includes at least one of the following: an HTTP response header and an HTTP response result.

[0133] According to an embodiment of the present disclosure, the first link information represents the parent-child relationship between nodes of a second number of levels in the first link, and the second link information represents the parent-child relationship between nodes of a third number of levels in the second link.

[0134] According to an embodiment of the present disclosure, the display module 530 may include a visualization unit and a fourth determination unit.

[0135] The visualization unit is used to visualize the P first link information and the Q second link information according to the parent-child relationship between the nodes of the second number of levels in each first link and the parent-child relationship between the nodes of the third number of levels in each second link to obtain a Gantt chart.

[0136] The fourth determining unit is used to determine the link collection result of the distributed system according to the Gantt chart.

[0137] According to an embodiment of the present disclosure, the Gantt chart includes a plurality of blocks in a rectangular coordinate system, each block represents the state of a node by color or pattern, and the state of a node includes normal or abnormal.

[0138] According to an embodiment of the present disclosure, in response to the state of the node being abnormal, the display module 530 may further include a display unit.

[0139] The display unit is used to display a text prompt at a preset position of a node whose distance status is abnormal based on the Gantt chart displayed on the front-end interface.

[0140] According to an embodiment of the present disclosure, the first sampling identifier is transmitted based on a service call relationship from upstream to downstream, and the second sampling identifier is transmitted based on a service response relationship from downstream to upstream.

[0141] According to the embodiments of the present invention, any one or more of the modules, submodules, units, and subunits, or at least part of the functions of any one of them can be implemented in one module. According to the embodiments of the present invention, any one or more of the modules, submodules, units, and subunits can be split into multiple modules for implementation. According to the embodiments of the present invention, any one or more of the modules, submodules, units, and subunits can be at least partially implemented as hardware circuits, such as field programmable gate arrays (FPGAs), programmable logic arrays (PLAs), systems on chips, systems on substrates, systems on packages, application specific integrated circuits (ASICs), or can be implemented by hardware or firmware in any other reasonable way of integrating or packaging circuits, or can be implemented in any one of the three implementation methods of software, hardware, and firmware, or in any appropriate combination of any of them. Alternatively, according to the embodiments of the present invention, one or more of the modules, submodules, units, and subunits can be at least partially implemented as computer program modules, and when the computer program modules are run, the corresponding functions can be performed.

[0142] For example, any of the first acquisition module 510, the second acquisition module 520, and the display module 530 can be combined in one module / unit / sub-unit, or any of the modules / units / sub-units can be split into multiple modules / units / sub-units. Alternatively, at least part of the functions of one or more of these modules / units / sub-units can be combined with at least part of the functions of other modules / units / sub-units and implemented in one module / unit / sub-unit. According to an embodiment of the present disclosure, at least one of the first acquisition module 510, the second acquisition module 520, and the display module 530 can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on a chip, a system on a substrate, a system on a package, an application specific integrated circuit (ASIC), or can be implemented by hardware or firmware such as any other reasonable way of integrating or packaging the circuit, or by any one of the three implementation methods of software, hardware, and firmware, or by a suitable combination of any of them. Alternatively, at least one of the first acquisition module 510 , the second acquisition module 520 , and the display module 530 may be at least partially implemented as a computer program module, and when the computer program module is executed, a corresponding function may be executed.

[0143] It should be noted that the link information processing device part in the embodiment of the present disclosure corresponds to the link information processing method part in the embodiment of the present disclosure. The description of the link information processing device part specifically refers to the link information processing method part, which will not be repeated here.

[0144] Figure 6A block diagram of an electronic device suitable for implementing a link information processing method according to an embodiment of the present disclosure is schematically shown. Figure 6 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0145] like Figure 6 As shown, the computer electronic device 600 according to the embodiment of the present disclosure includes a processor 601, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 602 or the program loaded from the storage part 609 to the random access memory (RAM) 603. The processor 601 may include, for example, a general-purpose microprocessor (such as a CPU), an instruction set processor and / or a related chipset and / or a special-purpose microprocessor (for example, an application-specific integrated circuit (ASIC)), etc. The processor 601 may also include an onboard memory for caching purposes. The processor 601 may include a single processing unit or multiple processing units for performing different actions of the method flow according to the embodiment of the present disclosure.

[0146] In RAM 603, various programs and data required for the operation of electronic device 600 are stored. Processor 601, ROM 602 and RAM 603 are connected to each other via bus 604. Processor 601 performs various operations of the method flow according to the embodiment of the present disclosure by executing the program in ROM 602 and / or RAM 603. It should be noted that the program can also be stored in one or more memories other than ROM 602 and RAM 603. Processor 601 can also perform various operations of the method flow according to the embodiment of the present disclosure by executing the program stored in the one or more memories.

[0147] According to an embodiment of the present disclosure, the electronic device 600 may further include an input / output (I / O) interface 605, which is also connected to the bus 604. The electronic device 600 may further include one or more of the following components connected to the input / output (I / O) interface 605: an input portion 606 including a keyboard, a mouse, etc.; an output portion 607 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage portion 608 including a hard disk, etc.; and a communication portion 609 including a network interface card such as a LAN card, a modem, etc. The communication portion 609 performs communication processing via a network such as the Internet. A drive 610 is also connected to the input / output (I / O) interface 605 as needed. A removable medium 611, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 610 as needed, so that a computer program read therefrom is installed into the storage portion 608 as needed.

[0148] According to an embodiment of the present disclosure, the method flow according to an embodiment of the present disclosure can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable storage medium, and the computer program contains a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 609, and / or installed from the removable medium 611. When the computer program is executed by the processor 601, the above-mentioned functions defined in the system of the embodiment of the present disclosure are executed. According to an embodiment of the present disclosure, the system, equipment, device, module, unit, etc. described above can be implemented by a computer program module.

[0149] The present disclosure also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or may exist independently without being assembled into the device / apparatus / system. The above computer-readable storage medium carries one or more programs, and when the above one or more programs are executed, the method according to the embodiment of the present disclosure is implemented.

[0150] According to an embodiment of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium. For example, it may include, but is not limited to: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, apparatus, or device.

[0151] For example, according to an embodiment of the present disclosure, the computer-readable storage medium may include the ROM 602 and / or the RAM 603 described above and / or one or more memories other than the ROM 602 and the RAM 603 .

[0152] An embodiment of the present disclosure also includes a computer program product, which includes a computer program, and the computer program contains a program code for executing the method provided by the embodiment of the present disclosure. When the computer program product runs on an electronic device, the program code is used to enable the electronic device to implement the link information processing method provided by the embodiment of the present disclosure.

[0153] When the computer program is executed by the processor 601, the above functions defined in the system / device of the embodiment of the present disclosure are executed. According to the embodiment of the present disclosure, the system, device, module, unit, etc. described above can be implemented by a computer program module.

[0154] In one embodiment, the computer program may rely on tangible storage media such as optical storage devices, magnetic storage devices, etc. In another embodiment, the computer program may also be transmitted and distributed in the form of signals on a network medium, and downloaded and installed through the communication part 609, and / or installed from a removable medium 611. The program code contained in the computer program may be transmitted using any appropriate network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.

[0155] According to an embodiment of the present disclosure, the program code for executing the computer program provided by the embodiment of the present disclosure can be written in any combination of one or more programming languages. Specifically, these computing programs can be implemented using high-level process and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages ​​include, but are not limited to, Java, C++, python, "C" language or similar programming languages. The program code can be executed entirely on the user computing device, partially on the user device, partially on the remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device can be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (for example, using an Internet service provider to connect through the Internet).

[0156] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram may represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of the code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box may also occur in an order different from that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, and the combination of boxes in the block diagram or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions. It can be understood by those skilled in the art that the features recorded in the various embodiments and / or claims of the present disclosure can be combined and / or combined in a variety of ways, even if such a combination or combination is not explicitly recorded in the present disclosure. In particular, without departing from the spirit and teaching of the present disclosure, the features described in the various embodiments and / or claims of the present disclosure may be combined and / or combined in a variety of ways. All of these combinations and / or combinations fall within the scope of the present disclosure.

[0157] The embodiments of the present disclosure are described above. However, these embodiments are only for illustrative purposes and are not intended to limit the scope of the present disclosure. Although the embodiments are described above separately, this does not mean that the measures in the various embodiments cannot be used in combination to advantage. The scope of the present disclosure is defined by the attached claims and their equivalents. Without departing from the scope of the present disclosure, those skilled in the art may make a variety of substitutions and modifications, which should all fall within the scope of the present disclosure.

Claims

1. A link information processing method, comprising: Based on a preset sampling rate, information is collected for P first links among M candidate links to obtain first link information of each of the P first links, wherein each of the candidate links includes multiple nodes in a distributed system, a service call relationship exists between the multiple nodes, M and P are both positive integers, and M>P; In response to at least one target node among the multiple nodes being abnormal, collecting information on Q second links related to the at least one target node among the (MP) candidate links to obtain second link information of each of the Q second links, where Q is a positive integer and (MP)>Q; and Based on a preset display mode, the link acquisition result of the distributed system is displayed on a front-end interface according to the P first link information and the Q second link information.

2. The method according to claim 1, wherein: The distributed system includes a plurality of nodes having a plurality of levels; The collecting information of P first links among the M candidate links based on the preset sampling rate to obtain the first link information of each of the P first links includes: Determine a first number of nodes to be sampled from all nodes at a first level of the distributed system according to the preset sampling rate and the total number of the candidate links; For each of the candidate links, when a node at the first level is the node to be sampled, determining the candidate link as the first link; and Information is collected for each of the first links to obtain the first link information.

3. The method according to claim 2, wherein: All nodes at the first level of the distributed system have a first sampling identifier, where the first sampling identifier indicates whether the node is the node to be sampled; When the first sampling identifier is a first preset value, it indicates that the node is the node to be sampled; When the first sampling identifier is a second preset value, it indicates that the node is not the node to be sampled; The first sampling identifier is transmitted to other nodes that call the node to be sampled based on a first preset method, wherein the first preset method includes at least one of the following: an HTTP request header and a remote procedure call.

4. The method according to claim 1, wherein: Each of the service call relationships represents the service call status between nodes at different levels in the candidate link; In response to at least one target node among the multiple nodes being abnormal, collecting information on Q second links related to the at least one target node among the (MP) candidate links to obtain second link information of each of the Q second links includes: For each of the target nodes, in response to an abnormality in the target node, determining at least one second link including the target node among the (MP) candidate links according to the service call relationship of each candidate link; as well as Information is collected for each of the second links to obtain the second link information.

5. The method according to claim 4, wherein: Each of the target nodes has a second sampling identifier, and the second sampling identifier indicates that an abnormality exists in the node; The second sampling identifier is transmitted to other nodes that respond to the target node based on a second preset manner, wherein the second preset manner includes at least one of the following: an HTTP response header and an HTTP response result.

6. The method according to claim 1, wherein: The first link information represents the parent-child relationship between nodes of a second number of levels in the first link, and the second link information represents the parent-child relationship between nodes of a third number of levels in the second link; The displaying the link acquisition result of the distributed system on the front-end interface based on the preset display mode and according to the P first link information and the Q second link information includes: According to the parent-child relationship between the nodes of the second number of levels in each of the first links and the parent-child relationship between the nodes of the third number of levels in each of the second links, the P first link information and the Q second link information are visualized to obtain a Gantt chart; as well as According to the Gantt chart, a link collection result of the distributed system is determined.

7. The method according to claim 6, wherein: The Gantt chart includes a plurality of blocks located in a rectangular coordinate system, each of the blocks represents the state of the node by color or pattern, and the state of the node includes normal or abnormal; In response to the state of the node being abnormal, the method further includes: Based on the Gantt chart displayed on the front-end interface, the text prompt is displayed at a preset position of a node whose distance status is abnormal.

8. The method according to claim 3 or 5, wherein: The first sampling identifier is transferred based on a service call relationship from upstream to downstream, and the second sampling identifier is transferred based on a service response relationship from downstream to upstream.

9. A link information processing device, comprising: A first collection module is used to collect information of P first links among M candidate links based on a preset sampling rate to obtain first link information of each of the P first links, wherein each of the candidate links includes a plurality of nodes in a distributed system, a service call relationship exists between the plurality of nodes, M and P are both positive integers, and M>P; a second collection module, configured to collect information on Q second links related to the at least one target node among the multiple nodes in response to an abnormality of the at least one target node among the (MP) candidate links, and obtain second link information of each of the Q second links, where Q is a positive integer and (MP)>Q; and The display module is used to display the link collection results of the distributed system on a front-end interface based on a preset display mode and according to the P first link information and the Q second link information.

10. An electronic device comprising: one or more processors; a memory for storing one or more computer programs, It is characterized in that the one or more processors execute the one or more computer programs to implement the steps of the method according to any one of claims 1 to 8.

11. A computer-readable storage medium having a computer program or instruction stored thereon, characterized in that: When the computer program or instruction is executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.

12. A computer program product comprising a computer program or instructions, characterized in that When the computer program or instruction is executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.

Citation Information

Cited By

  • Communication link recovery method, device, equipment, medium and program product

    CN121277746A

  • Communication link recovery method, apparatus, device, medium, and program product

    CN121277746B