Link tracking method, device, storage medium and program product

By setting up a link tracking device in the server kernel state of the distributed application system, monitoring and reporting link information, the protocol adaptation requirements and intrusion risks of link tracking in the existing technology are solved, and full link tracking without intrusion is achieved and complete link information is obtained.

WO2025158234A1PCT designated stage expired Publication Date: 2025-07-31CLOUD INTELLIGENCE ASSETS HOLDING (SINGAPORE) PTE LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
PCT/IB2025/050345
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-01-23
Filing Date
2025-01-13
Publication Date
2025-07-31

AI Technical Summary

Technical Problem

The existing link tracking solutions have problems in distributed application systems such as the need for adaptation of communication protocols, risk of intrusion, increased transmission overhead and inability to full-link tracking, especially in different protocols and application frameworks, which are difficult to achieve non-invasive full-link tracking.

Method used

Deploy link tracking devices in the server kernel state of distributed application systems. By setting up mount points in the kernel-state network subsystem and process management system, monitoring the link information between requests and applications, and reporting them to the link accounting center, generating complete link tracking information to avoid interference and modification of requests.

Benefits of technology

It realizes full-link tracking without intrusion in distributed application systems, obtains complete link information, including requests to enter the application, in-app processes/thread switching and process communication between different applications, avoiding additional communication protocol adaptation and transmission overhead.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure IB2025050345_31072025_PF_FP_ABST
    Figure IB2025050345_31072025_PF_FP_ABST
Patent Text Reader

Abstract

Provided in the embodiments of the present disclosure are a link tracking method, a device, a storage medium and a program product. In the present solution, a link tracking module is provided in a kernel mode of a server, and mounting points are configured for the link tracking module in a network subsystem and a process management system in the kernel mode, and cooperate with a link accounting center outside the server to track links when a request enters an application, inside an application and between applications. The whole link tracking process does not intervene in a distributed application system; moreover, link tracking information obtained by tracking is relatively complete since the present solution can track a situation of requests entering applications, and also can track intra-application process / thread switching procedures and inter-application process communication procedures. The technical solution of the present disclosure does not need to perform extra communication protocol adaptation on requests, does not need to modify requests, and will not bring intrusion risks to distributed applications.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] Link Tracing Method, Device, Storage Medium, and Program Product This disclosure claims priority to Chinese patent application number 202410095146.2, filed with the China Patent Office on January 23, 2024, entitled "Link Tracing Method, Device, Storage Medium, and Program Product," the entire contents of which are incorporated herein by reference. Technical Field This disclosure relates to the field of microservices technology, and more particularly to a link tracing method, device, storage medium, and program product. Background: Link tracing is an essential foundational capability in current microservices architectures. Link tracing can restore call links between applications for distributed application developers, helping them quickly analyze performance bottlenecks in distributed application architectures, diagnose problems, and improve development and diagnostic efficiency in the microservices era. Existing link tracing solutions carry a tracing tag in requests and, during subsequent application flows, use additional enhanced technology to sequentially copy the tracing tag to subsequent requests. Requests carrying the same tracing tag are considered to be on the same link, thus enabling link tracing. However, current solutions have certain limitations: (1) Carrying a tracking tag in a request requires adaptation to the communication protocol used by the application; (2) Carrying a tracking tag in a request may introduce an intrusion risk to the application; and (3) Full-link tracking cannot be implemented for applications that do not support adding tracking tags. SUMMARY Various aspects of the present disclosure provide a link tracking method, device, storage medium, and program product for implementing full-link tracking without modifying the request and without intruding on the application.An embodiment of the present disclosure provides a link tracing method, which is applied to a link tracing device on any server in a distributed application system. The link tracing device includes a first link tracing module located in kernel mode, wherein the first link tracing module sets mount points in at least a network subsystem and a process management system in kernel mode. The method includes: when a first mount point in the network subsystem for monitoring whether a first request has been received is triggered, obtaining information about a first application on the server responsible for processing the first request as entry link information and reporting the information to a link accounting center, so that the link accounting center adds the entry link information to target link tracing information corresponding to the first request; when a second mount point in the process management system for monitoring process / thread switching within an application is triggered, obtaining intra-application link information within the first application for the first request and reporting the information to the link accounting center, so that the link accounting center adds the intra-application link information to the target link tracing information; and when a third mount point in the network subsystem for monitoring inter-application process communication is triggered, obtaining inter-application link information between the first application and a second application for the first request and reporting the information to the link accounting center, so that the link accounting center adds the inter-application link information to the target link tracing information. An embodiment of the present disclosure further provides a link tracking device, which is deployed on any server in a distributed application system. The device includes: a first link tracking module located in kernel mode, wherein the first link tracking module sets a mount point in at least the network subsystem and process management system in kernel mode; wherein the first link tracking module is configured to: when a first mount point in the network subsystem for monitoring whether a first request is received is triggered, obtain information about a first application on the server responsible for processing the first request as entry link information and report it to a link accounting center, so that the link accounting center can add the entry link information to target link tracking information corresponding to the first request; when a second mount point in the process management system for monitoring process / thread switching within an application is triggered, obtain intra-application link information within the first application for the first request and report it to the link accounting center, so that the link accounting center can add the intra-application link information to the target link tracking information; and when a third mount point in the network subsystem for monitoring inter-application process communication is triggered, obtain inter-application link information between the first application and the second application for the first request and report it to the link accounting center. This allows the link accounting center to add the inter-application link information to the target link tracking information.Embodiments of the present disclosure also provide an electronic device, comprising: a memory and a processor; the memory is configured to store one or more computer instructions; and the processor is configured to execute the one or more computer instructions to perform the steps of the link tracing method provided in embodiments of the present disclosure. Embodiments of the present disclosure also provide a computer-readable storage medium storing a computer program. When the computer program is executed by the processor, the processor is enabled to perform the steps of the link tracing method provided in embodiments of the present disclosure. The present disclosure also provides a computer program product comprising a computer program / instructions. When executed by a processor, the computer program / instructions cause the processor to implement the link tracing method provided by the present disclosure. In this embodiment, a link tracing module is provided in the kernel state of a server in a distributed application system. By setting mount points for the link tracing module in the kernel state's network subsystem and process management system, and cooperating with a link accounting center external to the server, the module tracks links as requests enter applications, within applications, and between applications. During the entire link tracing process, the distributed application system is not interfered with. Furthermore, the traced link tracing information is relatively complete, capable of tracking not only the entry of requests into applications but also the process / thread switching within applications and the process communication between different applications. The present disclosure eliminates the need to add tracing tags to requests during the link tracing process. Therefore, there is no need for additional communication protocol adaptation or modification of requests, and no intrusion risk to distributed applications. BRIEF DESCRIPTION OF THE DRAWINGS The drawings described herein are used to provide a further understanding of the present disclosure and constitute a part of the present disclosure. The illustrative embodiments of the present disclosure and their descriptions are used to explain the present disclosure and do not constitute an improper limitation on the present disclosure.In the accompanying drawings: Figure 1 is a schematic diagram of ThreadLocal in multi-threaded operation according to an exemplary embodiment of the present disclosure; Figure 2 is a schematic diagram of the link tracing process according to an exemplary embodiment of the present disclosure; Figure 3 is a schematic diagram of the link tracing method according to an exemplary embodiment of the present disclosure; Figure 4 is a schematic diagram of the request flow according to an exemplary embodiment of the present disclosure; Figure 5 is a schematic diagram of a first application and a second application on the same server according to an exemplary embodiment of the present disclosure; Figure 6 is a schematic diagram of a first application and a second application on different servers according to an exemplary embodiment of the present disclosure; Figure 7 is a schematic diagram of a request flow between different applications on the same server and between different servers according to an exemplary embodiment of the present disclosure; Figure 8 is a schematic diagram of the structure of a link tracing device including a second link tracing module according to an exemplary embodiment of the present disclosure; Figure 9 is a schematic diagram of the link tracing method in a practical scenario according to an exemplary embodiment of the present disclosure; Figure 10 is a schematic diagram of the link tracing device according to an exemplary embodiment of the present disclosure; and Figure 11 is a schematic diagram of an electronic device according to an exemplary embodiment of the present disclosure. DETAILED DESCRIPTION OF THE EMBODIMENTS To make the objectives, technical solutions, and advantages of the present disclosure more clear, the technical solutions of the present disclosure will be clearly and completely described below in conjunction with specific embodiments of the present disclosure and the corresponding drawings. Obviously, the described embodiments are only some of the embodiments of the present disclosure, and are not all of them. All other embodiments derived by persons of ordinary skill in the art based on the embodiments of this disclosure without inventive effort are within the scope of protection of this disclosure. It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, storage, and display) involved in this disclosure are all authorized by the user or fully authorized by all parties. The collection, use, and processing of relevant data must comply with the relevant laws, regulations, and standards of the relevant countries and regions, and corresponding operation portals are provided for users to choose to authorize or reject. Furthermore, the various models involved in this disclosure (including but not limited to language models or large models) comply with relevant laws and standards. A centralized application system is a system built on a single hardware node (such as a high-performance computer) that displays comprehensive functionality to users and places extremely high demands on the system's computing and storage capabilities. However, with the rapid advancement of hardware technology, hardware costs have significantly decreased, while software complexity has increased. The performance of a single system cannot meet complex data computing tasks, and the complexity of software logic has also led to a significant increase in maintenance costs.Furthermore, the reliability of a single node is difficult to guarantee, and occasional downtime and other behaviors are inevitable, impacting software availability. Against this backdrop, distributed application systems have emerged. Distributed application systems are network systems built on software, consisting of multiple independent hardware nodes, such as computers or servers. Distributed application systems can decompose existing systems into services. For users, a complete interaction process is divided into multiple microservices in a distributed application system, each of which can exist on different hardware nodes. This approach allows complex monolithic software systems to be broken down into smaller, more manageable components, and a single application can be divided into a set of small services that coordinate and cooperate with each other. However, this flexibility comes at the cost of complexity. When a distributed application system receives a request, the request typically undergoes a complex process within the distributed application system. Therefore, existing technologies typically use full-link tracing technology to track the request flow path and status within distributed application systems. This allows distributed application developers to restore the call chain between applications, helping them quickly analyze performance bottlenecks in distributed application architectures, diagnose problems, and improve development and diagnostic efficiency in the microservices era. Existing chain tracing solutions include a tracing marker in the request and, during subsequent application flows, use enhanced technology to copy the tracing marker to subsequent requests. Requests carrying the same tracing marker are considered to be on the same chain, enabling chain tracing. For example, using the Hypertext Transfer Protocol (HTTP), a header field can be added to the HTTP request, carrying a tracing identifier (Traceld). When the request is subsequently transferred to an application implemented in Java, technologies such as Java agents can be used to copy the header fields of subsequent requests. Specifically, within the process, the Traceld field can be written to a Java thread local variable (ThreadLocal). Among them, the function of Java agent technology is to provide a complete set of backdoors for the Java virtual machine, through which the virtual machine can be monitored and analyzed, and even the operation of the virtual machine can be intervened.Among them, ThreadLocal is provided by the Java Development Kit (JKD) and can provide thread-local variables. If a ThreadLocal variable is created, each thread that accesses this variable will have a copy of this variable. In actual multi-threaded operations, the variables in their own local memory are operated, thus avoiding thread safety issues, as shown in Figure 1. The above solution has certain limitations: (1) For different protocols such as HTTP and Remote Procedure Call (RPC) protocols, the location and field names of the fields required to add Traceld in the request may be different. Therefore, carrying tracing tags in the request requires additional adaptation to the communication protocol used by the application. (2) In some cases, when carrying tracing tags in the request, the additional field names may be the same as the application fields, causing conflicts, thereby bringing intrusion risks to the application. (3) Carrying tracing tags in the request can increase transmission overhead, such as consuming more transmission bandwidth and increasing transmission delay. (4) In some scenarios, some applications do not allow adding additional fields to requests, so it is impossible to add tracking tags to requests. For these applications that do not support adding tracking tags, full-link tracking cannot be achieved. (5) If it is necessary to use additional enhancement technology to copy tracking tags in the application flow, it is necessary to pre-adapt the application language and application framework. For example, when developing a Java application, it may rely on network frameworks such as Netty, WebFlux, or Tomcat. In this case, when adding tracking tags to the requests in the Java application, it is necessary to use Java agent technology to adapt to network frameworks such as Netty, WebFlux, or Tomcat. For another example, when developing an application using the Go language (also known as Golang, a programming language), it may rely on network frameworks such as NET or GINN. In this case, when adding tracking tags to the requests of the Go application, it is necessary to use binary enhancement to adapt to network frameworks such as NET or GINN. In an embodiment of the present disclosure, a link tracking device can be deployed on a server in a distributed application system. The device includes at least a first link tracking module deployed in kernel state. By setting mount points for the link tracking module in relevant systems in kernel state, these mount points can be used to monitor whether the server has received the first request and to monitor link information within an application and between different applications. The monitored information is then sent to a link accounting center for processing by the link accounting center to obtain relatively complete link tracking information.Figure 2 illustrates the above process. As shown in Figure 2, the dashed arrows represent the link tracking path, and the solid arrows represent the request transmission path or flow path. As shown in the figure, the first request can flow not only between different applications on the same server, but also between the same application on the same server and between different applications on different servers. These flows can all be tracked by the first link tracking module, and the tracked link information can be synchronized to the link accounting center. Server 10 can use its first link tracking module to record the flow of the first request between different applications on server 10. Server 20 can also use its first link tracking module to record the flow of the first request within server 20. Based on this information, the first tracking module can report the recorded information to the link accounting center, which can then generate target link tracking information corresponding to the first request. During this process, no intervention is made on the request, thus completing full link tracking without intrusion into the application. This approach, on the one hand, provides relatively complete link tracing information, capable of describing the entire process of a request's flow within a distributed application system. This not only tracks the entry of a request into an application, but also the process / thread switching within the application, as well as the process communication between different applications. Furthermore, during this link tracing process, there's no need to add tracing tags to requests, eliminating the need for additional communication protocol adaptation and posing no risk of intrusion into the distributed application system. Furthermore, this approach doesn't increase request transmission overhead, and there's no restriction on whether an application supports adding additional fields to requests. This allows for full link tracing of applications developed in any programming language and any network framework. The following, combined with the accompanying drawings, details the technical solutions provided by various embodiments of the present disclosure. Figure 3 is a system architecture diagram of a distributed application system 100 provided by the present disclosure. As shown in Figure 3, distributed application system 100 may include multiple servers, with network connections between the multiple servers. Figure 3 uses two servers, server 10 and server 20, as an example, but does not limit the number of servers. The server can be implemented as a common server, a cloud host, a cloud-based virtual center, a cloud-based elastic computing instance, etc., and this embodiment does not impose any restrictions on this. As shown in FIG3 , the internal architecture of any server can be divided from bottom to top into: a hardware layer, a kernel layer, and an application layer.The hardware layer includes various server hardware resources, such as processors, storage (including RAM and hard drives), communication components, displays, power supplies, audio components, and various external devices. Figure 3 illustrates some of these hardware resources as an example. An operating system, or kernel layer, runs on the server's hardware resources. Above the operating system is the application layer. The application layer includes various applications running on the server, such as databases or data warehouses, streaming computing applications, log processing applications, distributed computing, and various virtual machines or containers. In contrast to applications, an operating system is a set of interrelated system software programs that manage and control various physical machine operations, utilize and run hardware and software resources, and provide public services to facilitate user interaction. In the embodiments of the present disclosure, the operating system serves as a bridge between applications and hardware resources. The operating system includes drivers for various hardware resources, which are used to drive these resources. A server's operating system may include, but is not limited to, a network subsystem, a process management system, a file management system, and a storage management system. The network subsystem is a core component of the operating system, responsible for handling network-related tasks. The process management system is used to manage user-mode application processes or threads within them. The file management system provides interfaces for users or programmers to access, create, modify, delete, and share files, and is used to store, organize, and manage files and directories. The storage management system is used to manage memory resources, specifically for operations such as memory allocation, protection, and expansion. In the embodiments of the present disclosure, the server's operating system is not limited to a specific type; any operating system that allows the addition of new functional modules is applicable to the embodiments of the present disclosure, including, but not limited to, Windows, Linux, Unix, and Android. In this embodiment, a link tracking device is added to the server. This link tracking device includes at least a link tracking module added to the kernel layer. To distinguish it from other link tracking modules, the link tracking module in the kernel layer is referred to as the first link tracking module. In the embodiments of the present disclosure, the implementation of the link tracking module in the kernel layer is not limited. For example, some operating systems provide user-friendly code embedding mechanisms that allow users to embed and run customized program code in the kernel. In this case, the first link tracking module can be embedded in the kernel layer based on these mechanisms.Taking the Linux operating system as an example, the extended Berkeley Packet Filter (eBPF) technology is provided to users. Based on the Elastic Byte Programming Framework introduced in software-defined networking, it is a key feature of the Linux operating system. Based on this, an optional implementation for adding a first link tracing module to the server's kernel layer involves using eBPF technology to mount an eBPF monitoring program into the kernel layer. The eBPF monitoring program in the kernel layer can be implemented as the first link tracing module in the link tracing device. Specifically, a pre-written eBPF monitoring program can be compiled into eBPF bytecode using a preset compiler, and this eBPF bytecode is loaded into the kernel layer, thereby embedding the first link tracing module in the kernel layer. In this embodiment, the eBPF monitoring program implemented as the first link tracing module primarily performs link tracing on requests on the server to which it belongs. In addition to adding a first link tracking module to the kernel layer, to enable the first link tracking module to track requests on its server, corresponding mount points are set for the first link tracking module at certain kernel layer function locations. Mount points connect existing functional modules or functions in the kernel layer to the first link tracking module. These mount points are associated with specific events, which can be considered triggering events for the first link tracking module. When kernel code executes at a corresponding mount point and a specific event occurs, the first link tracking module is executed, tracking the request processing at that mount point. Specifically, certain functions in the kernel layer's network subsystem, process management system, and file management system can be used as mount points. By setting a mount point, when a trigger event associated with the mount point (function) occurs, the first link tracking module can be executed to monitor and collect information about the request processing at the mount point. Consequently, link tracking of the request can be completed based on the first link tracking module and the set mount point. The following describes the link tracking process based on the link tracking device in detail, in conjunction with the system architecture shown in Figures 4-7. In Figures 4-7 , server 10 in a distributed application system receives a first request. Multiple applications are deployed on each server in the distributed application system. These applications can provide external services and call each other. The applications that can call each other can be located on the same server or on different servers, without limitation.The first request can originate from outside of server 10. For example, it can be a request issued by an application on another server within the distributed application system, or it can be a request sent by a user or client outside the distributed application system. Of course, the first request can also be an internal request initiated by an application on server 10 to request another application. Figure 4 illustrates an example of a first request originating from outside server 10. A link tracking device is deployed on server 10, including a first link tracking module added to the kernel layer. The first link tracking module can set a first mount point in the network subsystem for monitoring whether the first request has been received. The first link tracking module can also set a second mount point in the process management system for monitoring process switching or thread switching within an application, and a third mount point in the network subsystem for monitoring inter-application process communication. The terms "first," "second," and "third" are used above to define mount points. These terms are used only to distinguish between different mount points and do not define the order or method of mounting the mount points. When the first mount point is triggered, the first link tracking module can obtain information about the first application on the server responsible for processing the first request as entry link information. The first application refers to the application on the server responsible for processing the first request. For example, if the first request is a navigation request, the first application may be the navigation application responsible for processing the request. The information about the first application can be used to describe the application's running information related to the first request. Specifically, the information about the first application includes at least the identification information of the first application. The entry link information refers to the starting point information for full-link tracing of the first request on server 10. The entry link information may include at least path information for the first request, including, but not limited to, the identification of the server issuing the first request, the identification of the current server 10, and the identification information of the first application on the current server 10 that receives the first request. Furthermore, in a multi-process, multi-threaded system, the entry link information may also include the process ID of the process in the first application currently responsible for processing the first request and the thread ID of the thread in that process currently responsible for processing the first request. Furthermore, the inbound link information may also include status information of the first request, such as whether the first request was successfully received and stored in the receive queue. The inbound link information may also include information such as the position of the first request in the receive queue and whether the first request was scheduled. As shown in FIG4 , after obtaining the inbound link information, the first link tracking module may report it to the link accounting center, so that the link accounting center can add the inbound link information to the target link tracking information corresponding to the first request.Each request corresponds to one link tracking information. In the disclosed embodiment, for ease of distinction, the link tracking information corresponding to the first request is referred to as target link tracking information. As shown in Figure 4 , when the second mount point is triggered, the first link tracking module can obtain intra-application link information for the first request within the first application. This intra-application link information describes the application process / thread switching process when the first request circulates within the first application. The first link tracking module can report the intra-application link information to the link accounting center, which can then add the intra-application link information to the target link tracking information. As shown in Figure 4 , when the third mount point is triggered, the first link tracking module can obtain inter-application link information between the first application and the second application for the first request and report it to the link accounting center. The second application refers to an application other than the first application in the distributed application system. The second application can be another application on the server where the first application resides, i.e., the first and second applications are located on the same server, as shown in Figure 4 ; alternatively, the second application can be another application located on another server, i.e., the first and second applications are located on different servers, as shown in Figure 6 . Inter-application link information describes the process of process / thread switching between applications when a first request circulates between them. The first link tracking module can report this inter-application link information to the link accounting center, which can then add it to the target link tracking information. It should be noted that process / thread switching during intra-application and inter-application switching are not necessarily triggered. This depends on the first request, the type of the first application, and the application scenario. Regardless of whether they are triggered, the second and third mount points exist. Only when they are triggered does the first link tracking module perform the corresponding monitoring tasks. In Figures 4-7, dashed arrows represent link tracking paths, and solid arrows represent the flow path of the first request. These two paths are independent of each other. This means that the link tracking process does not affect or interfere with the flow of requests. The first link tracking module tracks requests from a spectator's perspective, and the requests or applications are unaware of the entire link tracking process.That is, in the disclosed embodiments, a link tracking module is set up in the server's kernel state. By setting mount points for this link tracking module in the kernel's network subsystem and process management system, and cooperating with a link accounting center external to the server to track links as requests enter applications, within applications, and between applications, the distributed application system is not interfered with throughout the link tracking process. Furthermore, the resulting link tracking information is relatively complete, tracking not only the entry of requests into applications but also the process / thread switching within applications and the process communication between different applications. The disclosed technical solution does not require additional communication protocol adaptation or modification of requests, and does not pose an intrusion risk to distributed applications. In some optional embodiments, as shown in FIG4 , the first mount point in the aforementioned embodiment can be a first function in the network subsystem for managing communication connections. The first function can be used to monitor all open ports on the network subsystem and, upon detecting receipt of a first request on a target port, report the first request to the first application based on the first request's destination address and the target port number, so that the first thread in the first process of the first application can process the first request. The first process refers to the process in the first application that processes the first request, and the first thread refers to the thread in the first process that needs to process the first request. Specifically, when the first request is received, the first function can be triggered to determine the destination address and target port number of the first request. Based on the target port number and the destination address of the first request, the first application that processes the first request is determined. Different ports correspond to different applications. When launching an application, the operating system can assign a unique port to the application and establish a mapping between the port and the application. The first function can determine whether the server 10 is the recipient of the first request based on the destination address of the first request. If the server 10 is determined to be the recipient of the first request, the first function can further determine the application that processes the first request based on the port number of the target port received. The first request can then be reported to the first application, which will then assign a process (the first process) to process the first request. Furthermore, in a multi-threaded scenario, the first process will also assign a thread (the first thread) to process the first request.Optionally, when the operating system utilizes a socket communication mechanism, the communication connection may be a socket connection, and the first function may be a function for managing Transmission Control Protocol (TCP) connection information, such as the sk_msg function. The socket communication mechanism provides a socket buffer. A socket can be understood as a file descriptor. A file descriptor can point to two ends (i.e., two socket buffers). Both socket buffers are readable and writable, thereby implementing bidirectional full-duplex communication. The connection between two socket buffers is a socket connection. The principle of socket communication can be understood as follows: one end writes data to the sender's buffer via a file descriptor, and the other end receives data from the receiver's buffer. Alternatively, one end reads data while the other writes data, which will not be further described here. The sk_msg function retrieves each data packet sent by the socket and determines the destination address of the first request based on the fields of msg (e.g., IP address, port, etc.) in the function. The sk_msg function can also record the request identifier and, when the first application processes the request, the process and thread information for the request. Accordingly, when the first link tracking module obtains information about the first application on the server responsible for processing the first request as inbound link information, it can obtain the identifier of the first request, the process ID of the first process, and the thread ID of the first thread from the first function. The identifier of the first request includes, but is not limited to, at least one of the following: source address, destination address, and request sequence number, and the specific identifier may vary depending on the communication protocol. The first link tracking module can then report the identifier of the server 10, the process ID of the first process, and the thread ID of the first thread as inbound link information to the link accounting center based on the identifier of the first request. Specifically, this step can be implemented as follows: the first link tracking module can report the identifier of the first request to the link accounting center to request the target tracking identifier corresponding to the target link to which the first request belongs. At this time, two situations may occur. The first situation is that the link accounting center already has the tracking identifier of the target link to which the first request belongs, recorded as the target tracking identifier, and the first link tracking module can receive the target tracking identifier returned by the link accounting center. The second situation is that: the first request is the first request, and the link accounting center does not have the tracking identifier of the target link to which the first request belongs. Therefore, the first link tracking module cannot receive the target tracking identifier returned by the link accounting center.In the first case, the first link tracking module may report the target tracking identifier, the server identifier, the process number of the first process, and the thread number of the first thread to the link accounting center. The link accounting center then adds the server identifier, the process number of the first process, and the thread number of the first thread to the target link tracking information based on the target tracking identifier. The link accounting center may determine the target link corresponding to the first request based on the target tracking identifier and add the server identifier, the process number of the first process, and the thread number of the first thread to the target link tracking information corresponding to the target link. In the second case, the first link tracking module may create or assign a target tracking identifier for the target link to which the first request belongs. The first link tracking module may then report the target tracking identifier, the server identifier, the process number of the first process, and the thread number of the first thread to the link accounting center. Based on this reported information, the link accounting center may generate target link tracking information corresponding to the target tracking identifier and add the server identifier, the process number of the first process, and the thread number of the first thread to the target link tracking information. Optionally, when the link accounting center adds the server 10 identifier, the process ID of the first process, and the thread ID of the first thread to the target link tracking information, it may first form a triplet of the server identifier, the process ID of the first process, and the thread ID of the first thread, and then add the triplet to the target link tracking information of the target link. In this manner, the first link tracking module can more accurately determine the entry link information and report it to the link accounting center. The link accounting center can then collaborate with the first link tracking module to add the entry link information to the target link tracking information corresponding to the first request, thereby obtaining more accurate and complete link tracking information. In some optional embodiments, as shown in FIG4 , the second mount point may be a second function in the process management system for managing process creation information. The second function may be used to respond to a child process creation request from the first process in the first application, create a second process as a child process, and switch the thread processing the first request from the first thread in the first process to the second thread in the second process. The first process here and the first process mentioned above are the same process, namely, the process currently processing the first request. The second process is the child process of the first process, and the first process is the parent process of the second process. The relationship between the child process and the parent process can be understood as follows: the child process can be created by the parent process, inherits most of the properties of the parent process, and is used to help the parent process perform tasks.Alternatively, if the operating system utilizes a socket communication mechanism, the communication connection can be a socket connection, and the second function can be a function used to create a process, such as the alloc_pid (allocate process identifier) ​​function. The alloc_pid function can be used to: assign a corresponding PID (process identifier) ​​to the child process to complete the child process creation and thereby obtain the application's process creation information. The alloc_pid function can create a child process using either a fork or spawn method. The fork method forks a second process from a first process by copying the parent process's current state and memory; the second process inherits most of the first process's properties. The spawn method creates a child process by running a series of spawn functions, creating a child process from scratch. The alloc_pid function can record the process ID of the first process, the thread ID of the first thread, the process ID of the second process, and the thread ID of the second thread during the child process creation process. Accordingly, when the first link tracking module obtains the intra-application link information of the first request within the first application and reports it to the link accounting center, this can be achieved in the following manner: the first link tracking module can obtain the process ID of the first process, the thread ID of the first thread, the process ID of the second process, and the thread ID of the second thread from the second function. The first link tracking module can then report the server 10 identifier, the process ID of the first process, the thread ID of the first thread, the process ID of the second process, and the thread ID of the second thread as the intra-application link information to the link accounting center. Based on the server 10 identifier, the process ID of the first process, and the thread ID of the first thread, the link accounting center can add the server 10 identifier, the process ID of the second process, and the thread ID of the second thread to the target link tracking information. Specifically, the link accounting center can match the server 10 identifier, the process ID of the first process, and the thread ID of the first thread as a triplet against the target link tracking information. Specifically, the link accounting center can determine whether the target link tracking information contains the server 10 identifier, the process ID of the first process, and the thread ID of the first thread. If so, the target link tracking information is considered a match; if not, the target link tracking information is considered a mismatch. The link accounting center may add the identifier of the server 10, the process number of the second process, and the thread number of the second thread to the target link tracking information when the identifier of the server 10, the process number of the first process, and the thread number of the first thread are matched in the target link tracking information.In this way, the first link tracking module can more accurately determine the intra-application link information of the first request within the first application and report it to the link accounting center. The link accounting center can then collaborate with the first link tracking module to add the intra-application link information to the target link tracking information, thereby obtaining more accurate and complete link tracking information. In some optional embodiments, the third mount point can be a third function in the network subsystem for managing inter-process communication. This third function can be used to: respond to an inter-process call request initiated by a third thread in a third process of the first application to the second application to process the first request, and establish an inter-process communication connection between the third thread in the third process of the first application and the fourth thread in the fourth process of the second application. The third process refers to the current process of the first application and can be either the first process or the second process mentioned above, depending on whether a process switch occurred in the previous step. For example, if no process switch occurred in the previous step, the third process can be the first process; if a process switch occurred in the previous step, the third process can be the second process. The third thread is the thread in the third process that processes the first request or performs operations related to the first request. The addition of "first" and "second" before the application name is merely used to distinguish the two applications and does not restrict the type, location, or order of the applications. The second application may be located on the same server as the first application or on another server, and this embodiment does not impose any restrictions. The fourth process refers to a process on the second application that establishes an inter-process communication connection with the first application. The fourth thread refers to the thread in the fourth process responsible for processing the first request or performing operations related to the first request. This thread needs to establish an inter-process communication connection with the third thread to facilitate the flow of the first request between applications. In other words, when processing the first request, the third thread in the third process of the first application may need to rely on other processes in other applications to process the first request, or require other processes in other applications to provide services for processing the first request. In this case, the third thread may initiate an inter-process call request to the second application to request that the relevant process / thread of the second application be called to process the first request or provide services. The third function may respond to this inter-process call request and establish an inter-process communication connection between the third thread in the third process of the first application and the fourth thread in the fourth process of the second application. After the inter-process communication connection is established, corresponding inter-process calls can be made between the first application and the second application.Accordingly, when the first link tracking module obtains inter-application link information between the first application and the second application for the first request and reports it to the link accounting center, it can obtain association information of the inter-process communication connection from the third function. This association information describes the communication association relationship established between the first application and the second application and includes at least the process ID of the third process and the thread ID of the third thread, and may also include other information. This other information includes, but is not limited to, at least one of the following: the process ID of the fourth process, the thread ID of the fourth thread, and identification information of the request sent to the second application. The first link tracking module can then report the server 10 identifier and the association information as inter-application link information to the link accounting center. The link accounting center can add the other information in the association information to the target link tracking information based on the server 10 identifier, the process ID of the third process, and the thread ID of the third thread. Specifically, the link accounting center may use the server 10 identifier, the process ID of the third process, and the thread ID of the third thread as a triplet for matching against the target link tracking information. Specifically, the link accounting center determines whether the target link tracking information contains the server 10 identifier, the process ID of the third process, and the thread ID of the third thread. If so, the target link tracking information is considered a match; if not, the target link tracking information is considered a mismatch. If the server 10 identifier, the process ID of the third process, and the thread ID of the third thread match the target link tracking information, the link accounting center may add other information from the associated information, excluding the server 10 identifier, the process ID of the third process, and the thread ID of the third thread, to the target link tracking information. It should be noted that the type of inter-process call request varies depending on the server where the second application resides. For example, when the second application resides on the same server as the first application, the inter-process call request is a local inter-process call request. When the second application resides on another server, the first application needs to establish an inter-process communication connection with the second application across servers. In other words, the inter-process call request is a remote inter-process call request. Furthermore, the inter-process communication connection association information obtained from the third function differs depending on the server where the second application resides and the type of inter-process call request. Based on this, the following describes the two scenarios described above, "the second application is on the current server 10 where the first application resides" and "the second application is on another server 20," with reference to Figures 5 and 6. Figure 6 simplifies the server 20 and does not limit its architecture. The architecture of server 20 can be the same as or similar to that of server 10, and this embodiment does not impose any limitations.In case 1, as shown in Figure 5 , when the second application is currently located on the same server as the first application, that is, the first and second applications are on the same server, the first link tracking module may further include a fourth mount point set in the file system. The file system is a computer system that names and logically stores and restores files. The file system can provide local shared files to support reading and writing in the local shared files by threads of different applications. In other words, data between different applications can be exchanged in kernel mode using the file system. Furthermore, the file system can provide the name of the local shared file and the file offset written by the thread in the local shared file. The file offset describes the thread's position when reading or writing in the local shared file. Based on this, the third function can be specifically configured to: when the inter-process call request is a local inter-process call request, write the third thread's data to the local shared file, allowing the fourth thread to read data from the local shared file. During this reading and writing process, the read and write operations in the local shared file can trigger the fourth mount point. Accordingly, when the first link tracking module obtains association information of the inter-process communication connection from the third function, this can be achieved in the following manner: When the fourth mount point is triggered by a write operation, the first link tracking module can obtain from the third function the process ID of the third process, the thread ID of the third thread, the name of the local shared file, and the first file offset written by the third thread in the local shared file. When the fourth mount point is triggered by a read operation, the first link tracking module can obtain from the third function the process ID of the fourth process, the thread ID of the fourth thread, the name of the local shared file, and the second file offset read from the local shared file by the fourth thread. Based on the above steps, the first link tracking module can use the process ID of the third process, the thread ID of the third thread, the process ID of the fourth process, and the thread ID of the fourth thread as association information based on the name of the local shared file, the first file offset, and the second file offset. Specifically, if the local shared file names are identical and the first and second file offsets are identical, this indicates that the local shared file to which the third thread writes data and the local shared file to which the fourth thread reads data are identical. Furthermore, the location where the third thread writes data in the local shared file and the location where the fourth thread reads data from the local shared file are identical, indicating no positional offset. In this case, the first link tracking module may use the process ID of the third process, the thread ID of the third thread, the process ID of the fourth process, and the thread ID of the fourth thread as association information.If the names of the local shared files are different, the local shared file for the third thread to write data and the local shared file for the fourth thread to read data can be unified to ensure that the shared file written by the third thread and read by the fourth thread are the same file. If the first file offset and the second file offset are different, this indicates that the location where the third thread writes to the local shared file is different from the location where the fourth thread reads from the local shared file, resulting in a position offset. In this case, the first link tracking module can align the location where the third thread writes to the local shared file and the location where the fourth thread reads from the local shared file. After alignment, the process number of the third process, the thread number of the third thread, the process number of the fourth process, and the thread number of the fourth thread can be used as the aforementioned association information. In case 2, as shown in Figure 6, when the second application is located on another server, that is, the first application and the second application are located on different servers, the third function can be specifically configured to: when the inter-process call request is a remote inter-process call request, generate a second request based on the inter-process call request and send the second request to the second application. The second request can be understood as a remote request that can be transmitted between different servers. The third function can generate different types of requests based on different request protocols. Different requests have different request headers. For example, if the request protocol is HTTP, an HTTP request can be generated based on that protocol; if the request protocol is TCP, a TCP request can be generated based on that protocol; and if the request protocol is File Transfer Protocol (FTP), an FTP request can be generated based on that protocol. When generating the second request, the third function can determine identification information of the second request. The identification information of the second request includes, but is not limited to, at least one of the following: a source address, a destination address, and a request sequence number. Accordingly, when the first link tracking module obtains association information of the inter-process communication connection from the third function, it is specifically configured to: obtain the process ID of the third process, the thread ID of the third thread, and the identification information of the second request from the third function as association information. In this manner, the first link tracking module can more accurately determine the inter-application link information between the first application and the second application for the first request and report it to the link accounting center. Inter-application link information is more comprehensive, encompassing not only link information between applications on different servers but also link information between applications across multiple servers. The link accounting center can collaborate with the first link tracking module to add intra-application link information to the target link tracking information, resulting in more accurate and complete link tracking information.In addition to the aforementioned cases where the first and second applications are located on the same server, and where the first and second applications are located on different servers, the following case may also exist: the first request first passes through two applications on the same server before going to a third application on another server. This case can be considered a combination of the previous two cases, as shown in Figure 7. The tracking process between different applications on the same server in Figure 7 can be seen in the embodiment shown in Figure 5, and the tracking process between different applications across servers in Figure 7 can be seen in the embodiment shown in Figure 6. These will not be described in detail here. In some optional embodiments, as shown in Figure 8, the link tracking device may further include: a second link tracking module located in user mode. Different from the first link tracking module in kernel mode, the first link tracking module is used to track the flow of the first request in kernel mode, while the second link tracking module is used to track the flow of the first request in user mode. User mode may also include: a request processing system and a coroutine management system. Coroutines, as distinguished from processes and threads, are a feature provided by programming languages ​​(the switching method and process between coroutines can be determined by the programmer). They are user mode operations and can also be understood as different functions in a thread that can be quickly switched between. The request processing system includes a standard library for handling protocol requests, which is used to process requests received in user mode. Optionally, if the programming language is Go, the standard library can be the net / http library. The coroutine management system includes coroutine creation functions and coroutine switching functions, which are used to create, convert, and monitor the status of user-mode coroutines. The second link tracking module can set a fifth mount point in the request processing system in user mode to process the first request, and a sixth mount point in the coroutine management system in user mode to monitor coroutine switching within the application. Optionally, the second link tracking module can mount the fifth and sixth mount points to user mode using uprobe (full name: uprobes). Uprobe is a performance tool in the Linux kernel that tracks function calls or instruction execution in applications for performance analysis and debugging. Based on this, when the fifth mount point is triggered, the second link tracking module can obtain the ID of the first coroutine in the first application responsible for processing the first request, and report the ID of the first coroutine to the link accounting center, so that the link accounting center can write the ID of the first coroutine into the target link tracking information. When the sixth mount point is triggered, the second link tracking module can obtain coroutine switching information within the first application for the first request and report it to the link accounting center, so that the link accounting center can write the coroutine switching information into the target link tracking information.In this way, the second link tracking module in user state can track the link of the user-state coroutine, thereby collaborating with the link accounting center to write relevant information about the coroutine into the target link tracking information, thereby obtaining more complete link tracking information. Optionally, the link accounting center may include a centralized link accounting center and a local link accounting center. The centralized link accounting center can be understood as a link accounting center in the cloud; the local link accounting center refers to an accounting center located locally on each server. The local link accounting center can be used to store various link information reported by the second link tracking module. The centralized link accounting center can be used to store various link information reported by the first link tracking module. In other words, link information obtained by path tracing in user state can be stored in the local link accounting center, and link information obtained by path tracing in kernel state can be stored in the centralized link accounting center. Optionally, when the storage capacity of the local link accounting center reaches a preset threshold, the local link accounting center can upload the stored user-state link information to the centralized link accounting center to reduce storage pressure on the local link accounting center. The following uses Figure 9 as an example, taking the first request as an HTTP request as an example, to further illustrate the link tracing method of the present disclosure in conjunction with actual application scenarios. In Figure 9, an application implemented in the Go language is used as an example. Applications implemented in the Go language support the concept of coroutines, and coroutine switching is completed in user mode. Therefore, the link tracing device shown in Figure 9 includes not only a first link tracing module in kernel mode, but also a second link tracing module in user mode. Figure 9 illustrates an example where the first link tracing module is a kernel-mode eBPF module, and the second link tracing module is a user-mode eBPF module. Referring to ① in Figure 9, upon receiving an HTTP request, the kernel-mode eBPF module reads the HTTP request's TCP (Transmission Control Protocol) connection number, Seq number (i.e., sequence number), source IP address sip, destination IP address dip (i.e., the current server's IP address), and the current application identifier (i.e., Appld) as identification information for the HTTP request. As shown in Figure 9, step 2, the kernel-mode eBPF module queries the centralized link accounting center for the traceld (link identifier) ​​corresponding to the HTTP request. The kernel-mode eBPF module generates the link data structure, namely, <Appld, Sip, Dip, Tepid, Seq> - Traceldo. As shown in Figure 9, step 3, the kernel-mode eBPF module provides the traceld corresponding to the HTTP request to the user-mode eBPF module.Refer to ④ in Figure 9. When any of the multiple user-mode coroutines (for example, coroutine i) starts processing an HTTP request, the user-mode eBPF module can record the ID of the current coroutine (abbreviated as Gold). Assume that the Gold of coroutine i is i, and generate the following data structure, which is recorded in the local link accounting center:

[0002] {

[0003] ParentGoId:

[0004] Gold: i

[0005] Traceld: xxx

[0006] Spanld : xxx

[0007] } Referring to ⑤ in FIG9 , in the case of a coroutine switch, assuming that another coroutine (for example, coroutine j) in the user-mode multiple coroutines continues to process the first request, the user-mode eBPF module can continue to record the Gold of the current coroutine j and generate the following data structure, where coroutine i is the parent coroutine of coroutine j, which is reflected in the following data structure and recorded in the local link accounting center: ParentGoId: i

[0008] Gold: j

[0009] Traceld: xxx

[0010] Spanld : xxx

[0011] } Refer to ⑥ in Figure 9. When another coroutine (for example, coroutine k) among multiple coroutines in user mode initiates an HTTP remote call to an application in another server, coroutine k can generate a new HTTP request. The user mode ebpf module records the TCP connection number, Seq number, source IP address sip (that is, the IP address of the current server), destination IP address dip, and target application Appld of the new HTTP request as identification information of the new HTTP request. That is, a data structure similar to the following <AppId, Sip, Dip, Tepid, Seq> - Traceld is written to the centralized link accounting center via the kernel-mode eBPF module, allowing the link tracking device on the server where the target application resides to continue link tracking for the new HTTP request. This new HTTP request and the previous HTTP request belong to the same link and correspond to the same Traceld. In the above data structure, Spannd represents the span identifier during the link tracing process. Traceld represents the entire link view of the HTTP request in the distributed application system, and Spannd represents the internal view of the HTTP request within different applications within the entire link. Optionally, Spannd can be transmitted downstream along with Traceld. It should be noted that the execution entity of each step of the method provided in the above embodiment can be the same device, or the method can be executed by different devices. For example, the execution entity of steps 31 to 33 can be device A; for another example, the execution entity of steps 31 and 32 can be device A, and the execution entity of step 33 can be device B, and so on. In addition, some of the processes described in the above embodiments and accompanying drawings include multiple operations that appear in a specific order. However, it should be understood that these operations may not be executed in the order in which they appear herein or may be executed in parallel. Operation numbers such as 31 and 32 are merely used to distinguish between different operations and do not represent any specific execution order. Furthermore, these processes may include more or fewer operations, and these operations may be executed sequentially or in parallel. It should be noted that terms such as "first" and "second" herein are used to distinguish between different messages, devices, modules, etc., and do not represent a specific order, nor do they limit "first" and "second" to different types. Figure 10 is a schematic structural diagram of a link tracking device provided in another exemplary embodiment of the present disclosure.The link tracking device is deployed on any server in the distributed application system, and includes: a first link tracking module 1001 in the kernel state, which sets a mount point in at least the network subsystem and the process management system in the kernel state. Among them, the first link tracking module 1001 is used to: when the first mount point used to monitor whether the first request is received in the network subsystem is triggered, obtain the information of the first application responsible for processing the first request on the server as the entry link information and report it to the link accounting center, so that the link accounting center adds the entry link information to the target link tracking information corresponding to the first request; when the second mount point used to monitor process / thread switching within the application in the process management system is triggered, obtain the intra-application link information of the first request in the first application and report it to the link accounting center, so that the link accounting center adds the intra-application link information to the target link tracking information; when the third mount point used to monitor inter-application process communication in the network subsystem is triggered, obtain the inter-application link information between the first application and the second application of the first request and report it to the link accounting center, so that the link accounting center adds the inter-application link information to the target link tracking information. Further optionally, the first mount point is a first function in the network subsystem for managing communication connections, and the first function is used to monitor the various ports that have been opened on the network subsystem, and when it is detected that a first request is received on the target port, the first request is reported to the first application according to the destination address of the first request and the port number of the target port, so that the first thread in the first process of the first application can process the first request; accordingly, when the first link tracking module 1001 obtains the information of the first application responsible for processing the first request on the server as the entry link information, it is specifically used to: obtain the identification information of the first request, the process number of the first process and the thread number of the first thread from the first function; according to the identification information of the first request, report the identification of the server, the process number of the first process and the thread number of the first thread as the entry link information to the link accounting center.Further optionally, when the first link tracking module 1001 reports the server identifier, the process number of the first process, and the thread number of the first thread as entry link information to the link accounting center based on the identification information of the first request, it is specifically used to: report the identification information of the first request to the link accounting center to request to obtain the target tracking identifier corresponding to the target link to which the first request belongs; if the target tracking identifier returned by the link accounting center is received, report the target tracking identifier, the server identifier, the process number of the first process, and the thread number of the first thread to the link accounting center, so that the link accounting center adds the server identifier, the process number of the first process, and the thread number of the first thread to the target link tracking information based on the target tracking identifier. Further optionally, the first link tracking module 1001 is further configured to: if the target tracking identifier returned by the link accounting center is not received, assign a target tracking identifier to the first request; and report the target tracking identifier, the server identifier, the process number of the first process, and the thread number of the first thread to the link accounting center, so that the link accounting center generates target link tracking information corresponding to the target tracking identifier and adds the server identifier, the process number of the first process, and the thread number of the first thread to the target link tracking information. Further optionally, the second mount point is a second function in the process management system for managing process creation information, and the second function is used to respond to a subprocess creation request of the first process in the first application, create a second process as a subprocess, and switch the thread processing the first request from the first thread in the first process to the second thread in the second process; accordingly, when the first link tracking module 1001 obtains the intra-application link information of the first request in the first application and reports it to the link accounting center, it is specifically used to: obtain the process number of the first process, the thread number of the first thread, the process number of the second process, and the thread number of the second thread from the second function; and report the server identifier, the process number of the first process, the thread number of the first thread, the process number of the second process, and the thread number of the second thread as intra-application link information to the link accounting center, so that the link accounting center adds the server identifier, the process number of the second process, and the thread number of the second thread to the target link tracking information based on the server identifier, the process number of the first process, and the thread number of the first thread.Further optionally, the third mount point is a third function in the network subsystem for managing inter-process communication, and the third function is used to respond to the inter-process call request initiated by the third thread in the third process of the first application to the second application due to processing the first request, and establish an inter-process communication connection between the third thread in the third process of the first application and the fourth thread in the fourth process of the second application; accordingly, when the first link tracking module 1001 obtains the inter-application link information of the first request between the first application and the second application and reports it to the link accounting center, it is specifically used to: obtain association information of the inter-process communication connection from the third function, and the association information includes at least the process number of the third process and the thread number of the third thread; report the server identifier and the association information as the inter-application link information to the link accounting center, so that the link accounting center adds other information in the association information to the target link tracking information according to the server identifier, the process number of the third process, and the thread number of the third thread. Further optionally, the first link tracking module also has a fourth mount point set in the file management system; the third function is specifically used to: when the inter-process call request is a local inter-process call request, write the data of the third thread into the local shared file, so that the fourth thread can read the data from the local shared file, and the read and write operations in the local shared file trigger the fourth mount point; accordingly, when the first link tracking module 1001 obtains the associated information of the inter-process communication connection from the third function, it is specifically used to: when the fourth mount point is triggered by a write operation, obtain the process number of the third process, the thread number of the third thread, the name of the local shared file and the first file offset written by the third thread in the local shared file from the third function; and when the fourth mount point is triggered by a read operation, obtain the process number of the fourth process, the thread number of the fourth thread, the name of the local shared file and the second file offset read by the fourth thread from the local shared file from the third function; according to the name of the local shared file, the first file offset and the second file offset, the process number of the third process, the thread number of the third thread, The process ID of the fourth process and the thread ID of the fourth thread serve as the association information.Further optionally, the third function is specifically used to: when the inter-process call request is a remote inter-process call request, generate a second request based on the inter-process call request, and send the second request to the second application; accordingly, when the first link tracking module 1001 obtains the associated information of the inter-process communication connection from the third function, it is specifically used to: obtain the process number of the third process, the thread number of the third thread and the identification information of the second request from the third function as the associated information. Further optionally, the link tracking device also includes: a second link tracking module 1002 located in the user state, and the second link tracking module 1002 is provided with a mount point in the request processing system and the coroutine management system in the user state; the second link tracking module 1002 is also used to: when the fifth mount point for processing the first request in the request processing system is triggered, obtain the ID of the first coroutine responsible for processing the first request in the first application, and report the ID of the first coroutine to the link accounting center, so that the link accounting center writes the ID of the first coroutine into the target link tracking information; when the sixth mount point for monitoring the coroutine switching within the application in the coroutine management system is triggered, obtain the coroutine switching information of the first request in the first application and report it to the link accounting center, so that the link accounting center writes the coroutine switching information into the target link tracking information. Further optionally, the link accounting center includes a centralized link accounting center and a local link accounting center; the local link accounting center is configured to store various link information reported by the second link tracking module, and the centralized link accounting center is configured to store various link information reported by the first link tracking module. The above describes the internal functions and structure of a link tracking device. As shown in FIG11 , in practice, the link tracking device can be implemented as an electronic device, including: a memory 1101 and a processor 1102. It should be noted that the electronic device can be any server in a distributed application system. The electronic device can include a first link tracking module in kernel mode, which sets a mount point in at least the network subsystem and process management system in kernel mode. Memory 1101 is configured to store computer programs and can be configured to store various other data to support operations on the computing platform. Examples of such data include instructions for any application or method operating on the computing platform, contact data, phonebook data, messages, images, videos, etc.Memory 1101 may be implemented by any type of volatile or non-volatile memory device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk, or optical disk. The processor 1102 is coupled to the memory 1101 and is configured to execute a computer program in the memory 1101, so as to: when a first mount point in the network subsystem for monitoring whether a first request is received is triggered, obtain information of a first application on the server responsible for processing the first request as entry link information and report the information to a link accounting center, so that the link accounting center adds the entry link information to target link tracking information corresponding to the first request; when a second mount point in the process management system for monitoring process / thread switching within an application is triggered, obtain intra-application link information of the first request within the first application and report the information to the link accounting center, so that the link accounting center adds the intra-application link information to the target link tracking information; and when a third mount point in the network subsystem for monitoring inter-application process communication is triggered, obtain inter-application link information between the first application and the second application of the first request and report the information to the link accounting center, so that the link accounting center adds the inter-application link information to the target link tracking information. Further optionally, the first mount point is a first function in the network subsystem for managing communication connections, and the first function is used to monitor the various ports that have been opened on the network subsystem, and when it is monitored that the first request is received on the target port, the first request is reported to the first application according to the destination address of the first request and the port number of the target port, so that the first thread in the first process of the first application can process the first request; accordingly, when the processor 1102 obtains the information of the first application responsible for processing the first request on the server as the entry link information, it is specifically used to: obtain the identification information of the first request, the process number of the first process and the thread number of the first thread from the first function; according to the identification information of the first request, report the identification of the server, the process number of the first process and the thread number of the first thread as the entry link information to the link accounting center.Further optionally, when the processor 1102 reports the server identifier, the process number of the first process, and the thread number of the first thread as entry link information to the link accounting center based on the identification information of the first request, the processor 1102 is specifically configured to: report the identification information of the first request to the link accounting center to request to obtain a target tracking identifier corresponding to the target link to which the first request belongs; if the target tracking identifier returned by the link accounting center is received, report the target tracking identifier, the server identifier, the process number of the first process, and the thread number of the first thread to the link accounting center, so that the link accounting center adds the server identifier, the process number of the first process, and the thread number of the first thread to the target link tracking information based on the target tracking identifier. Further optionally, the processor 1102 is also used to: if the target tracking identifier returned by the link accounting center is not received, assign a target tracking identifier to the first request; report the target tracking identifier, the identifier of the server, the process number of the first process, and the thread number of the first thread to the link accounting center, so that the link accounting center generates target link tracking information corresponding to the target tracking identifier and adds the identifier of the server, the process number of the first process, and the thread number of the first thread to the target link tracking information. Further optionally, the second mount point is a second function in the process management system for managing process creation information, and the second function is used to respond to a sub-process creation request of the first process in the first application, create a second process as a sub-process, and switch the thread processing the first request from the first thread in the first process to the second thread in the second process; accordingly, when the processor 1102 obtains the intra-application link information of the first request in the first application and reports it to the link accounting center, it is specifically used to: obtain the process number of the first process, the thread number of the first thread, the process number of the second process, and the thread number of the second thread from the second function; and report the server identifier, the process number of the first process, the thread number of the first thread, the process number of the second process, and the thread number of the second thread as intra-application link information to the link accounting center, so that the link accounting center adds the server identifier, the process number of the second process, and the thread number of the second thread to the target link tracking information according to the server identifier, the process number of the first process, and the thread number of the first thread.Further optionally, the third mount point is a third function in the network subsystem for managing inter-process communication, and the third function is used to respond to the inter-process call request initiated by the third thread in the third process of the first application to the second application due to processing the first request, and establish an inter-process communication connection between the third thread in the third process of the first application and the fourth thread in the fourth process of the second application; accordingly, when the processor 1102 obtains the inter-application link information of the first request between the first application and the second application and reports it to the link accounting center, it is specifically used to: obtain association information of the inter-process communication connection from the third function, and the association information includes at least the process number of the third process and the thread number of the third thread; report the server identifier and the association information as the inter-application link information to the link accounting center, so that the link accounting center adds other information in the association information to the target link tracking information according to the server identifier, the process number of the third process, and the thread number of the third thread. Further optionally, the first link tracking module also has a fourth mount point set in the file management system; the third function is specifically used to: when the inter-process call request is a local inter-process call request, write the data of the third thread into the local shared file, so that the fourth thread can read the data from the local shared file, and the read and write operations in the local shared file trigger the fourth mount point; accordingly, when the processor 1102 obtains the associated information of the inter-process communication connection from the third function, it is specifically used to: when the fourth mount point is triggered by a write operation, obtain the process number of the third process, the thread number of the third thread, the name of the local shared file and the first file offset written by the third thread in the local shared file from the third function; and when the fourth mount point is triggered by a read operation, obtain the process number of the fourth process, the thread number of the fourth thread, the name of the local shared file and the second file offset read by the fourth thread from the local shared file from the third function; according to the name of the local shared file, the first file offset and the second file offset, the process number of the third process, the thread number of the third thread, The process ID of the fourth process and the thread ID of the fourth thread serve as the association information.Further optionally, the third function is specifically used to: when the inter-process call request is a remote inter-process call request, generate a second request based on the inter-process call request, and send the second request to the second application; accordingly, when the processor 1102 obtains the association information of the inter-process communication connection from the third function, it is specifically used to: obtain the process number of the third process, the thread number of the third thread and the identification information of the second request from the third function as the association information. Further optionally, the electronic device also includes: a second link tracking module located in the user state, and the second link tracking module is provided with a mount point in the request processing system and the coroutine management system in the user state; the processor 1102 is further used to: when the fifth mount point for processing the first request in the request processing system is triggered, obtain the ID of the first coroutine responsible for processing the first request in the first application, and report the ID of the first coroutine to the link accounting center, so that the link accounting center writes the ID of the first coroutine into the target link tracking information; when the sixth mount point for monitoring the coroutine switching within the application in the coroutine management system is triggered, obtain the coroutine switching information of the first request in the first application and report it to the link accounting center, so that the link accounting center writes the coroutine switching information into the target link tracking information. Further optionally, the link accounting center includes a centralized link accounting center and a local link accounting center; the local link accounting center is used to store various link information reported by the second link tracking module; and the centralized link accounting center is used to store various link information reported by the first link tracking module. Furthermore, as shown in FIG11 , the electronic device also includes other components, such as a communication component 1103 and a power supply component 1104. FIG11 only schematically illustrates some components and does not imply that the electronic device only includes the components shown in FIG11 . The communication component 1103 is configured to facilitate wired or wireless communication between the device containing the communication component and other devices. The device containing the communication component can access a wireless network based on a communication standard, such as WiFi, 2G, 3G, 4G, or 5G, or a combination thereof. In an exemplary embodiment, the communication component receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component may be implemented based on near field communication (NFC) technology, radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology, or other technologies. The power supply component 1104 provides power to various components of the device in which the power supply component is located.The power supply assembly may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device in which the power supply assembly is located. Accordingly, embodiments of the present disclosure also provide a computer-readable storage medium storing a computer program. When executed, the computer program can implement the steps that can be performed by the electronic device in the above-described method embodiments. Accordingly, embodiments of the present disclosure also provide a computer program product, including a computer program / instructions. When executed by a processor, the computer program / instructions execute the steps that can be performed by the electronic device. In this embodiment, a link tracking module is provided in the kernel state of the server. By setting mount points for the link tracking module in the kernel state network subsystem and process management system, and cooperating with a link accounting center external to the server, the module tracks links when requests enter an application, within an application, and between applications. This ensures that the distributed application system is not interfered with throughout the entire link tracking process. Furthermore, the tracked link tracking information is relatively complete, capable of tracking not only the entry of requests into an application, but also the process / thread switching process within the application, as well as the process communication process between different applications. The technical solutions disclosed herein do not require additional communication protocol adaptation or modification of requests, nor do they introduce intrusion risks to distributed applications. Those skilled in the art will appreciate that the embodiments of the present disclosure may be provided as methods, systems, or computer program products. Therefore, the present disclosure may take the form of entirely hardware embodiments, entirely software embodiments, or embodiments combining software and hardware. Furthermore, the present disclosure may take the form of a computer program product implemented on one or more computer-readable storage media (including but not limited to disk storage, compact disc read-only memory (CD-ROM), optical storage, etc.) containing computer-usable program code. The present disclosure is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present disclosure. It should be understood that each process and / or block in the flowcharts and / or block diagrams, as well as combinations of processes and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate a device for implementing the functions specified in one or more processes in the flowchart and / or one or more blocks in the block diagram.These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means that implement the functions specified in one or more flows in a flowchart and / or one or more blocks in a block diagram. These computer program instructions may also be loaded onto a computer or other programmable data processing device, causing the computer or other programmable device to execute a series of operational steps to produce a computer-implemented process, such that the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one or more flows in a flowchart and / or one or more blocks in a block diagram. In a typical configuration, a computing device includes one or more processors (Central Processing Units, CPUs), input / output interfaces, network interfaces, and memory. Memory may include non-permanent storage in a computer-readable medium, random access memory (RAM), and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of a computer-readable medium. Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can be used to store information using any method or technology. Information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase-change random access memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic disk storage or other magnetic storage devices, or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include transitory computer-readable media, such as modulated data signals and carrier waves.It should also be noted that the terms "comprise," "include," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, product, or apparatus comprising a list of elements may include not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, product, or apparatus. Without further limitation, the phrase "comprising a..." does not preclude the presence of additional identical elements in the process, method, product, or apparatus comprising the elements. The foregoing are merely examples of the present disclosure and are not intended to limit the present disclosure. Those skilled in the art will readily appreciate that various modifications and variations of the present disclosure are possible. Any modifications, equivalent substitutions, improvements, and the like made within the spirit and principles of the present disclosure are intended to be encompassed by the claims of the present disclosure.

Claims

Claims 1. A link tracking method, wherein, A link tracing device applied to any server in a distributed application system. The link tracing device includes a first link tracing module in the kernel state, and the first link tracing module sets mount points in at least the network subsystem and the process management system in the kernel state. The method includes: when a first mount point for monitoring whether a first request is received in the network subsystem is triggered, obtaining information of a first application on the server responsible for processing the first request as entry link information and reporting it to a link accounting center, so that the link accounting center adds the entry link information to target link tracing information corresponding to the first request; when a second mount point for monitoring process / thread switching within an application in the process management system is triggered, obtaining in-application link information of the first request within the first application and reporting it to the link accounting center, so that the link accounting center adds the in-application link information to the target link tracing information; when a third mount point for monitoring inter-application process communication in the network subsystem is triggered, obtaining inter-application link information of the first request between the first application and a second application and reporting it to the link accounting center, so that the link accounting center adds the inter-application link information to the target link tracing information.

2. The method according to claim 1, wherein, The first mount point is a first function for managing communication connections in the network subsystem. The first function is used to monitor each port enabled on the network subsystem, and when a first request is received on a target port, report the first request to the first application according to the destination address of the first request and the port number of the target port, so that a first thread in a first process in the first application processes the first request. Correspondingly, obtaining information of a first application on the server responsible for processing the first request as entry link information includes: obtaining the identification information of the first request, the process ID of the first process, and the thread ID of the first thread from the first function. According to the identification information of the first request, report the identification of the server, the process ID of the first process, and the thread ID of the first thread as entry link information to the link accounting center.

3. The method according to claim 2, wherein According to the identification information of the first request, report the identification of the server, the process ID of the first process, and the thread ID of the first thread to the link accounting center as the entry link information, including: reporting the identification information of the first request to the link accounting center to request to obtain the target tracking identification corresponding to the target link to which the first request belongs; if the target tracking identification returned by the link accounting center is received, report the target tracking identification, the identification of the server, the process ID of the first process, and the thread ID of the first thread to the link accounting center, so that the link accounting center can add the identification of the server, the process ID of the first process, and the thread ID of the first thread to the target link tracking information according to the target tracking identification.

4. The method according to claim 3, wherein It also includes: If the target tracking identification returned by the link accounting center is not received, allocate a target tracking identification for the first request; 24 Report the target tracking identification, the identification of the server, the process ID of the first process, and the thread ID of the first thread to the link accounting center, so that the link accounting center can generate target link tracking information corresponding to the target tracking identification and add the identification of the server, the process ID of the first process, and the thread ID of the first thread to the target link tracking information.

5. The method according to any one of claims 1-4, wherein The second mount point is the second function in the process management system for managing process creation information. The second function is used to respond to the sub-process creation request of the first process in the first application, create the second process as the sub-process, and switch the thread processing the first request from the first thread in the first process to the second thread in the second process; Correspondingly, obtaining the in-application link information of the first request in the first application and reporting it to the link accounting center includes: obtaining the process ID of the first process, the thread ID of the first thread, the process ID of the second process, and the thread ID of the second thread from the second function; Report the identification of the server, the process ID of the first process, the thread ID of the first thread, the process ID of the second process, and the thread ID of the second thread to the link accounting center as the in-application link information, so that the link accounting center can add the identification of the server, the process ID of the second process, and the thread ID of the second thread to the target link tracking information according to the identification of the server, the process ID of the first process, and the thread ID of the first thread.

6. The method according to any one of claims 1-5, wherein, The third mount point is the third function in the network subsystem for managing inter-process communication. The third function is used to respond to the inter-process call request initiated by the third thread in the third process in the first application to the second application due to processing the first request, and establish an inter-process communication connection between the third thread in the third process in the first application and the fourth thread in the fourth process in the second application; Correspondingly, obtaining the inter-application link information between the first application and the second application for the first request and reporting same to the link accounting center includes: obtaining the association information of the inter-process communication connection from the third function, where the association information at least includes the process ID of the third process and the thread ID of the third thread; Reporting the identifier of the server and the association information as the inter-application link information to the link accounting center, so that the link accounting center can add other information in the association information to the target link tracking information according to the identifier of the server, the process ID of the third process, and the thread ID of the third thread.

7. The method according to claim 6, wherein, The first link tracking module further has a fourth mount point set in the file system; specifically, the third function is configured to: when the inter-process call request is a local inter-process call request, write the data of the third thread into a local shared file for the fourth thread to read the data from the local shared file, and the read and write operations in the local shared file trigger the fourth mount point; correspondingly, obtaining the association information of the inter-process communication connection from the third function includes: when the fourth mount point is triggered by a write operation, obtaining the process ID of the third process, the thread ID of the third thread, the name of the local shared file, and the first file offset written by the third thread in the local shared file from the third function; and when the fourth mount point is triggered by a read operation, obtaining the process ID of the fourth process, the thread ID of the fourth thread, the name of the local shared file, and the second file offset read by the fourth thread from the local shared file from the third function; using the name of the local shared file, the first file offset, and the second file offset, taking the process ID of the third process, the thread ID of the third thread, the process ID of the fourth process, and the thread ID of the fourth thread as the association information. Specifically, the third function is configured to: when the inter-process call request is a remote inter-process call request, generate a second request according to the inter-process call request and send the second request to the second application; correspondingly, obtaining the association information of the inter-process communication connection from the third function includes: obtaining the process ID of the third process, the thread ID of the third thread, and the identifier information of the second request from the third function as the association information.

8. The method according to claim 6, wherein ​ 9. The method according to any one of claims 1 - 8, wherein The link tracing device further includes: a second link tracing module in the user state, where the second link tracing module has mounting points set in the request processing system and the coroutine management system in the user state; The method further includes: when a fifth mounting point for processing a first request in the request processing system is triggered, obtaining the identity ID of the first coroutine responsible for processing the first request in the first application, and reporting the ID of the first coroutine to the link accounting center for the link accounting center to write the ID of the first coroutine into the target link tracing information; when a sixth mounting point for monitoring coroutine switching within an application in the coroutine management system is triggered, obtaining the coroutine switching information of the first request within the first application and reporting it to the link accounting center for the link accounting center to write the coroutine switching information into the target link tracing information.

10. The method according to claim 9, wherein The link accounting center includes a centralized link accounting center and a local link accounting center; wherein, the local link accounting center is used to store various link information reported by the second link tracing module; the centralized link accounting center is used to store various link information reported by the first link tracing module.

11. A link tracing device, wherein, The link tracing device is deployed on any server in a distributed application system, and the device includes: a first link tracing module in the kernel state, where the first link tracing module has mounting points set at least in the network subsystem and the process management system in the kernel state; wherein, the first link tracing module is used for: when a first mounting point for monitoring whether a first request is received in the network subsystem is triggered, obtaining information of the first application responsible for processing the first request on the server as entry link information and reporting it to the link accounting center for the link accounting center to add the entry link information to the target link tracing information corresponding to the first request; when a second mounting point for monitoring process / thread switching within an application in the process management system is triggered, obtaining the in-application link information of the first request within the first application and reporting it to the link accounting center for the link accounting center to add the in-application link information to the target link tracing information; when a third mounting point for monitoring inter-application process communication in the network subsystem is triggered, obtaining the inter-application link information of the first request between the first application and the second application and reporting it to the link accounting center for the link accounting center to add the inter-application link information to the target link tracing information.

12. The apparatus according to claim 11, wherein, It further includes: a second link tracing module in the user mode, where the second link tracing module has mounting points set in the request processing system and the coroutine management system in the user mode; the second link tracing module is configured to: when a fifth mounting point for processing a first request in the request processing system is triggered, obtain the ID of a first coroutine in the first application responsible for processing the first request, and report the ID of the first coroutine to the link accounting center for the link accounting center to write the ID of the first coroutine into the target link tracing information; when a sixth mounting point for monitoring coroutine switching within an application in the coroutine management system is triggered, obtain the coroutine switching information of the first request within the first application and report it to the link accounting center for the link accounting center to write the coroutine switching information into the target link tracing information.

13. An electronic device, wherein, Comprising: a memory and a processor; the memory is used for storing one or more computer instructions; the processor is used for executing the one or more computer instructions to: execute the steps in the method according to any one of claims 1-10.

14. A computer-readable storage medium storing a computer program, wherein, When the computer program is executed by the processor, it causes the processor to be able to implement the steps in the method according to any one of claims 1-10.

15. A computer program product, wherein, Comprising a computer program / instructions, when the computer program / instructions are executed by the processor, the method according to any one of claims 1-10 is executed. 27

Citation Information

Patent Citations

  • Full-link tracking system proxy method and device, computer equipment and storage medium

    CN116708558A

  • Link tracking method and device, electronic equipment and medium

    CN116800647A

  • Calling link tracking method, device and equipment and computer readable storage medium

    CN116841787A

  • Activity Tracing Through Event Correlation Across Multiple Software Applications

    US20230401139A1