WO2020232871A1 - 一种微服务依赖分析方法及装置 - Google Patents

一种微服务依赖分析方法及装置 Download PDF

Info

Publication number
WO2020232871A1
WO2020232871A1 PCT/CN2019/102725 CN2019102725W WO2020232871A1 WO 2020232871 A1 WO2020232871 A1 WO 2020232871A1 CN 2019102725 W CN2019102725 W CN 2019102725W WO 2020232871 A1 WO2020232871 A1 WO 2020232871A1
Authority
WO
WIPO (PCT)
Prior art keywords
dependency analysis
task
trigger
dependency
timing
Prior art date
Application number
PCT/CN2019/102725
Other languages
English (en)
French (fr)
Inventor
刘磊
Original Assignee
平安科技(深圳)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2020232871A1 publication Critical patent/WO2020232871A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/448Execution paradigms, e.g. implementations of programming paradigms
    • G06F9/4482Procedural

Definitions

  • the present invention relates to the field of computer technology, in particular to a method and device for analyzing microservice dependency.
  • microservices As a loosely coupled service-oriented architecture, microservices have received great attention in recent years. In practical applications, with the development of business, the number of microservices is increasing, and the calling relationship between services is becoming more and more complicated. A request may be obtained through the collaborative call of multiple microservices to obtain results. Therefore, microservices Dependency analysis between services appears to be very necessary. Once a request fails, the source of the error can be found through the dependency relationship between microservices and corrected.
  • the dependency analysis task in the process of dependency analysis, can be manually triggered, and each trigger can analyze the dependency data within a day to obtain the dependency relationship between microservices.
  • each trigger can analyze the dependency data within a day to obtain the dependency relationship between microservices.
  • the entire process of the above-mentioned dependency analysis involves multiple servers, resulting in a waste of server resources, and each execution of the dependency analysis task needs to be manually triggered, resulting in inefficient execution of the dependency analysis.
  • the embodiment of the present invention provides a microservice dependency analysis method and device, which can save server resources and improve the execution efficiency of dependency analysis.
  • the first aspect of the embodiments of the present invention provides a microservice dependency analysis method, which includes:
  • the link server obtains the dependency analysis component, and sets the dependency analysis component locally;
  • trigger condition is a timing trigger
  • trigger the dependency analysis component to execute the dependency analysis task when the current time stamp meets the timing period parameter
  • the trigger condition is an interface trigger
  • the dependency analysis component is triggered to execute the dependency analysis task according to the analysis request.
  • a second aspect of the embodiments of the present invention provides a microservice dependency analysis device, which includes:
  • a setting module for the link server to obtain the dependency analysis component, and set the dependency analysis component locally;
  • An obtaining module configured to obtain a trigger condition of the dependency analysis component, where the trigger condition is used to trigger a dependency analysis task corresponding to the dependency analysis component;
  • a timing trigger module configured to trigger the dependency analysis component to execute the dependency analysis task when the current time stamp meets the timing period parameter if the trigger condition is a timing trigger;
  • the request trigger module is configured to trigger the dependency analysis component to execute the dependency analysis task according to the analysis request when the analysis request is obtained in the request interface if the trigger condition is an interface trigger.
  • the third aspect of the embodiments of the present invention provides a microservice dependency analysis device, including: a processor and a memory;
  • the processor is connected to a memory, where the memory is used to store program code, and the processor is used to call the program code to execute the method according to the first aspect of the embodiment of the present invention.
  • the fourth aspect of the embodiments of the present invention provides a computer-readable storage medium, the computer-readable storage medium stores a computer program, the computer program includes program instructions, and when executed by a processor, the program instructions execute as The method of the first aspect of the embodiment of the present invention.
  • the time range parameter can be used to realize the dependency analysis of any time period, which can increase the flexibility of the dependency data involved in the dependency analysis task, and trigger the dependency analysis task through timing tasks or analysis requests. Avoid tedious operations triggered manually, and improve the execution efficiency of dependent analysis.
  • FIG. 1 is a schematic flowchart of a microservice dependency analysis method provided by an embodiment of the present invention
  • FIG. 2 is a schematic flowchart of another microservice dependency analysis method provided by an embodiment of the present invention.
  • FIG. 3 is a schematic structural diagram of a microservice dependency analysis apparatus provided by an embodiment of the present invention.
  • Fig. 4 is a schematic structural diagram of another microservice dependency analysis apparatus provided by an embodiment of the present invention.
  • Microservice architecture can refer to splitting the overall business into many services with specific and clear functions, and through the cooperation of many scattered small services, more complex problems can be solved.
  • the microservice architecture most of the functional modules are deployed and run separately, interacting with each other through the bus, and they are all stateless services.
  • the front and back business flows will be processed by multiple microservices.
  • the user can only know the final processing result of the business flow, but cannot know the processing sequence of the business flow and the processing results of each microservice passed. If there is an error in the business flow And exceptions, you need to log in to each server to view the log files to find and locate the problem, which takes too much time, resulting in too low efficiency in finding and locating the problem.
  • Link tracking can be recorded in a logical track of a specific request.
  • the above-mentioned logical track may include each service passed by the specific request and the time stamp of each service, the time spent processing each service, and the time spent on each service.
  • the execution status of each of the above services can refer to whether the execution is successful, whether a retry is performed, and whether the execution failure has an impact on the entire request.
  • Dependency analysis can obtain the calling relationship between microservices based on the microservice work information recorded in a certain period of time.
  • the method provided by the embodiment of the present invention can integrate the dependency analysis component into the local through the link server, that is, the dependency analysis component is a part of the link server and can use the resources in the link server.
  • the dependency analysis component can be encapsulated into a timing task, which can provide a timing trigger method for the dependency analysis task in the above dependency analysis component, which can be set
  • the timing period parameter in the timing task automatically executes the above dependency analysis task when the current time stamp meets the above timing period parameter; at the same time, the link server can provide an interface trigger method for the above dependency analysis component, which can be triggered by an analysis request
  • the dependency analysis component performs dependency analysis tasks.
  • any of the above triggering methods can trigger the dependency analysis component to automatically execute the dependency analysis task, and support dependency analysis at any time period, which can not only avoid the waste of server resources, but also avoid the tedious operation of manual triggering, and increase the dependency.
  • the execution efficiency of the analysis The method and device provided by the embodiment of the present invention will be described below in conjunction with FIG. 1 to FIG. 4.
  • FIG. 1 is a schematic flowchart of a microservice dependency analysis method provided by an embodiment of the present invention. As shown in FIG. 1, the method provided in the embodiment of the present invention will be specifically described below in conjunction with step S101 to step S104.
  • the link server obtains the dependency analysis component, and sets the dependency analysis component locally.
  • the link server can set the obtained dependency analysis component locally, that is, the dependency analysis component and the link server are combined into one to form a whole, and only one server is needed to execute the above-mentioned dependency Analyze the functions of the components and the initial link server.
  • the above dependency analysis component can be expressed as a collection of all function realization modules in the dependency analysis task, which can be used to analyze the calling relationship between microservices, especially the number of calls between microservices in a certain period of time; the above link server can Represents the backend server of Zipkin (Link Tracking System).
  • Zipkin is a distributed tracking system dedicated to collecting time data of distributed services. When potential problems are encountered in the microservice architecture, it can be ordered in a regular manner in the order of time. To collect data.
  • the dependency analysis component and Zipkin are two independent components.
  • the process of executing the above two components requires multiple servers, and the above dependency analysis component is added to Zipkin It not only saves server resources, but also realizes resource and function sharing between the two components.
  • the above-mentioned dependency analysis component can use the data collected in Zipkin as the dependent data for analysis, which can avoid the above-mentioned dependency analysis component data collection Process: For the original interface or other functional modules in Zipkin, the dependency analysis component can be called directly, which can make the execution of dependency analysis more convenient.
  • S102 Acquire a trigger condition of the dependency analysis component, where the trigger condition is used to trigger a dependency analysis task corresponding to the dependency analysis component.
  • the above-mentioned dependency analysis component can be set with two trigger modes, and when the trigger condition of any one of the above-mentioned two trigger modes is reached, the above-mentioned dependency analysis component can be triggered to execute the dependency analysis task.
  • the link server may obtain the trigger condition of the dependency analysis component, and determine whether to trigger the dependency analysis component to execute the dependency analysis task according to the trigger condition.
  • the type of the trigger condition can be determined first. If the trigger condition is a timing trigger, the current time stamp satisfies the timing period parameter in the timing trigger (ie, timing When the trigger condition of the trigger mode), the dependency analysis component can be triggered to execute the dependency analysis task.
  • the above-mentioned timing period parameters can be set according to actual requirements. As long as the current time stamp meets the set timing period parameters, the above-mentioned dependency analysis task can be automatically triggered and executed.
  • the dependency analysis component can be triggered to automatically execute the dependency analysis task; of course,
  • the above timing period parameter can also set a starting time point and a time frequency. For example, the starting time point is 12:30:00, and the above time frequency is 10 minutes, which can mean from the above starting time point of 12:30:00. Starting from seconds, the dependency analysis component can be triggered to execute the above dependency analysis task every 10 minutes.
  • a time range parameter can be used to determine the dependency data to be analyzed in the aforementioned dependency analysis task.
  • the time period to which it belongs is set, that is, the range of the dependent data obtained can be determined through a time range parameter. For example, if the above time range parameter is set to one day, it means that all dependent data related to the above dependency analysis task within that day can be obtained, and the above dependent data can be analyzed; if the above time range parameter is one week, it means that this All dependent data related to the above dependent analysis tasks within a week will be analyzed.
  • the aforementioned dependency analysis component can support dependency analysis at any time period, and obtain the calling relationship between the microservices in the aforementioned dependency analysis task. It is understandable that the aforementioned dependent data can be obtained from the link data stored in Zipkin according to the aforementioned time range parameter.
  • trigger condition is an interface trigger
  • when an analysis request is obtained in the request interface trigger the dependency analysis component to execute the dependency analysis task according to the analysis request.
  • the aforementioned dependency analysis can be triggered when the analysis request corresponding to the aforementioned dependency analysis task (that is, the trigger condition of the interface trigger mode) is acquired in the request interface
  • the component performs the aforementioned dependency analysis tasks.
  • the above request interface can be a specific interface in the above Zipkin.
  • a request can be sent through the above request interface to trigger the dependency analysis component to execute the above dependency analysis task without the need for permission verification.
  • a time range parameter can also be used to set the time period to which the dependent data to be analyzed in the above-mentioned dependency analysis task belongs.
  • the setting method is the same as the source of the above-mentioned dependency analysis task.
  • the trigger method is the same, so I won’t repeat it here. It should be noted that both the aforementioned interface triggering method and the aforementioned timing triggering method can trigger and execute the aforementioned dependency analysis task.
  • the other triggering method is satisfying In the case of trigger conditions, it is still necessary to wait in line, and the execution of the current dependency analysis task is completed before execution.
  • the dependency analysis component is set locally through the link server, and the above-mentioned dependency analysis component is encapsulated into a timing task, which can provide two triggering methods for the above-mentioned dependency analysis component, and the above-mentioned The dependency analysis component performs dependency analysis tasks.
  • the above-mentioned link server can trigger the above-mentioned dependency analysis component to execute the above-mentioned dependency analysis task by acquiring the trigger condition of the dependency analysis component according to the triggering condition, and if the above-mentioned trigger condition is a timing trigger, the above-mentioned timing task can be used to trigger the above-mentioned
  • the dependency analysis component executes the aforementioned dependency analysis task; if the aforementioned trigger condition is an interface trigger, the analysis request can be obtained in the request interface, and the dependency analysis component is triggered to execute the aforementioned dependency analysis task according to the aforementioned analysis request.
  • the time range parameter can be used to realize the dependency analysis of any time period, which can increase the flexibility of the dependency data involved in the dependency analysis task, and trigger the dependency analysis task through timing tasks or analysis requests. Avoid tedious operations triggered manually, and improve the execution efficiency of dependent analysis.
  • FIG. 2 is a schematic flowchart of another microservice dependency analysis method provided by an embodiment of the present invention. As shown in FIG. 2, the method provided in the embodiment of the present invention will be specifically described below in conjunction with step S201 to step S209.
  • the link server obtains the dependency analysis component, and sets the dependency analysis component locally.
  • step S201 For the specific implementation of the foregoing step S201, reference may be made to the description of step S101 in the embodiment corresponding to FIG. 1, which will not be repeated here.
  • S202 Encapsulate the dependency analysis component into a timed task, and set the timed period parameter for the timed task.
  • the above-mentioned dependency analysis component may be encapsulated into a timing task, and the timing task may be implemented by setting timing period parameters to complete the specified task at a specified time.
  • the above timing tasks can be completed through Elastic Job (distributed timing task framework).
  • the Elastic Job framework is a distributed flexible timing task scheduling framework that can provide a configuration string (equivalent to the above timing period parameters).
  • the above strings are configured to implement the above timing tasks at any point in time and at any frequency.
  • encapsulating the above-mentioned dependency analysis task into a timed task can trigger the above-mentioned dependency analysis task at a fixed frequency according to the configuration file, and avoid the tedious operation of manually triggering the dependency analysis task.
  • the above-mentioned Elastic Job can monitor the status of the above-mentioned timed task while it is running, and count the number of successful and failed data processed in the most recent period of time, can record the start time, end time, and next run time of the task last time, and can also record missed executions After the current task is completed, the missed task can be triggered automatically.
  • the trigger condition of the above-mentioned dependent analysis component can be determined, that is, the time point and time frequency of the above-mentioned timing period parameter setting can determine the above-mentioned dependent analysis component to perform the above-mentioned dependent analysis task.
  • the specific time point in other words, the timing period parameter set in the timing task can be expressed as the trigger condition of the above-mentioned dependency analysis component, and the above-mentioned dependency analysis task can be triggered and executed when the setting requirement of the above-mentioned time period parameter is met.
  • S204 Acquire a trigger condition of the dependency analysis component, where the trigger condition is used to trigger a dependency analysis task corresponding to the dependency analysis component.
  • step S204 For the specific implementation of the foregoing step S204, reference may be made to the description of step S102 in the embodiment corresponding to FIG. 1, which will not be repeated here.
  • S205 If the trigger condition is a timing trigger, obtain the current timestamp and the start timestamp, and determine the accumulated duration according to the current timestamp and the start timestamp.
  • the type of the trigger condition can be determined first. If the trigger condition is a timing trigger, the link server can record the current timestamp for acquiring the timing trigger condition, and The start time stamp set in the above timing task is obtained, and the accumulated time between the two can be calculated based on the current time stamp and the start time stamp. For example, if the start time stamp in the timed task is 8 o'clock exactly, and the current time stamp recorded by the link server is 8:20, it can be determined that the accumulated duration is 20 minutes.
  • the above-mentioned current timestamp may be expressed as the start time of the execution of the current dependent analysis task
  • the above-mentioned starting timestamp may be expressed as the start time of the last execution of the dependent analysis task
  • the above cumulative duration It can be expressed as the time difference between the execution start times of two adjacent dependency analysis tasks.
  • the dependency analysis component may be triggered to execute the dependency analysis task.
  • the aforementioned duration threshold may be expressed as an integer multiple of the time frequency in the aforementioned timing period parameter, that is, when the aforementioned cumulative duration is equal to an integer multiple of the aforementioned time frequency, the aforementioned dependency analysis component can be triggered to perform the dependency analysis task.
  • the timed period parameter in the timed task is set to 10 minutes (that is, the set time and frequency value), when the cumulative duration is a multiple of 10 (for example, 20, 30,...), the dependency analysis component can be triggered to execute the dependency Analysis task.
  • the above duration threshold may be expressed as the time frequency value set in the above configuration string, that is, the time difference between the two adjacent execution start times of the dependent analysis task preset in the timing task, when the above determination
  • the above-mentioned dependency analysis component may be triggered to execute the dependency analysis task based on the above-mentioned timing task.
  • the call status of the RESTful interface needs to be detected.
  • the call status can affect the trigger status of the dependency analysis component, and thus affect the execution of the dependency analysis task.
  • a RESTful interface is encapsulated in Zipkin.
  • the RESTful interface can be used for dependency analysis, and the dependency analysis task in the dependency analysis component is triggered by sending a RESTful request.
  • RESTFul is an architecture specification, constraints, and principles.
  • the architecture that conforms to this specification is the RESTful architecture.
  • the core specification and constraints of the RESTful architecture have a unified interface, which can be used by the client without any documentation. Server resources.
  • a RESTful request (ie analysis request) can be obtained from the RESTful interface, and the RESTful request can be used Control the aforementioned RESTful interface to call the aforementioned dependency analysis component to trigger the aforementioned dependency analysis component to execute the dependency analysis task.
  • the aforementioned RESTful request is equivalent to the trigger command of the aforementioned dependency analysis component, and the aforementioned trigger command may include a time range parameter, which can be used to limit the time period to which the dependent data belongs.
  • S209 Display the execution result of the dependency analysis task on the screen, and display the dependency relationship between the microservices corresponding to the dependency analysis task.
  • all dependency data within the above-mentioned time range parameter range can be obtained, and the above-mentioned dependency data can be analyzed to obtain the microservices corresponding to the above-mentioned dependency analysis task.
  • the execution result of the aforementioned dependency analysis task and the obtained calling relationship and the number of calls can be displayed on the terminal screen corresponding to the link server. Among them, the above execution result may refer to whether the above dependency analysis task is executed successfully.
  • the calling relationship and the number of calls between the microservices corresponding to the above dependency analysis task can be obtained, and the relationship between the above microservices is displayed on the above screen. If the execution fails, it means that the above dependency analysis task cannot be executed, and the call relationship and the number of calls between the microservices cannot be obtained. Therefore, the prompt of the execution failure is displayed on the above screen, and the execution failure is displayed. the reason.
  • the link tracking system (such as Zipkin) can record all the work information of all microservices through each specific request.
  • the above work information can also be called tracking data.
  • Information dependence analysis can clearly understand the calling relationship between microservices and the number of calls within a certain period of time, and you can also intuitively understand the processing time and processing results of each microservice during the calling process.
  • each dependency analysis task can involve multiple microservices.
  • the multiple microservices mentioned above can be all microservices corresponding to the same type of business, or all microservices in other systems with specific functions.
  • microservice A, microservice B,...,microservice F can obtain all data related to the above-mentioned microservice A-microservice F from the data collected by Zipkin according to the time range parameter set in the trigger mode.
  • the service name corresponding to the above microservice A-microservice F can be used as a key to query from all the tracking data collected by Zipkin to obtain the tracking data corresponding to the above microservice A-microservice F, and from The tracking data in the aforementioned time range parameter is selected from the aforementioned acquired tracking data as the dependence data corresponding to the aforementioned dependence analysis task.
  • the aforementioned dependence data may include the processing time and description information of each service in microservice A-microservice F, Timestamp and other information.
  • the set time range parameter is one week, all the tracking data about microservice A-microservice F in the last week will be obtained from the tracking data collected by Zipkin.
  • the service processing time, service processing timestamp, and description information corresponding to each service in the above dependent data the invocation link and link length between microservices can be determined, and it can also be clearly understood
  • the number of calls between microservices within the time range determined by the above time range parameters. For microservices that are called frequently, some optimization measures can be implemented for the above microservices, and for those microservices that are more time-consuming to call, they can be optimized in time .
  • Dependency analysis of microservices can understand the calling relationship and the number of calls between microservices, and can be displayed on the screen of the terminal device corresponding to the link server, so that system maintenance personnel can know the performance and bottleneck of the system in time.
  • the dependency analysis component is set locally through the link server, and the above-mentioned dependency analysis component is encapsulated into a timing task, which can provide two triggering methods for the above-mentioned dependency analysis component, and the above-mentioned The dependency analysis component performs dependency analysis tasks.
  • the above-mentioned link server can trigger the above-mentioned dependency analysis component to execute the above-mentioned dependency analysis task by acquiring the trigger condition of the dependency analysis component according to the triggering condition, and if the above-mentioned trigger condition is a timing trigger, the above-mentioned timing task can be used to trigger the above-mentioned
  • the dependency analysis component executes the aforementioned dependency analysis task; if the aforementioned trigger condition is an interface trigger, the analysis request can be obtained in the request interface, and the dependency analysis component is triggered to execute the aforementioned dependency analysis task according to the aforementioned analysis request.
  • the time range parameter can be used to realize the dependency analysis of any time period, which can increase the flexibility of the dependency data involved in the dependency analysis task, and trigger the dependency analysis task through timing tasks or analysis requests. Avoid tedious operations triggered manually, and improve the execution efficiency of dependent analysis.
  • FIG. 3 is a schematic structural diagram of a microservice dependency analysis apparatus provided by an embodiment of the present invention.
  • the microservice dependency analysis device 1 may include: a setting module 10, an acquisition module 20, a timing trigger module 30, and a request trigger module 40;
  • the setting module 10 is used for the link server to obtain the dependency analysis component, and set the dependency analysis component locally;
  • the obtaining module 20 is configured to obtain a trigger condition of the dependency analysis component, where the trigger condition is used to trigger a dependency analysis task corresponding to the dependency analysis component;
  • the timing trigger module 30 is configured to, if the trigger condition is a timing trigger, trigger the dependency analysis component to execute the dependency analysis task when the current time stamp meets the timing period parameter;
  • the request trigger module 40 is configured to trigger the dependency analysis component to execute the dependency analysis task according to the analysis request when the analysis request is acquired in the request interface if the trigger condition is an interface trigger.
  • step S101 to step S104 The specific functional implementations of the above-mentioned setting module 10, obtaining module 20, timing triggering module 30, and request triggering module 40 can be found in step S101 to step S104 in the embodiment corresponding to FIG. 1, which will not be repeated here.
  • the microservice dependency analysis device may further include: an encapsulation module 50, a determination module 60, and a display module 70;
  • the encapsulation module 50 is configured to encapsulate the dependency analysis component into a timed task, and set the timed period parameter for the timed task;
  • the determining module 60 is configured to determine the trigger condition of the dependency analysis component according to the timing period parameter;
  • the display module 70 is configured to display the execution result of the dependency analysis task on the screen, and display the dependency relationship between the microservices corresponding to the dependency analysis task.
  • step S202 For specific functional implementations of the encapsulation module 50, the determination module 60, and the display module 70, reference may be made to step S202, step S203, and step S209 in the embodiment corresponding to FIG. 2, which will not be repeated here.
  • the above-mentioned timing trigger module 30 may include: a cumulative duration determination unit 301 and a first execution unit 302;
  • the cumulative duration determining unit 301 is configured to, if the trigger condition is a timing trigger, obtain the current time stamp and the starting time stamp, and determine the cumulative duration according to the current time stamp and the starting time stamp;
  • the first execution unit 302 is configured to trigger the dependency analysis component to execute the dependency analysis task through the timing task if the accumulated duration is equal to the duration threshold in the timing period parameter.
  • step S205 the specific function implementation manners of the above-mentioned accumulated duration determining unit 301 and the first execution unit 302 can refer to step S205 to step S206 in the embodiment corresponding to FIG. 2, and details are not described herein again.
  • the request triggering module 40 may include a detection unit 401 and a second execution unit 402;
  • the detecting unit 401 is configured to detect the calling state of the RESTful interface if the trigger condition is an interface trigger;
  • the second execution unit 402 is configured to obtain an analysis request from the RESTful interface if the calling state is the called state, and control the RESTful interface to call the dependency analysis component according to the analysis request to trigger the The dependency analysis component executes the dependency analysis task.
  • step S207 For specific functional implementations of the detection unit 401 and the second execution unit 402, refer to step S207 to step S208 in the embodiment corresponding to FIG. 2, and details are not described herein again.
  • the dependency analysis component is set locally through the link server, and the above-mentioned dependency analysis component is encapsulated into a timing task, which can provide two triggering methods for the above-mentioned dependency analysis component, and the above-mentioned The dependency analysis component performs dependency analysis tasks.
  • the above-mentioned link server can trigger the above-mentioned dependency analysis component to execute the above-mentioned dependency analysis task by acquiring the trigger condition of the dependency analysis component according to the triggering condition, and if the above-mentioned trigger condition is a timing trigger, the above-mentioned timing task can be used to trigger the above-mentioned
  • the dependency analysis component executes the aforementioned dependency analysis task; if the aforementioned trigger condition is an interface trigger, the analysis request can be obtained in the request interface, and the dependency analysis component is triggered to execute the aforementioned dependency analysis task according to the aforementioned analysis request.
  • the time range parameter can be used to achieve dependency analysis for any time period, which can increase the flexibility of the dependency data involved in the dependency analysis task, and trigger the dependency analysis task through a timing task or an analysis request. Avoid tedious operations triggered manually, and improve the execution efficiency of dependent analysis.
  • FIG. 4 is a schematic structural diagram of another microservice dependency analysis apparatus provided by an embodiment of the present invention.
  • the microservice dependency analysis apparatus 500 in the embodiment of the present invention may include: one or more processors 501 and a memory 502.
  • the aforementioned processor 501 and memory 502 are connected through a bus 503.
  • the memory 502 is used to store a computer program, and the computer program includes program instructions.
  • the processor 501 is used to execute the program instructions stored in the memory 502, and can be used for:
  • the link server obtains the dependency analysis component, and sets the dependency analysis component locally;
  • trigger condition is a timing trigger
  • trigger the dependency analysis component to execute the dependency analysis task when the current time stamp meets the timing period parameter
  • the trigger condition is an interface trigger
  • the dependency analysis component is triggered to execute the dependency analysis task according to the analysis request.
  • the aforementioned processor 501 before executing the above-mentioned acquiring the trigger condition of the dependency analysis component, the aforementioned processor 501 is further configured to:
  • a trigger condition of the dependency analysis component is determined.
  • the processor 501 executes that if the trigger condition is a timing trigger, when the current timestamp meets the timing period parameter, when triggering the dependency analysis component to execute the dependency analysis task, it specifically uses in:
  • the trigger condition is a timing trigger, obtain the current timestamp and the start timestamp, and determine the accumulated duration according to the current timestamp and the start timestamp;
  • the dependency analysis component is triggered to execute the dependency analysis task through the timing task.
  • the request interface is a RESTful interface that characterizes state transition;
  • the processor 501 triggers the dependency analysis when an analysis request is acquired in the request interface when the trigger condition is an interface trigger.
  • the component executes the dependency analysis task it is specifically used to:
  • trigger condition is interface triggering, detect the invocation status of the RESTful interface
  • the aforementioned processor 501 is further configured to:
  • the execution result of the dependency analysis task is displayed on the screen, and the dependency relationship between the microservices corresponding to the dependency analysis task is displayed.
  • the above-mentioned processor 501 may be a central processing unit (central processing unit, CPU), and the processor may also be other general-purpose processors, digital signal processors (digital signal processors, DSP), and dedicated integration Circuit (application specific integrated circuit, ASIC), ready-made programmable gate array (field-programmable gate array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc.
  • the general-purpose processor may be a microprocessor or the processor may also be any conventional processor or the like.
  • the memory 502 may include a read-only memory and a random access memory, and provides instructions and data to the processor 501.
  • a part of the memory 502 may also include a non-volatile random access memory.
  • the memory 502 may also store device type information.
  • microservice dependency analysis device 500 can execute the description of the microservice dependency analysis method in the foregoing embodiment corresponding to FIG. 1 and FIG. 2 as well as the description of the microservice dependency analysis device in the embodiment corresponding to FIG. 3 , I won’t repeat it here.
  • the dependency analysis component is set locally through the link server, and the dependency analysis component is encapsulated into a timed task, which can provide two triggering methods for the dependency analysis component, and both triggering methods can trigger the above
  • the dependency analysis component performs dependency analysis tasks.
  • the above-mentioned link server can trigger the above-mentioned dependency analysis component to execute the above-mentioned dependency analysis task by acquiring the trigger condition of the dependency analysis component according to the triggering condition, and if the above-mentioned trigger condition is a timing trigger, the above-mentioned timing task can be used to trigger the above
  • the dependency analysis component executes the aforementioned dependency analysis task; if the aforementioned trigger condition is an interface trigger, the analysis request can be obtained in the request interface, and the dependency analysis component is triggered to execute the aforementioned dependency analysis task according to the aforementioned analysis request.
  • the time range parameter can be used to realize the dependency analysis of any time period, which can increase the flexibility of the dependency data involved in the dependency analysis task, and trigger the dependency analysis task through timing tasks or analysis requests. Avoid tedious operations triggered manually, and improve the execution efficiency of dependent analysis.
  • the embodiment of the present invention also provides a computer-readable storage medium, and the aforementioned computer-readable storage medium stores the aforementioned computer program executed by the microservice dependency analysis apparatus 1, and
  • the foregoing computer program includes program instructions.
  • the processor executes the foregoing program instructions, it can execute the description of the foregoing microservice dependency analysis method in the embodiment corresponding to FIG. 2 above, and therefore, it will not be repeated here.
  • the description of the beneficial effects of using the same method will not be repeated.
  • each process and/or structural schematic diagrams of the method flowcharts and/or structural schematic diagrams can be implemented by computer program instructions. Or a block, and a combination of processes and/or blocks in a flowchart and/or block diagram.
  • These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing equipment to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing equipment are generated for use.
  • These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing equipment to work in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including the instruction device.
  • the device implements the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the schematic structural diagram.
  • These computer program instructions can also be loaded on a computer or other programmable data processing equipment, so that a series of operation steps are executed on the computer or other programmable equipment to produce computer-implemented processing, so as to execute on the computer or other programmable equipment.
  • the instructions provide steps for implementing the functions specified in one block or multiple blocks in the flow chart or the flow chart and/or the structure.

Abstract

本发明实施例公开了一种微服务依赖分析方法及装置,该方法适用于微服务架构的应用,可以优化依赖分析执行效率。该方法包括:链路服务器获取依赖分析组件,将所述依赖分析组件设置到本地中;获取所述依赖分析组件的触发条件,所述触发条件用于触发所述依赖分析组件对应的依赖分析任务;若所述触发条件为定时触发,则在当前时间戳满足定时周期参数时,触发所述依赖分析组件执行所述依赖分析任务;若所述触发条件为接口触发,则在请求接口中获取到分析请求时,根据所述分析请求触发所述依赖分析组件执行所述依赖分析任务。采用本发明实施例,可以节省服务器资源,并提高依赖分析的执行效率。

Description

一种微服务依赖分析方法及装置
本申请要求于2019年5月20日提交中国专利局,申请号为201910420501.8、发明名称为“一种微服务依赖分析方法及装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本发明涉及计算机技术领域,尤其涉及一种微服务依赖分析方法及装置。
背景技术
微服务作为一种松耦合的面向服务架构,近年来受到了极大的关注。实际应用中,随着业务的发展,微服务的数量越来越多,服务之间的调用关系也越来越复杂,一个请求可能会经过多个微服务的协作调用来获取结果,因此,微服务之间的依赖分析显得非常必要,一旦一个请求出现失败问题,通过微服务之间的依赖关系来寻找错误根源并加以修改。
现有技术中,在依赖分析的过程中可以通过手动触发依赖分析任务,且每一次触发可对一天之内的依赖数据进行分析,得到微服务之间的依赖关系。然而,上述依赖分析的整个过程涉及到多台服务器,造成了服务器资源的浪费,且每一次依赖分析任务的执行均需要手动触发,从而导致依赖分析的执行效率低下。
发明内容
本发明实施例提供一种微服务依赖分析方法及装置,可以节省服务器资源,并提高依赖分析的执行效率。
本发明实施例第一方面提供了一种微服务依赖分析方法,该方法包括:
链路服务器获取依赖分析组件,将所述依赖分析组件设置到本地中;
获取所述依赖分析组件的触发条件,所述触发条件用于触发所述依赖分析组件对应的依赖分析任务;
若所述触发条件为定时触发,则在当前时间戳满足定时周期参数时,触发所述依赖分析组件执行所述依赖分析任务;
若所述触发条件为接口触发,则在请求接口中获取到分析请求时,根据所述分析请求触发所述依赖分析组件执行所述依赖分析任务。
本发明实施例第二方面提供了一种微服务依赖分析装置,该装置包括:
设置模块,用于链路服务器获取依赖分析组件,将所述依赖分析组件设置到本地中;
获取模块,用于获取所述依赖分析组件的触发条件,所述触发条件用于触发所述依赖分析组件对应的依赖分析任务;
定时触发模块,用于若所述触发条件为定时触发,则在当前时间戳满足定时周期参数时,触发所述依赖分析组件执行所述依赖分析任务;
请求触发模块,用于若所述触发条件为接口触发,则在请求接口中获取到分析请求时,根据所述分析请求触发所述依赖分析组件执行所述依赖分析任务。
本发明实施例第三方面提供了一种微服务依赖分析装置,包括:处理器和存储器;
所述处理器和存储器相连,其中,所述存储器用于存储程序代码,所述处理器用于调用所述程序代码,以执行如本发明实施例第一方面的方法。
本发明实施例第四方面提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序包括程序指令,所述程序指令当被处理器执行时,执行如本发明实施例第一方面的方法。
在微服务的依赖分析过程中,可以通过时间范围参数实现任何时间段的依赖分析,可以增加依赖分析任务中涉及到的依赖数据的灵活性,且通过定时任务或分析请求触发依赖分析任务,可以避免手动触发的繁琐操作,提高依赖分析的执行效率。
附图说明
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1是本发明实施例提供的一种微服务依赖分析方法的流程示意图;
图2是本发明实施例提供的另一种微服务依赖分析方法的流程示意图;
图3是本发明实施例提供的一种微服务依赖分析装置的结构示意图;
图4是本发明实施例提供的另一种微服务依赖分析装置的结构示意图。
具体实施方式
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。
微服务架构可以是指把整体的业务拆分成很多具有特定明确功能的服务, 通过很多分散的小服务之间的配合,可以解决更复杂的问题。在微服务构架中,大部分的功能模块都是单独部署运行的,彼此通过总线交互,均为无状态的服务,处于上述架构的环境中,前后台的业务流会经过多个微服务的处理和传递,在业务流的处理过程中,用户只能得知该业务流的最终处理结果,而无法得知业务流的处理顺序与经过的每个微服务的处理结果,若业务流出现了错误和异常,需要登录到各个服务器查看日志文件来查找和定位问题,耗费的时间太多,导致查找和定位问题的效率太低。链路跟踪可以记录在一次特定请求的逻辑轨迹。换言之,可以记录在该特定请求中系统完成的全部工作信息,上述逻辑轨迹可以包括上述特定请求经过的各个服务及经过每个服务的时间戳,每个服务处理花费的时长,以及每个服务的执行情况。上述每个服务的执行情况可以指是否执行成功,是否进行了重试,执行失败是否对整个请求造成了影响。依赖分析可以基于某一时间段内记录的微服务工作信息,得到各微服务之间的调用关系。
为了提高依赖分析的执行效率,本发明实施例提供的方法可以通过链路服务器将依赖分析组件集成进本地中,即依赖分析组件作为链路服务器中的一部分,可以使用上述链路服务器中的资源(例如,链路服务器中储存的数据、功能模块等),并可以将上述依赖分析组件封装成一个定时任务,可以为上述依赖分析组件中的依赖分析任务提供一种定时触发方式,可以通过设置定时任务中的定时周期参数,在当前时间戳满足上述定时周期参数时,自动执行上述依赖分析任务;同时,链路服务器可以为上述依赖分析组件提供一种接口触发方式,可以通过分析请求触发上述依赖分析组件执行依赖分析任务。其中,上述任一种触发方式均可以触发上述依赖分析组件自动执行上述依赖分析任务,并且支持任何时间段的依赖分析,不仅可以避免服务器资源的浪费,还可以避免手动触发的繁琐操作,提高依赖分析的执行效率。下面将结合图1至图4对本发明实施例提供的方法及装置进行说明。
请参见图1,图1是本发明实施例提供的一种微服务依赖分析方法的流程示意图。如图1所示,下面将结合步骤S101-步骤S104对本发明实施例提供的方法进行具体说明。
S101,链路服务器获取依赖分析组件,将所述依赖分析组件设置到本地中。
在一些可行的实施方式中,链路服务器可以将获取到的依赖分析组件设置到本地中,即将依赖分析组件与链路服务器合二为一,形成一个整体,只需要一个服务器就可执行上述依赖分析组件与初始链路服务器的功能。其中,上述依赖分析组件可以表示为依赖分析任务中所有功能实现模块的集合,可用于分析微服务之间的调用关系,尤其是某段时间内微服务之间的调用次数;上述链 路服务器可表示Zipkin(链路跟踪系统)的后台服务器,Zipkin是一个致力于收集分布式服务的时间数据的分布式跟踪系统,当在微服务架构中遇到潜在问题时,可以按照时间的顺序有规则地去收集数据。
可以理解的是,在将上述依赖分析组件集成进Zipkin中之前,依赖分析组件与Zipkin是两个独立的组件,执行上述两个组件的过程需要多台服务器,而将上述依赖分析组件添加至Zipkin中,不仅可以节省服务器资源,还可以实现两个组件之间的资源与功能共享,例如,上述依赖分析组件可以采用Zipkin中收集的数据作为依赖数据进行分析,可以避免上述依赖分析组件数据收集的过程;对于Zipkin中原有的接口或其他功能模块,依赖分析组件可以直接进行调用,可以使依赖分析执行变得更方便。
S102,获取所述依赖分析组件的触发条件,所述触发条件用于触发所述依赖分析组件对应的依赖分析任务。
在一些可行的实施方式中,上述依赖分析组件可设置两种触发方式,当达到上述两种触发方式中的任一种触发方式的触发条件时,可以触发上述依赖分析组件执行依赖分析任务。链路服务器可以通过获取上述依赖分析组件的触发条件,根据上述触发条件来判断是否触发依赖分析组件执行上述依赖分析任务。
S103,若所述触发条件为定时触发,则在当前时间戳满足定时周期参数时,触发所述依赖分析组件执行所述依赖分析任务。
在一些可行的实施方式中,对于上述获取到的触发条件,可以先确定该触发条件的类型,若该触发条件为定时触发,则在当前时间戳满足上述定时触发中的定时周期参数(即定时触发方式的触发条件)时,可以触发上述依赖分析组件执行依赖分析任务。其中,上述定时周期参数可按照实际需求进行设置,只要当前时间戳满足设置的定时周期参数,就可自动触发并执行上述依赖分析任务。例如,若定时周期参数设置为某一个时间点,如8点30分11秒,则在当前时间戳为8点30分11秒时,可以触发上述依赖分析组件自动执行上述依赖分析任务;当然,上述定时周期参数也可以设置一个起始时间点与一个时间频率,如起始时间点为12点30分00秒,上述时间频率为10分钟,可表示从上述起始时间点12点30分00秒开始,每10分钟就可以触发一次依赖分析组件执行上述依赖分析任务。
可选的,在执行上述依赖分析任务时,首先要根据上述依赖分析任务获取相应的依赖数据,因此在上述定时触发方式中,可以通过一个时间范围参数对上述依赖分析任务中待分析的依赖数据所属的时间段进行设置,即通过一个时间范围参数可以确定获取的依赖数据的范围。例如,上述时间范围参数设置为一天,则表示可以获取该天之内与上述依赖分析任务相关的全部依赖数据,并 对上述依赖数据进行分析;若上述时间范围参数为一周,则表示可以获取该周之内与上述依赖分析任务相关的全部依赖数据并进行分析。换言之,上述依赖分析组件可支持任何时间段的依赖分析,得到上述依赖分析任务中各微服务之间的调用关系。可以理解的是,上述依赖数据可以根据上述时间范围参数从Zipkin中存储的链路数据中获取。
S104,若所述触发条件为接口触发,则在请求接口中获取到分析请求时,根据所述分析请求触发所述依赖分析组件执行所述依赖分析任务。
在一些可行的实施方式中,若上述获取到的触发条件为接口触发,则在请求接口中获取到上述依赖分析任务对应的分析请求(即接口触发方式的触发条件)时,可以触发上述依赖分析组件执行上述依赖分析任务。其中,上述请求接口可以为上述Zipkin中的一个特定接口,在执行依赖分析任务时,可以通过上述请求接口发送一个请求,就可以触发上述依赖分析组件执行上述依赖分析任务,而无需进行权限验证之后登录到服务器才能执行上述依赖分析任务。在上述接口触发方式中,同样可以通过一个时间范围参数对上述依赖分析任务中待分析的依赖数据所属的时间段进行设置,设置的方式与上述依赖分析任务涉及的依赖数据的获取来源同上述定时触发方式相同,这里不再进行赘述。需要说明的是,上述接口触发方式与上述定时触发方式均可以触发并执行上述依赖分析任务,当其中一种触发方式正在触发上述依赖分析组件执行上述依赖分析任务时,另一种触发方式在满足触发条件的情况下仍需要排队等待,当前面的依赖分析任务执行完成后再开始执行。
本发明实施例通过链路服务器将依赖分析组件设置到本地中,并将上述依赖分析组件封装成定时任务,可为上述依赖分析组件提供两种触发方式,根据上述两种触发方式均可触发上述依赖分析组件执行依赖分析任务。具体实现方式为:上述链路服务器可通过获取依赖分析组件的触发条件,根据触发条件来触发上述依赖分析组件执行上述依赖分析任务,若上述触发条件为定时触发,则可通过上述定时任务触发上述依赖分析组件执行上述依赖分析任务;若上述触发条件为接口触发,则可在请求接口中获取到分析请求,根据上述分析请求触发上述依赖分析组件执行上述依赖分析任务。在微服务的依赖分析过程中,可以通过时间范围参数实现任何时间段的依赖分析,可以增加依赖分析任务中涉及到的依赖数据的灵活性,且通过定时任务或分析请求触发依赖分析任务,可以避免手动触发的繁琐操作,提高依赖分析的执行效率。
请参见图2,图2是本发明实施例提供的另一种微服务依赖分析方法的流程示意图。如图2所示,下面将结合步骤S201-步骤S209对本发明实施例提供的方法进行具体说明。
S201,链路服务器获取依赖分析组件,将所述依赖分析组件设置到本地中。
其中,上述步骤S201的具体实现方式可以参见上述图1所对应实施例中对步骤S101的描述,这里不再进行赘述。
S202,将所述依赖分析组件封装成定时任务,并为所述定时任务设置所述定时周期参数。
在一些可行的实施方式中,可将上述依赖分析组件封装成一个定时任务,该定时任务可以通过设置定时周期参数实现在指定的时间完成指定的任务。可选的,上述定时任务可以通过Elastic Job(分布式定时任务框架)完成,Elastic Job框架是一款分布式弹性定时任务调度框架,可以提供一个配置串(相当于上述定时周期参数),通过对上述串进行配置,可以实现在任何时间点、以任何频率执行上述定时任务。换言之,将上述依赖分析任务封装成一个定时任务,可以根据配置文件定时定频率地触发上述依赖分析任务,可以避免手动触发依赖分析任务的繁琐操作。
其中,上述Elastic Job可以监控上述定时任务运行时的状态,并统计最近一段时间处理的数据成功和失败数量,可以记录任务上次运行开始时间、结束时间以及下次运行时间,还可以记录错过执行的任务,在当前任务完成后可自动触发上述错过执行的任务。
S203,根据所述定时周期参数,确定所述依赖分析组件的触发条件。
在一些可行的实施方式中,基于上述定时周期参数的设置,可确定上述依赖分析组件的触发条件,即上述定时周期参数设置的时间点与时间频率可以决定上述依赖分析组件执行上述依赖分析任务的具体时间点,换句话说,定时任务中设置好的定时周期参数可表示为上述依赖分析组件的触发条件,满足上述定时周期参数的设置要求时可触发并执行上述依赖分析任务。
S204,获取所述依赖分析组件的触发条件,所述触发条件用于触发所述依赖分析组件对应的依赖分析任务。
其中,上述步骤S204的具体实现方式可以参见上述图1所对应实施例中对步骤S102的描述,这里不再进行赘述。
S205,若所述触发条件为定时触发,获取所述当前时间戳与起始时间戳,并根据所述当前时间戳与所述起始时间戳确定累计时长。
在一些可行的实施方式中,对于上述获取到的触发条件,可以先确定该触发条件的类型,若该触发条件为定时触发,链路服务器可记录获取到上述定时触发条件的当前时间戳,并获取上述定时任务中设置的起始时间戳,进而可根据上述当前时间戳与上述起始时间戳计算出两者之间的累计时长。例如,定时任务中的起始时间戳为8点整,链路服务器记录到的当前时间戳为8点20分, 则可确定累计时长为20分钟。
可选的,上述定时任务在Elastic Job框架上完成时,上述当前时间戳可表示为当前依赖分析任务执行开始时间,上述起始时间戳可表示为上次依赖分析任务执行开始时间,上述累计时长则可表示为相邻两次依赖分析任务执行开始时间之间的时间差。
S206,若所述累计时长等于所述定时周期参数中的时长阈值,则通过所述定时任务触发所述依赖分析组件执行所述依赖分析任务。
在一些可行的实施方式中,若上述确定的累计时长为上述定时周期参数中的时长阈值,则可触发上述依赖分析组件执行上述依赖分析任务。其中,上述时长阈值可表示为上述定时周期参数中时间频率的整数倍数值,也就是当上述累计时长等于上述时间频率的整数倍,则可以触发上述依赖分析组件执行依赖分析任务。例如,定时任务中的定时周期参数设置为10分钟(即设置的时间频率数值),当上述累计时长为10的倍数时(例如,20,30,…),可触发上述依赖分析组件执行上述依赖分析任务。
可选的,基于上述Elastic Job框架,上述时长阈值可以表示为上述配置串中设置的时间频率数值,即定时任务中预先设置的相邻两次依赖分析任务执行开始时间的时间差,当上述确定的累计时长等于上述时间频率数值时,可以基于上述定时任务触发上述依赖分析组件执行依赖分析任务。
S207,若所述触发条件为接口触发,则检测RESTful接口的调用状态。
在一些可行的实施方式中,若上述获取到的触发条件为接口触发,则需要检测RESTful接口的调用状态,上述调用状态可以影响上述依赖分析组件的触发状态,进而影响上述依赖分析任务的执行。在Zipkin中封装了一个RESTful接口,该RESTful接口可用于进行依赖分析,通过发送RESTful请求触发上述依赖分析组件中的依赖分析任务。其中,RESTFul是一种架构的规范与约束、原则,符合这种规范的架构就是RESTful架构,RESTful架构的核心规范与约束是具有统一的接口,可实现客户端无需借助任何文档就能调用到所有的服务器资源。
S208,若所述调用状态为已调用状态,则从所述RESTful接口中获取分析请求,根据所述分析请求控制所述RESTful接口调用所述依赖分析组件,以触发所述依赖分析组件执行所述依赖分析任务。
在一些可行的实施方式中,若上述调用状态为已调用状态,也就是上述RESTful接口处于正常工作状态中,则可以从上述RESTful接口中获取RESTful请求(即分析请求),该RESTful请求可以用来控制上述取RESTful接口调用上述依赖分析组件,以触发上述依赖分析组件执行依赖分析任务。上 述RESTful请求相当于上述依赖分析组件的触发命令,上述触发命令中可以包括时间范围参数,该时间范围参数可用于限定依赖数据所属的时间段。
S209,在屏幕显示所述依赖分析任务的执行结果,并显示所述依赖分析任务对应的微服务之间的依赖关系。
在一些可行的实施方式中,在执行上述依赖分析任务的过程中,可以获取上述时间范围参数范围内的全部依赖数据,并对上述依赖数据进行分析,得到上述依赖分析任务所对应的微服务之间的调用关系及上述时间范围参数范围内的调用次数。对于上述依赖分析任务的执行结果及得到的调用关系及调用次数,可以在链路服务器对应的终端屏幕进行显示。其中,上述执行结果可以指上述依赖分析任务是否执行成功,若成功,则可以得出上述依赖分析任务所对应微服务之间的调用关系及调用次数,并在上述屏幕上显示上述微服务之间的依赖关系图;若执行失败,则表示无法执行上述依赖分析任务,进而无法得到微服务之间的调用关系及调用次数,因此在上述屏幕上显示执行失败的提示,并显示出导致执行失败的原因。
在一些可行的实施方式中,链路跟踪系统(例如Zipkin)可以记录每一次特定请求所经过的所有微服务的全部工作信息,上述工作信息也可称为跟踪数据,通过对跟踪系统记录的工作信息进行依赖分析,可以清楚地了解到微服务之间的调用关系及某一段时间内的调用次数,也可以直观地了解到调用过程中各微服务的处理时间及处理结果。在依赖分析过程中,每一次依赖分析任务均可以涉及到多个微服务,上述多个微服务可以是同一类型业务对应的所有微服务,也可以是其它具有特定功能的系统中的所有微服务,例如,微服务A,微服务B,…,微服务F,可根据触发方式中设置的时间范围参数从Zipkin收集的数据中获取与上述微服务A-微服务F有关的所有数据。可选的,可以上述微服务A-微服务F分别对应的服务名称作为关键字从Zipkin收集到的全部跟踪数据中进行查询,获取与上述微服务A-微服务F对应的跟踪数据,并从上述获取到的跟踪数据中选择上述时间范围参数内的跟踪数据作为上述依赖分析任务对应的依赖数据,上述依赖数据可以包括微服务A-微服务F中每一个服务处理花费的时长,描述信息,时间戳等信息。若设置的时间范围参数为一周,则从Zipkin收集的跟踪数据中获取最近一周时间内的所有关于微服务A-微服务F的跟踪数据。可通过上述依赖数据中每个微服务对应的服务处理时间、服务处理时间戳以及每个服务对应的描述信息,可以确定微服务之间的调用链路及链路长度,也可以清楚地了解到在上述时间范围参数确定的时间范围内微服务之间的调用次数,对于调用比较频繁的微服务,可以对上述微服务实施一些优化措施,对于那些调用比较耗时的微服务,可以及时进行优化。对微服务 进行依赖分析可以了解微服务之间的调用关系及调用次数,并可在链路服务器对应的终端设备屏幕上进行显示,以使系统维护人员及时知道系统的性能及瓶颈。
本发明实施例通过链路服务器将依赖分析组件设置到本地中,并将上述依赖分析组件封装成定时任务,可为上述依赖分析组件提供两种触发方式,根据上述两种触发方式均可触发上述依赖分析组件执行依赖分析任务。具体实现方式为:上述链路服务器可通过获取依赖分析组件的触发条件,根据触发条件来触发上述依赖分析组件执行上述依赖分析任务,若上述触发条件为定时触发,则可通过上述定时任务触发上述依赖分析组件执行上述依赖分析任务;若上述触发条件为接口触发,则可在请求接口中获取到分析请求,根据上述分析请求触发上述依赖分析组件执行上述依赖分析任务。在微服务的依赖分析过程中,可以通过时间范围参数实现任何时间段的依赖分析,可以增加依赖分析任务中涉及到的依赖数据的灵活性,且通过定时任务或分析请求触发依赖分析任务,可以避免手动触发的繁琐操作,提高依赖分析的执行效率。
请参见图3,图3是本发明实施例提供的一种微服务依赖分析装置的结构示意图。如图3所示,该微服务依赖分析装置1可以包括:设置模块10、获取模块20、定时触发模块30、请求触发模块40;
设置模块10,用于链路服务器获取依赖分析组件,将所述依赖分析组件设置到本地中;
获取模块20,用于获取所述依赖分析组件的触发条件,所述触发条件用于触发所述依赖分析组件对应的依赖分析任务;
定时触发模块30,用于若所述触发条件为定时触发,则在当前时间戳满足定时周期参数时,触发所述依赖分析组件执行所述依赖分析任务;
请求触发模块40,用于若所述触发条件为接口触发,则在请求接口中获取到分析请求时,根据所述分析请求触发所述依赖分析组件执行所述依赖分析任务。
其中,上述设置模块10、获取模块20、定时触发模块30、请求触发模块40的具体功能实现方式可以参见上述图1所对应实施例中的步骤S101-步骤S104,这里不再进行赘述。
再请一并参见图3,该微服务依赖分析装置还可以包括:封装模块50、确定模块60、显示模块70;
封装模块50,用于将所述依赖分析组件封装成定时任务,并为所述定时任务设置所述定时周期参数;
确定模块60,用于根据所述定时周期参数,确定所述依赖分析组件的触 发条件;
显示模块70,用于在屏幕显示所述依赖分析任务的执行结果,并显示所述依赖分析任务对应的微服务之间的依赖关系。
其中,上述封装模块50、确定模块60、显示模块70的具体功能实现方式可以参见上述图2所对应实施例中的步骤S202、步骤S203以及步骤S209,这里不再进行赘述。
再请一并参见图3,上述定时触发模块30可以包括:累计时长确定单元301、第一执行单元302;
累计时长确定单元301,用于若所述触发条件为定时触发,获取所述当前时间戳与起始时间戳,并根据所述当前时间戳与所述起始时间戳确定累计时长;
第一执行单元302,用于若所述累计时长等于所述定时周期参数中的时长阈值,则通过所述定时任务触发所述依赖分析组件执行所述依赖分析任务。
其中,上述累计时长确定单元301、第一执行单元302的具体功能实现方式可以参见上述图2所对应实施例中的步骤S205-步骤S206,这里不再进行赘述。
再请一并参见图3,上述请求触发模块40可以包括:检测单元401、第二执行单元402;
检测单元401,用于若所述触发条件为接口触发,则检测RESTful接口的调用状态;
第二执行单元402,用于若所述调用状态为已调用状态,则从所述RESTful接口中获取分析请求,根据所述分析请求控制所述RESTful接口调用所述依赖分析组件,以触发所述依赖分析组件执行所述依赖分析任务。
其中,上述检测单元401、第二执行单元402的具体功能实现方式可以参见上述图2所对应实施例中的步骤S207-步骤S208,这里不再进行赘述。
本发明实施例通过链路服务器将依赖分析组件设置到本地中,并将上述依赖分析组件封装成定时任务,可为上述依赖分析组件提供两种触发方式,根据上述两种触发方式均可触发上述依赖分析组件执行依赖分析任务。具体实现方式为:上述链路服务器可通过获取依赖分析组件的触发条件,根据触发条件来触发上述依赖分析组件执行上述依赖分析任务,若上述触发条件为定时触发,则可通过上述定时任务触发上述依赖分析组件执行上述依赖分析任务;若上述触发条件为接口触发,则可在请求接口中获取到分析请求,根据上述分析请求触发上述依赖分析组件执行上述依赖分析任务。在微服务的依赖分析过程中,可以通过时间范围参数实现任何时间段的依赖分析,可以增加依赖分析任务中涉及到的依赖数据的灵活性,且通过定时任务或分析请求触发依赖分析任务, 可以避免手动触发的繁琐操作,提高依赖分析的执行效率。
请参见图4,图4是本发明实施例提供的另一种微服务依赖分析装置的结构示意图。如图4所示,本发明实施例中的微服务依赖分析装置500可以包括:一个或多个处理器501和存储器502。上述处理器501和存储器502通过总线503连接。存储器502用于存储计算机程序,该计算机程序包括程序指令,处理器501用于执行存储器502存储的程序指令,可用于:
链路服务器获取依赖分析组件,将所述依赖分析组件设置到本地中;
获取所述依赖分析组件的触发条件,所述触发条件用于触发所述依赖分析组件对应的依赖分析任务;
若所述触发条件为定时触发,则在当前时间戳满足定时周期参数时,触发所述依赖分析组件执行所述依赖分析任务;
若所述触发条件为接口触发,则在请求接口中获取到分析请求时,根据所述分析请求触发所述依赖分析组件执行所述依赖分析任务。
在一些可行的实施方式中,上述处理器501在执行上述在获取所述依赖分析组件的触发条件之前,还用于:
将所述依赖分析组件封装成定时任务,并为所述定时任务设置所述定时周期参数;
根据所述定时周期参数,确定所述依赖分析组件的触发条件。
在一些可行的实施方式中,上述处理器501在执行若所述触发条件为定时触发,则在当前时间戳满足定时周期参数时,触发所述依赖分析组件执行所述依赖分析任务时,具体用于:
若所述触发条件为定时触发,获取所述当前时间戳与起始时间戳,并根据所述当前时间戳与所述起始时间戳确定累计时长;
若所述累计时长等于所述定时周期参数中的时长阈值,则通过所述定时任务触发所述依赖分析组件执行所述依赖分析任务。
在一些可行的实施方式中,上述请求接口为表征状态转移RESTful接口;上述处理器501在执行上述若所述触发条件为接口触发,则在请求接口中获取到分析请求时,触发所述依赖分析组件执行所述依赖分析任务时,具体用于:
若所述触发条件为接口触发,则检测RESTful接口的调用状态;
若所述调用状态为已调用状态,则从所述RESTful接口中获取分析请求,根据所述分析请求控制所述RESTful接口调用所述依赖分析组件,以触发所述依赖分析组件执行所述依赖分析任务。
在一些可行的实施方式中,上述处理器501还用于:
在屏幕显示所述依赖分析任务的执行结果,并显示所述依赖分析任务对应 的微服务之间的依赖关系。
在一些可行的实施方式中,上述处理器501可以是中央处理单元(central processing unit,CPU),该处理器还可以是其他通用处理器、数字信号处理器(digital signal processor,DSP)、专用集成电路(application specific integrated circuit,ASIC)、现成可编程门阵列(field-programmable gate array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。
该存储器502可以包括只读存储器和随机存取存储器,并向处理器501提供指令和数据。存储器502的一部分还可以包括非易失性随机存取存储器。例如,存储器502还可以存储设备类型的信息。
应当理解,上述微服务依赖分析装置500可执行前文图1-图2所对应实施例中对微服务依赖分析方法的描述,也可执行图3所对应实施例中对微服务依赖分析装置的描述,在此不再进行赘述。
本发明实施例通过链路服务器将依赖分析组件设置到本地中,并将上述依赖分析组件封装成定时任务,可为上述依赖分析组件提供两种触发方式,根据上述两种触发方式均可以触发上述依赖分析组件执行依赖分析任务。具体实现方式为:上述链路服务器可通过获取依赖分析组件的触发条件,根据触发条件来触发上述依赖分析组件执行上述依赖分析任务,若上述触发条件为定时触发,则可通过上述定时任务触发上述依赖分析组件执行上述依赖分析任务;若上述触发条件为接口触发,则可在请求接口中获取到分析请求,根据上述分析请求触发上述依赖分析组件执行上述依赖分析任务。在微服务的依赖分析过程中,可以通过时间范围参数实现任何时间段的依赖分析,可以增加依赖分析任务中涉及到的依赖数据的灵活性,且通过定时任务或分析请求触发依赖分析任务,可以避免手动触发的繁琐操作,提高依赖分析的执行效率。
此外,这里需要指出的是:本发明实施例还提供了一种计算机可读存储介质,且上述计算机可读存储介质中存储有前文提及的微服务依赖分析装置1所执行的计算机程序,且上述计算机程序包括程序指令,当处理器执行上述程序指令时,能够执行前文图2所对应实施例中对上述微服务依赖分析方法的描述,因此,这里将不再进行赘述。另外,对采用相同方法的有益效果描述,也不再进行赘述。对于本发明所涉及的计算机可读存储介质实施例中未披露的技术细节,请参照本发明方法实施例的描述。
在本发明中提及“实施例”意味着,结合实施例描述的特定特征、结构或特性可以包含在本发明的至少一个实施例中。在说明书中的各个位置展示该短语并不一定均是指相同的实施例,也不是与其它实施例互斥的独立的或备选的实 施例。本领域技术人员显式地和隐式地理解的是,本文所描述的实施例可以与其它实施例相结合。在本发明说明书和所附权利要求书中使用的术语“和/或”是指相关联列出的项中的一个或多个的任何组合以及所有可能组合,并且包括这些组合。本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、计算机软件或者二者的结合来实现,为了清楚地说明硬件和软件的可互换性,在上述说明中已经按照功能一般性地描述了各示例的组成及步骤。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本发明的范围。
本发明实施例提供的方法及相关装置是参照本发明实施例提供的方法流程图和/或结构示意图来描述的,具体可由计算机程序指令实现方法流程图和/或结构示意图的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。这些计算机程序指令可提供到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或结构示意图一个方框或多个方框中指定的功能的装置。这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或结构示意图一个方框或多个方框中指定的功能。这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或结构示意一个方框或多个方框中指定的功能的步骤。
本发明说明书、权利要求书和附图中出现的术语“包括”和“具有”以及它们任何变形,意图在于覆盖不排他的包含。例如包含了一系列步骤或单元的过程、方法、系统、产品或设备没有限定于已列出的步骤或单元,而是可选地还包括没有列出的步骤或单元,或可选地还包括对于这些过程、方法、产品或设备固有的其它步骤或单元。
以上所揭露的仅为本发明较佳实施例而已,当然不能以此来限定本发明之权利范围,因此依本发明权利要求所作的等同变化,仍属本发明所涵盖的范围。

Claims (20)

  1. 一种微服务依赖分析方法,其特征在于,包括:
    链路服务器获取依赖分析组件,将所述依赖分析组件设置到本地中;
    获取所述依赖分析组件的触发条件,所述触发条件用于触发所述依赖分析组件对应的依赖分析任务;
    若所述触发条件为定时触发,则在当前时间戳满足定时周期参数时,触发所述依赖分析组件执行所述依赖分析任务;
    若所述触发条件为接口触发,则在请求接口中获取到分析请求时,根据所述分析请求触发所述依赖分析组件执行所述依赖分析任务。
  2. 根据权利要求1所述的方法,其特征在于,所述在获取所述依赖分析组件的触发条件之前,还包括:
    将所述依赖分析组件封装成定时任务,并为所述定时任务设置所述定时周期参数;
    根据所述定时周期参数,确定所述依赖分析组件的触发条件。
  3. 根据权利要求2所述的方法,其特征在于,所述将所述依赖分析组件封装成定时任务,并为所述定时任务设置所述定时周期参数,包括:
    基于分布式定时任务框架,将所述依赖分析组件封装成定时任务;
    根据所述分布式定时任务框架为所述定时任务分配的配置串,为所述定时任务设置所述定时周期参数。
  4. 根据权利要求1所述的方法,其特征在于,所述若所述触发条件为定时触发,则在当前时间戳满足定时周期参数时,触发所述依赖分析组件执行所述依赖分析任务,包括:
    若所述触发条件为定时触发,获取所述当前时间戳与起始时间戳,并根据所述当前时间戳与所述起始时间戳确定累计时长;
    若所述累计时长等于所述定时周期参数中的时长阈值,则通过所述定时任务触发所述依赖分析组件执行所述依赖分析任务。
  5. 根据权利要求4所述的方法,其特征在于,所述若所述累计时长等于所述定时周期参数中的时长阈值,则通过所述定时任务触发所述依赖分析组件执行所述依赖分析任务,包括:
    若所述累计时长等于所述定时周期参数中的时长阈值,则通过所述定时任务触发所述依赖分析组件获取时间范围参数;
    根据所述时间范围参数,获取所述依赖分析任务对应的依赖数据,并分析所述依赖数据。
  6. 根据权利要求1-5任一项所述的方法,其特征在于,所述请求接口为表征状态转移RESTful接口;所述若所述触发条件为接口触发,则在请求接口中获取到分析请求时,触发所述依赖分析组件执行所述依赖分析任务,包括:
    若所述触发条件为接口触发,则检测RESTful接口的调用状态;
    若所述调用状态为已调用状态,则从所述RESTful接口中获取分析请求,根据所述分析请求控制所述RESTful接口调用所述依赖分析组件,以触发所述依赖分析组件执行所述依赖分析任务。
  7. 根据权利要求1-5任一项所述的方法,其特征在于,还包括:
    在屏幕显示所述依赖分析任务的执行结果,并显示所述依赖分析任务对应的微服务之间的依赖关系。
  8. 一种微服务依赖分析装置,其特征在于,包括:
    设置模块,用于链路服务器获取依赖分析组件,将所述依赖分析组件设置到本地中;
    获取模块,用于获取所述依赖分析组件的触发条件,所述触发条件用于触发所述依赖分析组件对应的依赖分析任务;
    定时触发模块,用于若所述触发条件为定时触发,则在当前时间戳满足定时周期参数时,触发所述依赖分析组件执行所述依赖分析任务;
    请求触发模块,用于若所述触发条件为接口触发,则在请求接口中获取到分析请求时,根据所述分析请求触发所述依赖分析组件执行所述依赖分析任务。
  9. 根据权利要求8所述的装置,其特征在于,所述装置还包括:
    封装模块,用于将所述依赖分析组件封装成定时任务,并为所述定时任务设置所述定时周期参数;
    确定模块,用于根据所述定时周期参数,确定所述依赖分析组件的触发条件。
  10. 根据权利要求9所述的装置,其特征在于,所述封装模块包括:
    定时任务封装单元,用于基于分布式定时任务框架,将所述依赖分析组件封装成定时任务;
    设置单元,用于根据所述分布式定时任务框架为所述定时任务分配的配置串,为所述定时任务设置所述定时周期参数。
  11. 根据权利要求8所述的装置,其特征在于,所述定时触发模块包括:
    累计时长确定单元,用于若所述触发条件为定时触发,获取所述当前时间戳与起始时间戳,并根据所述当前时间戳与所述起始时间戳确定累计时长;
    第一执行单元,用于若所述累计时长等于所述定时周期参数中的时长阈值,则通过所述定时任务触发所述依赖分析组件执行所述依赖分析任务。
  12. 根据权利要求11所述的装置,其特征在于,所述第一执行单元包括:
    时间范围确定子单元,用于若所述累计时长等于所述定时周期参数中的时长阈值,则通过所述定时任务触发所述依赖分析组件获取时间范围参数;
    数据分析子单元,用于根据所述时间范围参数,获取所述依赖分析任务对应的依赖数据,并分析所述依赖数据。
  13. 根据权利要求8-12任一项所述的装置,其特征在于,所述请求触发模块包括:
    检测单元,用于若所述触发条件为接口触发,则检测RESTful接口的调用状态;
    第二执行单元,用于若所述调用状态为已调用状态,则从所述RESTful接口中获取分析请求,根据所述分析请求控制所述RESTful接口调用所述依赖分析组件,以触发所述依赖分析组件执行所述依赖分析任务。
  14. 根据权利要求8-12任一项所述的装置,其特征在于,所述装置还包括:
    显示模块,用于在屏幕显示所述依赖分析任务的执行结果,并显示所述依赖分析任务对应的微服务之间的依赖关系。
  15. 一种微服务依赖分析装置,其特征在于,包括:处理器和存储器;
    所述处理器和存储器相连,其中,所述存储器用于存储程序代码,所述处理器用于调用所述程序代码,以执行:
    链路服务器获取依赖分析组件,将所述依赖分析组件设置到本地中;
    获取所述依赖分析组件的触发条件,所述触发条件用于触发所述依赖分析组件对应的依赖分析任务;
    若所述触发条件为定时触发,则在当前时间戳满足定时周期参数时,触发所述依赖分析组件执行所述依赖分析任务;
    若所述触发条件为接口触发,则在请求接口中获取到分析请求时,根据所述分析请求触发所述依赖分析组件执行所述依赖分析任务。
  16. 根据权利要求15所述的装置,其特征在于,所述处理器在执行所述在获取所述依赖分析组件的触发条件之前,还用于:
    将所述依赖分析组件封装成定时任务,并为所述定时任务设置所述定时周期参数;
    根据所述定时周期参数,确定所述依赖分析组件的触发条件。
  17. 根据权利要求15所述的装置,其特征在于,所述处理器在执行所述若所述触发条件为定时触发,则在当前时间戳满足定时周期参数时,触发所述依赖分析组件执行所述依赖分析任务时,具体用于:
    若所述触发条件为定时触发,获取所述当前时间戳与起始时间戳,并根据所述当前时间戳与所述起始时间戳确定累计时长;
    若所述累计时长等于所述定时周期参数中的时长阈值,则通过所述定时任务触发所述依赖分析组件执行所述依赖分析任务。
  18. 根据权利要求15-17任一项所述的装置,所述请求接口为表征状态转移RESTful接口;所述处理器在执行所述若所述触发条件为接口触发,则在请求接口中获取到分析请求时,触发所述依赖分析组件执行所述依赖分析任务时,具体用于:
    若所述触发条件为接口触发,则检测RESTful接口的调用状态;
    若所述调用状态为已调用状态,则从所述RESTful接口中获取分析请求,根据所述分析请求控制所述RESTful接口调用所述依赖分析组件,以触发所述依赖分析组件执行所述依赖分析任务。
  19. 根据权利要求15-17任一项所述的装置,所述处理器还用于:
    在屏幕显示所述依赖分析任务的执行结果,并显示所述依赖分析任务对应的微服务之间的依赖关系。
  20. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质存储有计算机程序,所述计算机程序包括程序指令,所述程序指令当被处理器执行时,执行如权利要求1-7任一项所述的方法。
PCT/CN2019/102725 2019-05-20 2019-08-27 一种微服务依赖分析方法及装置 WO2020232871A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910420501.8A CN110244991A (zh) 2019-05-20 2019-05-20 一种微服务依赖分析方法及装置
CN201910420501.8 2019-05-20

Publications (1)

Publication Number Publication Date
WO2020232871A1 true WO2020232871A1 (zh) 2020-11-26

Family

ID=67884434

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/102725 WO2020232871A1 (zh) 2019-05-20 2019-08-27 一种微服务依赖分析方法及装置

Country Status (2)

Country Link
CN (1) CN110244991A (zh)
WO (1) WO2020232871A1 (zh)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113360282A (zh) * 2021-06-03 2021-09-07 中国工商银行股份有限公司 一种任务管理方法、装置、电子设备及存储介质
CN117311950A (zh) * 2023-11-28 2023-12-29 宁德时代新能源科技股份有限公司 任务处理方法、任务处理装置、电子设备及存储介质
CN117311950B (zh) * 2023-11-28 2024-04-26 宁德时代新能源科技股份有限公司 任务处理方法、任务处理装置、电子设备及存储介质

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112667457A (zh) * 2019-10-16 2021-04-16 烽火通信科技股份有限公司 对微服务架构下服务调用进行监控的方法及系统
CN111130908B (zh) * 2019-12-31 2022-09-06 中信百信银行股份有限公司 基于调用流量分析预测的微服务动态聚合拆分系统
CN111984346B (zh) * 2020-08-12 2023-10-27 八维通科技有限公司 微服务环境中调用链追踪的方法、系统、装置及存储介质
CN113190423B (zh) * 2021-04-20 2024-02-20 北京异乡旅行网络科技有限公司 业务数据的监控方法、装置及系统

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130311481A1 (en) * 2012-05-21 2013-11-21 International Business Machines Corporation Determining a Cause of an Incident Based on Text Analytics of Documents
CN106790718A (zh) * 2017-03-16 2017-05-31 北京搜狐新媒体信息技术有限公司 服务调用链路分析方法及系统
CN108763482A (zh) * 2018-05-25 2018-11-06 联想(北京)有限公司 用于数据分析流程调度的方法、装置和服务器集群
CN108874559A (zh) * 2018-05-31 2018-11-23 康键信息技术(深圳)有限公司 电子装置、分布式系统业务链路分析方法及存储介质
CN109756364A (zh) * 2018-12-07 2019-05-14 成都四方伟业软件股份有限公司 一种基于日志分析的微服务性能优化系统和分析方法

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102880493B (zh) * 2012-09-25 2015-04-08 南京大学 一种构件间动态依赖关系的自动分析方法
US10356213B2 (en) * 2017-03-17 2019-07-16 International Business Machines Corporation Automatic interdependency resolution for micro-service deployments
CN106980543B (zh) * 2017-04-05 2020-02-07 福建智恒软件科技有限公司 基于事件触发的分布式任务调度方法及装置

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130311481A1 (en) * 2012-05-21 2013-11-21 International Business Machines Corporation Determining a Cause of an Incident Based on Text Analytics of Documents
CN106790718A (zh) * 2017-03-16 2017-05-31 北京搜狐新媒体信息技术有限公司 服务调用链路分析方法及系统
CN108763482A (zh) * 2018-05-25 2018-11-06 联想(北京)有限公司 用于数据分析流程调度的方法、装置和服务器集群
CN108874559A (zh) * 2018-05-31 2018-11-23 康键信息技术(深圳)有限公司 电子装置、分布式系统业务链路分析方法及存储介质
CN109756364A (zh) * 2018-12-07 2019-05-14 成都四方伟业软件股份有限公司 一种基于日志分析的微服务性能优化系统和分析方法

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113360282A (zh) * 2021-06-03 2021-09-07 中国工商银行股份有限公司 一种任务管理方法、装置、电子设备及存储介质
CN113360282B (zh) * 2021-06-03 2024-04-12 中国工商银行股份有限公司 一种任务管理方法、装置、电子设备及存储介质
CN117311950A (zh) * 2023-11-28 2023-12-29 宁德时代新能源科技股份有限公司 任务处理方法、任务处理装置、电子设备及存储介质
CN117311950B (zh) * 2023-11-28 2024-04-26 宁德时代新能源科技股份有限公司 任务处理方法、任务处理装置、电子设备及存储介质

Also Published As

Publication number Publication date
CN110244991A (zh) 2019-09-17

Similar Documents

Publication Publication Date Title
WO2020232871A1 (zh) 一种微服务依赖分析方法及装置
US11659020B2 (en) Method and system for real-time modeling of communication, virtualization and transaction execution related topological aspects of monitored software applications and hardware entities
US8843684B2 (en) Performing call stack sampling by setting affinity of target thread to a current process to prevent target thread migration
US10013332B2 (en) Monitoring mobile application performance
WO2020233015A1 (zh) 一种链路跟踪方法及装置
US8799904B2 (en) Scalable system call stack sampling
US20100223446A1 (en) Contextual tracing
US7702783B2 (en) Intelligent performance monitoring of a clustered environment
US8296411B2 (en) Programmatically determining an execution mode for a request dispatch utilizing historic metrics
US10298469B2 (en) Automatic asynchronous handoff identification
US20130081001A1 (en) Immediate delay tracker tool
US9529691B2 (en) Monitoring and correlating a binary process in a distributed business transaction
US8799872B2 (en) Sampling with sample pacing
US9043652B2 (en) User-coordinated resource recovery
US8453013B1 (en) System-hang recovery mechanisms for distributed systems
US9176783B2 (en) Idle transitions sampling with execution context
US10223407B2 (en) Asynchronous processing time metrics
CN113157426B (zh) 一种任务调度方法、系统、设备及存储介质
CN111552613A (zh) 线程超时的处理方法、装置以及电子设备
CN113238815B (zh) 一种接口访问控制方法、装置、设备及存储介质
US10165074B2 (en) Asynchronous custom exit points
US9838488B2 (en) Agent asynchronous transaction monitor
US9935856B2 (en) System and method for determining end user timing
US9628544B2 (en) Distributed build and compile statistics
CN111045950A (zh) 性能问题点确定方法、装置、数据分析系统及存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19929804

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19929804

Country of ref document: EP

Kind code of ref document: A1