Log-based node generation method and device, equipment, medium and product

By obtaining and analyzing the log data of multiple business subsystems, generating and completing nodes of the transaction link, the link incompleteness caused by transaction log loss or error is solved, and the integrity and abnormal analysis of transaction business is achieved.

CN119149502APending Publication Date: 2024-12-17CHINA CONSTRUCTION BANK +1
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411298411.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-18
Publication Date
2024-12-17

AI Technical Summary

Technical Problem

The prior art cannot determine the nodes on the transaction link in the event of a lost or error in the transaction log, resulting in incomplete transaction links and inability to analyze potential problems or efficiency bottlenecks in the transaction business.

Method used

By obtaining log data of multiple business subsystems, the nodes in the transaction link are generated using upstream node identification, current node identification and downstream node identification. If the data of a certain node is missing, reference data will be queried from other log data to complete the link. , and use error codes and error counts to identify exception node information.

Benefits of technology

It realizes transaction link integrity in case of transaction log loss or error, can analyze problems and exceptions in trading business, and provides reference for maintenance and optimization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119149502A_ABST
    Figure CN119149502A_ABST
Patent Text Reader

Abstract

The invention provides a log-based node generation method, which can be applied to the technical field of computers and the technical field of finance, and comprises the following steps: obtaining respective log data of M business subsystems related to a transaction business; for any target service subsystem in the M service subsystems, generating the Nth node of the transaction link according to the current node identifier in the first log data corresponding to the target service subsystem; generating an (N + 1) th node of the transaction link according to the downstream node identifier in the first log data; when the second log data corresponding to the (N + 1) th node cannot be queried according to the downstream node identifier in the first log data, querying reference log data from the M pieces of log data according to the downstream node identifier in the first log data; and generating the (N + 2) th node of the transaction link according to the current node identifier in the reference log data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the fields of computer technology and financial technology, and more specifically to a log-based node generation method, device, equipment, medium and product. Background Art

[0002] Financial services are usually composed of multiple subsystems, each of which has dependencies on multiple other subsystems. Obtaining the subsystems involved in the business execution process and the relationship between subsystems is crucial for the operation and maintenance analysis of financial services. In related technologies, nodes on the transaction chain are generated by identifying the naming rules and timestamps of sub-transaction numbers in transaction logs (or transaction details).

[0003] In the process of realizing the concept of the present disclosure, there are at least the following problems in the related art: the transaction log is generated by the transaction subsystem executing the transaction tracking task. If the transaction tracking task fails to be executed, the transaction log cannot be obtained, and then the nodes on the transaction link cannot be determined by the method in the related art to obtain a complete transaction link. Summary of the invention

[0004] In view of the above problems, the present disclosure provides a log-based node generation method, apparatus, device, medium and product.

[0005] According to a first aspect of the present disclosure, a log-based node generation method is provided, comprising: obtaining log data of each of M business subsystems related to a transaction business, wherein the log data comprises an upstream node identifier, a current node identifier, and a downstream node identifier, wherein M is a positive integer and M≥2; for any target business subsystem among the M business subsystems, generating an Nth node of a transaction link according to the current node identifier in the first log data corresponding to the target business subsystem, wherein N is a positive integer; generating an N+1th node of the transaction link according to the downstream node identifier in the first log data; in a case where the second log data corresponding to the N+1th node cannot be queried according to the downstream node identifier in the first log data, querying reference log data from the M log data according to the downstream node identifier in the first log data; generating an N+2th node of the transaction link according to the current node identifier in the reference log data.

[0006] According to an embodiment of the present disclosure, the above method also includes: when the second log data corresponding to the above N+1th node can be queried according to the above downstream node identifier in the above first log data, generating the N+2th node according to the above downstream node identifier in the above second log data.

[0007] According to an embodiment of the present disclosure, the above-mentioned log data also includes node error information, and the node error information includes an error code and a node error count. The above-mentioned method also includes: determining the node error description corresponding to the above-mentioned error code in the parameter dictionary based on the above-mentioned error code; and using the above-mentioned error code, the above-mentioned node error description and the above-mentioned node error count as abnormal node information corresponding to the above-mentioned log data.

[0008] According to an embodiment of the present disclosure, the method further includes: when the abnormal node information exists at the N+2th node, generating the abnormal node information of the N+1th node according to the abnormal node information of the N+2th node.

[0009] According to an embodiment of the present disclosure, the above method also includes: obtaining multiple copies of third log data in which the above upstream node identifier is consistent with the above current node identifier in each of the above log data; determining target log data from the multiple third log data according to the timestamp in the above third log data; and generating the head node of the above transaction link according to the above current node identifier in the above target log data.

[0010] According to an embodiment of the present disclosure, the method further includes: for any target business subsystem among the M business subsystems, when the transaction link already has the downstream node identifier in the first log data, ending the node generation of the transaction link.

[0011] According to an embodiment of the present disclosure, the above-mentioned acquisition of respective log data of M business subsystems related to the transaction business includes: acquiring respective log data of M business subsystems related to the above-mentioned transaction business from the log storage area of ​​each of the above-mentioned business subsystems according to the unique identifier of the above-mentioned transaction business.

[0012] A second aspect of the present disclosure provides a log-based node generation device, characterized in that the device includes: a data acquisition module, used to acquire log data of each of M business subsystems related to the transaction business, wherein the log data includes an upstream node identifier, a current node identifier, and a downstream node identifier, wherein M is a positive integer and M≥2; a first generation module, used to generate the Nth node of the transaction link for any target business subsystem among the M business subsystems according to the current node identifier in the first log data corresponding to the target business subsystem, wherein N is a positive integer; a second generation module, used to generate the N+1th node of the transaction link according to the downstream node identifier in the first log data; a third generation module, used to query reference log data from the M log data according to the downstream node identifier in the first log data when the second log data corresponding to the N+1th node cannot be queried according to the downstream node identifier in the first log data; and a fourth generation module, used to generate the N+2th node of the transaction link according to the current node identifier in the reference log data.

[0013] A third aspect of the present disclosure provides an electronic device, comprising: one or more processors; and a memory for storing one or more computer programs, wherein the one or more processors execute the one or more computer programs to implement the steps of the above method.

[0014] The fourth aspect of the present disclosure further provides a computer-readable storage medium having a computer program or instructions stored thereon, which implements the steps of the above method when the above computer program or instructions are executed by a processor.

[0015] The fifth aspect of the present disclosure further provides a computer program product, including a computer program or instructions, which implement the steps of the above method when the above computer program or instructions are executed by a processor.

[0016] According to the embodiment of the present disclosure, by searching for the second log data corresponding to the node in the collected multiple log data, it is determined whether the second log data is missing in the multiple log data. In the case where the second log data cannot be found, that is, in the case where it is determined that the second log data is missing in the multiple log data, reference log data is queried from M log data according to the downstream node identifier in the first log data, and the downstream adjacent node of the node corresponding to the missing second log data in the transaction link is generated according to the current node identifier in the reference log data obtained by the query, so as to obtain a complete transaction link. In order to analyze potential problems or efficiency bottlenecks in the transaction business by using the complete transaction link, for example, transaction business abnormalities caused by errors in a certain business subsystem, etc., provide a reference basis for the optimization and maintenance of the subsequent business subsystem. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0018] Figure 1 An application scenario diagram of log-based node generation according to an embodiment of the present disclosure is schematically shown.

[0019] Figure 2 The flowchart of the log-based node generation method according to an embodiment of the present disclosure is schematically shown.

[0020] Figure 3 The flowchart of a log-based node generation method according to another embodiment of the present disclosure is schematically shown.

[0021] Figure 4 The flowchart of a log-based node generation method according to another embodiment of the present disclosure is schematically shown.

[0022] Figure 5 A schematic diagram schematically shows a link relationship according to an embodiment of the present disclosure.

[0023] Figure 6 The structural block diagram of a log-based node generation device according to an embodiment of the present disclosure is schematically shown.

[0024] Figure 7 A block diagram of an electronic device suitable for implementing a log-based node generation method according to an embodiment of the present disclosure is schematically shown. DETAILED DESCRIPTION

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

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

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

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

[0029] It should be noted that the log-based node generation method and device disclosed herein can be used in the fields of financial technology and computer technology, and can also be used in any field other than the fields of financial technology and computer technology. The application field of the log-based node generation method and device disclosed herein is not limited.

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

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

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

[0033] The following is a brief description of the terms used in this article.

[0034] Java language: Java is an object programming language with the characteristics of simplicity, object-oriented, distributed, robust, secure, platform independence and portability, multi-threading, and dynamism.

[0035] HTTP (Hypertext Transfer Protocol): A protocol that can access network resources such as HTML (HyperText Markup Language). It is the basis for data exchange on the Web and is a client-server protocol, that is, the request is usually initiated by the recipient such as a browser.

[0036] Log data is data used in the business subsystem to record the execution process of transaction business. Log data includes sub-transaction sequence numbers. The naming rules of sub-transaction sequence numbers can represent the order relationship between multiple nodes. In related technologies, the sub-transaction sequence numbers in the log data are identified to identify the order between other nodes except the transaction initiator, thereby obtaining a complete transaction link. In the case of incorrect sub-transaction sequence numbers, the transaction details start time of the node is used as the basis for determining its order on the transaction link.

[0037] In actual application, the log data of the business subsystem may be missing due to various reasons, such as log system failure due to insufficient disk storage space, etc., which makes it impossible to use the methods in related technologies to determine the nodes on the transaction link.

[0038] An embodiment of the present disclosure provides a log-based node generation method, which obtains log data of each of M business subsystems related to a transaction business, wherein the log data includes an upstream node identifier, a current node identifier, and a downstream node identifier, wherein M is a positive integer and M≥2; for any target business subsystem among the M business subsystems, the Nth node of a transaction link is generated according to the current node identifier in the first log data corresponding to the target business subsystem, wherein N is a positive integer; the N+1th node of the transaction link is generated according to the downstream node identifier in the first log data; when the second log data corresponding to the N+1th node cannot be queried according to the downstream node identifier in the first log data, reference log data is queried from M log data according to the downstream node identifier in the first log data; and the N+2th node of the transaction link is generated according to the current node identifier in the reference log data.

[0039] Figure 1An application scenario diagram of log-based node generation according to an embodiment of the present disclosure is schematically shown.

[0040] like Figure 1 As shown, the 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 is used to provide a medium for a communication link between the first terminal device 101, the second terminal device 102, the third terminal device 103, and the server 105. The network 104 may include various connection types, such as wired, wireless communication links, or optical fiber cables, etc.

[0041] The user can use the first terminal device 101, the second terminal device 102, and the third terminal device 103 to interact with the server 105 through the network 104 to receive or send messages, etc. Various communication client applications 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 platform software, etc. (only for example).

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

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

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

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

[0046] The following will be based on Figure 1 The scene described by Figure 2~Figure 3 The log-based node generation method of the disclosed embodiment is described in detail.

[0047] Figure 2 The flowchart of the log-based node generation method according to an embodiment of the present disclosure is schematically shown.

[0048] like Figure 2 As shown, the log-based node generation method of this embodiment includes operations S210 to S250.

[0049] In operation S210, log data of each of M business subsystems related to the transaction business is obtained, wherein the log data includes an upstream node identifier, a current node identifier, and a downstream node identifier, wherein M is a positive integer and M≥2.

[0050] In operation S220, for any target business subsystem among the M business subsystems, an Nth node of the transaction link is generated according to a current node identifier in the first log data corresponding to the target business subsystem, where N is a positive integer.

[0051] In operation S230, an N+1th node of the transaction link is generated according to the downstream node identifier in the first log data;

[0052] In operation S240, when the second log data corresponding to the N+1th node cannot be found according to the downstream node identifier in the first log data, reference log data is searched from the M log data according to the downstream node identifier in the first log data;

[0053] In operation S250, the N+2th node of the transaction link is generated according to the current node identifier in the reference log data.

[0054] According to an embodiment of the present disclosure, a business subsystem is a subsystem that provides financial business services to users. Transaction business is a business generated by a transaction initiated by a user, and one transaction business may involve multiple business subsystems. Each business subsystem corresponds to a log data, and each log data includes at least an upstream node identifier, a current node identifier, and a downstream node identifier. The current node identifier may be a unique identifier of the business subsystem corresponding to the log data; the upstream node identifier may be a unique identifier of a business subsystem located upstream of the business subsystem in the process of processing a transaction business; the downstream node identifier may be a unique identifier of a business subsystem located downstream of the business subsystem in the process of processing a transaction business.

[0055] According to an embodiment of the present disclosure, a transaction link is a schematic link composed of multiple nodes participating in a transaction business, wherein each node in the transaction link represents a business subsystem. There are multiple log data of business subsystems related to the transaction business, wherein only the log data of M business subsystems can be obtained, that is, there are log data of one or more business subsystems related to the transaction business that are not in the M log data.

[0056] According to an embodiment of the present disclosure, in the process of generating each node of a transaction link, for any target business subsystem among the M business subsystems, the Nth node of the transaction link is generated according to the current node identifier in the first log data corresponding to the target business subsystem. In the storage process, the Nth node of the transaction link can be represented by the current node identifier of the first log data. The transaction link can be saved in a sequence, and different nodes are distinguished by separators. For example, the sequence A|B|C, where A, B, and C are the current node identifiers in different log data.

[0057] According to the embodiment of the present disclosure, since the downstream node identifier in the first log data represents the unique identifier of the business subsystem located downstream of the target business subsystem during the execution of the transaction business, the downstream node of the Nth node in the transaction link can be determined according to the downstream node identifier in the first log data. According to the downstream node identifier in the first log data, the N+1th node of the transaction link is generated.

[0058] According to an embodiment of the present disclosure, the reference log data is the downstream node adjacent to the N+1th node, that is, the log data corresponding to the N+2th node. The current node identifier is queried in the M log data, and the second log data that matches the downstream node identifier in the first log data is matched. In the case where the second log data corresponding to the N+1th node cannot be found, that is, the second log data corresponding to the N+1th node is missing, the log data corresponding to the downstream node adjacent to the N+1th node is queried from the M log data according to the downstream node identifier in the first log data. Specifically, the downstream node identifier in the first log data can be matched with the upstream node identifiers of the M log data to determine the reference log data. Based on the current node identifier in the reference log data found, the N+2th node of the transaction link is generated.

[0059] According to the embodiment of the present disclosure, by searching for the second log data corresponding to the node in the collected multiple log data, it is determined whether the second log data is missing in the multiple log data. In the case where the second log data cannot be found, that is, in the case where it is determined that the second log data is missing in the multiple log data, reference log data is queried from M log data according to the downstream node identifier in the first log data, and the downstream adjacent node of the node corresponding to the missing second log data in the transaction link is generated according to the current node identifier in the reference log data obtained by the query, so as to obtain a complete transaction link. In order to use the complete transaction link to analyze potential problems or efficiency bottlenecks in the transaction business, for example, transaction business anomalies caused by errors in a certain business subsystem, etc., to provide a reference basis for the subsequent maintenance of the business subsystem.

[0060] According to an embodiment of the present disclosure, the log-based node generation method also includes: when the second log data corresponding to the N+1th node can be queried according to the downstream node identifier in the first log data, generating the N+2th node according to the downstream node identifier in the second log data.

[0061] According to an embodiment of the present disclosure, the current node identifier is queried in M ​​log data, and the downstream node identifier in the first log data is matched with the current node identifier of the second log data. When the second log data corresponding to the N+1th node is found, the N+2th node in the transaction link is generated according to the downstream node identifier in the second log data.

[0062] According to an embodiment of the present disclosure, in the case where there is no missing log data of a node, the log data corresponding to the N+2th node is searched in M ​​log data according to the downstream node identifier of the first log data, and then the N+2th node is generated according to the downstream node identifier in the second log data, thereby solving the problem of inaccurate node order caused by incorrect naming rules of factor transaction sequence numbers and improving the integrity of the link.

[0063] Figure 3 The flowchart of a log-based node generation method according to another embodiment of the present disclosure is schematically shown.

[0064] like Figure 3 As shown, the log-based node generation method of this embodiment includes operations S310 to S370.

[0065] In operation S310, log data of each of M business subsystems related to the transaction business is obtained.

[0066] In operation S320, for any target business subsystem among the M business subsystems, an Nth node of the transaction link is generated according to a current node identifier in the first log data corresponding to the target business subsystem.

[0067] In operation S330, an N+1th node of the transaction link is generated according to the downstream node identifier in the first log data.

[0068] In operation S340 , it is determined whether the second log data corresponding to the N+1th node can be queried according to the downstream node identifier in the first log data.

[0069] When the second log data corresponding to the N+1th node is found, operation S350 is performed; when the second log data corresponding to the N+1th node is not found, operations S360 to S370 are performed.

[0070] In operation S350 , an N+2th node is generated according to the downstream node identifier in the second log data.

[0071] In operation S360 , reference log data is searched from the M log data according to the downstream node identifier in the first log data.

[0072] In operation S370, the N+2th node of the transaction link is generated according to the current node identifier in the reference log data.

[0073] According to an embodiment of the present disclosure, the N+1th node of the transaction link is generated according to the downstream node identifier in the first log data, and the second log data corresponding to the N+1th node is queried according to the downstream node identifier in the first log data to determine whether the second log data corresponding to the N+1th node is lost. In this way, in the event that the second log data corresponding to the N+1th node is lost, the transaction link is completed and the reference log data of the N+2th node is searched for, so as to continue to generate downstream nodes, reduce the situation where the transaction link is incomplete due to the loss of node log data, and improve the integrity of the transaction link.

[0074] According to an embodiment of the present disclosure, when the N+2th node of a transaction link has been generated, the log data corresponding to the Nth node in the M log data may be deleted to reduce cross-talk problems during data link generation.

[0075] According to an embodiment of the present disclosure, the log data also includes node error information, and the node error information includes an error code and a node error count. The log-based node generation method also includes: determining a node error description corresponding to the error code in a parameter dictionary based on the error code; and using the error code, node error description and node error count as abnormal node information corresponding to the log data.

[0076] According to an embodiment of the present disclosure, the node error information includes an error code and a node error count, wherein the error code is used to characterize the error type of the system error, for example, the error code may include XDCA0XXXX, XDBF300XXX, etc. The node error count is used to record the severity of the system abnormality caused by the node error, and the node error count can help users or algorithms quickly identify the scope of impact. When the node error counter detects that the node generates an error code, the error counter automatically increases the value of the node error count.

[0077] According to an embodiment of the present disclosure, the parameter dictionary includes various error codes and error descriptions corresponding to the error codes, such as HTTP call timeout, too many requests to the current interface, exceptions when executing the target service method through reflection, etc. Error code XDCA0XXXX indicates that the query data failed; error code XDBF300XXX indicates that an exception occurred when executing the target service method through reflection.

[0078] According to an embodiment of the present disclosure, based on the error code obtained from the log information, the error description corresponding to the error code is queried in the storage device that stores the parameter dictionary, the error code, the node error description and the node error count are used as the abnormal node information corresponding to the log data, and the abnormal node information is stored corresponding to the node of the transaction link, so that the server can call the abnormal node information through the node of the transaction link.

[0079] According to an embodiment of the present disclosure, for a business subsystem that generates an abnormality, abnormal node information is added to the node corresponding to the business subsystem, and the abnormal node information is used to provide a reference for abnormal analysis or other link analysis through the node link, thereby further improving the integrity of the node link.

[0080] According to an embodiment of the present disclosure, the log-based node generation method further includes: when abnormal node information exists at the N+2th node, generating abnormal node information at the N+1th node according to the abnormal node information at the N+2th node.

[0081] According to an embodiment of the present disclosure, for the N+1th node that loses the second log data, if there is abnormal node information in the downstream node of the N+1th node, that is, the N+2th node, it can be considered that there is an abnormality in the N+1th node with a high probability, and the abnormal node information of the N+2th node is used as the abnormal node information of the N+1th node.

[0082] According to an embodiment of the present disclosure, the loss of the second log data corresponding to the N+1th node is caused by a failure of the system's log system or a failure of the disk storing the log. To improve the accuracy of the abnormal node information, the node error count of the abnormal node information of the N+2th node can be changed to distinguish the impact of the abnormal node information of the N+1th node and the abnormal node information of the N+2th node on the transaction business.

[0083] According to an embodiment of the present disclosure, by judging whether there is abnormal node information of the N+2th node downstream of the N+1th node which lacks the second log data in the transaction link, if there is abnormal node information, the abnormal node information of the N+1th node will be generated according to the abnormal node information of the N+2th node to supplement the abnormal node information which lacks the second log data in the transaction link, thereby enriching the transaction link and improving the integrity of the transaction link.

[0084] According to an embodiment of the present disclosure, the log-based node generation method also includes: obtaining multiple copies of third log data in which the upstream node identifier in each log data is consistent with the current node identifier; determining the target log data from the multiple third log data based on the timestamp in the third log data; and generating the head node of the transaction link based on the current node identifier in the target log data.

[0085] According to an embodiment of the present disclosure, the third log data represents the log data corresponding to the initiating node of the transaction business. In a distributed system, a transaction business may be initiated by multiple business subsystems, and in the log data corresponding to the head node of the transaction link, the upstream node identifier is consistent with the current node identifier. Therefore, by matching the upstream node identifier and the current node identifier in each log data, multiple copies of the third log data can be obtained.

[0086] According to an embodiment of the present disclosure, multiple copies of third log data are sorted according to the timestamps in each third log data, and the multiple third log data are respectively used to generate corresponding transaction links. The third log data with the smallest timestamp or the third log data with the largest timestamp is selected from the multiple third log data as the target log data. The target log data is used to represent the log data corresponding to the head node used to generate the transaction link. The head node of the transaction link is generated according to the current node identifier in the target log data.

[0087] According to an embodiment of the present disclosure, for a distributed service system including multiple business subsystems, multiple third log data can be put into a unified collection. When the third node of the transaction link has been generated, the third log data corresponding to the head node is removed from the aggregated collection to reduce the occurrence of multiple or repeated string problems in the transaction link.

[0088] Figure 4 The flowchart of a log-based node generation method according to another embodiment of the present disclosure is schematically shown.

[0089] like Figure 4 As shown, the log-based node generation method of this embodiment includes operations S410 to S470.

[0090] In operation S410, a queue consisting of a plurality of third log data is obtained. Specifically, the log data of each of the M business subsystems related to the transaction business is obtained according to the global event tracking number. From the M log data, the third log data whose upstream node identifier is consistent with the current node identifier is searched, and the plurality of third log data found is stored in the queue.

[0091] In operation S420, target log data is determined and a head node is generated. Specifically, according to the timestamps in the plurality of third log data, the third log data with the smallest timestamp is selected as the target log data.

[0092] In operation S430, determine whether the log data corresponding to the downstream node identifier of the current log data exists. Specifically, according to the downstream node identifier in the target log data, query multiple log data whose current node identifier matches the downstream node identifier in the target log data. In the case that the log data corresponding to the downstream node identifier of the target log data exists, perform operation S440. In the case that the log data corresponding to the downstream node identifier of the target log data does not exist, perform operation S450.

[0093] In operation S440, the obtained log data is stored in a log queue, and a Qth node is generated based on each log data. Q is a positive integer.

[0094] In operation S450, reference log data is searched from the M log data according to the downstream node identifier in the log data, and the Q+2th node is generated according to the current node identifier in the reference log data.

[0095] In operation S460, it is determined whether the traversal of the M log data is complete. If the traversal is complete, the process ends; if the traversal is not complete, operation S470 is performed.

[0096] In operation S470, a node is generated according to the untraversed log data and added to the transaction link. Specifically, a node is generated according to the untraversed log data and added to the transaction link as a leaf node (tail node) of the currently generated transaction link.

[0097] According to an embodiment of the present disclosure, the log-based node generation method further includes: for any target business subsystem among the M business subsystems, when the transaction link already has a downstream node identifier in the first log data, ending the node generation of the transaction link.

[0098] According to an embodiment of the present disclosure, for any target business subsystem among M business subsystems, a ring-shaped link relationship may exist between the multiple business subsystems. For example, the nodes already existing in the transaction link include A→B→C. The processing result in the transaction business is obtained at node C and needs to be sent to node A, resulting in the recipient node identifier in the log data of node C being A. To improve the readability of the transaction link, when the downstream node identifier in the first log data already exists in the transaction link, the node generation on the transaction link is terminated to reduce the occurrence of multiple or repeated string problems in the transaction link.

[0099] According to an embodiment of the present disclosure, obtaining log data of each of M business subsystems related to the transaction business includes: obtaining log data of each of M business subsystems related to the transaction business from the log storage area of ​​each business subsystem according to the unique identifier of the transaction business.

[0100] According to an embodiment of the present disclosure, the log storage area is used to store multiple log data generated by the business subsystem, wherein, in the same business subsystem, one transaction business corresponds to one log data, and each transaction business has a unique identifier for distinguishing different transaction businesses. The unique identifier of the transaction business can be a global event tracking number, which is used to uniquely identify multiple log data related to one transaction business. Multiple log data of multiple business subsystems in the transaction system can be collected, and the log data of each of the M business subsystems related to the transaction business can be obtained according to the unique identifier of the transaction business.

[0101] According to the embodiments of the present disclosure, the transaction link is persisted and saved, and the nodes with abnormal node information on the transaction link are marked with abnormal labels, so that when the transaction link is displayed on the front end, the nodes with abnormal node information can be distinguished from other nodes.

[0102] According to the embodiments of the present disclosure, the service can be used to intuitively see the call relationship of each system, and after a system alarm is issued, it can quickly analyze the specific affected system, respond quickly, and perform call analysis of the link view system. It also supports clicking on node data to display the transaction information and error code information of the corresponding transaction code to determine what error caused the current node. The error code information includes HTTP call timeout, too many requests to the current interface, and exceptions when executing the target service method through reflection.

[0103] According to the embodiments of the present disclosure, by acquiring multiple transaction links, a transaction link topology of two dimensions, transaction business and business subsystem, is formed. The call relationship between business subsystems in the transaction business will carry a unique identifier. A request can be initiated based on the unique identifier of the current business subsystem to find the transaction link related to the current business subsystem in multiple transaction links, split the data into a graph, and retain node abnormality information for the nodes in the string.

[0104] Figure 5 A schematic diagram schematically shows a link relationship according to an embodiment of the present disclosure.

[0105] like Figure 5As shown in the figure, the current business subsystem is XX7, XX1~XX6 and XX8~XX12 are other business subsystems, and P1~P10 include different business layers of multiple business subsystems, for example, they can include application layer, customer layer, external connection layer, etc. The P1~P10 layers in the figure are only schematic, and adaptive changes can be made in different scenarios. Within the preset time period, there are 3 transaction links related to the current business subsystem XX7, namely XX1→XX2→XX3→XX7→XX8→XX6→XX12, XX1→XX2→XX3→XX7→XX8→XX10→XX11→XX4→XX5, XX12→XX8→XX10→XX9→XX7→XX2. Among them, XX2 is a node with abnormal information.

[0106] According to an embodiment of the present disclosure, the log data also includes node information, and the node information includes the response time and processing time of the node. For a node that lacks the second log data, the node information of the node that lacks the second log data can be generated through the node information of the upstream node or downstream node of the current node, so as to provide a reference for locating the cause of the abnormal transaction of the current node.

[0107] According to an embodiment of the present disclosure, the front end Figure 5 The transaction link diagram shown shows that multiple transaction links related to the current business subsystem display node information and abnormal node information on the front end in response to user operations on the front end. For example, when the user clicks Figure 5 When a node is reached, the corresponding transaction code information will pop up. If there is an error, the node information and abnormal node information will pop up to help users quickly locate the cause of the node error.

[0108] Based on the above-mentioned log-based node generation method, the present disclosure also provides a log-based node generation device. Figure 5 The device is described in detail.

[0109] Figure 6 The structural block diagram of a log-based node generation device according to an embodiment of the present disclosure is schematically shown.

[0110] like Figure 6 As shown, the log-based node generation device 600 of this embodiment includes a data acquisition module 610 , a first generation module 620 , a second generation module 630 , a third generation module 640 , and a fourth generation module 650 .

[0111] The data acquisition module 610 is used to acquire the log data of each of the M business subsystems related to the transaction business, wherein the log data includes an upstream node identifier, a current node identifier, and a downstream node identifier, wherein M is a positive integer, and M≥2. In one embodiment, the data acquisition module 610 can be used to perform the operation S210 described above, which will not be described in detail here.

[0112] The first generating module 620 is used to generate the Nth node of the transaction link for any target business subsystem among the M business subsystems according to the current node identifier in the first log data corresponding to the target business subsystem, where N is a positive integer. In one embodiment, the first generating module 620 can be used to perform the operation S220 described above, which will not be repeated here.

[0113] The second generation module 630 is used to query the reference log data from the M log data according to the downstream node identifier in the first log data when the second log data corresponding to the N+1th node cannot be queried according to the downstream node identifier in the first log data. In one embodiment, the second generation module 630 can be used to perform the operation S230 described above, which will not be repeated here.

[0114] The third generation module 640 is used to query the reference log data from the M log data according to the downstream node identifier in the first log data when the second log data corresponding to the N+1th node cannot be queried according to the downstream node identifier in the first log data. In one embodiment, the third generation module 640 can be used to perform the operation S240 described above, which will not be repeated here.

[0115] The fourth generation module 650 is used to generate the N+2th node of the transaction link according to the current node identifier in the reference log data. In one embodiment, the fourth generation module 650 can be used to perform the operation S250 described above, which will not be described in detail here.

[0116] According to an embodiment of the present disclosure, the log-based node generation device 600 further includes: a fifth generation module.

[0117] The fifth generating module is used to generate the N+2th node according to the downstream node identifier in the second log data when the second log data corresponding to the N+1th node can be queried according to the downstream node identifier in the first log data.

[0118] According to an embodiment of the present disclosure, the log data also includes node error information, the node error information includes an error code and a node error count, and the log-based node generation device 600 also includes: a first determination module and an abnormality determination module.

[0119] The first determination module is used to determine a node error description corresponding to an error code in a parameter dictionary based on the error code.

[0120] The abnormality determination module is used to use the error code, node error description and node error count as abnormal node information corresponding to the log data.

[0121] According to an embodiment of the present disclosure, the log-based node generation device 600 further includes: an exception generation module.

[0122] The abnormality generating module is used to generate abnormal node information of the N+1th node according to the abnormal node information of the N+2th node when abnormal node information exists in the N+2th node.

[0123] According to an embodiment of the present disclosure, the log-based node generation device 600 further includes: a log acquisition module, a target determination module, and a sixth generation module.

[0124] The log acquisition module is used to acquire multiple third log data in which the upstream node identifier in each log data is consistent with the current node identifier.

[0125] The target determination module is used to determine the target log data from the plurality of third log data according to the timestamp in the third log data.

[0126] The sixth generation module is used to generate a head node of the transaction link according to the current node identifier in the target log data.

[0127] According to an embodiment of the present disclosure, the log-based node generation device 600 further includes: a link termination module.

[0128] The node termination module is used to terminate the node generation of the transaction link for any target business subsystem among the M business subsystems when the transaction link already has a downstream node identifier in the first log data.

[0129] According to an embodiment of the present disclosure, the data acquisition module 610 includes: a data acquisition unit.

[0130] The data acquisition unit is used to acquire the respective log data of M business subsystems related to the transaction business from the log storage area of ​​each business subsystem according to the unique identifier of the transaction business.

[0131] According to an embodiment of the present disclosure, any multiple modules of the data acquisition module 610, the first generation module 620, the second generation module 630, the third generation module 640, and the fourth generation module 650 can be combined in one module for implementation, or any one of the modules can be split into multiple modules. Alternatively, at least part of the functions of one or more of these modules can be combined with at least part of the functions of other modules and implemented in one module. According to an embodiment of the present disclosure, at least one of the data acquisition module 610, the first generation module 620, the second generation module 630, the second generation module 630, the third generation module 640, and the fourth generation module 650 can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on a chip, a system on a substrate, a system on a package, an application specific integrated circuit (ASIC), or can be implemented by hardware or firmware such as any other reasonable way of integrating or packaging the circuit, or implemented in any one of the three implementation methods of software, hardware, and firmware or in an appropriate combination of any of them. Alternatively, at least one of the data acquisition module 610, the first generation module 620, the second generation module 630, the third generation module 640, and the fourth generation module 650 can be at least partially implemented as a computer program module, which can perform corresponding functions when the computer program module is executed.

[0132] Figure 7 A block diagram of an electronic device suitable for implementing a log-based node generation method according to an embodiment of the present disclosure is schematically shown.

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

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

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

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

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

[0138] The embodiment of the present disclosure also includes a computer program product, which includes a computer program, and the computer program contains program code for executing the method shown in the flowchart. When the computer program product is run in a computer system, the program code is used to enable the computer system to implement the log-based node generation method provided by the embodiment of the present disclosure.

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

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

[0141] In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 709, and / or installed from the removable medium 711. When the computer program is executed by the processor 701, the above functions defined in the system of the embodiment of the present disclosure are performed. According to the embodiment of the present disclosure, the system, device, means, module, unit, etc. described above can be implemented by a computer program module.

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

[0143] The flow charts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0144] It will be appreciated by those skilled in the art that the features described in the various embodiments of the present disclosure may be combined and / or combined in a variety of ways, even if such combinations or combinations are not explicitly described in the present disclosure. In particular, without departing from the spirit and teachings of the present disclosure, the features described in the various embodiments of the present disclosure may be combined and / or combined in a variety of ways. All of these combinations and / or combinations fall within the scope of the present disclosure.

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

Claims

1. A log-based node generation method, characterized in that: The method comprises: Obtaining log data of each of M business subsystems related to the transaction business, wherein the log data includes an upstream node identifier, a current node identifier, and a downstream node identifier, wherein M is a positive integer and M≥2; For any target business subsystem among the M business subsystems, generating an Nth node of a transaction link according to the current node identifier in the first log data corresponding to the target business subsystem, where N is a positive integer; Generate an N+1th node of the transaction link according to the downstream node identifier in the first log data; In a case where the second log data corresponding to the N+1th node cannot be queried according to the downstream node identifier in the first log data, querying reference log data from the M log data according to the downstream node identifier in the first log data; According to the current node identifier in the reference log data, an N+2th node of the transaction link is generated.

2. The method according to claim 1, characterized in that The method further comprises: When the second log data corresponding to the N+1th node can be queried according to the downstream node identifier in the first log data, the N+2th node is generated according to the downstream node identifier in the second log data.

3. The method according to claim 1, characterized in that The log data also includes node error information, the node error information includes an error code and a node error count, and the method further includes: Determining a node error description corresponding to the error code in a parameter dictionary based on the error code; The error code, the node error description and the node error count are used as abnormal node information corresponding to the log data.

4. The method according to claim 3, characterized in that The method further comprises: In a case where the abnormal node information exists at the N+2th node, the abnormal node information at the N+1th node is generated according to the abnormal node information at the N+2th node.

5. The method according to claim 1, characterized in that The method further comprises: Acquire a plurality of third log data in which the upstream node identifier in each of the log data is consistent with the current node identifier; Determining target log data from a plurality of the third log data according to a timestamp in the third log data; A head node of the transaction link is generated according to the current node identifier in the target log data.

6. The method according to claim 5, characterized in that The method further comprises: For any target business subsystem among the M business subsystems, if the downstream node identifier in the first log data already exists in the transaction link, the node generation of the transaction link is terminated.

7. The method according to claim 1, characterized in that The obtaining of log data of each of M business subsystems related to the transaction business includes: According to the unique identifier of the transaction service, respective log data of the M business subsystems related to the transaction service are obtained from the log storage area of ​​each of the business subsystems.

8. A log-based node generation device, characterized in that: The device comprises: A data acquisition module, used to acquire log data of each of M business subsystems related to the transaction business, wherein the log data includes an upstream node identifier, a current node identifier, and a downstream node identifier, wherein M is a positive integer and M≥2; A first generating module is configured to generate, for any target business subsystem among the M business subsystems, an Nth node of a transaction link according to the current node identifier in the first log data corresponding to the target business subsystem, where N is a positive integer; A second generating module, configured to generate an N+1th node of the transaction link according to the downstream node identifier in the first log data; a third generating module, configured to query reference log data from the M pieces of log data according to the downstream node identifier in the first log data, if the second log data corresponding to the N+1th node cannot be queried according to the downstream node identifier in the first log data; The fourth generating module is used to generate the N+2th node of the transaction link according to the current node identifier in the reference log data.

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

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

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

Citation Information

Patent Citations

  • Log tracking method, device and system, server and storage medium

    CN113448936A

  • Method and device for determining calling link and electronic equipment

    CN116132272A

  • Layered topological graph generation method and device, equipment and storage medium

    CN118606097A

  • Link tracking method and apparatus

    WO2020259003A1