Transaction request link tracking method, device, equipment, medium and program product

By configuring business tags in transaction requests and dynamically adjusting the link collection method, the problems of resource waste and data redundancy in existing technologies are solved, and flexible and efficient link tracing is achieved to meet different business needs.

CN121008991APending Publication Date: 2025-11-25INDUSTRIAL AND COMMERCIAL BANK OF CHINA +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511196190.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-26
Publication Date
2025-11-25

AI Technical Summary

Technical Problem

Existing link tracing methods collect all transaction requests indiscriminately, resulting in wasted resources, data redundancy, and low flexibility.

Method used

By configuring business tags for transaction requests through entry nodes, the link collection method is dynamically adjusted according to the tag type. Full collection is only performed for critical business requests, and sampling collection is performed for non-critical business requests to generate link tracing results.

Benefits of technology

It improves the flexibility of link tracing, reduces resource waste and storage costs, meets the link tracing needs in different scenarios, and ensures the accuracy and integrity of link data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121008991A_ABST
    Figure CN121008991A_ABST
Patent Text Reader

Abstract

The invention provides a transaction request link tracking method and device, equipment, a medium and a program product, which can be applied to the field of distributed technologies. The method comprises the following steps: configuring a service label for a received transaction request by using an entrance node, wherein the entrance node is used for interacting with an external system; under the condition that the type of the service label is a first-class label, updating the state of the target configuration item to be an open state; wherein the state of the target configuration item is related to the link acquisition mode; under the condition that the state of the target configuration item is an open state, processing information corresponding to each service node through which the transaction request passes is acquired, and a link tracking result of the transaction request is generated based on the acquired multiple pieces of processing information; the processing information is used for recording link data generated when the service node performs processing operation on the transaction request.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of distributed technology, and more particularly to a transaction request link tracking method, device, equipment, medium and program product. BACKGROUND

[0002] With the continuous development of large enterprises such as banks, the demand for monitoring the calling relationship between application systems according to the transaction scenario is increasing. A transaction request may pass through multiple applications, and may pass through multiple service nodes within an application. Link tracking of the transaction request can achieve rapid positioning of the service node where the fault occurs, visualization of the calling relationship between services, and meet multiple goals such as security audit and compliance check.

[0003] The existing link tracking method usually collects all transaction requests without distinction according to a preset link collection method, which has low flexibility and may cause resource waste and data redundancy. SUMMARY

[0004] In view of the above problems, the present application provides a link tracking method, device, equipment, medium and program product for improving the flexibility of link tracking.

[0005] According to a first aspect of the present application, a transaction request link tracking method is provided, comprising: configuring a business tag for a received transaction request by using an entry node, the entry node being used for interacting with an external system; in a case where the type of the business tag is a first type of tag, updating the state of a target configuration item to an open state; wherein the state of the target configuration item is related to a link collection method; in a case where the state of the target configuration item is the open state, obtaining processing information corresponding to each service node passed by the transaction request and generating a link tracking result of the transaction request based on the obtained multiple processing information; the processing information is used for recording link data generated by the service node performing a processing operation on the transaction request.

[0006] According to an embodiment of the present application, the entry node is used to configure a business tag for a received transaction request, comprising: in response to the entry node receiving a transaction request, extracting target business information from the transaction request; determining a business tag of the transaction request based on the target business information; associating the business tag with the transaction request, so that the business tag follows the transaction request in multiple service nodes.

[0007] According to an embodiment of the present application, the business label is associated with the transaction request, including: writing the business label into a target context, the target context being used to deliver information across nodes; delivering in a service node in response to the transaction request, each service node reading the business label from the target context and writing the business label into a target context of a downstream service node, so that the processing information corresponding to the service nodes passed by the transaction request all contain the business label, forming a complete link association between the multiple service nodes.

[0008] According to an embodiment of the present application, the business label is written into the target context, including: determining a service interface called by processing the transaction request according to target business information; and writing a matched business label into the target context of the transaction request in response to matching the business label corresponding to the service interface in a business label library.

[0009] According to an embodiment of the present application, the business label is written into the configuration context, including at least one of the following: adding annotation information on a target method of the transaction request, the annotation information being used to declare a business label associated with the method call, and writing the business label into the target context of the transaction request before the method execution; defining the business label in a target code of the transaction request, and writing the business label into the target context of the transaction request in response to the code execution reaching a marked position; the target method and the target code being used to execute the call of the business label or being used to execute at least part of the business logic.

[0010] According to an embodiment of the present application, the annotation information is added on the target method of the transaction request, including: in a case where the method of the transaction request calls multiple services, encapsulating the service call needing to add the annotation information into a public method, and adding the annotation information on the public method; matching a corresponding business label in a business label library based on interface information of the service interface, determining the business label of the transaction request according to a matching result, and writing the business label into the target context.

[0011] According to an embodiment of the present application, further comprising: in a case where the type of the business label is a second type label, maintaining a state of a target configuration item as a closed state; in a case where the state of the target configuration item is the closed state, extracting processing information of part of nodes from the multiple service nodes passed by the transaction request based on preset collection information, and generating a link tracking result of the transaction request based on the extracted processing information.

[0012] According to an embodiment of the present application, the processing information corresponding to each service node passed through by the transaction request is acquired, and a link tracking result of the transaction request is generated based on the acquired multiple pieces of processing information, including: controlling multiple service nodes to respectively send processing information containing a business tag to a link gateway, so that the link gateway determines a topology relationship between the service nodes based on the business tag in the multiple pieces of processing information, and determines link data of the transaction request based on the multiple pieces of processing information; and obtaining the link tracking result of the transaction request based on the topology relationship and the link data determined by the link gateway.

[0013] A second aspect of the present application provides a transaction request link tracking device, including: a configuration module configured to configure a business tag for a received transaction request by using an entry node, the entry node being configured to interact with an external system; an update module configured to update a state of a target configuration item to an open state in a case where a type of the business tag is a first type of tag; wherein the state of the target configuration item is related to a link collection manner; and an acquisition module configured to acquire processing information corresponding to each service node passed through by the transaction request and generate a link tracking result of the transaction request based on the acquired multiple pieces of processing information in a case where the state of the target configuration item is the open state; the processing information being configured to record link data generated by a service node performing a processing operation on the transaction request.

[0014] A third aspect of the present application provides an electronic device, including: one or more processors; a memory configured to store one or more computer programs, wherein the one or more processors execute the one or more computer programs to implement steps of the method.

[0015] A fourth aspect of the present application further provides a computer-readable storage medium having a computer program or instructions stored thereon, wherein the computer program or instructions are executed by a processor to implement steps of the method.

[0016] A fifth aspect of the present application further provides a computer program product, including a computer program or instructions, wherein the computer program or instructions are executed by a processor to implement steps of the method. BRIEF DESCRIPTION OF DRAWINGS

[0017] The above content of the present application and other purposes, features and advantages will be more apparent through the following description of the embodiments of the present application with reference to the accompanying drawings, in which:

[0018] Figure 1 An application scenario diagram of a transaction request link tracking method, device, equipment, medium and program product according to an embodiment of the present application is schematically shown;

[0019] Figure 2 A flowchart of a transaction request link tracking method according to an embodiment of the present application is schematically shown;

[0020] Figure 3 This illustration shows a flowchart of configuring a service tag for a received transaction request using an entry node, according to an embodiment of this application.

[0021] Figure 4 This illustration schematically shows a flowchart of associating a business tag with a transaction request according to an embodiment of this application;

[0022] Figure 5 This illustration schematically shows a flowchart of writing a service tag into a target context according to an embodiment of this application;

[0023] Figure 6 This illustration shows a flowchart of adding annotation information to a target method for a transaction request according to an embodiment of this application;

[0024] Figure 7 The diagram illustrates the principle of obtaining processing information corresponding to each service node through which a transaction request passes, and generating a link tracing result of the transaction request based on the collected processing information, according to an embodiment of this application.

[0025] Figure 8 This schematically illustrates a structural block diagram of a transaction request link tracing apparatus according to an embodiment of this application; and

[0026] Figure 9 A block diagram schematically illustrates an electronic device suitable for implementing a transaction request link tracing method according to an embodiment of this application. Detailed Implementation

[0027] The embodiments of this application will now be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of this application. In the following detailed description, numerous specific details are set forth to provide a thorough understanding of the embodiments of this application for ease of explanation. However, it will be apparent that one or more embodiments may be implemented without these specific details. Furthermore, descriptions of well-known structures and technologies are omitted in the following description to avoid unnecessarily obscuring the concepts of this application.

[0028] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the scope of this application. The terms “comprising,” “including,” etc., as used herein indicate the presence of features, steps, operations, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, or components.

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

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

[0031] It should be noted that the link tracing method and apparatus provided in this application can be used in the fintech field, or in any field other than fintech. The application fields of the link tracing method and apparatus provided in this application are not limited.

[0032] Embodiments of this application provide a link tracing method, including: configuring a business tag for a received transaction request using an entry node, the entry node being used to interact with an external system; updating the status of a target configuration item to an enabled state when the business tag type is a single-class tag; wherein the status of the target configuration item is related to the link acquisition method; when the target configuration item is enabled, acquiring processing information corresponding to each service node through which the transaction request passes and generating a link tracing result for the transaction request based on the acquired processing information; the processing information is used to record the link data generated by the service node performing processing operations on the transaction request.

[0033] Figure 1 The illustration shows an application scenario diagram of the transaction request link tracing method, apparatus, device, medium, and program product according to embodiments of this application.

[0034] like Figure 1 As shown, application scenario 100 according to this embodiment may include a first terminal device 101, a second terminal device 102, a third terminal device 103, a network 104, and a server 105. The network 104 serves as a medium for providing a communication link between the first terminal device 101, the second terminal device 102, the third terminal device 103, and the server 105. The network 104 may include various connection types, such as wired or wireless communication links, or fiber optic cables, etc.

[0035] Users can use the first terminal device 101, the second terminal device 102, and the third terminal device 103 to interact with the server 105 via the network 104 to receive or send messages, etc. Various communication client applications can be installed on the first terminal device 101, the second terminal device 102, and the third terminal device 103, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social media platform software, etc. (for example only).

[0036] The first terminal device 101, the second terminal device 102, and the third terminal device 103 can be various electronic devices with displays and support web browsing, including but not limited to smartphones, tablets, laptops, and desktop computers.

[0037] Server 105 can be a server that provides various services, such as a backend management server that supports websites browsed by users using the first terminal device 101, the second terminal device 102, and the third terminal device 103 (this is just an example). The backend management server can analyze and process data such as received user requests, and feed back the processing results (such as web pages, information, or data obtained or generated according to user requests) to the terminal devices.

[0038] It should be noted that the transaction request tracing method provided in this application embodiment can generally be executed by server 105. Correspondingly, the transaction request tracing device provided in this application embodiment can generally be located in server 105. The transaction request tracing method provided in this application embodiment can also be executed by a server or server cluster that is different from server 105 and capable of communicating with the first terminal device 101, the second terminal device 102, the third terminal device 103, and / or server 105. Correspondingly, the tracing device provided in this application embodiment can also be located in a server or server cluster that is different from server 105 and capable of communicating with the first terminal device 101, the second terminal device 102, the third terminal device 103, and / or server 105.

[0039] It should be understood that Figure 1 The number of terminal devices, networks, and servers shown is merely illustrative. Depending on implementation needs, any number of terminal devices, networks, and servers can be included.

[0040] The following will be based on Figure 1 The described scene, through Figures 2-7 The transaction request chain tracing method according to the embodiments of this application will be described in detail.

[0041] Figure 2 A flowchart illustrating a transaction request chain tracing method according to an embodiment of this application is shown schematically.

[0042] like Figure 2 As shown, the transaction request tracing method in this embodiment includes operations S210 to S230.

[0043] In operation S210, the entry node is used to configure business tags for received transaction requests. The entry node is used to interact with external systems.

[0044] In some embodiments, the ingress node serves as the entry point for the system to interact with external systems, such as a gateway, API service, or load balancer. Upon receiving a transaction request, the ingress node can identify the business type of the request based on its characteristics and configure a corresponding business tag for the transaction request. For example, business tags can include first-class tags and second-class tags; different types of business tags correspond to different tracing requirements and employ different tracing methods.

[0045] When operating S220, if the type of business tag is a type 1 tag, the status of the target configuration item will be updated to the enabled state; the status of the target configuration item is related to the link collection method.

[0046] In some embodiments, the target configuration item can be a switch for controlling the link acquisition method. For example, the sampling rate, acquisition depth, and whether to record a complete log can be adjusted by adjusting the state of the target configuration item.

[0047] Key business processes, such as payment and order creation, can be tagged with a single type of label. When the business label of a transaction request is a single type of label, a higher link tracing priority is assigned to the transaction request, the status of the target configuration item is updated to the enabled state, and the link information of the transaction request is collected through full collection.

[0048] In operation S230, when the target configuration item is in the enabled state, the processing information corresponding to each service node through which the transaction request passes is obtained, and the link tracing result of the transaction request is generated based on the collected processing information.

[0049] In some embodiments, when the target configuration item is enabled, processing information of each service node through which the transaction request passes is obtained. This processing information records the link data generated by the service nodes performing processing operations on the transaction request, and may include service node name, method name, execution time, input / output parameters, exception information, etc. By aggregating the processing information of all service nodes through which the transaction request passes, a link tracing result for the transaction request is generated. The link tracing result may include, for example, a call chain topology diagram and a timeline.

[0050] This application embodiment triggers target configuration item status updates through business tags, achieving conditional initiation of link data collection. Full-link data collection is activated only when a transaction request carries a specific business tag, avoiding resource waste caused by indiscriminate collection of all requests. Furthermore, the collection method (such as sampling rate and data granularity) can be automatically adjusted according to tag status changes, improving the flexibility of link tracing and link data collection.

[0051] See also Figure 2 The transaction request link tracing method provided in this application embodiment also includes operations S240 to S250.

[0052] When operating S240, if the business label type is a second-class label, keep the target configuration item in the off state.

[0053] When operating S250, with the target configuration item in the off state, the processing information of some nodes is extracted from multiple service nodes through which the transaction request passes based on the preset collection information, and the link tracing result of the transaction request is generated based on the extracted processing information.

[0054] In some embodiments, the second-class label is used to mark ordinary business operations, such as list queries. When the business label of a transaction request is a second-class label, the target configuration item is in a closed state, and the transaction request is traced by default in a preset manner. The default trace method can be to extract the processing information of some nodes from multiple service nodes traversed by the transaction request based on preset collection information (such as a sampling rate of 10%).

[0055] This application embodiment disables the full collection of transaction requests under the second type of tag, and only stores a portion of sampled node data, reducing storage costs and computational overhead, meeting the link tracing needs in different scenarios, and improving the flexibility of link tracing and link data collection.

[0056] Figure 3 The flowchart illustrating the configuration of service tags for received transaction requests using an entry node according to an embodiment of this application is shown.

[0057] like Figure 3 As shown, this embodiment utilizes the entry node to configure service tags for received transaction requests, including operations S310 to S330.

[0058] When operating S310, in response to the ingress node receiving a transaction request, the target business information is extracted from the transaction request.

[0059] In some embodiments, the entry node is the first node where the system interacts with the outside world. It receives transaction requests from clients (such as browsers, mobile applications) or other external systems. For example, the entry node of an e-commerce system might be the website's homepage server or the interface server of a mobile application.

[0060] In some embodiments, the entry node can receive and parse transaction requests through a specific protocol to obtain target business information. The target business information can be key fields used to identify the business type, such as user type, operation type, business scenario, etc.

[0061] When operating S320, the business tag of the transaction request is determined based on the target business information.

[0062] In some embodiments, the business tag of a transaction request can be determined by matching target business information with business tags in a preset business database. The preset business database can define the mapping relationship between business information and business tags in the form of key-value pairs or rule tables. The matching logic between business information and business tags can include, for example, exact matching, fuzzy matching, and priority processing. For example, exact matching can be direct matching of predefined key-value pairs; fuzzy matching can be performed using wildcards or regular expressions. When business information matches multiple business tags, the tag with the highest priority is selected for matching.

[0063] When operating S330, a service tag is associated with a transaction request so that the service tag is passed along with the transaction request across multiple service nodes.

[0064] In some embodiments, business tags can be attached to transaction requests through methods such as request header injection or context objects, so that the business tags can be passed along with the transaction request to multiple service nodes in the system.

[0065] The link tracing method provided in this application matches business tags with business information extracted from transaction requests, enabling dynamic determination of business tags and improving the flexibility of business tag determination. Furthermore, by attaching business tags to transaction requests, it achieves end-to-end business tagging. Utilizing the entry node to determine business tags effectively improves the consistency of business tags, avoiding inconsistencies in business tag format or meaning due to logical differences among intermediate service nodes. Moreover, as a stateless proxy layer, the entry node can decouple the business tag generation logic from the business service; the code of the business service node does not need to concern itself with how the business tags are generated, but only needs to pass through the business tags attached by the entry node.

[0066] Figure 4 A flowchart illustrating the association of a business tag with a transaction request according to an embodiment of this application is shown.

[0067] like Figure 4 As shown, the association of business tags with transaction requests in this embodiment includes operations S410 to S420.

[0068] When operating S410, the business tag is written to the target context, which is used to pass information across nodes.

[0069] In some embodiments, the target context can be a Span context. In a distributed tracing scenario, a Span is the basic unit of tracing, representing an independent operation (such as an HTTP request, database query, function call, etc.). The Span context is a metadata container for the Span, used to transmit tracing information within the distributed system. A Span context may include, for example, a TraceID (a globally unique identifier used to associate all Spans belonging to the same request chain), a SpanID (the unique identifier of the current Span), and other metadata. When a service node executes an operation, it generates detailed information for a single Span to record the execution details of that operation. Each Span has its own independent context, which may include a unique SpanID and attributes such as operation name, execution time, and tags. Each Span inherits the TraceID and some metadata (such as business tags) from its parent Span.

[0070] In operation S420, in response to the transmission of transaction requests in service nodes, each service node reads the business tag from the target context and writes the business tag into the target context of the downstream service node, so that the processing information corresponding to the service node through which the transaction request passes all contains the business tag, forming a complete link association between multiple service nodes.

[0071] In some embodiments, the target context can be passed via synchronous or asynchronous calls. For example, in a synchronous call, the target context can be passed via request headers or message attributes. In an asynchronous call (such as a message queue), business tags can be passed via message headers or thread context.

[0072] In some embodiments, each service node extracts a business tag from the received target context and records logs or processing logic based on the business tag. Before initiating a downstream service node call, the current service node re-injects the business tag into the newly generated target context to ensure that the business tag is not broken in the chain, so that the logs of all service nodes contain the business tag, which facilitates aggregation analysis by business tag.

[0073] This application embodiment transmits business tags across nodes through the target context to realize the completion link association of transaction requests in a distributed system. The business tags in the target context can aggregate the scattered processing data in multiple service nodes into a complete link, thereby improving the accuracy and effectiveness of the association between service nodes.

[0074] In some embodiments, business tags can be attached to transaction requests either explicitly or implicitly. Explicit tagging can be implemented, for example, through method annotations or by setting tags in the code. Implicit mapping can be achieved by configuring the mapping relationship between interfaces and tags through environment variables.

[0075] Explicit tagging directly controls the generation and modification of business tags through code logic, which can improve the accuracy of business tags and is suitable for scenarios that need to dynamically set business tags based on complex business conditions. Implicit tagging, on the other hand, defines the mapping relationship between interfaces and tags through external configuration (such as environment variables and configuration files), which has lower operational complexity and can effectively improve the flexibility and timeliness of business tag generation.

[0076] The following combination Figure 5 The method of attaching business tags to transaction requests through implicit mapping will be further explained.

[0077] Figure 5 The flowchart illustrating the writing of a business tag into a target context according to an embodiment of this application is shown in the illustration.

[0078] like Figure 5 As shown, writing the business tag into the target context in this embodiment includes operations S510 to S520.

[0079] When operating S510, determine the service interfaces that need to be called to process the transaction request based on the target business information.

[0080] In some embodiments, a service interface is the functional entry point exposed by a service node, such as an explicit Application Programming Interface (API), while a service node is the physical or logical unit that actually runs the service code. The relationship between a service interface and a service node can be one-to-many, where a transaction request is sent to a responding service node to execute business logic processing.

[0081] In some embodiments, after receiving a transaction request, the entry node parses the request to obtain the parsing result (request path, request parameters, user type, etc.), and determines the service interface to be called to process the transaction request based on the parsing result. The service interface can be matched directly based on the request path, or it can be dynamically selected by combining the request parameters and / or user type.

[0082] When operating S520, in response to matching the business tag corresponding to the service interface in the business tag library, the matched business tag is written into the target context of the transaction request.

[0083] In some embodiments, the tag library can be a pre-configured rule base that stores the mapping relationship between "service interfaces" and "business tags." For example, if the service interface is interface 1, the corresponding business tag is tag A. Business tags matching the current transaction request can be queried from the tag library using methods such as exact matching, wildcard matching, and parameterized matching. The matched business tags are written into the target context to ensure that the tags can be transmitted within the system along with the request.

[0084] In some embodiments, business tags can be explicitly marked. Writing business tags to the target context can include at least one of the following: adding annotation information to the target method of the transaction request, the annotation information being used to declare the business tags that need to be associated with the method call, and writing the business tags to the target context of the transaction request before the method execution; or defining business tags in the target code of the transaction request, and writing the business tags to the target context of the transaction request in response to the code execution reaching the marked position.

[0085] In some embodiments, the tags that need to be associated with a method can be declared through annotation information. It should be noted that the target method for which annotation information is added must be a public method. Since annotations typically require a proxy or reflection to take effect, non-public methods may not be intercepted. Before a method is invoked, the system automatically reads the tag information from the annotations and writes the business tags into the target context of the current request. If a transaction request requires cross-service calls, the business tags are automatically passed to downstream service nodes through the request's metadata to ensure consistent tags throughout the entire chain.

[0086] In some embodiments, tags can also be defined directly in the code via an API. For example, tags can be dynamically generated or passed via an API, and the tag values ​​can change dynamically. When the code executes to the marked location, the business tag is dynamically written to the target context.

[0087] Target methods and target code are used to execute calls to business tags or to execute at least part of the business logic. For example, a target method can be a wrapped method annotated with tags (e.g., only used to trigger tag writing, with the actual business logic delegated to other methods), or it can be a core method containing business logic. The annotations added to the method do not change the method's functionality; they only add metadata. Target code can be a code snippet for calling a utility class, used to set context tags rather than the business logic itself.

[0088] Compared to implicit mapping, explicit tagging can label business tags for complex logic (such as conditional branches, loop calls, etc.). Business tags can come from runtime data, effectively improving the flexibility and dynamism of business tag generation.

[0089] Figure 6 The flowchart illustrating the process of adding annotation information to a target method for a transaction request according to an embodiment of this application is shown.

[0090] like Figure 6 As shown, adding annotation information to the target method of the transaction request in this embodiment includes operations S610 to S620.

[0091] When operating S610, if a transaction request method calls multiple services, the service calls that require annotation information are encapsulated into a separate public method, and the annotation information is added to the public method.

[0092] When operating S620, the interface information of the service interface is matched with the corresponding business tag in the business tag library. Based on the matching result, the business tag of the transaction request is determined and written into the target context.

[0093] In some embodiments, when a transaction request method needs to call multiple services, in order to avoid duplicate annotations or chaotic tag management, the target service needs to be extracted into a public method, and an annotation is added to the public method to declare the business tag. Here, the target service is the service that needs to have annotation information added.

[0094] By analyzing the main method of the transaction request, the target service that needs to be associated with a business tag, such as the payment service, can be identified. Only the service call requiring the associated business tag can be extracted; other services can maintain their original calling methods. The target service call can be extracted into a separate public method, and a custom annotation can be added to the public method to declare the business tag that the call needs to be associated with. When the public method executes, the business tag matching the transaction request can be determined by parsing the tags in the annotation, and the matched business tag can be written into the target context of the current request for use by subsequent logic.

[0095] For transaction request methods that call multiple services, this application embodiment encapsulates the target service call separately, concentrates the business tags on the public method, avoids the proliferation or duplication of business tags in the main method annotation, and decouples business tags and business logic.

[0096] Figure 7 The diagram illustrates the principle of obtaining processing information corresponding to each service node through which a transaction request passes, and generating a link tracing result of the transaction request based on the collected processing information, according to an embodiment of this application.

[0097] like Figure 7As shown, the embodiment of obtaining the processing information corresponding to each service node through which the transaction request passes and generating the link tracing result of the transaction request based on the collected processing information includes: controlling multiple service nodes to send processing information containing business tags to the link gateway, so that the link gateway can determine the topological relationship between service nodes based on the business tags in the multiple processing information and determine the link data of the transaction request based on the multiple processing information.

[0098] In some embodiments, the link gateway serves as the entry point and distribution center for link data. Applications A, B, and C send processing information to the link gateway. This processing information may include the target context (service tag, TraceId, SpanId) of the current service node. See also... Figure 7 For example, the target context of ingress application A may include TraceId=t1, SpanId=s1, and biz Tag (business tag)=000088. The ingress application is the aforementioned ingress node, and applications B and C are the aforementioned service nodes. Applications B and C integrate and propagate the business tag and target context of ingress application A. Based on the topology and link data determined by the link gateway, the link tracing result of the transaction request is obtained.

[0099] After receiving processing information from multiple nodes, the link gateway first performs unified parsing and consistency verification of the target context of each node to ensure that the link data format of each node is consistent.

[0100] In some embodiments, topology calculation is performed based on the processing information of multiple service nodes. For example, based on the call order of TraceID and SpanId in the target context, dependencies between services (such as A→B→C) are dynamically generated. For instance, the link gateway can identify the service call order by parsing TraceID and SpanId. The parsed call chain (such as A→B→C) is sent to the topology calculation service, which merges historical data to generate a global topology relationship (such as a dependency graph of all services). The topology relationship (such as A→B→C) is encoded to generate a unique identifier (i.e., a topology signature), and the topology relationship is written to the corresponding database to enable queries related to the topology relationship.

[0101] In some embodiments, the raw link data from multiple processing information sources is organized to determine the complete link data corresponding to the transaction request. For example, the raw link data can be processed using distributed stream processing, and the processed link data can be stored in a corresponding search and analysis engine to facilitate searching, analysis, and log management. Decoupling and buffering the raw data through distributed storage and asynchronous processing improves system processing stability.

[0102] In some embodiments, topology and link data can be input into a visualization tool to generate an interactive link diagram and obtain link tracing results for transaction requests.

[0103] The business tags in this application can penetrate asynchronous boundaries, ensuring uninterrupted link connections. The link gateway can associate processing information from different processing stages based on business tags, improving the accuracy and comprehensiveness of link tracing results. Based on the business tags and call sequences in real-time processing information, a service dependency graph is dynamically constructed. Even if service instances are scaled up or down, or the call chain changes (such as switching from service A to service B), the system can still automatically update the topology, ensuring the accuracy and flexibility of link tracing.

[0104] Based on the above transaction request tracing method, this application also provides a transaction request tracing apparatus. The following will be combined with... Figure 8 The device is described in detail.

[0105] Figure 8 A schematic block diagram of a transaction request link tracing apparatus according to an embodiment of this application is shown.

[0106] like Figure 8 As shown, the transaction request tracing device 800 of this embodiment includes a configuration module 810, an update module 820, and an acquisition module 830.

[0107] The configuration module 810 is used to configure service tags for received transaction requests using the entry node, which is used to interact with external systems. In one embodiment, the configuration module 810 can be used to perform the operation S210 described above, which will not be repeated here.

[0108] The update module 820 is used to update the status of the target configuration item to the enabled state when the service tag type is a type 1 tag; wherein, the status of the target configuration item is related to the link acquisition method. In one embodiment, the update module 820 can be used to perform the operation S220 described above, which will not be repeated here.

[0109] The acquisition module 830, when the target configuration item is in the enabled state, acquires the processing information corresponding to each service node through which the transaction request passes and generates a link tracing result of the transaction request based on the collected processing information; the processing information is used to record the link data generated by the service node performing processing operations on the transaction request. In one embodiment, the acquisition module 830 can be used to execute the operation S230 described above, which will not be repeated here.

[0110] According to embodiments of this application, any plurality of modules among the configuration module 810, update module 820, and acquisition module 830 can be combined into one module, or any one of these modules can be split into multiple modules. Alternatively, at least a portion of the functionality of one or more of these modules can be combined with at least a portion of the functionality of other modules and implemented in one module. According to embodiments of this application, at least one of the configuration module 810, update module 820, and acquisition module 830 can be at least partially implemented as hardware circuitry, such as a field-programmable gate array (FPGA), a programmable logic array (PLA), a system-on-a-chip, a system-on-a-substrate, a system-on-package, an application-specific integrated circuit (ASIC), or any other reasonable means of integrating or packaging circuitry, or implemented in software, hardware, or firmware, or in any appropriate combination of any of these three implementation methods. Alternatively, at least one of the configuration module 810, update module 820, and acquisition module 830 can be at least partially implemented as a computer program module, which, when run, can perform corresponding functions.

[0111] Figure 9 A block diagram schematically illustrates an electronic device suitable for implementing a transaction request link tracing method according to an embodiment of this application.

[0112] like Figure 9 As shown, an electronic device 900 according to an embodiment of this application includes a processor 901, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 902 or a program loaded from a storage portion 908 into a random access memory (RAM) 903. The processor 901 may include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or an associated chipset and / or a special-purpose microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 901 may also include onboard memory for caching purposes. The processor 901 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of this application.

[0113] RAM 903 stores various programs and data required for the operation of electronic device 900. Processor 901, ROM 902, and RAM 903 are interconnected via bus 904. Processor 901 executes various operations of the method flow according to embodiments of this application by executing programs in ROM 902 and / or RAM 903. It should be noted that programs may also be stored in one or more memories other than ROM 902 and RAM 903. Processor 901 may also execute various operations of the method flow according to embodiments of this application by executing programs stored in one or more memories.

[0114] According to embodiments of this application, the electronic device 900 may further include an input / output (I / O) interface 905, which is also connected to a bus 904. The electronic device 900 may also include one or more of the following components connected to the input / output (I / O) interface 905: an input section 906 including a keyboard, mouse, etc.; an output section 907 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 908 including a hard disk, etc.; and a communication section 909 including a network interface card such as a LAN card, modem, etc. The communication section 909 performs communication processing via a network such as the Internet. A drive 910 is also connected to the input / output (I / O) interface 905 as needed. A removable medium 911, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on the drive 910 as needed so that computer programs read from it can be installed into the storage section 908 as needed.

[0115] This application also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or it may exist independently and not assembled into the device / apparatus / system. The computer-readable storage medium carries one or more programs, which, when executed, implement the method according to the embodiments of this application.

[0116] According to embodiments of this application, the computer-readable storage medium can be a non-volatile computer-readable storage medium, such as including but not limited to: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this application, the computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. For example, according to embodiments of this application, the computer-readable storage medium may include ROM 902 and / or RAM 903 and / or one or more memories other than ROM 902 and RAM 903 described above.

[0117] Embodiments of this application also include a computer program product comprising a computer program containing program code for performing the methods shown in the flowchart. When the computer program product is run on a computer system, the program code enables the computer system to implement the transaction request tracing method provided in the embodiments of this application.

[0118] When the computer program is executed by the processor 901, it performs the functions defined in the system / apparatus of this application embodiment. According to the embodiments of this application, the systems, apparatuses, modules, units, etc., described above can be implemented by computer program modules.

[0119] In one embodiment, the computer program may rely on a tangible storage medium such as an optical storage device or a magnetic storage device. In another embodiment, the computer program may also be transmitted and distributed in the form of signals over a network medium, and downloaded and installed via the communication section 909, and / or installed from a removable medium 911. The program code contained in the computer program can be transmitted using any suitable network medium, including but not limited to: wireless, wired, etc., or any suitable combination thereof.

[0120] In such an embodiment, the computer program can be downloaded and installed from a network via the communication section 909, and / or installed from the removable medium 911. When the computer program is executed by the processor 901, it performs the functions defined in the system of this application embodiment. According to the embodiments of this application, the systems, devices, apparatuses, modules, units, etc., described above can be implemented by computer program modules.

[0121] According to embodiments of this application, program code for executing the computer programs provided in the embodiments of this application can be written in any combination of one or more programming languages. Specifically, these computational programs can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages ​​include, but are not limited to, languages ​​such as Java, C++, Python, "C", or similar programming languages. The program code can be executed entirely on the user's computing device, partially on the user's device, partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).

[0122] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0123] Those skilled in the art will understand that the features described in the various embodiments of this application can be combined and / or combined in various ways, even if such combinations or combinations are not explicitly described in this application. In particular, the features described in the various embodiments of this application can be combined and / or combined in various ways without departing from the spirit and teachings of this application. All such combinations and / or combinations fall within the scope of this application.

Claims

1. A transaction request tracing method, characterized in that, The method includes: The entry node is used to configure a business tag for the received transaction request, and the entry node is used to interact with external systems; If the type of the business tag is a type 1 tag, the status of the target configuration item will be updated to the enabled state; wherein, the status of the target configuration item is related to the link acquisition method; When the target configuration item is enabled, the processing information corresponding to each service node through which the transaction request passes is obtained, and the link tracing result of the transaction request is generated based on the collected processing information; the processing information is used to record the link data generated by the service node performing processing operations on the transaction request.

2. The transaction request tracing method according to claim 1, characterized in that, The process of configuring service tags for received transaction requests using the entry node includes: In response to the entry node receiving the transaction request, target business information is extracted from the transaction request; The business tag of the transaction request is determined based on the target business information; The business tag is associated with the transaction request so that the business tag is transmitted along with the transaction request across multiple service nodes.

3. The transaction request tracing method according to claim 2, characterized in that, Associating the business tag with the transaction request includes: The business tag is written into the target context, which is used to transmit information across nodes; In response to the transmission of a transaction request in the service nodes, each service node reads the business tag from the target context and writes the business tag into the target context of the downstream service node, so that the processing information corresponding to the service nodes through which the transaction request passes all contain the business tag, forming a complete link association between multiple service nodes.

4. The transaction request tracing method according to claim 3, wherein writing the business tag into the target context includes: Determine the service interfaces that need to be called to process the transaction request based on the target business information; In response to a matching business tag for the service interface in the business tag library, the matched business tag is written into the target context of the transaction request.

5. The transaction request tracing method according to claim 3, characterized in that, The step of writing the business tag into the configuration context includes at least one of the following: Add annotation information to the target method of the transaction request. The annotation information is used to declare the business tag that the method call needs to be associated with. Write the business tag into the target context of the transaction request before the method is executed. Define a business tag in the target code of the transaction request, and write the business tag into the target context of the transaction request in response to the code execution reaching the marked position; The target method and the target code are used to execute the call to the business tag or to execute at least part of the business logic.

6. The transaction request tracing method according to claim 5, characterized in that, Adding annotation information to the target method of the transaction request includes: When the transaction request method calls multiple services, the service calls that require annotation information are encapsulated into a separate public method, and the annotation information is added to the public method. Based on the interface information of the service interface, the corresponding business tag is matched in the business tag library, and the business tag of the transaction request is determined according to the matching result and written into the target context.

7. The transaction request tracing method according to claim 1, characterized in that, The method further includes: If the type of the business tag is a type II tag, keep the state of the target configuration item in the closed state; When the target configuration item is in the off state, processing information of some nodes is extracted from multiple service nodes through which the transaction request passes based on preset collection information, and the link tracing result of the transaction request is generated based on the extracted processing information.

8. The transaction request tracing method according to claim 1, characterized in that, The step of obtaining processing information corresponding to each service node through which the transaction request passes and generating a link tracing result of the transaction request based on the collected processing information includes: The system controls the multiple service nodes to send processing information containing service tags to the link gateway, so that the link gateway can determine the topological relationship between the service nodes based on the service tags in the multiple processing information, and determine the link data of the transaction request based on the multiple processing information. Based on the topology and link data determined by the link gateway, the link tracing result of the transaction request is obtained.

9. A transaction request tracing device, characterized in that, The device includes: The configuration module is used to configure business tags for received transaction requests using entry nodes, which are used to interact with external systems; The update module is used to update the status of the target configuration item to the enabled state when the type of the business tag is a type 1 tag; wherein, the status of the target configuration item is related to the link acquisition method; The acquisition module is used to acquire processing information corresponding to each service node through which the transaction request passes, and generate a link tracing result of the transaction request based on the collected processing information, when the target configuration item is in the enabled state; the processing information is used to record the link data generated by the service node performing processing operations on the transaction request.

10. An electronic device, comprising: One or more processors; Memory, used to store one or more computer programs. The characteristic feature is that the one or more processors execute the one or more computer programs to implement the steps of the method according to any one of claims 1 to 8.

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

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