Service monitoring method, device, computer system and medium

By monitoring the time data of the service during the process of processing requests, processing and generating a visual interface, the problem of low single-point monitoring efficiency in the prior art is solved, and rapid monitoring and analysis of the performance of multiple services is achieved.

CN113448796BActive Publication Date: 2025-02-21BEIJING WODONG TIANJUN INFORMATION TECH CO LTD +1
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202010226218.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-03-26
Publication Date
2025-02-21
Estimated Expiration
2040-03-26

AI Technical Summary

Technical Problem

The existing single-point monitoring method can only monitor the performance of one service, resulting in manual dependent services being checked in turn when a service has performance problems, which is time-consuming and inefficient.

Method used

Provide a service monitoring method, by monitoring the time data of the service during the process of processing the request, including the time when the service starts processing the request, the time when the processing is completed, the time when the dependent service is called, and the time when the dependent service returns the result, processing is processed to obtain the data. Service execution time and dependent service call time, and a visual interface is generated for analysis.

Benefits of technology

The performance monitoring and analysis of multiple services is realized, which avoids inefficient problems caused by manual troubleshooting, and services that can quickly identify performance problems and rely on services, improving monitoring efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113448796B_ABST
    Figure CN113448796B_ABST
Patent Text Reader

Abstract

The present disclosure provides a service monitoring method, wherein the service is configured to process a request and call at least one dependent service in the process of processing the request. The method comprises: monitoring the service, in response to the service receiving the request, obtaining monitoring data, the monitoring data comprising time data when the service starts to process the request, time data when the service completes processing the request, time data when the service starts to call the dependent service, and time data when the dependent service returns a result, and processing the monitoring data to obtain the service execution time of the service with respect to the request and the dependent service calling time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and more specifically, to a service monitoring method, device, computer system and medium. Background Art

[0002] With the rapid development of the Internet industry, the application of microservice architecture is becoming more and more widespread. Microservice architecture is to split multiple services that can be independently developed, designed, operated and maintained. Each service can be deployed independently and isolated from each other. Services can be called through the Application Programming Interface (API). Microservice architecture can provide services to users and meet their needs by calling dependent services.

[0003] In order to ensure the normal operation and maintenance of the microservice architecture, in related technologies, the performance of each service is usually monitored through a single-point monitoring method.

[0004] However, in the process of implementing the concept of the present invention, the inventors found that there are at least the following problems in the prior art: the single-point monitoring method can only monitor the performance of one service. When a service has poor performance problems, it is still necessary to rely on manual inspection of the dependent services of the service one by one, which is time-consuming and inefficient. Summary of the invention

[0005] In view of this, the present disclosure provides a service monitoring method, device, computer system and medium.

[0006] One aspect of the present disclosure provides a service monitoring method, wherein the service is configured to process a request and call at least one dependent service in the process of processing the request, the method comprising: monitoring the service, obtaining monitoring data in response to the service receiving the request, the monitoring data comprising time data when the service starts processing the request, time data when the service completes processing the request, time data when the service starts calling the dependent service and time data when the dependent service returns a result, and processing the monitoring data to obtain the service execution time and dependent service calling time of the service regarding the request.

[0007] According to an embodiment of the present disclosure, the method further includes: generating a visualization interface based on the service execution time and dependent service call time of the service with respect to the request, wherein the visualization interface includes chart content.

[0008] According to an embodiment of the present disclosure, the method further includes: obtaining relevant information of the monitoring data, the relevant information including at least one of identification information of the request and server information executing the service, and storing the monitoring data and the relevant information in association with each other.

[0009] According to an embodiment of the present disclosure, the associating and storing the monitoring data and the related information includes: using the identification information of the request as a key, the monitoring data and the server information as values, and associating and storing the monitoring data and the related information.

[0010] According to an embodiment of the present disclosure, the associated storage of the monitoring data and the related information includes: storing the monitoring data and the related information in an associated manner in a first memory; in response to satisfying a first condition, transferring the monitoring data and the related information to a second memory, wherein the reading and writing speeds of the second memory are lower than those of the first memory, and the first condition includes at least one of the following: the cumulative storage time of the monitoring data and the related information in the first memory reaches a first threshold; the remaining storage space of the first memory is lower than a second threshold.

[0011] According to an embodiment of the present disclosure, monitoring the service includes: setting monitoring points at specified locations of the service by setting program annotations, wherein the specified locations include an entry location of the service, an exit location of the service, an entry location for calling the dependent service, and an exit location of the dependent service.

[0012] According to an embodiment of the present disclosure, the method further includes: determining whether the service is abnormal based on the service execution time, and if the service is abnormal, checking the performance of the dependent service based on the dependent service call time.

[0013] Another aspect of the present disclosure provides a service monitoring device, wherein the service is configured to process a request and call at least one dependent service in the process of processing the request, and the device includes a monitoring module, an acquisition module, and a processing module. The monitoring module is used to monitor the service. The acquisition module is used to obtain monitoring data in response to the service receiving the request, and the monitoring data includes time data when the service starts to process the request, time data when the service completes processing the request, time data when the service starts to call the dependent service, and time data when the dependent service returns the result. The processing module is used to process the monitoring data to obtain the service execution time and dependent service call time of the service regarding the request.

[0014] According to an embodiment of the present disclosure, the device further includes: a generation module, configured to generate a visualization interface based on the service execution time and dependent service call time of the service with respect to the request, wherein the visualization interface includes chart content.

[0015] According to an embodiment of the present disclosure, the device further includes an acquisition module and a storage module. The acquisition module is used to acquire relevant information of the monitoring data, wherein the relevant information includes at least one of the identification information of the request and the server information executing the service. The storage module is used to store the monitoring data and the relevant information in association with each other.

[0016] According to an embodiment of the present disclosure, the associating and storing the monitoring data and the related information includes: using the identification information of the request as a key, and the monitoring data and the server information as values, and associating and storing the monitoring data and the related information.

[0017] According to an embodiment of the present disclosure, the associated storage of the monitoring data and the related information includes: storing the monitoring data and the related information in an associated manner in a first memory, and transferring the monitoring data and the related information to a second memory in response to satisfying a first condition, wherein the reading and writing speeds of the second memory are lower than those of the first memory, and the first condition includes at least one of the following: the cumulative storage time of the monitoring data and the related information in the first memory reaches a first threshold; the remaining storage space of the first memory is lower than a second threshold.

[0018] According to an embodiment of the present disclosure, monitoring the service includes: setting monitoring points at specified locations of the service by setting program annotations, wherein the specified locations include an entry location of the service, an exit location of the service, an entry location for calling the dependent service, and an exit location of the dependent service.

[0019] According to an embodiment of the present disclosure, the device further includes a determination module and a troubleshooting module. The determination module is used to determine whether the service is abnormal based on the service execution time. The troubleshooting module is used to troubleshoot the performance of the dependent service based on the dependent service call time when the service is abnormal.

[0020] Another aspect of the present disclosure provides a computer system, including: one or more processors, and a storage device for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors execute the method as described above.

[0021] Another aspect of the present disclosure provides a computer-readable medium storing computer-executable instructions, which are used to implement the above method when executed.

[0022] Another aspect of the present disclosure provides a computer program, which includes computer executable instructions, and the instructions are used to implement the method described above when executed. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0024] Figure 1 The application scenario of the service monitoring method and device according to the embodiment of the present disclosure is schematically shown;

[0025] Figure 2 A flow chart of a service monitoring method according to an embodiment of the present disclosure is schematically shown;

[0026] Figure 3 A monitoring diagram according to an embodiment of the present disclosure is schematically shown;

[0027] Figure 4 A schematic diagram schematically shows a visualization interface according to an embodiment of the present disclosure;

[0028] Figure 5 A block diagram schematically shows a service monitoring device according to an embodiment of the present disclosure; and

[0029] Figure 6 The block diagram of a computer system according to an embodiment of the present disclosure is schematically shown. DETAILED DESCRIPTION

[0030] Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the present disclosure. In addition, in the following description, descriptions of well-known structures and technologies are omitted to avoid unnecessary confusion of the concepts of the present disclosure.

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

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

[0033] In the case of using expressions such as "at least one of A, B, and C, etc.", it should generally be interpreted in accordance with the meaning of the expression generally understood by those skilled in the art (for example, "a system having at least one of A, B, and C" should include but not be limited to a system having A alone, B alone, C alone, A and B, A and C, B and C, and / or A, B, C, etc.). In the case of using expressions such as "at least one of A, B, or C, etc.", it should generally be interpreted in accordance with the meaning of the expression generally understood by those skilled in the art (for example, "a system having at least one of A, B, or C" should include but not be limited to a system having A alone, B alone, C alone, A and B, A and C, B and C, and / or A, B, C, etc.). Those skilled in the art should also understand that any transitional conjunctions and / or phrases that substantially indicate two or more optional items, whether in the specification, claims, or drawings, should be understood to give the possibility of including one of these items, either of these items, or both of these items. For example, the phrase "A or B" should be understood to include the possibilities of "A" or "B", or "A and B".

[0034] An embodiment of the present disclosure provides a service monitoring method, wherein the service is configured to process a request and call at least one dependent service in the process of processing the request. The method comprises: monitoring the service, in response to the service receiving a request, obtaining monitoring data, the monitoring data comprising time data when the service starts processing the request, time data when the service completes processing the request, time data when the service starts calling the dependent service, and time data when the dependent service returns a result. Furthermore, the obtained monitoring data is processed to obtain the service execution time of the service with respect to the request and the dependent service call time.

[0035] Figure 1 An application scenario 100 of the service monitoring method and apparatus according to an embodiment of the present disclosure is schematically shown.

[0036] like Figure 1 As shown, the application scenario 100 according to this embodiment may include a microservice architecture 110 and a server 120 .

[0037] The microservice architecture 110 may include multiple services, and each service may be called through an application programming interface (API). For example, service A may be used to respond to user requests and provide corresponding services to users. In addition, service A may call service B and service C in the process of processing the request.

[0038] The server 120 may be a server that provides various services. For example, the server 120 may monitor service A, receive monitoring data for service A, and analyze and process the monitoring data.

[0039] It should be noted that the service monitoring method provided in the embodiment of the present disclosure can generally be executed by the server 120. Accordingly, the service monitoring device provided in the embodiment of the present disclosure can generally be set in the server 120. The service monitoring method provided in the embodiment of the present disclosure can also be executed by a server or server cluster that is different from the server 120 and can communicate with the microservice architecture 110 and / or the server 120. Accordingly, the service monitoring device provided in the embodiment of the present disclosure can also be set in a server or server cluster that is different from the server 120 and can communicate with the microservice architecture 110 and / or the server 120.

[0040] It should be understood that Figure 1 The number of microservice architectures, services in the microservice architecture, and servers is only illustrative. Depending on the implementation requirements, there can be any number of microservice architectures, services in the microservice architecture, and servers.

[0041] Figure 2 The flowchart of the service monitoring method according to the embodiment of the present disclosure is schematically shown.

[0042] According to an embodiment of the present disclosure, a service may be configured to process a request and call at least one dependent service in the process of processing the request. For example, service A may be configured to generate a web page interface in response to a user request. In the process of processing the request, service A may call dependent service B and dependent service C to perform corresponding processing content.

[0043] like Figure 2 As shown, the method includes operations S201 to S203.

[0044] In operation S201 , a service is monitored.

[0045] According to the embodiments of the present disclosure, the services in the microservice architecture can be monitored to determine the performance of the services, thereby realizing the operation and maintenance of the microservice architecture. For example, each service in the microservice architecture can be monitored, or a specific service in the microservice architecture can be monitored, and so on.

[0046] In an embodiment of the present disclosure, monitoring a service may include: setting a monitoring point at a specified location of the service by setting a program annotation, wherein the specified location includes an entry location of the service, an exit location of the service, an entry location for calling a dependent service, and an exit location of the dependent service.

[0047] According to an embodiment of the present disclosure, a program annotation may include a name and remarks to identify relevant information of the monitoring point.

[0048] For example, when processing a related request, service A calls dependent service B. Monitoring service A may include setting monitoring points at the entry and exit positions of service A, and also setting monitoring points at the entry position (e.g., the position in service A where dependent service B is called) and the exit position (e.g., the position in service A where the result returned by dependent service B is received) of dependent service B.

[0049] For example, in the embodiment of the present disclosure, the program annotation @Monitor(name="Service A", "Provide XXX service") can be added to the entry and exit positions of service A, and the program annotation @Monitor(name="Service B", "Provide XXX service") can be added to the entry and exit positions of dependent service B. It can be understood that the program annotations of the embodiment of the present disclosure are all added to the program corresponding to service A.

[0050] In operation S202, in response to the service receiving the request, monitoring data is obtained, including the time data when the service starts processing the request, the time data when the service completes processing the request, the time data when the service starts calling the dependent service, and the time data when the dependent service returns the result.

[0051] According to the embodiment of the present disclosure, after receiving the request, the service can start to execute the program corresponding to the service to process the request. Each monitoring point can obtain the time data when the program is executed to the corresponding position.

[0052] For example, Figure 3 A monitoring diagram according to an embodiment of the present disclosure is schematically shown.

[0053] like Figure 3 As shown, in response to service A receiving the request, the program corresponding to service A starts to process the request. Then the monitoring point located at the entry position of service A can obtain the time data when service A starts to process the request, the monitoring point located at the entry position of dependent service B can obtain the time data when service A starts to call dependent service B, the monitoring point located at the exit position of dependent service B can obtain the time data when dependent service B returns the result, and the monitoring point located at the exit position of service A can obtain the time data when service A completes processing the request.

[0054] According to the embodiment of the present disclosure, the monitoring engine may, for example, generate an agent with the aid of agent technology, thereby realizing the monitoring function of each monitoring point.

[0055] In operation S203, the monitoring data is processed to obtain the service execution time and dependent service calling time of the service with respect to the request.

[0056] According to an embodiment of the present disclosure, the service execution time for the request can be determined based on the time difference between the time data when the service starts processing the request and the time data when the service completes processing the request. The call time of the dependent service can be determined based on the time difference between the time data when the service starts calling the dependent service and the time data when the dependent service returns the result.

[0057] For example, service A starts processing a request at 10000000000, service A completes processing the request at 10000000060, service A starts calling service B at 10000000020, service B returns the result at 10000000030, service A starts calling service C at 10000000040, and service C returns the result at 10000000055. For this request, the execution time of service A is 60 (nanoseconds), the calling time of service B is 10 (nanoseconds), and the calling time of service C is 15 (nanoseconds).

[0058] In the embodiment of the present disclosure, it is also possible to determine whether a service is abnormal based on the service execution time. If a service is abnormal, the performance of the dependent service is checked based on the dependent service call time.

[0059] For example, the average time for service A to process related requests is 60 nanoseconds. If the execution time for service A to process related requests is too long (for example, exceeding 50% of the average time) at one time, several times, or within a period of time, then service A can be considered abnormal. At this time, the performance of each dependent service can be determined based on the call time of each dependent service that service A depends on.

[0060] For example, service A needs to call dependent services B and C during the process of processing a request. For a certain request, the execution time of service A is 100 nanoseconds (for example, the normal range is 50-70 nanoseconds), the call time of service B is 50 nanoseconds (for example, the normal range is 5-15 nanoseconds), and the call time of service C is 15 nanoseconds (for example, the normal range is 10-20 nanoseconds). First, we can determine that service A is abnormal through the execution time of service A, and then determine that the abnormality of service A is caused by performance problems of service B through the call time of service B, so we can perform operation and maintenance on service B.

[0061] The disclosed embodiment obtains the time data of the service starting to process the request, the time data of the service completing the processing of the request, the time data of the service starting to call the dependent service, and the time data of the dependent service returning the result by monitoring the designated location of the service, and then obtains the execution time of the service processing the request and the call time of the service it depends on, so that the performance problem of the service and the service it depends on can be determined based on the execution time and the call time. The problem of manual investigation in sequence is avoided, so that the service with performance problems can be found out through the monitoring data corresponding to the service processing a request.

[0062] In the embodiment of the present disclosure, relevant information of the monitoring data may also be obtained, the relevant information including at least one of the identification information of the request and the server information executing the service, and the monitoring data and the relevant information may be stored in association. For example, the identification information of the request may be used as a key, the monitoring data and the server information may be used as values, and the monitoring data and the relevant information may be stored in association.

[0063] According to an embodiment of the present disclosure, the identification information of the request may include the service name of the service that processes the request and the timestamp corresponding to the request. For example, the identification information may be service-a-1574854329588, where service-a represents the service name of service A that processes the request, and the timestamp is 1574854329588 (nanoseconds). The server information that executes the service may be, for example, the server IP address, etc.

[0064] For example, when processing related requests, service A needs to call dependent services B and C. The name of service A is service-a, the name of service B is service-b, and the name of service C is service-c. The monitoring data includes: the time when service A started processing the request was 10000000000, the time when service A completed processing the request was 10000000060, the time when service A started calling service B was 10000000020, the time when service B returned the result was 10000000030, the time when service A started calling service C was 10000000040, and the time when service C returned the result was 10000000055. The identification information generated by service A for the request is service-a-1574854329588. The IP address of the server executing service A is 10.22.33.44.

[0065] The disclosed embodiment may store the requested identification information (service-a-1574854329588) as a key, and the relevant columns corresponding to the key may include:

[0066] 1) Column service-a-0-start (indicates the time when service A starts processing requests). The corresponding value of this column can be 10000000000;

[0067] 2) Column service-a-1-service-b-start (indicates the time when service A starts calling service B), the corresponding value of this column can be 10000000020;

[0068] 3) Column service-a-1-service-b-end (indicates the time when service B returns the result), the corresponding value of this column can be 10000000030;

[0069] 4) Column service-a-2-service-c-start (indicates the time when service A starts calling service C), the corresponding value of this column can be 10000000040;

[0070] 5) Column service-a-2-service-c-end (indicates the time when service C returns the result), the corresponding value of this column can be 10000000055;

[0071] 6) Column service-a-0-end (indicates the time when service A completes the request), the corresponding value of this column can be 10000000060;

[0072] 7) Column period-0-service-a (indicates the execution time of service A), the corresponding value of this column can be 60;

[0073] 8) Column period-1-service-b (indicates the call time of service B), the corresponding value of this column can be 10;

[0074] 9) Column period-2-service-c (indicates the call time of service C), the corresponding value of this column can be 15;

[0075] 10) Column total (indicates the total time taken by the service to process the request), the corresponding value of this column may be 60; and

[0076] 11) Column ip (IP address of the server executing service A), the corresponding value of this column can be 10.22.33.44.

[0077] In the embodiment of the present disclosure, the monitoring data and related information may be first associated and stored in a first memory, and then, in response to satisfying a first condition, the monitoring data and related information may be transferred to a second memory, wherein the read and write speed of the second memory is lower than that of the first memory. The first condition includes at least one of the following: the cumulative storage time of the monitoring data and related information in the first memory reaches a first threshold, or the remaining storage space of the first memory is lower than a second threshold.

[0078] For example, the monitoring data and related information may be temporarily stored in a memory corresponding to the request context information, or the monitoring data and related information may be temporarily stored in a cache. Then, in response to satisfying the first condition, the monitoring data and related information are transferred to a hard disk or disk for persistent storage. It is understood that the embodiment of the present disclosure can reduce the number of network transmissions by asynchronously transferring the monitoring data and related information from the first memory to the second memory, without affecting the performance of the main program, thereby improving the monitoring performance.

[0079] According to the embodiment of the present disclosure, a visualization interface may also be generated based on the service execution time of the service with respect to the request and the dependent service calling time, wherein the visualization interface includes chart content.

[0080] The visualization interface may include chart content, which may include, for example, a line chart or a bar chart, etc. The line chart or bar chart may be used to represent information such as service execution time and dependent service call time, so that users can intuitively judge the performance of each service.

[0081] For example, Figure 4 The schematic diagram of the visualization interface according to the embodiment of the present disclosure is schematically shown. In this embodiment, service A can process the relevant request and call dependent services B, C and D during the processing.

[0082] like Figure 4 As shown, the horizontal axis of the chart may represent the time when the request occurs, and the vertical axis may represent the execution time of the service and the call time of the dependent services. For example, the broken line 410 may represent the execution time of the request of service A at each time point, the columnar area 420 may represent the call time of service B, the columnar area 430 may represent the call time of service C, and the columnar area 440 may represent the call time of service D. The embodiment of the present disclosure may also display detailed information 450 of the request at a certain time point.

[0083] The disclosed embodiment obtains the time data when the service starts to process the request, the time data when the service completes the request, the time data when the service starts to call the dependent service, and the time data when the dependent service returns the result by monitoring the designated location of the service, and then obtains the execution time of the service processing the request and the call time of the service it depends on, so that the performance problem of the service and the service it depends on can be determined based on the execution time and the call time. The problem of inefficiency caused by manual sequential troubleshooting is avoided, so that the service with performance problems can be checked out through the monitoring data corresponding to the service processing a request, thereby improving the troubleshooting efficiency.

[0084] The disclosed embodiment can also generate a visual interface based on the service execution time of the service request and the dependent service call time, so that the user can intuitively judge the performance of each service, effectively improving the performance troubleshooting efficiency and user experience.

[0085] Figure 5 The block diagram of the service monitoring device 500 according to the embodiment of the present disclosure is schematically shown.

[0086] like Figure 5 As shown, the apparatus 500 includes a monitoring module 510, an obtaining module 520 and a processing module 530. The service is configured to process a request and call at least one dependent service in the process of processing the request.

[0087] The monitoring module 510 is used to monitor services.

[0088] The acquisition module 520 is used to obtain monitoring data in response to the service receiving a request. The monitoring data includes time data when the service starts processing the request, time data when the service completes processing the request, time data when the service starts calling the dependent service, and time data when the dependent service returns the result.

[0089] The processing module 530 is used to process the monitoring data to obtain the service execution time and dependent service calling time of the service with respect to the request.

[0090] According to an embodiment of the present disclosure, the apparatus 500 further includes: a generation module for generating a visualization interface based on the service execution time and dependent service call time of the service with respect to the request, wherein the visualization interface includes chart content.

[0091] According to an embodiment of the present disclosure, the device 500 further includes an acquisition module and a storage module. The acquisition module is used to acquire relevant information of the monitoring data, and the relevant information includes at least one of the requested identification information and the server information of the execution service. The storage module is used to store the monitoring data and the relevant information in association.

[0092] According to an embodiment of the present disclosure, monitoring data and related information are stored in association, including: using requested identification information as a key, monitoring data and server information as values, and storing the monitoring data and related information in association.

[0093] According to an embodiment of the present disclosure, monitoring data and related information are stored in association, including: storing the monitoring data and related information in association in a first memory, and transferring the monitoring data and related information to a second memory in response to satisfying a first condition. The read and write speed of the second memory is lower than that of the first memory. The first condition includes at least one of the following: the cumulative storage time of the monitoring data and related information in the first memory reaches a first threshold; the remaining storage space of the first memory is less than a second threshold.

[0094] According to an embodiment of the present disclosure, monitoring a service includes: setting a monitoring point at a specified location of the service by setting a program annotation, wherein the specified location includes an entry location of the service, an exit location of the service, an entry location for calling a dependent service, and an exit location of the dependent service.

[0095] According to an embodiment of the present disclosure, the device 500 further includes a determination module and a troubleshooting module. The determination module is used to determine whether a service is abnormal based on the service execution time. The troubleshooting module is used to troubleshoot the performance of the dependent service based on the dependent service call time when the service is abnormal.

[0096] According to an embodiment of the present disclosure, the apparatus 500 may, for example, execute the above reference Figure 2 The described method will not be repeated here.

[0097] According to the embodiments of the present invention, any one or more of the modules, submodules, units, and subunits, or at least part of the functions of any one of them can be implemented in one module. According to the embodiments of the present invention, any one or more of the modules, submodules, units, and subunits can be split into multiple modules for implementation. According to the embodiments of the present invention, any one or more of the modules, submodules, units, and subunits can be at least partially implemented as hardware circuits, such as field programmable gate arrays (FPGAs), programmable logic arrays (PLAs), systems on chips, systems on substrates, systems on packages, application specific integrated circuits (ASICs), or can be implemented by hardware or firmware in any other reasonable way of integrating or packaging the circuit, or implemented in any one of the three implementation methods of software, hardware, and firmware, or in any appropriate combination of any of them. Alternatively, according to the embodiments of the present invention, one or more of the modules, submodules, units, and subunits can be at least partially implemented as computer program modules, and when the computer program modules are run, the corresponding functions can be performed.

[0098] For example, the monitoring module 510, the acquisition module 520 and the processing module 530 can be combined in one module, or any one of the modules can be split into multiple modules. Alternatively, at least part of the functions of one or more of these modules can be combined with at least part of the functions of other modules and implemented in one module. According to an embodiment of the present invention, at least one of the monitoring module 510, the acquisition module 520 and the processing module 530 can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on a chip, a system on a substrate, a system on a package, an application specific integrated circuit (ASIC), or can be implemented in hardware or firmware such as any other reasonable way of integrating or packaging the circuit, or in a suitable combination of software, hardware and firmware. Alternatively, at least one of the monitoring module 510, the acquisition module 520 and the processing module 530 can be at least partially implemented as a computer program module, and when the program is run by a computer, the function of the corresponding module can be executed.

[0099] Figure 6 The block diagram of a computer system according to an embodiment of the present disclosure is schematically shown. Figure 6 The computer system shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0100] like Figure 6 As shown, the computer system 600 according to the embodiment of the present disclosure includes a processor 601, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 602 or the program loaded from the storage part 608 to the random access memory (RAM) 603. The processor 601 may include, for example, a general-purpose microprocessor (such as a CPU), an instruction set processor and / or a related chipset and / or a special-purpose microprocessor (such as an application-specific integrated circuit (ASIC)), etc. The processor 601 may also include an onboard memory for caching purposes. The processor 601 may include a processor for executing reference Figure 2 The described method flow according to the embodiment of the present disclosure may be a single processing unit or multiple processing units for different actions.

[0101] In RAM 603, various programs and data required for the operation of system 600 are stored. Processor 601, ROM 602, and RAM 603 are connected to each other via bus 604. Processor 601 executes the above-referenced functions by executing the programs in ROM 602 and / or RAM 603. Figure 2It should be noted that the program may also be stored in one or more memories other than ROM 602 and RAM 603. The processor 601 may also execute the above-referenced method by executing the program stored in one or more memories. Figure 2 Describe the method.

[0102] According to an embodiment of the present disclosure, the system 600 may further include an input / output (I / O) interface 605, which is also connected to the bus 604. The system 600 may further include one or more of the following components connected to the I / O interface 605: an input section 606 including a keyboard, a mouse, etc.; an output section 607 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 608 including a hard disk, etc.; and a communication section 609 including a network interface card such as a LAN card, a modem, etc. The communication section 609 performs communication processing via a network such as the Internet. A drive 610 is also connected to the I / O interface 605 as needed. A removable medium 611, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 610 as needed, so that a computer program read therefrom is installed into the storage section 608 as needed.

[0103] According to an embodiment of the present disclosure, the method described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 609, and / or installed from the removable medium 611. When the computer program is executed by the processor 601, the above-mentioned functions defined in the system of the embodiment of the present disclosure are executed. According to an embodiment of the present disclosure, the system, equipment, device, module, unit, etc. described above can be implemented by a computer program module.

[0104] It should be noted that the computer-readable medium shown in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the foregoing. According to an embodiment of the present disclosure, the computer-readable medium may include the ROM 602 and / or RAM 603 described above and / or one or more memories other than ROM 602 and RAM 603.

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

[0106] As another aspect, the present disclosure further provides a computer-readable medium, which may be included in the device described in the above embodiment; or may exist independently without being assembled into the device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by a device, the device executes the above method.

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

Claims

1. A service monitoring method, wherein the service is configured to process a request and call at least one dependent service in the process of processing the request, the method comprising: monitor said services; In response to the service receiving the request, obtaining monitoring data, the monitoring data including time data when the service starts processing the request, time data when the service completes processing the request, time data when the service starts calling a dependent service, and time data when the dependent service returns a result; Processing the monitoring data to obtain a service execution time of the service with respect to the request and a dependent service call time, wherein the dependent service call time is included in the service execution time of the request; Determining whether an abnormality occurs in the service based on the service execution time; In the event that the service is abnormal, checking the performance of the dependent service based on the dependent service call time; The method further comprises: Acquire relevant information of the monitoring data, the relevant information including at least one of identification information of the request and information of a server executing the service, the identification information including a service name of the service processing the request and a timestamp corresponding to the request; storing the monitoring data and the related information in association with each other in a first memory; In response to satisfying the first condition, transferring the monitoring data and the related information to a second memory, in, The reading and writing speed of the second memory is lower than that of the first memory; The first condition includes at least one of the following: the accumulated storage time of the monitoring data and the related information in the first memory reaches a first threshold; the remaining storage space of the first memory is less than a second threshold.

2. The method according to claim 1, further comprising: A visualization interface is generated based on the service execution time of the service with respect to the request and the dependent service calling time, wherein the visualization interface includes chart content.

3. The method according to claim 1, wherein: The storing the monitoring data and the related information in association with each other includes: The identification information of the request is used as a key, and the monitoring data and the server information are used as values, and the monitoring data and the related information are stored in an associated manner.

4. The method according to claim 1, wherein: The monitoring of the service comprises: Monitoring points are set at designated locations of the service by setting program annotations, wherein the designated locations include an entry location of the service, an exit location of the service, an entry location for calling the dependent service, and an exit location of the dependent service.

5. A service monitoring device, wherein the service is configured to process a request and call at least one dependent service in the process of processing the request, the device comprising: A monitoring module, used for monitoring the service; an acquisition module, configured to obtain monitoring data in response to the service receiving the request, the monitoring data including time data of when the service starts to process the request, time data of when the service completes processing the request, time data of when the service starts to call a dependent service, and time data of when the dependent service returns a result; A processing module, used for processing the monitoring data to obtain the service execution time of the service with respect to the request and the dependent service calling time, wherein the dependent service calling time is included in the service execution time of the request; The device further comprises a determination module and a troubleshooting module; wherein the determination module is used to determine whether the service is abnormal based on the service execution time; and the troubleshooting module is used to troubleshoot the performance of the dependent service based on the dependent service call time when the service is abnormal; The device also includes: an acquisition module, configured to acquire relevant information of the monitoring data, wherein the relevant information includes at least one of identification information of the request and information of a server executing the service, wherein the identification information includes a service name of the service processing the request and a timestamp corresponding to the request; storing the monitoring data and the related information in association with each other in a first memory; In response to satisfying the first condition, transferring the monitoring data and the related information to a second memory, in, The reading and writing speed of the second memory is lower than that of the first memory; The first condition includes at least one of the following: the accumulated storage time of the monitoring data and the related information in the first memory reaches a first threshold; the remaining storage space of the first memory is less than a second threshold.

6. A computer system comprising: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors execute the method according to any one of claims 1 to 4.

7. A computer-readable medium having executable instructions stored thereon, which, when executed by a processor, causes the processor to execute the method according to any one of claims 1 to 4.

Citation Information

Patent Citations

  • Monitoring of application program interface integrations

    US10176081B1