CN110430070B - Service state analysis method, device, server, data analysis equipment and medium - Google Patents

Service state analysis method, device, server, data analysis equipment and medium Download PDF

Info

Publication number
CN110430070B
CN110430070B CN201910654757.5A CN201910654757A CN110430070B CN 110430070 B CN110430070 B CN 110430070B CN 201910654757 A CN201910654757 A CN 201910654757A CN 110430070 B CN110430070 B CN 110430070B
Authority
CN
China
Prior art keywords
service
analyzed
request
server
response
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
CN201910654757.5A
Other languages
Chinese (zh)
Other versions
CN110430070A (en
Inventor
周正
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing QIYI Century Science and Technology Co Ltd
Original Assignee
Beijing QIYI Century Science and Technology Co Ltd
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 Beijing QIYI Century Science and Technology Co Ltd filed Critical Beijing QIYI Century Science and Technology Co Ltd
Priority to CN201910654757.5A priority Critical patent/CN110430070B/en
Publication of CN110430070A publication Critical patent/CN110430070A/en
Application granted granted Critical
Publication of CN110430070B publication Critical patent/CN110430070B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/12Network monitoring probes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Telephonic Communication Services (AREA)

Abstract

The embodiment of the invention provides a service state analysis method, a service state analysis device, a server, data analysis equipment and a medium, relates to the technical field of computers, and can simplify a service analysis method. The embodiment of the invention comprises the following steps: and monitoring the server within a preset time period to acquire state data of the service to be analyzed, wherein the service to be analyzed comprises a service operated by the server and/or a service called by the server. And then sending the state data to the data analysis equipment so that the data analysis equipment analyzes the state of the service to be analyzed according to the state data.

Description

Service state analysis method, device, server, data analysis equipment and medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method, an apparatus, a server, a data analysis device, and a medium for analyzing a service status.
Background
With the development of internet technology and intelligent devices, the intelligent devices provide more and more functions, and in order to implement the functions in the intelligent devices, the number of services provided in the network is also more and more. The services are often mutually called, so that the coupling between the services is serious, and if one service has a problem, a plurality of services can be unavailable.
In order to find out a service having a problem in time and repair the service having the problem, it is necessary to analyze the state of each service. In the prior art, a state analysis code is added to each service, and the service state is analyzed by obtaining data such as the success rate of a called service interface and the response time of the service to a received request through the added state analysis code.
However, the number of services in the network is huge, the workload of adding the state analysis code to the code of each service is huge, and the operation is complicated and time-consuming.
Disclosure of Invention
Embodiments of the present invention provide a service state analysis method, a service state analysis device, a server, a data analysis device, and a medium, so as to implement a simplified service analysis method. The specific technical scheme is as follows:
in a first aspect, an embodiment of the present invention provides a service state analysis method, which is applied to a probe module operated by a server, and the method includes:
monitoring the server within a preset time period, and acquiring state data of a service to be analyzed, wherein the service to be analyzed comprises a service operated by the server and/or a service called by the server;
and sending the state data to data analysis equipment so that the data analysis equipment analyzes the state of the service to be analyzed according to the state data.
Optionally, when the service to be analyzed is a service operated by the server, monitoring the server within a preset time period to obtain status data of the service to be analyzed includes:
within the preset time period, receiving a first request sent by a requester, and extracting attribute parameters of the first request, where the first request is used to request to invoke a service to be analyzed in the server, and the attribute parameters include: the identifier of the service to be analyzed and the interface identifier of the service to be analyzed requested to be called by the first request are obtained;
forwarding the first request to the service to be analyzed, and recording a first request moment for forwarding the first request;
receiving a first response aiming at the first request sent by the service to be analyzed, and recording a first response time of receiving the first response;
extracting a return code in the first response, and forwarding the first response to the requester, wherein the return code is used for representing a processing result of the service to be analyzed on the first request;
determining state data of the service to be analyzed, wherein the state data comprises: the identifier of the service to be analyzed, the interface identifier, the return code, the first request time and the first response time.
Optionally, when the service to be analyzed is the service called by the server, monitoring the server within the preset time period to obtain the status data of the service to be analyzed includes:
receiving a second request sent by any service in the server within the preset time period, and recording a second request time for receiving the second request, wherein the second request is used for requesting to call a service to be analyzed included by a receiver;
extracting attribute parameters in the second request, wherein the attribute parameters comprise: the interface identifier of the service to be analyzed, the identifier of the service to be analyzed and the identifier of the receiver, which are requested to be called by the second request;
forwarding the second request to the recipient;
receiving a second response aiming at the second request and sent by the receiver, and recording a second response time for receiving the second response;
extracting a return code in the second response, and forwarding the second response to the service sending the second request, wherein the return code is used for representing a processing result of the receiver on the second request;
determining status data of the service to be analyzed, the status data comprising: the interface identifier, the identifier of the service to be analyzed, the identifier of the receiver, the return code, the second request time and the second response time.
In a second aspect, an embodiment of the present invention provides a service state analysis method, which is applied to a data analysis device, and the method includes:
receiving state data of a service to be analyzed sent by a server, wherein the service to be analyzed comprises a service operated by the server and/or a service called by the server;
and analyzing the state of the service to be analyzed according to the state data.
Optionally, when the service to be analyzed is a service operated by the server, the state data includes: the service to be analyzed receives a first request time of a first request, a first response time of a first response to the first request, which is sent by the service to be analyzed, the return code in the first response and an interface identifier of the service to be analyzed, which is requested to be called by the first request, and the first request is used for requesting to call the service to be analyzed in the server;
the analyzing the state of the service to be analyzed according to the state data comprises:
determining the time difference between the first response time and the first request time as the duration of processing the first request by the service to be analyzed;
and determining the success rate of the interface of the service to be analyzed according to the return code and the interface identifier.
Optionally, when the service to be analyzed is a service called by the server, the state data includes: the service to be analyzed receives a second request time of a second request, a second response time of a second response to the second request sent by the service to be analyzed, a return code in the second response and an interface identifier of the service to be analyzed requested to be called by the second request, wherein the second request is used for requesting to call the service to be analyzed included in a receiver;
the analyzing the state of the service to be analyzed according to the state data comprises:
determining the difference between the second request time and the second response time as the duration of processing the second request by the service to be analyzed;
and determining the success rate of the interface of the service to be analyzed according to the return code and the interface identifier.
In a third aspect, an embodiment of the present invention provides a service status analysis apparatus, which is applied to a probe module operated by a server, where the apparatus includes:
the acquisition module is used for monitoring the server within a preset time period and acquiring the state data of the service to be analyzed, wherein the service to be analyzed comprises the service operated by the server and/or the service called by the server;
and the sending module is used for sending the state data acquired by the acquiring module to data analysis equipment so that the data analysis equipment analyzes the state of the service to be analyzed according to the state data.
Optionally, when the service to be analyzed is a service operated by the server, the obtaining module is specifically configured to:
within the preset time period, receiving a first request sent by a requester, and extracting attribute parameters of the first request, where the first request is used to request to invoke a service to be analyzed in the server, and the attribute parameters include: the identifier of the service to be analyzed and the interface identifier of the service to be analyzed requested to be called by the first request are obtained;
forwarding the first request to the service to be analyzed, and recording a first request moment for forwarding the first request;
receiving a first response aiming at the first request and sent by the service to be analyzed, and recording a first response time for receiving the first response;
extracting a return code in the first response, and forwarding the first response to the requester, wherein the return code is used for representing a processing result of the service to be analyzed on the first request;
determining status data of the service to be analyzed, the status data comprising: the identifier of the service to be analyzed, the interface identifier, the return code, the first request time and the first response time.
Optionally, when the service to be analyzed is a service called by the server, the obtaining module is specifically configured to:
within the preset time period, receiving a second request sent by any service in the server, and recording a second request moment for receiving the second request, wherein the second request is used for requesting to call a service to be analyzed included by a receiver;
extracting attribute parameters in the second request, wherein the attribute parameters comprise: the interface identifier of the service to be analyzed, the identifier of the service to be analyzed and the identifier of the receiver, which are requested to be called by the second request;
forwarding the second request to the recipient;
receiving a second response aiming at the second request sent by the receiver, and recording a second response time for receiving the second response;
extracting a return code in the second response, and forwarding the second response to the service sending the second request, wherein the return code is used for representing a processing result of the receiver on the second request;
determining status data of the service to be analyzed, the status data comprising: the interface identifier, the identifier of the service to be analyzed, the identifier of the receiver, the return code, the second request time and the second response time.
In a fourth aspect, an embodiment of the present invention provides a service status analysis apparatus, which is applied to a data analysis device, and the apparatus includes:
the system comprises a receiving module, a sending module and a receiving module, wherein the receiving module is used for receiving state data of a service to be analyzed sent by a server, and the service to be analyzed comprises a service operated by the server and/or a service called by the server;
and the analysis module is used for analyzing the state of the service to be analyzed according to the state data received by the receiving module.
Optionally, when the service to be analyzed is a service operated by the server, the state data includes: the service to be analyzed receives a first request time of a first request, a first response time of a first response to the first request, which is sent by the service to be analyzed, the return code in the first response and an interface identifier of the service to be analyzed, which is requested to be called by the first request, and the first request is used for requesting to call the service to be analyzed in the server;
the analysis module is specifically configured to:
determining the time difference between the first response time and the first request time as the duration of processing the first request for the service to be analyzed;
and determining the success rate of the interface of the service to be analyzed according to the return code and the interface identifier.
Optionally, when the service to be analyzed is a service called by the server, the state data includes: the service to be analyzed receives a second request time of a second request, a second response time of a second response to the second request, which is sent by the service to be analyzed, and a return code in the second response and an interface identifier of the service to be analyzed, which is requested to be called by the second request, and the second request is used for requesting to call the service to be analyzed, which is included in a receiver;
the analysis module is specifically configured to:
determining the difference between the second request time and the second response time as the duration of processing the second request by the service to be analyzed;
and determining the success rate of the interface of the service to be analyzed according to the return code and the interface identifier.
In a fifth aspect, an embodiment of the present invention provides a server, where the server includes a processor, a communication interface, a memory, and a communication bus, where the processor and the communication interface complete communication between the memory and the processor through the communication bus;
a memory for storing a computer program;
and a processor, configured to implement the steps of the service state analysis method according to the first aspect when executing the program stored in the memory.
In a sixth aspect, an embodiment of the present invention provides a data analysis device, where the data analysis device includes a processor, a communication interface, a memory, and a communication bus, where the processor and the communication interface complete communication between the memory and the processor through the communication bus;
a memory for storing a computer program;
and the processor is used for realizing the service state analysis method steps in the second aspect when executing the program stored in the memory.
In a seventh aspect, an embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and when being executed by a processor, the computer program implements the steps of the service status analysis method according to the first aspect.
In an eighth aspect, an embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and when being executed by a processor, the computer program implements the steps of the service status analysis method according to the second aspect.
In a ninth aspect, an embodiment of the present invention further provides a computer program product including instructions, which when run on a computer, cause the computer to perform the steps of the service state analysis method according to the first aspect.
In a tenth aspect, embodiments of the present invention further provide a computer program product containing instructions, which when run on a computer, cause the computer to perform the steps of the service state analysis method according to the second aspect.
According to the service state analysis method, the service state analysis device, the server, the data analysis equipment and the medium provided by the embodiment of the invention, the probe module in the embodiment of the invention can collect the service operated by the server where the probe program is located and the state data of the service called by the server, and send the collected state data to the data analysis equipment, so that the data analysis equipment can analyze the state of the service to be analyzed according to the state data. Therefore, the embodiment of the invention can determine the states of the services operated by the server and the services called by the server by using the probe module, and does not need to add a state analysis code in each service, so that the embodiment of the invention simplifies the service analysis method.
Of course, it is not necessary for any product or method to achieve all of the above-described advantages at the same time for practicing the invention.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below.
Fig. 1 is a schematic structural diagram of a service status analysis system according to an embodiment of the present invention;
fig. 2 is a flowchart of a service status analysis method according to an embodiment of the present invention;
FIG. 3 is a flowchart of another service status analysis method provided in the embodiment of the present invention;
fig. 4 is a flowchart of another service status analysis method according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of another service status analysis system according to an embodiment of the present invention;
fig. 6 is a flowchart of another service status analysis method according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of a service status analysis apparatus according to an embodiment of the present invention;
fig. 8 is a schematic structural diagram of another service status analysis apparatus according to an embodiment of the present invention;
fig. 9 is a schematic structural diagram of an electronic device according to an embodiment of the present invention;
fig. 10 is a schematic structural diagram of another electronic device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be described below with reference to the drawings in the embodiments of the present invention.
As shown in fig. 1, fig. 1 is a system for analyzing a service status according to an embodiment of the present invention, where the system includes: a server and a data analysis device.
In which various services, such as service 1, service 2 and service 3 in fig. 1, are running. The service running in the server can be called by other devices, and the service running in the server can also call other services.
The data analysis device is used for analyzing the state of the service. Alternatively, the data analysis device may be a data analysis server.
It should be noted that fig. 1 exemplarily shows one server and one data analysis device, and the number of the devices in the embodiment of the present application is not limited thereto.
Referring to fig. 1, the service status analysis method shown in fig. 2 is applied to a probe module operated by a server in the service status analysis system shown in fig. 1.
The probe module can also run in a container of the server or can also run in a virtual machine of the server. The probe module can be a bottom layer agent (agent) system, is an interceptor running before a main (main) method, can seamlessly access the main method, and realizes that the method of the probe module is executed firstly and then the main method is executed. It will be appreciated that the main method in embodiments of the invention may be sending or receiving a request.
The service status analysis method shown in fig. 2 includes the steps of:
step 201, monitoring the server in a preset time period, and acquiring the state data of the service to be analyzed.
The service to be analyzed comprises a service operated by the server and/or a service called by the server.
In the embodiment of the invention, the request time of the service to be analyzed for receiving the request, the response time of the response and the return code in the response can be obtained.
Wherein the return code is used for representing the processing result of the service to be analyzed on the received request.
For example, a return code of 200 indicates that the server has successfully received and successfully processed the request. The return code is 400, indicating that the processing of the request failed due to an error in the client information. The return code is 500, indicating that the processing of the request failed due to an error in the server information.
Step 202, sending status data to a data analysis system.
In the embodiment of the present invention, in the service state analysis system shown in fig. 1, after the data analysis system of the data analysis server receives the state data, the state of the service to be analyzed may be analyzed according to the state data.
According to the service state analysis method provided by the embodiment of the invention, the probe module in the embodiment of the invention can collect the service operated by the server where the probe module is located and the state data of the service called by the server, and send the collected state data to the data analysis equipment, so that the data analysis equipment can analyze the state of the service to be analyzed according to the state data. Therefore, the embodiment of the invention can determine the states of the services operated by the server and the services called by the server by using the probe module, and does not need to add a state analysis code in each service, so that the embodiment of the invention simplifies the service analysis method.
In step 201, the service to be analyzed includes two services, which are respectively: the service run by the server, and the service called by the server.
Referring to fig. 3, when the service to be analyzed is a service operated by the server, the method for acquiring the state data of the service to be analyzed in step 201 includes the following steps:
step 301, in a preset time period, receiving a first request sent by a requester, and extracting attribute parameters of the first request.
The first request is used for requesting to call a service to be analyzed in the server, and the attribute parameters comprise: the service analysis method comprises the steps of identifying the service to be analyzed and identifying an interface of the service to be analyzed requested to be called by the first request.
In embodiments of the present invention, the attribute parameters may also include other data, such as request type (e.g., GET, PUT, or DELETE). The embodiment of the present invention does not specifically limit the parameters specifically included in the attribute parameters.
It is understood that the requesting party may be another server besides the server of the service status analysis system shown in fig. 1 or another service running in the server, or an intelligent terminal used by the user, etc.
Step 302, forwarding the first request to the service to be analyzed, and recording a first request time for forwarding the first request.
It can be understood that, in the case of not considering the time consumed by transmission, the time when the first request is forwarded to the service to be analyzed is the time when the service to be analyzed receives the first request.
Step 303, receiving a first response to the first request sent by the service to be analyzed, and recording a first response time when the first response is received.
It can be understood that, each time a request is received by the server, the server allocates a thread to the server for processing the request, so that the service to be analyzed can distinguish the requests corresponding to the responses according to different threads.
And under the condition of not considering the transmission time consumption, the time when the probe module receives the first response is the time when the probe module sends the first response to the service to be analyzed.
Step 304, extracting the return code in the first response, and forwarding the first response to the requester.
The return code is used for representing the processing result of the service to be analyzed on the first request.
Step 305, determining status data of the service to be analyzed.
Wherein the status data includes: the analysis method comprises the steps of identification of a service to be analyzed, interface identification of the service to be analyzed requested to be called by a first request, a return code in a first response, a first request time and a first response time.
Referring to fig. 4, when the service to be analyzed is a service called by the server, the method for acquiring the state data of the service to be analyzed in step 201 includes the following steps:
step 401, receiving a second request sent by any service in the server within a preset time period, and recording a second request time for receiving the second request.
The second request is used for requesting to call the service to be analyzed included by the receiving party.
In the embodiment of the present invention, the receiving party may be another server in the service status analysis system, or may also be a third-party server.
It can be understood that, in the case of not considering the time consumption of data transmission, the time when the probe module receives the second request is the time when any service in the server sends the second request.
Step 402, extracting the attribute parameters in the second request.
Wherein the attribute parameters include: and the second request requests the interface identifier of the service to be analyzed, the identifier of the service to be analyzed and the identifier of the receiver to be called.
In embodiments of the present invention, the attribute parameters may also include other data, such as request type. The embodiment of the present invention does not specifically limit the parameters specifically included in the attribute parameters.
Step 403, the second request is forwarded to the receiver.
And step 404, receiving a second response to the second request sent by the receiver, and recording a second response time for receiving the second response.
It can be understood that, if the time consumed for data transmission is not considered, the time when the probe module receives the second response is the time when the receiver sends the second response.
Step 405, extracting the return code in the second response, and forwarding the second response to the service sending the second request.
And the return code is used for representing the processing result of the second request by the receiving party.
At step 406, status data of the service to be analyzed is determined.
Wherein the status data includes: the interface identification of the service to be analyzed, the identification of the receiving party, the return code in the second response, the second request time and the second response time which are requested to be called by the second request.
With reference to fig. 5, after the probe module acquires the state data of the service to be analyzed, the state data is sent to the data analysis device, the data analysis device may be the data analysis server shown in fig. 5, and referring to fig. 6, the method for the data analysis server to analyze the state of the service to be analyzed includes:
step 601, receiving the state data of the service to be analyzed sent by the server.
The service to be analyzed comprises a service operated by the server and/or a service called by the server.
Step 602, analyzing the state of the service to be analyzed according to the state data.
In the embodiment of the present invention, when the service to be analyzed is a service operated by a server, the state data of the service to be analyzed includes: the service to be analyzed receives a first request time of the first request, a first response time of a first response to the first request, which is sent by the service to be analyzed, a return code in the first response and an interface identifier requested to be called by the first request. The first request is used for requesting to call the service to be analyzed in the server.
In one embodiment, the time difference between the first request time and the first response time may be determined as a duration for the service to be analyzed to process the first request.
And determining the success rate of the interface called by the service to be analyzed according to the return code and the interface identifier.
For example, the status data includes: service to be analyzed 1, interface 1, 200 (return code); service to be analyzed 1, interface 1, 500 (return code); service to be analyzed 1, interface 1, 201 (return code); service to analyze 1, interface 1, 203 (return code). The success rate of the interface 1 of the service to be analyzed 1 is: 75 percent.
Optionally, when the service to be analyzed is a service operated by the server, the state data of the service to be analyzed may further include: an identification of the service to be analyzed, an identification of the requestor, and/or a request type of the first request.
It can be understood that each service to be analyzed can be distinguished by its identity. And determining the success rate of the service to be analyzed for processing the request type according to the return code and the request type of the first request. The method for determining the success rate of the service to be analyzed for processing a certain request type may refer to the method for determining the success rate of the interface. Whether the request sent by the requester is an Application Programming Interface (API) request can be determined according to the identifier of the requester.
For example: and determining whether the request sent by the requester is an API request or not according to the IP address of the receiver and the interface identifier called by the request.
When the service to be analyzed is a service called by the server, the state data of the service to be analyzed includes: and the service to be analyzed receives a second request time of the second request, a second response time of a second response to the second request, which is sent by the service to be analyzed, a return code in the second response and the interface identifier of the service to be analyzed, which is requested to be called by the second request. The second request is used for requesting to call the service to be analyzed included by the receiving party.
In one embodiment, a time difference between the second response time and the second request time may be determined as a duration for the service to be analyzed to process the second request. And determining the success rate of the called interface of the service to be analyzed according to the return code and the interface identifier.
Optionally, when the service to be analyzed is a service called by the server, the state data of the service to be analyzed may further include: an identification of the service to be analyzed, an identification of a server to which the service to be analyzed belongs, and/or a request type of the second request.
It can be understood that each service to be analyzed can be distinguished according to the identification of the service to be analyzed.
Whether the service to be analyzed is a third-party service can be determined according to the server identification of the receiving party.
For example, it is determined whether the service to be analyzed is a third party service according to an Internet Protocol (IP) address of the receiver server. It can be understood that the servers whose IP addresses do not belong to the intranet segment may be all third-party servers, and the service to be analyzed is operated in the third-party servers as the third-party services.
If the service to be analyzed is the third-party service, the method for determining the interface success rate can be further adopted to determine the interface success rate of the third-party service.
The method for analyzing other data in the status data of the service to be analyzed when the service to be analyzed is a service called by the server is the same as the method for analyzing other data in the status data of the service to be analyzed when the service to be analyzed is a service operated by the server, and is not described herein again.
Therefore, in the embodiment of the present invention, since the data analysis device receives the status data of each service run in the server and each service called by the server, the data analysis device can analyze the status of each service run in the server and each service called by the server, and it is not necessary to add a status analysis code in each service, so that the embodiment of the present invention simplifies the service analysis method.
In addition, in the prior art, a mode of adding a state analysis code in a service is adopted to acquire state data of the service. However, since the state analysis code cannot be added to the third-party service, the state of the third-party service cannot be analyzed in the prior art.
The embodiment of the invention can analyze the state of the third-party service, so the embodiment of the invention has wider application range.
Referring to fig. 5, after the data analysis server analyzes the status of the service to be analyzed, the analysis result may be stored in a time database (e.g., programmable intelligent font construction system (graph) or time sequence database (infiluxdb)). The monitoring server may obtain an analysis result of the service state to be analyzed from the time database.
The monitoring server may be a server installed with a visualization suite (grafana) or a monitoring system (zabbix), and various reports may be generated according to an analysis result of a service state to be analyzed.
For example, an interface success rate report is generated, as shown in table one:
watch 1
Time period Service Interface success rate
000-005 Service 1 80%
005-010 Service 2 50%
The monitoring server can also display the analysis result of the service to be analyzed, and assist the user in finding the service possibly with problems in time.
The monitoring server can also send alarm information according to the analysis result of the service to be analyzed.
For example, if a service processing request consumes too much time, the monitoring server may send alarm information to the designated terminal, so that an operator may repair the service in time according to the alarm information received by the terminal.
Referring to fig. 7, an embodiment of the present invention provides a service status analysis apparatus, which is applied to a probe module operated by a server, and includes: an acquisition module 701 and a sending module 702;
an obtaining module 701, configured to monitor a server within a preset time period, and obtain state data of a service to be analyzed, where the service to be analyzed includes a service run by the server and/or a service called by the server;
a sending module 702, configured to send the status data obtained by the obtaining module 701 to the data analysis device, so that the data analysis device analyzes the status of the service to be analyzed according to the status data.
Optionally, when the service to be analyzed is a service operated by the server, the obtaining module 701 may be specifically configured to:
within a preset time period, receiving a first request sent by a requester, and extracting attribute parameters of the first request, wherein the first request is used for requesting to call a service to be analyzed in a server, and the attribute parameters include: the service analysis method comprises the steps of identifying a service to be analyzed and an interface identifier of the service to be analyzed requested to be called by a first request;
forwarding the first request to a service to be analyzed, and recording a first request moment for forwarding the first request;
receiving a first response aiming at the first request sent by the service to be analyzed, and recording a first response time of receiving the first response;
extracting a return code in the first response, and forwarding the first response to the requester, wherein the return code is used for representing a processing result of the service to be analyzed on the first request;
determining state data of a service to be analyzed, the state data comprising: the system comprises an identifier of a service to be analyzed, an interface identifier, a return code, a first request time and a first response time.
Optionally, when the service to be analyzed is a service called by the server, the obtaining module 701 may be specifically configured to:
receiving a second request sent by any service in the server within a preset time period, and recording a second request time for receiving the second request, wherein the second request is used for requesting to call a service to be analyzed included by a receiver;
extracting attribute parameters in the second request, wherein the attribute parameters comprise: the second request requests the interface identifier of the service to be analyzed, the identifier of the service to be analyzed and the identifier of the receiver to be called;
forwarding the second request to the receiver;
receiving a second response aiming at the second request sent by the receiver, and recording a second response time for receiving the second response;
extracting a return code in the second response, and forwarding the second response to the service sending the second request, wherein the return code is used for indicating a processing result of the receiver on the second request;
determining state data of a service to be analyzed, the state data comprising: the service analysis method comprises the steps of interface identification, identification of a service to be analyzed, identification of a receiver, a return code, a second request time and a second response time.
Referring to fig. 8, an embodiment of the present invention provides a service status analysis apparatus, which is applied to a data analysis device, and includes: a receiving module 801 and an analyzing module 802;
a receiving module 801, configured to receive state data of a service to be analyzed, where the service to be analyzed includes a service run by a server and/or a service called by the server;
the analyzing module 802 is configured to analyze the status of the service to be analyzed according to the status data received by the receiving module 801.
Optionally, when the service to be analyzed is a service operated by the server, the state data includes: the method comprises the steps that the service to be analyzed receives a first request time of a first request, a first response time of a first response aiming at the first request and sent by the service to be analyzed, a return code in the first response and an interface identifier of the service to be analyzed, which is requested to be called by the first request, wherein the first request is used for requesting to call the service to be analyzed in a server;
the analysis module 802 may be specifically configured to:
determining the time difference between the first response time and the first request time as the duration of processing the first request by the service to be analyzed;
and determining the interface success rate of the service to be analyzed according to the return code and the interface identifier.
Optionally, when the service to be analyzed is a service called by the server, the state data includes: the service to be analyzed receives a second request time of a second request, a second response time of a second response aiming at the second request sent by the service to be analyzed, a return code in the second response and an interface identifier of the service to be analyzed requested to be called by the second request, wherein the second request is used for requesting to call the service to be analyzed included by the receiver;
the analysis module 802 may be specifically configured to:
determining the difference between the second request time and the second response time as the duration of processing the second request by the service to be analyzed;
and determining the interface success rate of the service to be analyzed according to the return code and the interface identifier.
The embodiment of the present invention further provides a server, as shown in fig. 9, including a processor 901, a communication interface 902, a memory 903 and a communication bus 904, where the processor 901, the communication interface 902, and the memory 903 complete mutual communication through the communication bus 904,
a memory 903 for storing computer programs;
the processor 901 is configured to implement the steps executed by the probe module run by the server in the above method embodiment when executing the program stored in the memory 903.
The embodiment of the present invention further provides a data analysis device, as shown in fig. 10, which includes a processor 1001, a communication interface 1002, a memory 1003 and a communication bus 1004, wherein the processor 1001, the communication interface 1002 and the memory 1003 complete mutual communication through the communication bus 1004,
a memory 1003 for storing a computer program;
the processor 1001 is configured to implement the steps performed by the data analysis apparatus in the foregoing method embodiments when executing the program stored in the memory 1003.
The communication bus mentioned in the electronic device may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this is not intended to represent only one bus or type of bus.
The communication interface is used for communication between the electronic equipment and other equipment.
The Memory may include a Random Access Memory (RAM) or a Non-Volatile Memory (NVM), such as at least one disk Memory. Alternatively, the memory may be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components.
In yet another embodiment provided by the present invention, a computer-readable storage medium is further provided, in which a computer program is stored, and the computer program, when executed by a processor, implements the steps performed by the probe module executed by the server in the above method embodiment.
In a further embodiment provided by the present invention, a computer-readable storage medium is also provided, in which a computer program is stored, which, when being executed by a processor, realizes the steps performed by the data analysis device in the above-mentioned method embodiment.
In a further embodiment provided by the present invention, there is also provided a computer program product comprising instructions which, when run on a computer, cause the computer to perform the method steps of the above embodiment performed by a probe module run by a server.
In a further embodiment provided by the present invention, there is also provided a computer program product comprising instructions which, when run on a computer, cause the computer to perform the method steps performed by the data analysis apparatus in the above embodiments.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the invention to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another computer readable storage medium, for example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on differences from other embodiments. In particular, for the apparatus embodiment, since it is substantially similar to the method embodiment, the description is relatively simple, and reference may be made to the partial description of the method embodiment for relevant points.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (12)

1. A service status analysis method applied to a probe module operated by a server, the method comprising:
monitoring the server within a preset time period to acquire state data of a service to be analyzed, wherein the service to be analyzed comprises a service operated by the server;
sending the state data to data analysis equipment so that the data analysis equipment analyzes the state of the service to be analyzed according to the state data;
in a preset time period, monitoring the server to obtain state data of the service to be analyzed, including:
within the preset time period, receiving a first request sent by a requester, and extracting attribute parameters of the first request, where the first request is used to request to invoke a service to be analyzed in the server, and the attribute parameters include: the identifier of the service to be analyzed and the interface identifier of the service to be analyzed requested to be called by the first request are obtained;
forwarding the first request to the service to be analyzed, and recording a first request moment for forwarding the first request;
receiving a first response aiming at the first request and sent by the service to be analyzed, and recording a first response time for receiving the first response;
extracting a return code in the first response, and forwarding the first response to the requester, wherein the return code is used for representing a processing result of the service to be analyzed on the first request;
determining state data of the service to be analyzed, wherein the state data comprises: the identifier of the service to be analyzed, the interface identifier, the return code, the first request time and the first response time.
2. The method according to claim 1, wherein the service to be analyzed further includes a service called by the server, and when the service to be analyzed is the service called by the server, the monitoring the server within the preset time period to obtain the status data of the service to be analyzed includes:
receiving a second request sent by any service in the server within the preset time period, and recording a second request time for receiving the second request, wherein the second request is used for requesting to call a service to be analyzed included by a receiver;
extracting attribute parameters in the second request, wherein the attribute parameters comprise: the interface identifier of the service to be analyzed, the identifier of the service to be analyzed and the identifier of the receiver, which are requested to be called by the second request, are obtained;
forwarding the second request to the recipient;
receiving a second response aiming at the second request sent by the receiver, and recording a second response time for receiving the second response;
extracting a return code in the second response, and forwarding the second response to the service sending the second request, wherein the return code is used for representing a processing result of the receiver on the second request;
determining state data of the service to be analyzed, wherein the state data comprises: the interface identifier, the identifier of the service to be analyzed, the identifier of the receiver, the return code, the second request time and the second response time.
3. A service state analysis method applied to a data analysis device, the method comprising:
receiving state data of a service to be analyzed, which is acquired and sent by a probe module running in a server, wherein the service to be analyzed comprises the service running in the server;
analyzing the state of the service to be analyzed according to the state data;
the status data includes: the service to be analyzed receives a first request time of a first request, a first response time of a first response aiming at the first request sent by the service to be analyzed, a return code in the first response and an interface identifier of the service to be analyzed requested to be called by the first request, wherein the first request is used for requesting to call the service to be analyzed in the server;
the analyzing the state of the service to be analyzed according to the state data comprises:
determining the time difference between the first response time and the first request time as the duration of processing the first request for the service to be analyzed;
and determining the interface success rate of the service to be analyzed according to the return code and the interface identifier.
4. The method of claim 3, wherein the service to be analyzed further comprises a service called by the server, and when the service to be analyzed is the service called by the server, the state data comprises: the service to be analyzed receives a second request time of a second request, a second response time of a second response to the second request sent by the service to be analyzed, a return code in the second response and an interface identifier of the service to be analyzed requested to be called by the second request, wherein the second request is used for requesting to call the service to be analyzed included in a receiver;
the analyzing the state of the service to be analyzed according to the state data comprises:
determining the difference between the second request time and the second response time as the duration of processing the second request by the service to be analyzed;
and determining the success rate of the interface of the service to be analyzed according to the return code and the interface identifier.
5. A service status analysis apparatus applied to a probe module operated by a server, the apparatus comprising:
the acquisition module is used for monitoring the server within a preset time period and acquiring state data of a service to be analyzed, wherein the service to be analyzed comprises a service operated by the server;
the sending module is used for sending the state data acquired by the acquiring module to data analysis equipment so that the data analysis equipment can analyze the state of the service to be analyzed according to the state data;
the acquisition module is specifically configured to:
within the preset time period, receiving a first request sent by a requester, and extracting attribute parameters of the first request, where the first request is used to request to invoke a service to be analyzed in the server, and the attribute parameters include: the identifier of the service to be analyzed and the interface identifier of the service to be analyzed requested to be called by the first request are obtained;
forwarding the first request to the service to be analyzed, and recording a first request moment for forwarding the first request;
receiving a first response aiming at the first request and sent by the service to be analyzed, and recording a first response time for receiving the first response;
extracting a return code in the first response, and forwarding the first response to the requester, wherein the return code is used for representing a processing result of the service to be analyzed on the first request;
determining status data of the service to be analyzed, the status data comprising: the identifier of the service to be analyzed, the interface identifier, the return code, the first request time and the first response time.
6. The apparatus according to claim 5, wherein the service to be analyzed further includes a service called by the server, and when the service to be analyzed is the service called by the server, the obtaining module is specifically configured to:
within the preset time period, receiving a second request sent by any service in the server, and recording a second request moment for receiving the second request, wherein the second request is used for requesting to call a service to be analyzed included by a receiver;
extracting attribute parameters in the second request, wherein the attribute parameters comprise: the interface identifier of the service to be analyzed, the identifier of the service to be analyzed and the identifier of the receiver, which are requested to be called by the second request;
forwarding the second request to the recipient;
receiving a second response aiming at the second request and sent by the receiver, and recording a second response time for receiving the second response;
extracting a return code in the second response, and forwarding the second response to the service sending the second request, wherein the return code is used for representing a processing result of the receiver on the second request;
determining state data of the service to be analyzed, wherein the state data comprises: the interface identifier, the identifier of the service to be analyzed, the identifier of the receiver, the return code, the second request time and the second response time.
7. A service status analysis apparatus applied to a data analysis device, the apparatus comprising:
the system comprises a receiving module, a processing module and a processing module, wherein the receiving module is used for receiving state data of services to be analyzed, which are acquired and sent by a probe module running in a server, and the services to be analyzed comprise services running in the server;
the analysis module is used for analyzing the state of the service to be analyzed according to the state data received by the receiving module;
the status data includes: the service to be analyzed receives a first request time of a first request, a first response time of a first response to the first request, which is sent by the service to be analyzed, the return code in the first response and an interface identifier of the service to be analyzed, which is requested to be called by the first request, and the first request is used for requesting to call the service to be analyzed in the server;
the analysis module is specifically configured to:
determining the time difference between the first response time and the first request time as the duration of processing the first request for the service to be analyzed;
and determining the success rate of the interface of the service to be analyzed according to the return code and the interface identifier.
8. The apparatus of claim 7, wherein the service to be analyzed further comprises a service called by the server, and when the service to be analyzed is the service called by the server, the state data comprises: the service to be analyzed receives a second request time of a second request, a second response time of a second response to the second request sent by the service to be analyzed, a return code in the second response and an interface identifier of the service to be analyzed requested to be called by the second request, wherein the second request is used for requesting to call the service to be analyzed included in a receiver;
the analysis module is specifically configured to:
determining the difference between the second request time and the second response time as the duration of processing the second request by the service to be analyzed;
and determining the interface success rate of the service to be analyzed according to the return code and the interface identifier.
9. The server is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor and the communication interface are used for realizing the communication between the processor and the memory through the communication bus;
a memory for storing a computer program;
a processor for implementing the method steps of claim 1 or 2 when executing a program stored in the memory.
10. The data analysis equipment is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor and the communication interface are used for realizing the communication between the processor and the memory through the communication bus;
a memory for storing a computer program;
a processor for implementing the method steps of claim 3 or 4 when executing a program stored in the memory.
11. A computer-readable storage medium, characterized in that a computer program is stored in the computer-readable storage medium, which computer program, when being executed by a processor, carries out the method steps of claim 1 or 2.
12. A computer-readable storage medium, characterized in that a computer program is stored in the computer-readable storage medium, which computer program, when being executed by a processor, carries out the method steps of claim 3 or 4.
CN201910654757.5A 2019-07-19 2019-07-19 Service state analysis method, device, server, data analysis equipment and medium Active CN110430070B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910654757.5A CN110430070B (en) 2019-07-19 2019-07-19 Service state analysis method, device, server, data analysis equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910654757.5A CN110430070B (en) 2019-07-19 2019-07-19 Service state analysis method, device, server, data analysis equipment and medium

Publications (2)

Publication Number Publication Date
CN110430070A CN110430070A (en) 2019-11-08
CN110430070B true CN110430070B (en) 2022-07-22

Family

ID=68411209

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910654757.5A Active CN110430070B (en) 2019-07-19 2019-07-19 Service state analysis method, device, server, data analysis equipment and medium

Country Status (1)

Country Link
CN (1) CN110430070B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111008066B (en) * 2019-12-09 2023-08-18 广州品唯软件有限公司 Service interface analysis system, method, interface analysis device and medium
CN113448796A (en) * 2020-03-26 2021-09-28 北京沃东天骏信息技术有限公司 Service monitoring method, device, computer system and medium
CN111506505A (en) * 2020-04-13 2020-08-07 北京奇艺世纪科技有限公司 Test case obtaining method and device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101789145A (en) * 2010-01-14 2010-07-28 中国建设银行股份有限公司 Method for monitoring health status of self-service channel business system and system therefor
CN105491143A (en) * 2015-12-15 2016-04-13 国云科技股份有限公司 Software running state monitoring system and realization method thereof
CN109739726A (en) * 2018-12-29 2019-05-10 阿里巴巴集团控股有限公司 A kind of health examination method, device and electronic equipment

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8078674B2 (en) * 2007-05-10 2011-12-13 International Business Machines Corporation Server device operating in response to received request

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101789145A (en) * 2010-01-14 2010-07-28 中国建设银行股份有限公司 Method for monitoring health status of self-service channel business system and system therefor
CN105491143A (en) * 2015-12-15 2016-04-13 国云科技股份有限公司 Software running state monitoring system and realization method thereof
CN109739726A (en) * 2018-12-29 2019-05-10 阿里巴巴集团控股有限公司 A kind of health examination method, device and electronic equipment

Also Published As

Publication number Publication date
CN110430070A (en) 2019-11-08

Similar Documents

Publication Publication Date Title
CN110430070B (en) Service state analysis method, device, server, data analysis equipment and medium
CN108255620B (en) Service logic processing method, device, service server and system
US8141151B2 (en) Non-intrusive monitoring of services in a service-oriented architecture
CN109213604B (en) Data source management method and device
CN109995612B (en) Service inspection method and device and electronic equipment
CN112506755B (en) Log acquisition method, device, computer equipment and storage medium
CN111953558A (en) Sensitive information monitoring method and device, electronic equipment and storage medium
CN111309635A (en) Test case generation method, device, server and storage medium
CN109491733B (en) Interface display method based on visualization and related equipment
CN111147310A (en) Log tracking processing method, device, server and medium
CN113010494A (en) Database auditing method and device and database proxy server
WO2019028114A1 (en) Cloud-based discovery and inventory
CN110309028B (en) Monitoring information acquisition method, service monitoring method, device and system
CN112988589A (en) Interface testing method, device and system
CN110311975B (en) Data request processing method and device
CN108390770B (en) Information generation method and device and server
CN114465919B (en) Network service testing method, system, electronic equipment and storage medium
CN114090268B (en) Container management method and container management system
CN116069591A (en) Interface performance monitoring method, device, equipment and storage medium
CN115643200A (en) Abnormity detection method, abnormity detection device, electronic equipment and medium
CN113472583B (en) Fault cause identification method, device and system
CN108763291B (en) Data management method and device and electronic equipment
CN113132431B (en) Service monitoring method, service monitoring device, electronic device, and medium
CN111651356A (en) Application program testing method, device and system
CN112714161A (en) Video access method, device and system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant