Link tracking method and device

By transmitting link identifiers and sub-link identifiers in the microservice system in the financial technology field, generating target data and intercepting log information, it solves the problem of link tracking during task processing in the microservice system and improves performance tuning and user experience. .

CN110262889BActive Publication Date: 2024-10-29WEBANK (CHINA)
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN201910569709.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-06-27
Publication Date
2024-10-29
Estimated Expiration
2039-06-27

AI Technical Summary

Technical Problem

During the task processing process of microservice systems in the field of financial technology, it is difficult to effectively track the call links between multiple microservice subsystems, resulting in performance bottlenecks and tuning difficulties.

Method used

By transferring link identifiers and sub-link identifiers between microservice subsystems, target data is generated to identify calling behaviors, and by intercepting call request messages and log information, the link tracking process is simplified and processing efficiency is improved.

Benefits of technology

It achieves effective tracking of microservice subsystem links during task processing, improves the flexibility and user experience of performance tuning, and simplifies the link tracking process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN110262889B_ABST
    Figure CN110262889B_ABST
Patent Text Reader

Abstract

The embodiment of the present invention relates to the technical field of financial technology (Fintech), and discloses a link tracking method and device, wherein the method includes: if the first microservice subsystem determines to call the second microservice subsystem, the target data for link tracking is generated according to the first link identifier, the sublink identifier of the first link corresponding to the first microservice subsystem, the identifier of the first microservice subsystem, and the identifier of the second microservice subsystem. In the embodiment of the present invention, the target data is generated by using the link identifier to which the call behavior belongs, the sublink identifier corresponding to the call behavior, the identifier of the caller (i.e., the first microservice subsystem), and the identifier of the called party (i.e., the second microservice subsystem), so that the target data can identify the call behavior; in this way, each microservice subsystem that executes the call behavior can generate the target data corresponding to the call behavior, and the call link can be parsed by obtaining multiple target data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of financial technology (Fintech), and in particular to a link tracking method and device. Background Art

[0002] With the development of computer technology, more and more technologies are applied in the financial field. The traditional financial industry is gradually transforming to financial technology (Fintech). However, due to the security and real-time requirements of the financial industry, higher requirements are also placed on technology. The field of financial technology usually involves a large number of tasks. For example, banks may generate thousands or even tens of thousands of tasks every day. Therefore, it is very important to use a reasonable task processing system to process tasks in order to ensure the accuracy and real-time performance of task processing in the field of financial technology.

[0003] The microservice system is a task processing system commonly used in the field of financial technology. It can split an application and / or service system with a large task processing volume into several or even dozens of microservice subsystems with smaller task processing volumes, thereby reducing the coupling of task processing and providing more flexible service support capabilities. For example, a certain loan task may require a certain deposit to be collected from the applicant's account before the loan is disbursed to the applicant's account. If the traditional task processing method is adopted, it may be necessary to design a dedicated task processing service for this type of loan task; however, the task processing service dedicated to this type of loan task cannot be applied to other loan tasks, such as direct loan tasks. Accordingly, a microservice subsystem for collecting deposits and a microservice subsystem for lending can be set up in the microservice system. In this way, by setting up a free calling relationship between multiple microservice subsystems, it is possible to process multiple loan tasks.

[0004] In summary, the client device may go through multiple microservice subsystems from issuing a task processing request to receiving a task response message. Analyzing the multiple microservice subsystems and the calling sequence between multiple microservice subsystems during the task processing process is very important for locating performance bottlenecks and performing performance tuning. Therefore, there is an urgent need for a link tracking method to track the links of the microservice subsystems called during the task processing process. Summary of the invention

[0005] The embodiments of the present invention provide a link tracking method and device for tracking the link of a microservice subsystem called during task processing.

[0006] In a first aspect, an embodiment of the present invention provides a link tracking method, comprising:

[0007] The first microservice subsystem receives first information, wherein the first information includes a first task to be processed. Then, based on the first task to be processed, if it is determined that the second microservice subsystem is to be called to process the second task to be processed, a first link identifier and a sub-link identifier of the first link corresponding to the first microservice subsystem are obtained; further, the first microservice subsystem generates target data for link tracking based on the first link identifier, the sub-link identifier of the first link corresponding to the first microservice subsystem, an identifier of the first microservice subsystem, and an identifier of the second microservice subsystem.

[0008] In the above design, when the first microservice subsystem calls the second microservice subsystem, it generates target data by using the link identifier to which the call behavior belongs, the sublink identifier corresponding to the call behavior, the identifier of the caller (i.e., the first microservice subsystem), and the identifier of the callee (i.e., the second microservice subsystem), so that the target data can be used to identify the call behavior; in this way, when the task processing is completed, each microservice subsystem that executes the call can generate corresponding target data, and by obtaining the target data corresponding to multiple microservice subsystems, the multiple call behaviors that the task processing has gone through can be parsed, and then the call link can be obtained based on the multiple call behaviors. It can be seen from this that the above design can track the links of the microservice subsystems called during the task processing process.

[0009] In a possible design, after the first microservice subsystem obtains the first link identifier and the sub-link identifier of the first link corresponding to the first microservice subsystem, it also sends a first call request message to the second microservice subsystem, where the first call request message includes the second task to be processed, the first link identifier, and the sub-link identifier of the first link corresponding to the first microservice subsystem; further, the first microservice subsystem obtains first log information according to the state of the second microservice subsystem processing the second task to be processed, and generates the target data according to the identifier of the first microservice subsystem and the first log information; wherein the first log information includes the second task to be processed, the first link identifier, the sub-link identifier of the first link corresponding to the first microservice subsystem, and the identifier of the second microservice subsystem, and the state of the second microservice subsystem processing the second task to be processed is a processing completion state or a processing interruption state.

[0010] In the above design, by adding the link identifier and the sub-link identifier in the call request message, the second microservice subsystem can obtain the link identifier and the sub-link identifier by parsing the received call request message. In this way, multiple microservice subsystems can be associated with the same task (which may be different processing stages) through the link identifier in the call request message, and the call order can be associated through the sub-link identifier in the call request message; and, by intercepting the log information, the microservice subsystem can obtain relevant data of the call by parsing the log information, such as the link identifier, the sub-link identifier corresponding to the call behavior, and the identifier of the called party; that is, the above design uses the method of intercepting the call request message and intercepting the log information to simplify the link tracking process and improve processing efficiency.

[0011] In a possible design, after the first microservice subsystem generates the target data according to the identifier of the first microservice subsystem and the first log information, the first microservice subsystem also stores the target data in a preset storage space, where the preset storage space is used to store one or more target data for link tracking generated by at least one microservice subsystem.

[0012] In the above design, by storing the target data corresponding to the call behavior in the preset storage space, the user can obtain the target data corresponding to all call behaviors of a certain task by accessing the preset storage space, so that the call link can be obtained according to multiple target data, and the user experience is better; and the preset storage space can be customized by the user, so that the link tracking method in the above design can better meet actual needs and has a wider range of applications.

[0013] In a possible design, if the first microservice subsystem determines that the state of the second microservice subsystem processing the second to-be-processed task is a processing interruption state, the state of the target data in the preset storage space is marked as an abnormal state.

[0014] In the above design, by marking the status of the target data corresponding to the calling behavior in the preset storage space, the user can determine whether multiple calling behaviors are successful by accessing the preset storage space. The implementation process is relatively simple and can improve user satisfaction.

[0015] In a possible design, the first call request also includes the first link identifier and the sub-link identifier of the first link corresponding to the third microservice subsystem; the first microservice subsystem obtains the first link identifier from the first call request, and generates a sub-link identifier of the first link corresponding to the first microservice subsystem; further, the first microservice subsystem generates target data for link tracking according to the first link identifier, the sub-link identifier of the first link corresponding to the third microservice subsystem, the sub-link identifier of the first link corresponding to the first microservice subsystem, the identifier of the first microservice subsystem, and the identifier of the second microservice subsystem.

[0016] In the above design, when the identifier of a sub-link is included in the call request message, the target data is generated by using the identifier of the sub-link and the identifier of the currently generated sub-link, and two adjacent call behaviors can be associated through the identifiers of these two sub-links; in this way, after obtaining multiple target data corresponding to multiple call behaviors, multiple call behaviors can be concatenated through the identifiers of the sub-links in the multiple target data to obtain a call link.

[0017] In a second aspect, an embodiment of the present invention provides a link tracking device, the device comprising:

[0018] A transceiver module, configured to receive first information, wherein the first information includes a first task to be processed;

[0019] an acquisition module, configured to acquire, according to the first task to be processed, a first link identifier and a sub-link identifier of the first link corresponding to the first microservice subsystem if it is determined to call the second microservice subsystem to process the second task to be processed;

[0020] A processing module is used to generate target data for link tracking according to the first link identifier, the sub-link identifier of the first link corresponding to the first microservice subsystem, the identifier of the first microservice subsystem, and the identifier of the second microservice subsystem.

[0021] In a possible design, the transceiver module is also used to: send a first call request message to the second microservice subsystem, wherein the first call request message includes the second task to be processed, the first link identifier, and the sub-link identifier of the first link corresponding to the first microservice subsystem; further, obtain first log information according to the status of the second microservice subsystem processing the second task to be processed, and generate the target data according to the identifier of the first microservice subsystem and the first log information; wherein the first log information includes the second task to be processed, the first link identifier, the sub-link identifier of the first link corresponding to the first microservice subsystem, and the identifier of the second microservice subsystem, and the status of the second microservice subsystem processing the second task to be processed is a processing completion status or a processing interruption status.

[0022] In one possible design, the processing module is further used to: store the target data in a preset storage space, where the preset storage space is used to store one or more target data for link tracking generated by at least one microservice subsystem.

[0023] In a possible design, the processing module is further used to: if it is determined that the state of the second microservice subsystem processing the second task to be processed is a processing interruption state, then mark the state of the target data in the preset storage space as an abnormal state.

[0024] In a possible design, the first call request also includes the first link identifier and the sub-link identifier of the first link corresponding to the third microservice subsystem; the acquisition module is also used to: obtain the first link identifier from the first call request, and generate the sub-link identifier of the first link corresponding to the first microservice subsystem; accordingly, the processing module is also used to: generate target data for link tracking according to the first link identifier, the sub-link identifier of the first link corresponding to the third microservice subsystem, the sub-link identifier of the first link corresponding to the first microservice subsystem, the identifier of the first microservice subsystem, and the identifier of the second microservice subsystem.

[0025] In a third aspect, an embodiment of the present invention provides a computer-readable storage medium, comprising instructions, which, when executed on a processor of a computer, enables the processor of the computer to execute any of the methods described in the first aspect above.

[0026] In a fourth aspect, an embodiment of the present invention provides a computer program product, which, when executed on a computer, enables the computer to execute any of the methods described in the first aspect above.

[0027] These and other aspects of the present invention will become more apparent from the following description of the embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0029] Figure 1 A schematic diagram of the architecture of a task processing system provided by an embodiment of the present invention;

[0030] Figure 2 A schematic diagram of a flow chart corresponding to a link tracking method provided by an embodiment of the present invention;

[0031] Figure 3 A schematic diagram of an interaction process corresponding to a link tracking method provided by an embodiment of the present invention;

[0032] Figure 4 A schematic diagram of the structure of a link tracking device provided by an embodiment of the present invention;

[0033] Figure 5 A schematic diagram of the structure of a terminal device provided by an embodiment of the present invention;

[0034] Figure 6 A schematic diagram of the structure of a backend device provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0035] In order to make the purpose, technical scheme and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0036] Fintech refers to a new innovative technology brought to the financial field after the integration of information technology into the financial field. By using advanced information technology to assist in financial operations, transaction execution and financial system improvement, it can improve the processing efficiency and business scale of the financial system and reduce costs and financial risks.

[0037] There are usually multiple business systems in the field of financial technology, such as marketing business systems, loan business systems, insurance business systems, etc. Each business system can be responsible for executing the business related to it. Taking the marketing business system as an example, generally speaking, the marketing business system can generate thousands or even tens of thousands of businesses every day. Accordingly, the marketing business system needs to manage a large number of businesses, such as checking daily account information and verifying user information. It can be seen that the financial technology field may need to process a large number of tasks generated by multiple business systems every day. Since the number of tasks processed in the financial technology field is large and the application scenarios are wide, it is necessary to ensure the accuracy, security and non-loss of task processing.

[0038] Figure 1 A schematic diagram of the architecture of a task processing system provided by an embodiment of the present invention is shown in FIG. Figure 1 As shown, the system may include at least one client device (such as client device 101, client device 102 and client device 103) and microservice system 110, wherein microservice system 110 may be provided with one or more microservice subsystems, such as microservice subsystem 111, microservice subsystem 112, microservice subsystem 113 and microservice subsystem 114. At least one client device may be connected to one or more microservice subsystems, for example, by wired connection or wireless connection, without limitation.

[0039] In the embodiment of the present invention, client devices 101 to 103 may be client devices set in different business systems, for example, client device 101 is a client device set in a marketing business system, client device 102 is a client device set in a loan business system, and client device 103 is a client device set in an insurance business system; different business systems may respectively send task processing requests to microservice system 110 through client devices set in their respective business systems. Taking client device 101 as an example, in a specific implementation, if client device 101 determines that a certain microservice subsystem (such as microservice subsystem 111) needs to be called to process a task, a task request message may be sent to microservice subsystem 111; accordingly, after the task request message arrives at microservice subsystem 111, microservice subsystem 111 may execute a task processing process for the task request message, and may send a task response message to client device 101 after obtaining the task processing result.

[0040] In a possible implementation, the microservice subsystem 111 may also call other microservice subsystems during the process of executing task processing by the microservice subsystem 111. Specifically, a preset call relationship table may be provided in the microservice subsystem 111, and the preset call relationship table may be used to indicate one or more microservice subsystems that need to be called during the process of executing task processing by the microservice subsystem 111. Table 1 is a schematic table of a possible preset call relationship table provided in an embodiment of the present invention.

[0041] Table 1: A possible preset call relationship table

[0042]

[0043] As shown in Table 1, the preset correspondence table of the microservice subsystem 111 may store at least one preset judgment condition and one or more microservice subsystems. For example, in the process of microservice subsystem 111 executing task processing, if it executes to a certain judgment stage and determines that the preset judgment condition of the judgment stage satisfies judgment result 1, then microservice subsystem 112 may be called to execute the task processing process of the judgment stage; or, if it is determined that the preset judgment condition of the judgment stage satisfies judgment result 2, then microservice subsystem 112 and microservice subsystem 113 may be called at the same time to execute the task processing process of the judgment stage; or, if it is determined that the preset judgment condition of the judgment stage satisfies judgment result 3, then microservice subsystem 114 may be called to execute the task processing process of the judgment stage.

[0044] Accordingly, taking the calling of microservice subsystem 112 as an example, after the microservice subsystem 112 completes the task processing process of the judgment phase, the task result of the judgment phase can be sent to the microservice subsystem 111; thus, the microservice subsystem 111 can perform the task processing process of the next phase according to the task processing result of the judgment phase. It can be understood that the microservice subsystem 111 can also call other microservice subsystems in the subsequent task processing process, which is not specifically limited.

[0045] It should be noted that in the embodiment of the present invention, the microservice subsystem may refer to a server, or may also refer to a process in a server; if the microservice subsystem is a server, one or more microservice subsystems may be set in the same server, or may be set in different servers, without specific limitation.

[0046] An embodiment of the present invention provides a link tracking method. The execution subject of the method can be any microservice subsystem. The method can track the link of the microservice subsystem called during the task processing process. Figure 2A flowchart corresponding to a link tracking method provided by an embodiment of the present invention, the method comprising:

[0047] Step 201: The first microservice subsystem receives first information.

[0048] Taking the first microservice subsystem as microservice subsystem 113 as an example, in the embodiment of the present invention, the first information may exist in the following three situations:

[0049] Scenario 1

[0050] In scenario one, the first information may include only the first task to be processed.

[0051] If the first information only includes the first task to be processed, it means that the device sending the first information to the first microservice subsystem has not called any other microservice subsystem (including the first microservice subsystem). For example, the first information may be sent by the client device 101 to the microservice subsystem 113.

[0052] Scenario 2

[0053] In scenario 2, the first information may include a first task to be processed, a first link identifier, and a first sub-chain identifier.

[0054] If the first information includes the first pending task, the first link identifier and the first sub-chain identifier, it means that the device sending the first information to the first microservice subsystem is calling the microservice subsystem, and the call is the first call process in the execution of the pending task, that is, the first microservice subsystem has not been called by other microservice subsystems in the process of processing the pending task. For example, if the first information is sent by microservice subsystem 111 to microservice subsystem 113, microservice subsystem 111 has not been called by other microservice subsystems before calling microservice subsystem 113; accordingly, the first sub-chain can be the sub-chain identifier corresponding to microservice subsystem 111, that is, the sub-chain generated by microservice subsystem 111 according to the behavior of microservice subsystem 111 calling microservice subsystem 113.

[0055] It should be noted that only the process of executing the same task is considered here, and the process of executing different tasks is not considered; that is, in scenario 2, the microservice subsystem 111 can be called by other microservice subsystems in the process of executing other tasks, which is not limited here.

[0056] Scenario 3

[0057] In scenario three, the first information may include a first task to be processed, a first link identifier, a first sub-chain identifier, and a second sub-chain identifier.

[0058] If the first information includes the first pending task, the first link identifier, the first subchain identifier, and the second subchain identifier, it means that the device sending the first information to the first microservice subsystem is calling the microservice subsystem, and this call is not the first call process in the execution of the pending task, that is, the first microservice subsystem has been called by other microservice subsystems in the process of processing the pending task. For example, if the first information is sent from microservice subsystem 111 to microservice subsystem 113, microservice subsystem 111 may have been called by microservice subsystem 114 (and / or microservice subsystem 112, not limited) before calling microservice subsystem 113.

[0059] Correspondingly, the first sub-chain identifier can be the sub-chain identifier corresponding to microservice subsystem 111, that is, microservice subsystem 111 calls microservice subsystem 113 to generate it, and the second sub-chain identifier can be the sub-chain identifier corresponding to microservice subsystem 114, that is, microservice subsystem 114 calls microservice subsystem 111 to generate it.

[0060] Step 202: If the first microservice subsystem determines to call the second microservice subsystem to process the second task to be processed based on the first task to be processed, the first link identifier and the sublink identifier of the first link corresponding to the first microservice subsystem are obtained;

[0061] In a specific implementation, after the microservice subsystem 113 obtains the first task to be processed in the first information, during the process of processing the first task to be processed, if it is determined that other microservice subsystems (such as microservice subsystem 112) need to be called to process the second task to be processed, the first information can be queried to determine whether the first information includes information related to the link.

[0062] In scenarios 2 and 3, since the first information includes information related to the link, the microservice subsystem 113 can obtain information related to the link from the first information. Specifically, in scenario 2, if the first information is sent from microservice subsystem 111 to microservice subsystem 113, microservice subsystem 113 can obtain the first link identifier and the subchain identifier corresponding to microservice subsystem 111; accordingly, in scenario 3, if the first information is sent from microservice subsystem 111 to microservice subsystem 113, and microservice subsystem 111 has been called by microservice subsystem 114, microservice subsystem 113 can obtain the first link identifier, the subchain identifier corresponding to microservice subsystem 111, and the subchain identifier corresponding to microservice subsystem 114. After obtaining the information related to the link, microservice subsystem 113 can execute step 203.

[0063] In scenario 1, since the first information is sent from the client device 101 to the microservice subsystem 113, the first information does not include information related to the link. In this way, the microservice subsystem 113 can generate a first link identifier, and can generate a subchain identifier corresponding to the calling behavior (i.e., the subchain identifier corresponding to the microservice subsystem 113) according to the behavior of the microservice subsystem 113 calling the microservice subsystem 112. Among them, the first link identifier and the subchain identifier corresponding to the calling behavior can be set by a technician in this field based on experience, or can also be set by a user according to actual needs, and there is no specific limitation.

[0064] In one example, the first link identifier may be the identifier of the task to be processed carried in the task request message sent by the client device 101 to the microservice system 110. Accordingly, the sub-chain identifier corresponding to the call behavior may be generated based on the caller (i.e., microservice subsystem 113) and the callee (i.e., microservice subsystem 112) of the call behavior.

[0065] In a possible implementation, after generating the first link identifier and the sub-link identifier corresponding to the microservice subsystem 113, the microservice subsystem 113 may send a first call request message to the microservice subsystem 112. The first call request message may include the second task to be processed, the first link identifier, and the sub-link identifier corresponding to the microservice subsystem 113. In this way, after receiving the first call request message sent by the microservice subsystem 113, the microservice subsystem 112 may process the second task to be processed, and if the processing result corresponding to the second task to be processed is obtained, the processing result corresponding to the second task to be processed may be sent to the microservice subsystem 113.

[0066] Accordingly, after obtaining the second pending task in the first call request message, the microservice subsystem 112, in the process of processing the second pending task, if it is determined that it is necessary to call other microservice subsystems (such as the microservice subsystem 111) to process the third pending task, can query the first call request message to determine whether the first call request message includes information related to the link. Since the first call request message includes the first link identifier and the sublink identifier corresponding to the microservice subsystem 113, the microservice subsystem 112 can obtain the first link identifier and the sublink identifier corresponding to the microservice subsystem 113 from the first call request message, and can execute step 203.

[0067] In an embodiment of the present invention, by adding a link identifier and a sub-link identifier in a call request message, the second microservice subsystem can obtain the link identifier and the sub-link identifier by parsing the received call request message. In this way, multiple microservice subsystems can be associated with the same task (which may be different processing stages) through the link identifier in the call request message, and the call order can be associated through the sub-link identifier in the call request message. It can be seen that the embodiment of the present invention enables the microservice subsystem to obtain the link identifier and the sub-link identifier by intercepting the call request message, thereby making the link tracking process more flexible and easier to implement.

[0068] Step 203: The first microservice subsystem generates target data for link tracking according to the first link identifier, the sub-link identifier of the first link corresponding to the first microservice subsystem, the identifier of the first microservice subsystem, and the identifier of the second microservice subsystem.

[0069] Taking microservice subsystem 113 calling microservice subsystem 112 as an example, in one possible implementation method, when microservice subsystem 113 determines to call microservice subsystem 112, it can generate target data according to the first link identifier, the sub-chain identifier corresponding to microservice subsystem 113, the identifier of microservice subsystem 113 and the identifier of microservice subsystem 112.

[0070] In another possible implementation, the microservice subsystem 113 may generate target data according to the log file and the memory information of the microservice subsystem 113 when receiving the processing result of the second task to be processed sent by the microservice subsystem 112 or determining that the microservice subsystem 112 executes the second task to be processed abnormally. Specifically, in the process of calling the microservice subsystem 112 to process the second task to be processed, the underlying program in the microservice subsystem 113 (such as the code logic under the org.apache.http.wire data packet) will execute the action of printing the log. In the embodiment of the present invention, an interceptor may be set in the microservice subsystem 113, and the interceptor may intercept the action of printing the log executed by the code logic under the org.apache.http.wire data packet, so as to obtain the log file corresponding to the calling behavior; accordingly, the microservice subsystem 113 may store the log file in a preset location in the microservice system 110, so that the log file can be obtained by any microservice subsystem of the microservice subsystems 111 to 114 included in the microservice system 110. Accordingly, the log file may include the first call request message (including the first link identifier and the sub-chain identifier corresponding to the microservice subsystem 113) and the Internet Protocol (IP) address of the microservice subsystem 112, or may also include the processing result obtained by the microservice subsystem 112 processing the second task to be processed. In this way, the microservice subsystem 113 can obtain the log file corresponding to the calling behavior of calling the microservice subsystem 112 by intercepting the bottom program printing log action.

[0071] In one example, the microservice subsystem 113 can intercept the action of printing logs by the underlying program (i.e., the code logic under the org.apache.http.wire data packet). Generally speaking, the code logic under the org.apache.http.wire data packet can execute the operation of printing logs according to a preset period, such as executing a printing operation every 3ms, and each printing operation can print some fields in the log file; in this way, the microservice subsystem 113 can obtain the printed log file through the interception operation. In the embodiment of the present invention, in each interception operation, the microservice subsystem 113 can obtain information of a fixed amount of data, for example, the first interception operation can obtain the first call request message from the code logic under the org.apache.http.wire data packet, the second interception operation can obtain the IP address of the microservice subsystem 112 from the code logic under the org.apache.http.wire data packet, the third interception operation can obtain the processing result corresponding to the second task to be processed from the code logic under the org.apache.http.wire data packet, or the third interception operation can obtain the exception information (such as call timeout, call interruption, etc.) of processing the second task to be processed from the code logic under the org.apache.http.wire data packet; in this way, the first call request message, the IP address of the microservice subsystem 112, the processing result corresponding to the second task to be processed, or the exception information of processing the second task to be processed can be obtained from the code logic under the org.apache.http.wire data packet through multiple interception operations, so that a complete log file to be printed can be obtained by assembling these information, and accordingly, these information in the log file can be used to obtain the target data later.

[0072] In an embodiment of the present invention, a preset log level may be set in the microservice subsystem 113, so that the microservice subsystem 113 can intercept log files that match the preset log level from multiple log files printed by the underlying program (i.e., the code logic under the org.apache.http.wire data packet). Wherein, the level of the log can be any one of the ERROR level, WARN level, INFO level, and DEBUG level, and the preset log level can be set by a technician in this field based on experience, or can also be set by a user, and is not specifically limited. As an example, an embodiment of the present invention can set the preset log level to the DEBUG level, so that since the log level of the log files intercepted by the code logic under the org.apache.http.wire data packet is all the DEBUG level, the microservice subsystem 113 can obtain all log files intercepted by the code logic under the org.apache.http.wire data packet.

[0073] Furthermore, after obtaining the log file, the microservice subsystem 113 may preprocess the information in the log file, and the preprocessing may include regularization processing, interception processing (such as deleting irrelevant characters), format conversion processing (such as converting to Java format), etc. Moreover, the microservice subsystem 113 may also obtain information such as the identifier of the microservice subsystem 113 and the IP address of the microservice subsystem 113 from the memory space of the microservice subsystem 113, and then generate target data according to the log file, the identifier of the microservice subsystem 113 and the IP address of the microservice subsystem 113.

[0074] In the embodiment of the present invention, by intercepting the action of printing logs by the underlying program (i.e., the code logic under the org.apache.http.wire data packet), the microservice subsystem can obtain the printed log file, and thus can obtain relevant data of the call by parsing the log file, such as the link identifier, the sub-link identifier corresponding to the calling behavior, and the identifier of the called party; that is, the embodiment of the present invention adopts the method of intercepting log files to simplify the link tracking process and improve processing efficiency.

[0075] Furthermore, the process of generating target data by the microservice subsystem 113 can be executed in a preset database, and the preset database can be a space for storing intermediate files set in the microservice subsystem 113. In this way, the microservice subsystem 113 can store the information obtained by each interception operation in the preset database, and when it is determined that the target data is generated in the preset database, the microservice subsystem 113 can store the target data in the preset storage space; wherein the preset storage space can be set in the microservice system 110 and can be obtained by any microservice subsystem in the microservice system 110.

[0076] In a specific implementation, there may be multiple ways for the microservice subsystem 113 to determine the generation of target data. In one possible implementation, if the microservice subsystem 113 receives the processing result of the second task to be processed sent by the microservice subsystem 112, it can be determined that the target data has been generated in the preset database; in this way, the microservice subsystem 113 can store the target data in the preset storage space. In another possible implementation, if the microservice subsystem 113 has not received the processing result of the second task to be processed sent by the microservice subsystem 112 within the first preset time, it can be determined that the process of calling the microservice subsystem 112 is interrupted (an exception occurs); in this way, the microservice subsystem 113 can store the information currently stored in the preset database in the preset storage space, and can mark it as an abnormal state in the preset storage space.

[0077] In one example, if the microservice subsystem 113 determines that the time length for which the preset database stores the target data exceeds a second preset time length, the target data may be deleted from the preset database, thereby saving memory space and improving data processing efficiency.

[0078] In the embodiment of the present invention, the first preset duration and the second preset duration may be set by those skilled in the art based on experience, or may be determined by a user based on actual needs, and are not specifically limited.

[0079] In an embodiment of the present invention, by storing the target data corresponding to the calling behavior in a preset storage space, the user can obtain the target data corresponding to all the calling behaviors of a certain task by accessing the preset storage space, so that the calling link can be obtained according to multiple target data, and the user experience is better; and, by marking the status of the target data corresponding to the calling behavior in the preset storage space, the user can determine whether multiple calling behaviors are successful by accessing the preset storage space. The implementation process is relatively simple and can improve user satisfaction.

[0080] The target data generated by the microservice subsystem 113 is described below from scenarios 1 to 3 respectively.

[0081] In scenario 1, the target data generated by the microservice subsystem 113 may include the first link identifier, the subchain identifier corresponding to the microservice subsystem 113, the identifier of the microservice subsystem 113, the identifier of the microservice subsystem 112, the second task to be processed, and the state of the microservice subsystem 112 processing the second task to be processed. The state of the microservice subsystem 112 processing the second task to be processed may be a parameter obtained by the microservice subsystem 112 processing the second task to be processed, or may be abnormal information of the microservice subsystem 112 processing the second task to be processed, such as abnormal type, abnormal state, abnormal time information, etc.

[0082] In situation two, the target data generated by microservice subsystem 113 may include the first link identifier, the sub-chain identifier corresponding to microservice subsystem 113, the sub-chain identifier corresponding to microservice subsystem 111, the identifier of microservice subsystem 113, the identifier of microservice subsystem 112, the second task to be processed, and the status of microservice subsystem 112 processing the second task to be processed.

[0083] In scenario three, since microservice subsystem 113 calls microservice subsystem 112, and before the call, microservice subsystem 113 is called by microservice subsystem 111 (for example, to process the third pending task), and microservice subsystem 111 is called by microservice subsystem 114 (for example, to process the fourth pending task), the target data generated by microservice subsystem 111 may include the first link identifier, the subchain identifier corresponding to microservice subsystem 111, the subchain identifier corresponding to microservice subsystem 114, the identifier of microservice subsystem 111, the identifier of microservice subsystem 113, the third pending task, and the status of microservice subsystem 113 processing the second pending task. Accordingly, the target data generated by microservice subsystem 113 may include the first link identifier, the subchain identifier corresponding to microservice subsystem 113, the subchain identifier corresponding to microservice subsystem 111, the identifier of microservice subsystem 113, the identifier of microservice subsystem 112, the second pending task, and the status of microservice subsystem 112 processing the second pending task.

[0084] In one example, if a user wants to obtain one or more target data generated by a microservice subsystem that is called during the execution of a first task to be processed, the user can send a request message to the microservice system 110 through the client device 101 (or the client device 102 or the client device 103, without limitation); in this way, the microservice system 110 can display all target data related to the process of the first task to be processed in the preset storage space to the user, for example, it can be pushed to the user through WeChat, DingTalk, enterprise WeChat, email, etc., or it can be directly displayed on the screen of the client device 101, without specific limitation.

[0085] In an embodiment of the present invention, when the identifier of a sub-link is included in a call request message, target data is generated by using the identifier of the sub-link and the identifier of the currently generated sub-link, and two adjacent call behaviors can be associated through the identifiers of these two sub-links; in this way, after obtaining multiple target data corresponding to multiple call behaviors, multiple call behaviors can be concatenated through the identifiers of the sub-links in the multiple target data to obtain a call link.

[0086] based on Figure 1 The system architecture shown in the figure, a possible scenario for processing tasks to be processed provided by the embodiment of the present invention is:

[0087] In the first stage, the client device 101 sends a task request message to the microservice subsystem 111 , where the task request message includes a task to be processed (eg, task a to be processed).

[0088] In the first stage, after the microservice subsystem 111 receives the pending task a sent by the client device 101, if it is determined that the microservice subsystem 112 needs to be called to process the pending task a1 during the execution of the pending task a, a first call request message can be sent to the microservice subsystem 112; wherein the first call request message may include the pending task a1.

[0089] In the second stage, after receiving the first call request message sent by the microservice subsystem 111, the microservice subsystem 112 can parse and obtain the pending task a1; if it is determined that the microservice subsystem 113 needs to be called to process the pending task a2 during the execution of the pending task a1, a second call request message can be sent to the microservice subsystem 113; wherein the second call request message may include the pending task a2.

[0090] In the third stage, after receiving the second call request message sent by the microservice subsystem 112, the microservice subsystem 113 can parse and obtain the pending task a2. If it is determined that the microservice subsystem 114 needs to be called to process the pending task a3 during the execution of the pending task a2, a third call request message can be sent to the microservice subsystem 114; wherein the third call request message may include the pending task a3.

[0091] In the fourth stage, after the microservice subsystem 114 receives the third call request message sent by the microservice subsystem 113, it can parse and obtain the pending task a3. If it is determined that there is no need to call other microservice subsystems during the execution of the pending task a3, the processing result obtained by processing the pending task a3 can be sent to the microservice subsystem 113.

[0092] In the fifth stage, after microservice subsystem 113 receives the processing result corresponding to the pending task a3 sent by microservice subsystem 114, it can use the processing result corresponding to the pending task a3 to continue processing the pending task a2. If it is determined that there is no need to call other microservice subsystems in the process of continuing to process the pending task a2, the processing result obtained by processing the pending task a2 can be sent to microservice subsystem 112.

[0093] In the sixth stage, after microservice subsystem 112 receives the processing result corresponding to the pending task a2 sent by microservice subsystem 113, it can use the processing result corresponding to the pending task a2 to continue processing the pending task a1. If it is determined that there is no need to call other microservice subsystems in the process of continuing to process the pending task a1, the processing result obtained by processing the pending task a1 can be sent to microservice subsystem 111.

[0094] In the seventh stage, after the microservice subsystem 111 receives the processing result corresponding to the pending task a1 sent by the microservice subsystem 112, it can use the processing result corresponding to the pending task a1 to continue processing the pending task a. If it is determined that there is no need to call other microservice subsystems in the process of continuing to process the pending task a, the processing result obtained by processing the pending task a can be sent to the client device 101.

[0095] For ease of understanding, a specific example is described below: if the pending task a is to obtain the customer name corresponding to a certain order number, and the microservice subsystem 111 is set with a correspondence between the order number and the mobile phone number, the microservice subsystem 112 is set with a correspondence between the mobile phone number and the ID number, the microservice subsystem 113 is set with a correspondence between the ID number and the home address, and the microservice subsystem 114 is set with a correspondence between the home address and the name; then after receiving the pending task a, the microservice subsystem 111 can query the target mobile phone number corresponding to the order number from the microservice subsystem 111, and then call the microservice subsystem 112 to query the target ID number corresponding to the target mobile phone number, and the microservice subsystem 112 calls the microservice subsystem 113 to query the target home address corresponding to the target ID number, and the microservice subsystem 113 calls the microservice subsystem 114 to query the target name corresponding to the target home address. In this way, after the microservice subsystem 114 obtains the target name through the microservice subsystem 113 and the microservice subsystem 112 , it can be sent to the microservice subsystem 111 in sequence, so that the microservice subsystem 111 sends it to the client device 101 .

[0096] The following is based on the description of this scenario Figure 2 The specific implementation process of the link tracking method shown.

[0097] Figure 3 An interactive flow chart corresponding to a link tracking method in this scenario provided by an embodiment of the present invention, such as Figure 3 As shown, the method includes:

[0098] Step 301 : The client device 101 sends a task request message to the microservice subsystem 111 .

[0099] In the embodiment of the present invention, if the client device 101 determines that it needs to call the microservice subsystem 111 to process the pending task a, it can send a task request message to the microservice subsystem 111, and the task request message includes the pending task a. Specifically, if the client device 101 is connected to the microservice subsystem 111 by wired means, the task request message can be sent to the microservice subsystem 111 via a network cable, optical fiber, etc. If the client device 101 is connected to the microservice subsystem 111 by wireless means, the task request message can be sent to the microservice subsystem 111 via Bluetooth, sound waves, etc.

[0100] Step 302: If the microservice subsystem 111 determines to call the microservice subsystem 112, a link identifier and a subchain identifier b1 are generated.

[0101] Specifically, during the process of microservice subsystem 111 processing pending task a, if it is determined that microservice subsystem 112 needs to be called to process pending task a1, the task request message can be parsed to determine whether the task request message includes information related to the link. Since the task request message does not include information related to the link, the microservice subsystem 111 can generate a link identifier and a subchain identifier (such as b1) corresponding to the microservice subsystem 111. Among them, the link identifier can correspond to the pending task a, and the subchain identifier b1 corresponding to the microservice subsystem 111 can correspond to the behavior of the microservice subsystem 111 calling the microservice subsystem 112 to process the pending task a1.

[0102] In one example, the link identifier may be the identifier of the task a to be processed, that is, the link identifier may be a. Thus, the link identifier a may be used to indicate that the call link is a link generated by the microservice subsystem called in the process of processing the task a to be processed.

[0103] Step 303 : The microservice subsystem 111 sends a call request message to the microservice subsystem 112 .

[0104] In a specific implementation, the microservice subsystem 111 can generate a first call request message according to the task a1 to be processed, the link identifier a, and the subchain identifier b1 corresponding to the microservice subsystem 111. The link identifier a and the subchain identifier b1 corresponding to the microservice subsystem 111 can be set in the header file of the first call request message, so that the microservice subsystem 112 can obtain the link identifier a and the subchain identifier b1 corresponding to the microservice subsystem 111 by parsing the header file of the first call request message, without parsing the entire first call request message, thereby improving the efficiency of data processing.

[0105] In the embodiment of the present invention, there may be multiple ways for microservice subsystem 111 to send the first call request message to microservice subsystem 112. In one possible implementation, microservice subsystem 111 may be connected to microservice subsystem 112 by wire or wirelessly, so that microservice subsystem 111 may directly send the first call request message to microservice subsystem 112 by wire or wirelessly. In another possible implementation, a public network may be provided in microservice system 110, and any microservice system from microservice subsystem 111 to microservice subsystem 114 may access the public network; thus, microservice subsystem 111 may send the first call request message to the public network, and microservice subsystem 112 may download the first call request message from the public network.

[0106] Step 304: If the microservice subsystem 112 determines to call the microservice subsystem 113, a subchain identifier b2 is generated.

[0107] Specifically, after microservice subsystem 112 receives the first call request message sent by microservice subsystem 111, it can start the processing process of pending task a1. If it is determined that the process of processing pending task a1 requires calling microservice subsystem 113 to process pending task a2, the header file of the first call request message can be parsed to determine whether the first call request message includes link-related information.

[0108] Accordingly, the microservice subsystem 112 can parse the link identifier a and the subchain identifier b1 corresponding to the microservice subsystem 111 from the header file of the first call request message, and can generate a subchain identifier (such as b2) corresponding to the microservice subsystem 112. Among them, the subchain identifier b2 corresponding to the microservice subsystem 112 can correspond to the behavior of the microservice subsystem 112 calling the microservice subsystem 113 to process the pending task a2.

[0109] Step 305 , the microservice subsystem 112 sends a call request message to the microservice subsystem 113 .

[0110] In a specific implementation, the microservice subsystem 112 can generate a second call request message according to the task to be processed a2, the link identifier a, the subchain identifier b1 corresponding to the microservice subsystem 111, and the subchain identifier b2 corresponding to the microservice subsystem 112. Among them, the link identifier a, the subchain identifier b1 corresponding to the microservice subsystem 111, and the subchain identifier b2 corresponding to the microservice subsystem 112 can be set in the header file of the second call request message. Further, the microservice subsystem 112 can send the second call request message to the microservice subsystem 113.

[0111] Step 306: If the microservice subsystem 113 determines to call the microservice subsystem 114, a subchain identifier b3 is generated.

[0112] Specifically, after microservice subsystem 113 receives the second call request message sent by microservice subsystem 112, it can start the processing process of pending task a2. If it is determined that the process of processing pending task a2 requires calling microservice subsystem 114 to process pending task a3, the header file of the second call request message can be parsed to determine whether the second call request message includes link-related information.

[0113] Accordingly, microservice subsystem 113 can parse the link identifier a, the subchain identifier b1 corresponding to microservice subsystem 111, and the subchain identifier b2 corresponding to microservice subsystem 112 from the header file of the second call request message, and can generate a subchain identifier (such as b3) corresponding to microservice subsystem 113. Among them, the subchain identifier b3 corresponding to microservice subsystem 112 can correspond to the behavior of microservice subsystem 113 calling microservice subsystem 114 to process the pending task a3.

[0114] Step 307 , the microservice subsystem 113 sends the call request message to the microservice subsystem 114 .

[0115] In a specific implementation, the microservice subsystem 113 may generate a third call request message according to the task to be processed a2, the link identifier a, the subchain identifier b2 corresponding to the microservice subsystem 112, and the subchain identifier b3 corresponding to the microservice subsystem 113. Among them, the link identifier a, the subchain identifier b2 corresponding to the microservice subsystem 112, and the subchain identifier b3 corresponding to the microservice subsystem 113 may be set in the header file of the third call request message. Further, the microservice subsystem 113 may send the third call request message to the microservice subsystem 114.

[0116] Step 308 , the microservice subsystem 114 executes the task a3 to be processed and obtains the processing result corresponding to the task a3 to be processed.

[0117] Specifically, after receiving the third call request message sent by the microservice subsystem 113, the microservice subsystem 114 can start the processing process of the pending task a3. Since it is not necessary to call other microservice subsystems during the processing of the pending task a3, the microservice subsystem 114 can process and obtain the processing result of the pending task a3.

[0118] Step 309 , the microservice subsystem 114 sends the processing result corresponding to the task a3 to be processed to the microservice subsystem 113 .

[0119] In an embodiment of the present invention, if the microservice subsystem 114 executes and obtains the processing result corresponding to the pending task a3 within the preset time, the processing result corresponding to the pending task a3 can be successfully sent to the microservice subsystem 113; if the microservice subsystem 114 fails to execute and obtain the processing result corresponding to the pending task a3 within the preset time, it means that an abnormality occurs in the process of the microservice subsystem 114 executing the pending task a3, for example, network failure, hardware damage, insufficient memory, etc. of the microservice subsystem 114 can all cause an abnormality in the process of executing the pending task a3.

[0120] In step 310 , the microservice subsystem 113 generates target data, executes the task a2 to be processed, and obtains a processing result corresponding to the task a2 to be processed.

[0121] In a specific implementation, after sending the third call request message to the microservice subsystem 114, the microservice subsystem 113 can intercept the underlying program (i.e., the code logic under the org.apache.http.wire data packet) according to a preset period to complete the action of printing the log. In this way, the microservice subsystem 113 can obtain a log file with a level not lower than the preset log level by intercepting the action of printing the log by the code logic under the org.apache.http.wire data packet; accordingly, if the processing result corresponding to the pending task a3 is obtained within the preset time, it means that the complete log file has been obtained at present; in this way, the microservice subsystem 113 can generate the target data corresponding to the microservice subsystem 113 according to the log file and the IP address and identifier of the microservice subsystem 113. Among them, the log file intercepted by the microservice subsystem 113 may include the content in the third call request message (such as the pending task a3, the link identifier a, the subchain identifier b2 corresponding to the microservice subsystem 112 and the subchain identifier b3 corresponding to the microservice subsystem 113), the IP address of the microservice system 114, and the processing result corresponding to the pending task a3.

[0122] Accordingly, if the microservice subsystem 113 does not obtain the processing result corresponding to the pending task a3 within the preset time, it means that an exception occurs in the process of the microservice subsystem 114 processing the pending task a3; in this way, the microservice subsystem 113 can generate the target data corresponding to the microservice subsystem 113 according to the log file, the exception information and the IP address and identification of the microservice subsystem 113. Among them, the log file may include the content in the third call request message (such as the pending task a3, the link identification a, the subchain identification b2 corresponding to the microservice subsystem 112 and the subchain identification b3 corresponding to the microservice subsystem 113), the IP address of the microservice system 114, and the processing result corresponding to the pending task a3. In addition, the microservice subsystem 113 can store the target data corresponding to the microservice subsystem 113 in the preset storage space.

[0123] In an example, Table 2 is a schematic table of target data provided by an embodiment of the present invention.

[0124] Table 2: Schematic representation of a target data

[0125] Link ID Front sub-chain logo Subchain Identification Caller Callee a <![CDATA[b2]]> <![CDATA[b3]]> Microservice Subsystem 113 Microservice Subsystem 114 a <![CDATA[b1]]> <![CDATA[b2]]> Microservice Subsystem 112 Microservice Subsystem 113 a <![CDATA[b1]]> Microservice Subsystem 111 Microservice Subsystem 112

[0126] The target data corresponding to the microservice subsystem 113 can be shown in the second row of Table 2. The target data corresponding to the microservice subsystem 113 can include the link identifier a, the previous subchain identifier b2, the subchain identifier b1, the caller identifier "microservice subsystem 113" and the callee identifier "microservice subsystem 114".

[0127] Furthermore, the microservice subsystem 113 can continue to process the pending task a2 according to the processing result corresponding to the pending task a3. If the processing result corresponding to the pending task a2 is obtained within the preset time, the processing result corresponding to the pending task a2 can be successfully sent to the microservice subsystem 112. If the microservice subsystem 113 fails to obtain the processing result corresponding to the pending task a2 within the preset time, it means that an abnormality occurs in the process of the microservice subsystem 113 executing the pending task a2.

[0128] In step 311 , the microservice subsystem 113 sends the processing result corresponding to the task a2 to be processed to the microservice subsystem 112 .

[0129] Step 312, the microservice subsystem 112 generates target data, executes the task a1 to be processed, and obtains the processing result corresponding to the task a1 to be processed.

[0130] Step 313 , the microservice subsystem 112 sends the processing result corresponding to the task a1 to be processed to the microservice subsystem 111 .

[0131] Step 314: the microservice subsystem 111 generates target data, executes the task a to be processed, and obtains the processing result corresponding to the task a to be processed.

[0132] In the embodiment of the present invention, the specific implementation process of steps 311 to 314 can refer to steps 309 to 310, which will not be repeated here.

[0133] Correspondingly, the target data corresponding to microservice subsystem 112 can be as shown in the third row of Table 2, and the target data corresponding to microservice subsystem 112 can include link identifier a, previous subchain identifier b1, subchain identifier b2, the caller identifier "microservice subsystem 112" and the callee identifier "microservice subsystem 113"; the target data corresponding to microservice subsystem 111 can be as shown in the fourth row of Table 2, and the target data corresponding to microservice subsystem 111 can include link identifier a, subchain identifier b1, the caller identifier "microservice subsystem 111" and the callee identifier "microservice subsystem 112".

[0134] Step 315 , the microservice subsystem 111 sends the processing result corresponding to the task a to be processed to the client device 101 .

[0135] Further, the microservice subsystem 111 can continue to process the pending task a according to the processing result corresponding to the pending task a1. If the processing result corresponding to the pending task a is obtained within the preset time, the processing result corresponding to the pending task a can be successfully sent to the client device 101. In this way, after receiving the processing result corresponding to the pending task a, if the client device 101 wants to obtain the microservice subsystem link called in the process of executing the pending task a, it can access the preset storage space and obtain the target data shown in Table 2. According to the three target data shown in the second to fourth rows of Table 2, the calling link can be obtained: microservice subsystem 111-microservice subsystem 112-microservice subsystem 113-microservice subsystem 114.

[0136] Accordingly, if the client device 101 does not receive the processing result corresponding to the pending task a sent by the microservice subsystem 111 within the preset time, it means that an abnormality occurs in the process of the microservice subsystem 111 executing the pending task a. In this case, the client device 101 can generate an alarm message and display the alarm message to the user, for example, it can be sent to the user through WeChat, DingTalk, enterprise WeChat, email, etc., or it can be displayed to the user on the screen, or it can be broadcast to the user by voice, without specific limitation.

[0137] In the above embodiment of the present invention, the first microservice subsystem receives first information, the first information includes a first task to be processed, and the first microservice subsystem obtains the first link identifier and the sub-link identifier of the first link corresponding to the first microservice subsystem if it determines to call the second microservice subsystem to process the second task to be processed based on the first task to be processed; further, the first microservice subsystem generates target data for link tracking based on the first link identifier, the sub-link identifier of the first link corresponding to the first microservice subsystem, the identifier of the first microservice subsystem, and the identifier of the second microservice subsystem. In an embodiment of the present invention, when the first microservice subsystem calls the second microservice subsystem, target data is generated by using the link identifier to which the call behavior belongs, the sub-link identifier corresponding to the call behavior, the identifier of the caller (i.e., the first microservice subsystem), and the identifier of the called party (i.e., the second microservice subsystem), so that the target data can be used to identify the call behavior; that is, when the task processing is completed, each microservice subsystem that executes the call can generate corresponding target data, so that the call links corresponding to multiple call behaviors can be parsed by obtaining multiple target data; it can be seen that the embodiment of the present invention can track the links of the microservice subsystems called during the task processing process.

[0138] In view of the above method flow, an embodiment of the present invention further provides a link tracking device, and the specific content of the device can be implemented with reference to the above method.

[0139] Figure 4 A schematic diagram of the structure of a link tracking device provided by an embodiment of the present invention includes:

[0140] The transceiver module 401 is used to receive first information, wherein the first information includes a first task to be processed;

[0141] The acquisition module 402 is used to acquire the first link identifier and the sub-link identifier of the first link corresponding to the first microservice subsystem if it is determined to call the second microservice subsystem to process the second task to be processed according to the first task to be processed;

[0142] The processing module 403 is used to generate target data for link tracking according to the first link identifier, the sub-link identifier of the first link corresponding to the first microservice subsystem, the identifier of the first microservice subsystem, and the identifier of the second microservice subsystem.

[0143] Optionally, the transceiver module 401 is further used for:

[0144] Sending a first call request message to the second microservice subsystem, where the first call request message includes the second task to be processed, the first link identifier, and a sub-link identifier of the first link corresponding to the first microservice subsystem;

[0145] The first log information is obtained according to the state of the second microservice subsystem processing the second task to be processed, and the target data is generated according to the identifier of the first microservice subsystem and the first log information; wherein the first log information includes the second task to be processed, the first link identifier, the sub-link identifier of the first link corresponding to the first microservice subsystem, and the identifier of the second microservice subsystem, and the state of the second microservice subsystem processing the second task to be processed is a processing completion state or a processing interruption state.

[0146] Optionally, the processing module 403 is further configured to:

[0147] The target data is stored in a preset storage space, where the preset storage space is used to store one or more target data for link tracking generated by at least one microservice subsystem.

[0148] Optionally, the processing module 403 is further configured to:

[0149] If it is determined that the state of the second microservice subsystem processing the second to-be-processed task is a processing interruption state, the state of the target data in the preset storage space is marked as an abnormal state.

[0150] Optionally, the first call request also includes the first link identifier and a sub-link identifier of the first link corresponding to the third microservice subsystem;

[0151] The acquisition module 402 is further used to: acquire the first link identifier from the first call request, and generate a sub-link identifier of the first link corresponding to the first microservice subsystem;

[0152] The processing module 403 is further used to generate target data for link tracking according to the first link identifier, the sub-link identifier of the first link corresponding to the third microservice subsystem, the sub-link identifier of the first link corresponding to the first microservice subsystem, the identifier of the first microservice subsystem, and the identifier of the second microservice subsystem.

[0153] It can be seen from the above content that: in the above embodiment of the present invention, the first microservice subsystem receives the first information, the first information includes the first task to be processed, and the first microservice subsystem obtains the first link identifier and the sub-link identifier of the first link corresponding to the first microservice subsystem if it determines to call the second microservice subsystem to process the second task to be processed based on the first task to be processed; further, the first microservice subsystem generates target data for link tracking based on the first link identifier, the sub-link identifier of the first link corresponding to the first microservice subsystem, the identifier of the first microservice subsystem, and the identifier of the second microservice subsystem. In an embodiment of the present invention, when the first microservice subsystem calls the second microservice subsystem, target data is generated by using the link identifier to which the call behavior belongs, the sub-link identifier corresponding to the call behavior, the identifier of the caller (i.e., the first microservice subsystem), and the identifier of the called party (i.e., the second microservice subsystem), so that the target data can be used to identify the call behavior; that is, when the task processing is completed, each microservice subsystem that executes the call can generate corresponding target data, so that the call links corresponding to multiple call behaviors can be parsed by obtaining multiple target data; it can be seen that the embodiment of the present invention can track the links of the microservice subsystems called during the task processing process.

[0154] Based on the same inventive concept, an embodiment of the present invention further provides a computer-readable storage medium, including instructions, which, when executed on a processor of a computer, causes the processor of the computer to execute the following Figure 2 The link tracking method described in any aspect.

[0155] Based on the same inventive concept, an embodiment of the present invention further provides a computer program product, which, when executed on a computer, enables the computer to execute the following Figure 2 The link tracking method described in any aspect.

[0156] Based on the same technical concept, an embodiment of the present invention provides a terminal device, such as Figure 5 As shown, it includes at least one processor 1101 and a memory 1102 connected to the at least one processor. The specific connection medium between the processor 1101 and the memory 1102 is not limited in the embodiment of the present invention. Figure 5 For example, the processor 1101 and the memory 1102 are connected via a bus. The bus can be divided into an address bus, a data bus, a control bus, etc.

[0157] In the embodiment of the present invention, the memory 1102 stores instructions that can be executed by at least one processor 1101. The at least one processor 1101 can execute the steps included in the aforementioned link tracking method by executing the instructions stored in the memory 1102.

[0158] Among them, the processor 1101 is the control center of the terminal device, which can use various interfaces and lines to connect various parts of the terminal device, and realize data processing by running or executing instructions stored in the memory 1102 and calling data stored in the memory 1102. Optionally, the processor 1101 may include one or more processing units, and the processor 1101 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, etc., and the modem processor mainly processes instructions issued by operation and maintenance personnel. It is understandable that the above-mentioned modem processor may not be integrated into the processor 1101. In some embodiments, the processor 1101 and the memory 1102 may be implemented on the same chip, and in some embodiments, they may also be implemented separately on independent chips.

[0159] Processor 1101 may be a general-purpose processor, such as a central processing unit (CPU), a digital signal processor, an application-specific integrated circuit (ASIC), a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, or a discrete hardware component, and may implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of the present invention. A general-purpose processor may be a microprocessor or any conventional processor, etc. The steps of the method disclosed in the embodiment of the link tracking method may be directly embodied as being executed by a hardware processor, or may be executed by a combination of hardware and software modules in the processor.

[0160] The memory 1102 is a non-volatile computer-readable storage medium that can be used to store non-volatile software programs, non-volatile computer executable programs and modules. The memory 1102 may include at least one type of storage medium, such as a flash memory, a hard disk, a multimedia card, a card-type memory, a random access memory (Random Access Memory, RAM), a static random access memory (Static Random Access Memory, SRAM), a programmable read-only memory (Programmable Read Only Memory, PROM), a read-only memory (Read Only Memory, ROM), an electrically erasable programmable read-only memory (Electrically Erasable Programmable Read-Only Memory, EEPROM), a magnetic memory, a disk, an optical disk, etc. The memory 1102 is any other medium that can be used to carry or store a desired program code in the form of an instruction or data structure and can be accessed by a computer, but is not limited thereto. The memory 1102 in the embodiment of the present invention can also be a circuit or any other device that can realize a storage function, for storing program instructions and / or data.

[0161] Based on the same technical concept, the embodiment of the present invention provides a backend device, such as Figure 6 As shown, it includes at least one processor 1201 and a memory 1202 connected to the at least one processor. The specific connection medium between the processor 1201 and the memory 1202 is not limited in the embodiment of the present invention. Figure 6 For example, the processor 1201 and the memory 1202 are connected via a bus. The bus can be divided into an address bus, a data bus, a control bus, etc.

[0162] In the embodiment of the present invention, the memory 1202 stores instructions that can be executed by at least one processor 1201. The at least one processor 1201 can execute the steps included in the aforementioned link tracking method by executing the instructions stored in the memory 1202.

[0163] Among them, the processor 1201 is the control center of the back-end device, and can use various interfaces and lines to connect various parts of the back-end device, and realize data processing by running or executing instructions stored in the memory 1202 and calling data stored in the memory 1202. Optionally, the processor 1201 may include one or more processing units, and the processor 1201 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, application programs, etc., and the modem processor mainly parses the received instructions and parses the received results. It is understandable that the above-mentioned modem processor may not be integrated into the processor 1201. In some embodiments, the processor 1201 and the memory 1202 may be implemented on the same chip, and in some embodiments, they may also be implemented separately on independent chips.

[0164] Processor 1201 may be a general-purpose processor, such as a central processing unit (CPU), a digital signal processor, an application-specific integrated circuit (ASIC), a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, or a discrete hardware component, and may implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of the present invention. A general-purpose processor may be a microprocessor or any conventional processor, etc. The steps of the method disclosed in the embodiment of the link tracking method may be directly embodied as being executed by a hardware processor, or may be executed by a combination of hardware and software modules in the processor.

[0165] The memory 1202 is a non-volatile computer-readable storage medium that can be used to store non-volatile software programs, non-volatile computer executable programs and modules. The memory 1202 may include at least one type of storage medium, such as a flash memory, a hard disk, a multimedia card, a card-type memory, a random access memory (Random Access Memory, RAM), a static random access memory (Static Random Access Memory, SRAM), a programmable read-only memory (Programmable Read Only Memory, PROM), a read-only memory (Read Only Memory, ROM), an electrically erasable programmable read-only memory (Electrically Erasable Programmable Read-Only Memory, EEPROM), a magnetic memory, a disk, an optical disk, etc. The memory 1202 is any other medium that can be used to carry or store a desired program code in the form of an instruction or data structure and can be accessed by a computer, but is not limited thereto. The memory 1202 in the embodiment of the present invention can also be a circuit or any other device that can realize a storage function, for storing program instructions and / or data.

[0166] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0167] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0168] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0169] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0170] Although the preferred embodiments of the present invention have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.

[0171] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.

Claims

1. A link tracing method, characterized in that: The method comprises: The first microservice subsystem receives first information, where the first information includes a first task to be processed; If the first microservice subsystem determines, based on the first pending task, to call the second microservice subsystem to process the second pending task, the first microservice subsystem obtains the first link identifier and the sub-link identifier of the first link corresponding to the first microservice subsystem; The first microservice subsystem sends a first call request message to the second microservice subsystem, where the first call request message includes the second to-be-processed task, the first link identifier, and a sub-link identifier of the first link corresponding to the third microservice subsystem; The first microservice subsystem obtains the first link identifier from the first call request, and generates a sub-link identifier of the first link corresponding to the first microservice subsystem; The first microservice subsystem generates target data for link tracking based on the first link identifier, the sub-link identifier of the first link corresponding to the third microservice subsystem, the sub-link identifier of the first link corresponding to the first microservice subsystem, the identifier of the first microservice subsystem, and the identifier of the second microservice subsystem.

2. The method according to claim 1, characterized in that After the first microservice subsystem obtains the first link identifier and the sub-link identifier of the first link corresponding to the first microservice subsystem, the method further includes: The first microservice subsystem obtains first log information based on a status of the second microservice subsystem processing the second to-be-processed task, and generates the target data based on the identifier of the first microservice subsystem and the first log information; wherein the first log information includes the second to-be-processed task, the first link identifier, the sub-link identifier of the first link corresponding to the first microservice subsystem, the sub-link identifier of the first link corresponding to the third microservice subsystem, and the identifier of the second microservice subsystem, and the status of the second microservice subsystem processing the second to-be-processed task is a processing completion status or a processing interruption status.

3. The method according to claim 2, characterized in that After the first microservice subsystem generates the target data according to the identifier of the first microservice subsystem and the first log information, the method further includes: The first microservice subsystem stores the target data in a preset storage space, where the preset storage space is used to store one or more pieces of target data for link tracking generated by at least one microservice subsystem.

4. The method according to claim 3, characterized in that The method further comprises: If the first microservice subsystem determines that the state of the second microservice subsystem processing the second to-be-processed task is a processing interruption state, the first microservice subsystem marks the state of the target data in the preset storage space as an abnormal state.

5. A link tracking device, characterized in that: The device comprises: a transceiver module, configured to receive first information, wherein the first information includes a first task to be processed; an acquisition module, configured to, if it is determined, based on the first pending task, that the second microservice subsystem is to be invoked to process the second pending task, obtain a first link identifier and a sub-link identifier of the first link corresponding to the first microservice subsystem, send a first call request message to the second microservice subsystem, the first call request message including the second pending task, the first link identifier, and the sub-link identifier of the first link corresponding to the third microservice subsystem, obtain the first link identifier from the first call request, and generate a sub-link identifier of the first link corresponding to the first microservice subsystem; A processing module is configured to generate target data for link tracking based on the first link identifier, the sub-link identifier of the first link corresponding to the third microservice subsystem, the sub-link identifier of the first link corresponding to the first microservice subsystem, the identifier of the first microservice subsystem, and the identifier of the second microservice subsystem.

6. The device according to claim 5, characterized in that The transceiver module is also used for: First log information is obtained based on the status of the second microservice subsystem processing the second pending task, and the target data is generated based on the identifier of the first microservice subsystem and the first log information; wherein the first log information includes the second pending task, the first link identifier, the sub-link identifier of the first link corresponding to the first microservice subsystem, the sub-link identifier of the first link corresponding to the third microservice subsystem, and the identifier of the second microservice subsystem, and the status of the second microservice subsystem processing the second pending task is a processing completion state or a processing interruption state.

7. The device according to claim 6, characterized in that The processing module is further configured to: The target data is stored in a preset storage space, where the preset storage space is used to store one or more target data for link tracking generated by at least one microservice subsystem.

8. The device according to claim 7, characterized in that The processing module is further configured to: If it is determined that the state of the second microservice subsystem processing the second to-be-processed task is a processing interruption state, the state of the target data in the preset storage space is marked as an abnormal state.

9. A computer-readable storage medium, characterized in that The method comprises instructions which, when executed on a processor of a computer, cause the processor of the computer to perform the method according to any one of claims 1 to 4.

10. A computer program product, characterized in that When the method is executed on a computer, the computer is enabled to execute the method according to any one of claims 1 to 4.

Citation Information

Patent Citations

  • Tracking method and device for invoked link in distributed system

    CN106603270A

  • Monitoring method and system of link calling in distributed system

    CN108183927A