CN113672460B - Service monitoring method and device - Google Patents

Service monitoring method and device Download PDF

Info

Publication number
CN113672460B
CN113672460B CN202110954445.3A CN202110954445A CN113672460B CN 113672460 B CN113672460 B CN 113672460B CN 202110954445 A CN202110954445 A CN 202110954445A CN 113672460 B CN113672460 B CN 113672460B
Authority
CN
China
Prior art keywords
service
layer
party
request
electronic equipment
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
CN202110954445.3A
Other languages
Chinese (zh)
Other versions
CN113672460A (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 CN202110954445.3A priority Critical patent/CN113672460B/en
Publication of CN113672460A publication Critical patent/CN113672460A/en
Application granted granted Critical
Publication of CN113672460B publication Critical patent/CN113672460B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/302Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a software system
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3051Monitoring arrangements for monitoring the configuration of the computing system or of the computing system component, e.g. monitoring the presence of processing resources, peripherals, I/O links, software programs

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computing Systems (AREA)
  • Physics & Mathematics (AREA)
  • Quality & Reliability (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Telephone Function (AREA)
  • Telephonic Communication Services (AREA)

Abstract

The application provides a service monitoring method and a device, wherein an interface layer of electronic equipment receives a service request of a third party service, and a target service consists of at least one third party service; the interface layer uploads the service request to a service layer of the electronic device; the service layer responds to the service request, calls a third party service pointed by the service request to process the service request, and obtains monitoring data of the third party service in the process of calling the third party service to process the service request; the service layer uploads the monitoring data of the third-party service to the monitoring layer of the electronic equipment; the monitoring layer determines the service quality of the third party service based on the monitoring data of the third party service, and monitors the service condition of the third party service. And the service quality of the third party service can indicate the reason of the abnormality of the third party service, so that the abnormal third party service can be positioned through monitoring the service condition of the third party service, and the abnormal third party service can be purposefully solved based on the reason of the abnormality of the third party service.

Description

Service monitoring method and device
Technical Field
The application belongs to the technical field of anomaly monitoring, and particularly relates to a service monitoring method and device.
Background
Currently, an Application (APP) provides a plurality of services, each service is composed of a plurality of third party services, so that each service can call the third party services to realize a specific function, development cost can be reduced by calling the third party services, for example, shopping services can call third party payment services to pay, so that different shopping platforms can call the third party payment services, and each shopping platform is not required to develop payment services.
In the process of executing the service by the application program, monitoring data of the service can be returned, whether the service is abnormal or not is determined based on the monitoring data of the service, for example, response time of the service, success rate of the service and the like can be determined through the monitoring data. The monitoring data is obtained by counting the responses of all the third party services, and can reflect the service quality of the service consisting of a plurality of third party services, but cannot reflect the service quality of the third party services.
Disclosure of Invention
The application provides a service monitoring method and device.
In one aspect, the present application provides a service monitoring method, the method comprising:
the method comprises the steps that an interface layer of electronic equipment receives a service request of a third party service, a target service is composed of at least one third party service, and the service request is used for indicating to call the third party service composing the target service;
The interface layer of the electronic equipment uploads the service request to the service layer of the electronic equipment;
the service layer of the electronic equipment responds to the service request, calls a third party service pointed by the service request to process the service request, and obtains monitoring data of the third party service in the process of calling the third party service to process the service request;
the service layer of the electronic equipment uploads the monitoring data of the third party service to the monitoring layer of the electronic equipment;
and the monitoring layer of the electronic equipment determines the service quality of the third party service based on the monitoring data of the third party service, wherein the service quality of the third party service is used for indicating whether the third party service is abnormal or not and indicating the reason of the third party service abnormality when the third party service is abnormal.
Optionally, the service layer of the electronic device responds to the service request, and invoking a third party service pointed by the service request to process the service request, and in the process of invoking the third party service to process the service request, obtaining the monitoring data of the third party service includes:
the service layer of the electronic equipment analyzes the service request to determine whether annotation data are marked in the service request;
If the service layer of the electronic equipment determines that the service request is marked with annotation data, enabling proxy service of target service;
the service layer of the electronic equipment intercepts the service request through the proxy service, and sends the service request to the third party service through the proxy service so as to call the third party service to process the service request;
and the service layer of the electronic equipment receives monitoring data sent by the third party service through the proxy service in the process of calling the third party service to process the service request.
Optionally, the determining, by the monitoring layer of the electronic device, the service quality of the third party service based on the monitoring data of the third party service includes:
the monitoring layer of the electronic equipment identifies the monitoring data of the third party service and determines an error code corresponding to the third party service;
and the monitoring layer of the electronic equipment determines the abnormal type when the third party service is abnormal based on the error code.
Optionally, the method further comprises:
the interface layer of the electronic equipment receives a display request, wherein the display request carries a service identifier;
The interface layer of the electronic equipment uploads the display request to the service layer of the electronic equipment;
the service layer of the electronic equipment responds to the display request, and monitoring data of the third party service pointed by the service identifier is extracted from the monitoring layer of the electronic equipment;
the service layer of the electronic equipment uploads the monitoring data of the third party service pointed by the service identifier to the interface layer of the electronic equipment;
and the interface layer of the electronic equipment outputs the monitoring data of the third party service pointed by the service identifier.
Optionally, the method further comprises:
if the service layer of the electronic equipment detects that the running time reaches the timing time, acquiring monitoring data of at least one third party service from the monitoring layer of the electronic equipment;
the service layer of the electronic equipment uploads the acquired monitoring data to the interface layer of the electronic equipment;
and the interface layer of the electronic equipment outputs the acquired monitoring data.
Optionally, the method further comprises:
the interface layer of the electronic equipment displays a setting window;
the interface layer of the electronic equipment acquires monitoring indexes set by a user in the setting window;
And the interface layer of the electronic equipment uploads the monitoring index to the service layer of the electronic equipment, wherein the monitoring index is used for indicating the service layer of the electronic equipment to acquire monitoring data corresponding to the monitoring index from all monitoring data.
In another aspect, the present application also provides an electronic device, including: the system comprises an interface layer, a service layer and a monitoring layer;
the interface layer is used for receiving a service request of a third party service, uploading the service request to the service layer, wherein a target service consists of at least one third party service, and the service request is used for indicating to call the third party service which consists of the target service;
the service layer is used for responding to the service request, calling a third party service pointed by the service request to process the service request, acquiring monitoring data of the third party service in the process of calling the third party service to process the service request, and uploading the monitoring data of the third party service to the monitoring layer;
the monitoring layer determines the service quality of the third party service based on the monitoring data of the third party service, wherein the service quality of the third party service is used for indicating whether the third party service is abnormal or not and indicating the reason of the third party service abnormality when the third party service is abnormal.
Optionally, the service layer is configured to parse the service request to determine whether annotation data is marked in the service request, and if it is determined that annotation data is marked in the service request, enable proxy service of the target service;
the service layer is configured to intercept the service request through the proxy service, send the service request to the third party service through the proxy service, so as to invoke the third party service to process the service request, and receive, through the proxy service, monitoring data sent by the third party service in a process of invoking the third party service to process the service request.
Optionally, the interface layer is further configured to receive a display request, where the display request carries a service identifier, and upload the display request to the service layer;
the service layer is further configured to extract, from the monitoring layer of the electronic device, monitoring data of the third party service pointed by the service identifier in response to the display request, and upload the monitoring data of the third party service pointed by the service identifier to the interface layer;
and the interface layer is also used for outputting the monitoring data of the third party service pointed by the service identifier.
Optionally, the service layer is further configured to acquire monitoring data of at least one third party service from the monitoring layer if the running time reaches the timing time, and upload the acquired monitoring data to an interface layer of the electronic device;
the interface layer is also used for outputting the acquired monitoring data.
According to the service monitoring method and device, the interface layer of the electronic equipment receives the service request of the third party service, the target service is composed of at least one third party service, and the service request is used for indicating to call the third party service composing the target service; the interface layer of the electronic equipment uploads the service request to the service layer of the electronic equipment; the service layer of the electronic equipment responds to the service request, calls a third party service pointed by the service request to process the service request, and obtains monitoring data of the third party service in the process of calling the third party service to process the service request; the service layer of the electronic equipment uploads the monitoring data of the third party service to the monitoring layer of the electronic equipment; the monitoring layer of the electronic equipment determines the service quality of the third party service based on the monitoring data of the third party service, wherein the service quality of the third party service is used for indicating whether the third party service is abnormal or not and indicating the reason of the abnormality of the third party service when the third party service is abnormal, thereby realizing the monitoring of the service condition of the third party service. And the service quality of the third party service can indicate the reason of the abnormality of the third party service, so that the abnormal third party service can be positioned through monitoring the service condition of the third party service, and the abnormal third party service can be purposefully solved based on the reason of the abnormality of the third party service.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, and it is obvious that the drawings in the following description are some embodiments of the present application, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a signaling diagram of a service monitoring method according to an embodiment of the present application;
FIG. 2 is a signaling diagram of another service monitoring method according to an embodiment of the present application;
FIG. 3 is a signaling diagram of yet another service monitoring method according to an embodiment of the present application;
fig. 4 is a signaling diagram of yet another service monitoring method according to an embodiment of the present application;
fig. 5 is a schematic view of a service monitoring method according to an embodiment of the present application.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present application more apparent, the technical solutions of the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application, and it is apparent that the described embodiments are some embodiments of the present application, but not all embodiments of the present application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
Referring to fig. 1, a signaling diagram of a service monitoring method provided by an embodiment of the present application may include the following steps:
s101, an interface layer of the electronic equipment receives a service request of a third party service, wherein the target service is composed of at least one third party service, and the service request is used for indicating to call the third party service composing the target service.
In this embodiment, the APP installed in the electronic device may provide multiple target services, where at least one target service is composed of at least one third party service, for example, a current shopping service, a live broadcast service, and a video service include a payment service, and the payment service may be a third party online payment service (i.e., a third party service) to invoke the third party online payment service to implement an online payment function, and the target service and the third party service in this embodiment are not limited in what kind of service this embodiment is.
The interface layer of the electronic device can monitor the operation of the target service to intercept the service request of the third party service. The service request of the third party service can be obtained through user triggering, such as monitoring that the user triggers a request control of the third party service. If a user triggers a request control of a third party service, a service request bound by the request control is automatically triggered, and an interface layer of the electronic equipment can intercept the service request. Taking a shopping service as an example, the target service is described, and the shopping service includes a plurality of third party services such as a page display service, an address filling service, a payment service and the like. The user can initiate an online payment request when purchasing an item based on the shopping service, the online payment request is directed to the payment service to process the online payment request through the payment service, an online payment operation is performed by the payment service to complete the online payment, and the corresponding online payment request can be acquired by the interface layer.
Of course, the present embodiment can trigger the service request of the third party service in other manners, for example, a plurality of third party services in the target service may be sequentially executed, that is, after one third party service is invoked, the next third party service can be automatically triggered, so that the third party service can be automatically triggered and invoked. In such a scenario, the interface layer of the electronic device is able to intercept a service request for a third party service.
The foregoing describes, by taking the example that the user triggers the third party service and the third service automatically triggers along with the execution of the target service, that the interface layer may intercept the service request of the third party service, and the triggering manner of the third party service and the manner that the interface layer receives the service request of the third party service are not limited in this embodiment.
S102, the interface layer of the electronic equipment uploads the service request to the service layer of the electronic equipment. In this embodiment, the interface layer and the service layer are two layers in the software architecture of the electronic device, the information interaction between the interface layer and the service layer can refer to the communication protocol followed by the software architecture of the electronic device, and the interface layer and the service layer belong to the internal software layer of the electronic device, so that the probability of being attacked when the information interaction between the interface layer and the service layer is performed is low, and the security of the service request can be improved.
S103, the service layer of the electronic equipment responds to the service request, calls the third party service pointed by the service request to process the service request, and obtains monitoring data of the third party service in the process of calling the third party service to process the service request.
The third party service may be a service link in the target service, and if a certain third party service is abnormal, it is indicated that a service link of the target service is wrong, so that the target service cannot be normally executed, and therefore the third party service is related to whether the target service can be normally executed.
Taking a shopping service as an example, the shopping service includes a page display service, an address filling service, a payment service, and the like, if the shopping service initiates a payment request, the payment request directs to the payment service, the payment service is invoked to process the payment request, and the payment operation is performed by the payment request to complete the online payment. If the payment service is abnormal, the shopping service cannot be completed normally, so that whether the third party service can process the target service normally or not can be executed normally.
In this embodiment, a communication path exists between a service layer of the electronic device and a service provider of the third party service, so that the third party service can be invoked by the service layer of the electronic device, and monitoring data generated in the process of processing a service request by the same third party service can be sent to the service layer by the service provider, so that the third party service can be monitored by the monitoring data.
S104, the service layer of the electronic equipment uploads the monitoring data of the third-party service to the monitoring layer of the electronic equipment. The monitoring layer is one layer in the software architecture of the electronic equipment, the information interaction between the monitoring layer and the service layer can refer to the communication protocol followed by the software architecture of the electronic equipment, the monitoring layer and the service layer belong to the internal software layer of the electronic equipment, and the probability of being attacked is lower when the information interaction is carried out between the monitoring layer and the service layer, so that the safety of monitoring data can be improved.
S105, a monitoring layer of the electronic equipment determines service quality of the third party service based on monitoring data of the third party service, wherein the service quality of the third party service is used for indicating whether the third party service is abnormal or not, and indicating the reason of the third party service abnormality when the third party service is abnormal.
In this embodiment, one way to determine the quality of service of the third party service is: the monitoring layer of the electronic equipment identifies the monitoring data of the third party service and determines an error code corresponding to the third party service; the monitoring layer of the electronic device determines an anomaly type when the third party service is abnormal based on the error code.
Wherein the identifying of the monitoring data includes identifying a data format, a data content, etc. of the monitoring data, and determining a corresponding error code by analysis of the data format, the data content, etc. This is because the data format and the data content of the monitor data of different anomaly types may be different, for example, the data format and the data content of the error code 30005 and the error code 7610001 are different, and the present embodiment can determine the anomaly type by analyzing the data format and the data content or the like. The anomaly type can indicate the anomaly reason when the third party service is abnormal, some anomaly types can also indicate the operation of eliminating the anomaly, for example, error code 7610001 indicates that the website connection is wrong, the reason for the website connection error may be that the user uses the network excessively or the mobile phone signal is poor, the user can restart the mobile phone, if the mobile phone is restarted, the anomaly still exists, and the error code still exists at 7610001, the operation may be caused by arrears of the electronic equipment, and the user can perform cost inquiry and the like.
According to the service monitoring method, the interface layer of the electronic equipment receives the service request of the third party service, the target service is composed of at least one third party service, and the service request is used for indicating to call the third party service composing the target service; the interface layer of the electronic equipment uploads the service request to the service layer of the electronic equipment; the service layer of the electronic equipment responds to the service request, calls a third party service pointed by the service request to process the service request, and obtains monitoring data of the third party service in the process of calling the third party service to process the service request; the service layer of the electronic equipment uploads the monitoring data of the third party service to the monitoring layer of the electronic equipment; the monitoring layer of the electronic equipment determines the service quality of the third party service based on the monitoring data of the third party service, wherein the service quality of the third party service is used for indicating whether the third party service is abnormal or not and indicating the reason of the abnormality of the third party service when the third party service is abnormal, thereby realizing the monitoring of the service condition of the third party service. And the service quality of the third party service can indicate the reason of the abnormality of the third party service, so that the abnormal third party service can be positioned through monitoring the service condition of the third party service, and the abnormal third party service can be purposefully solved based on the reason of the abnormality of the third party service.
Referring to fig. 2, a signaling diagram of another service monitoring method according to an embodiment of the present application may include the following steps:
s201, an interface layer of the electronic equipment receives a service request of a third party service, wherein the target service is composed of at least one third party service, and the service request is used for indicating to call the third party service composing the target service.
S202, the interface layer of the electronic equipment uploads the service request to the service layer of the electronic equipment.
S203, the service layer of the electronic equipment analyzes the service request to determine whether annotation data are marked in the service request.
S204, if the service layer of the electronic equipment determines that the service request is marked with annotation data, enabling the proxy service of the target service. Wherein the annotation data is used to indicate a proxy service that enables the target service to intercept the service request through the proxy service and trigger the proxy service to invoke the third party service. The annotation data comprises identification information of the target service and identification information of the third party service, so that proxy service corresponding to the target service is started through the identification information of the target service, and the third party service called by the proxy service is informed through the identification information of the third party service.
One form of annotation data is as follows:
@ServiceMonitor(groupId="lego",serviceId="lego.saveAlbumCatalog"public AlbumCatalogSaveResponsesaveAlbumCatalog(AlbumCatalogalbumCatalog){
method for requesting third party services
String requestUrl=api.getLegoNewPgcUrl()+"/lego-pgc/open/album/fengan";
}。
The groupId is identification information of the third party service, which may be grouping information of the third party service, for example, groupId is a group name of the third party service, for example, group1, group2, etc., and in this embodiment, the same type of third party service is placed in the same group; the serviceId is identification information of the target service, which may be a name of the target service, and in addition, the identification information of the target service may also be used as a tag when the monitoring data is stored, so as to distinguish the monitoring data.
If any target service needs to monitor the service quality of the third party service, the annotation data is added in the service request of the third party service. After the service layer receives the service request of the third party service, the service layer analyzes that annotation data exists in the service request, and then the service layer enables proxy service.
S205, the service layer of the electronic equipment intercepts the service request through the proxy service, and sends the service request to the third party service through the proxy service so as to call the third party service to process the service request.
S206, the service layer of the electronic equipment receives monitoring data sent by the third party service through the proxy service in the process of calling the third party service to process the service request. And in the process of processing the service request by the third party service, the third party service sends the monitoring data to the proxy service, and the monitoring data of the third party service is obtained through the proxy service.
In this embodiment, the third party service may monitor whether the third party service is abnormal during the service request processing process, and when the monitoring data is sent, the monitoring data suspected to be abnormal may be obtained from all the monitoring data, and the monitoring data suspected to be abnormal is sent to the third party service, so that how the third party service obtains the monitoring data suspected to be abnormal is not described in this embodiment.
S207, the service layer of the electronic equipment uploads the monitoring data of the third-party service to the monitoring layer of the electronic equipment.
S208, the monitoring layer of the electronic equipment determines the service quality of the third party service based on the monitoring data of the third party service, wherein the service quality of the third party service is used for indicating whether the third party service is abnormal or not, and indicating the reason of the third party service abnormality when the third party service is abnormal.
According to the service monitoring method, the service layer marks annotation data in the determined service request, enables the proxy service of the target service, and receives monitoring data of the third-party service through the proxy service. If a certain third party service in the target service needs to be monitored, annotation data can be added in a service request of the third party service, modification of the target service and the third party service is not needed, and monitoring of the third party service is facilitated.
Referring to fig. 3, a signaling diagram of another service monitoring method according to an embodiment of the present application may include the following steps:
s301, an interface layer of the electronic equipment receives a service request of a third party service, wherein the target service is composed of at least one third party service, and the service request is used for indicating to call the third party service composing the target service.
S302, the interface layer of the electronic equipment uploads the service request to the service layer of the electronic equipment.
S303, the service layer of the electronic equipment responds to the service request, calls the third party service pointed by the service request to process the service request, and obtains monitoring data of the third party service in the process of calling the third party service to process the service request.
S304, the service layer of the electronic equipment uploads the monitoring data of the third-party service to the monitoring layer of the electronic equipment.
S305, a monitoring layer of the electronic equipment determines service quality of the third party service based on the monitoring data of the third party service, wherein the service quality of the third party service is used for indicating whether the third party service is abnormal or not, and indicating the reason of the third party service abnormality when the third party service is abnormal.
S306, the interface layer of the electronic equipment receives a display request, wherein the display request carries a service identifier.
The display request is used for indicating that a user views the monitoring data of the third party service so as to view the running condition of the third party service through the monitoring data of the third party service; if the monitoring data of the third party service indicates that the third party service is abnormal, the monitoring data of the third party service can be used for adjusting the third party service so as to eliminate/reduce the abnormal probability.
In this embodiment, the display request may be triggered by the user at the electronic device, for example, the user triggers a "display" control in the electronic device, and the user triggers the display request through voice, gestures, and the like; for another example, the user triggers the display request in another electronic device, where the other electronic device is located in a different area than the electronic device, to remotely trigger.
S307, the interface layer of the electronic device uploads the display request to the service layer of the electronic device.
And S308, the service layer of the electronic equipment responds to the display request, and the monitoring data of the third party service pointed by the service identifier is extracted from the monitoring layer of the electronic equipment. The service identifier may be at least one of a name of the third party service, a group name of the third party service, and the same type of third party service is placed in the same group.
When the monitoring layer of the electronic equipment stores the monitoring data of the third party service, the service identifier is used as a tag of the monitoring data, so that the monitoring data of different third party services can be distinguished through the service identifier. If the service layer receives the display request, searching the monitoring data with the service identifier in the display request as a label from all the monitoring data.
S309, the service layer of the electronic equipment uploads the monitoring data of the third party service pointed by the service identifier to the interface layer of the electronic equipment.
S310, the interface layer of the electronic equipment outputs monitoring data of the third party service pointed by the service identification.
The interface layer of the electronic device may trigger the electronic device to display the monitoring data of the third party service to which the service identification points. If the display request is triggered by other electronic equipment, the electronic equipment can send the monitoring data of the third party service pointed by the service identifier to the other electronic equipment, and the monitoring data are displayed in the other electronic equipment; the form of the electronic device sending the monitoring data to other electronic devices may be in the form of mail, short message, etc. In addition, any electronic device may display the monitoring data in the form of a chart or the like, and the present embodiment does not limit the display and transmission of the monitoring data.
According to the service monitoring method, the interface layer of the electronic equipment receives the display request, the display request carries the service identifier, and the interface layer of the electronic equipment uploads the display request to the service layer of the electronic equipment; the service layer of the electronic equipment responds to the display request, the monitoring data of the third party service pointed by the service identifier is extracted from the monitoring layer of the electronic equipment, the monitoring data of the third party service pointed by the service identifier is uploaded to the interface layer of the electronic equipment by the service layer of the electronic equipment, the monitoring data of the third party service pointed by the service identifier is output by the interface layer of the electronic equipment, and the user can trigger the display request when viewing the monitoring data of a certain third party service, so that the monitoring data of the third party service pointed by the service identifier is presented to the user.
Referring to fig. 4, a signaling diagram of still another service monitoring method according to an embodiment of the present application may include the following steps:
s401, an interface layer of the electronic equipment receives a service request of a third party service, wherein the target service is composed of at least one third party service, and the service request is used for indicating to call the third party service composing the target service.
S402, the interface layer of the electronic device uploads the service request to the service layer of the electronic device.
S403, the service layer of the electronic equipment responds to the service request, calls the third party service pointed by the service request to process the service request, and obtains monitoring data of the third party service in the process of calling the third party service to process the service request.
S404, the service layer of the electronic equipment uploads the monitoring data of the third-party service to the monitoring layer of the electronic equipment.
S405, a monitoring layer of the electronic equipment determines service quality of the third party service based on monitoring data of the third party service, wherein the service quality of the third party service is used for indicating whether the third party service is abnormal or not, and indicating the reason of the third party service abnormality when the third party service is abnormal.
S406, if the service layer of the electronic equipment detects that the running time reaches the timing time, acquiring monitoring data of at least one third party service from the monitoring layer of the electronic equipment.
In this embodiment, the timing time may be a time of triggering the display of the service quality at intervals of a certain time, that is, the monitoring data of the third party service is displayed at intervals of a certain time and triggered once, the third party service displayed each time may be the same or different, and the anomaly type corresponding to the monitoring data of the third party service displayed each time may also be the same or different.
For example, a timing task is set, the timing task is used for triggering and displaying the monitoring data of the third party service, the timing task is executed once every certain time, so that the monitoring data of the third party service can be displayed every certain time, the running time of the electronic equipment is timed in the running process of the corresponding electronic equipment, and if the running time reaches the timing time, the timing task is triggered to acquire the monitoring data of at least one third party service from the monitoring layer. The embodiment can also set task parameters of the timing task, and determine the third party service to be displayed currently and the type of abnormality to be displayed according to the task parameters.
S407, the service layer of the electronic device uploads the acquired monitoring data to the interface layer of the electronic device.
S408, the interface layer of the electronic equipment outputs the acquired monitoring data.
The interface layer of the electronic device may display the acquired monitoring data to display the monitoring data locally at the electronic device. The interface layer receives the monitoring data and then directly displays the monitoring data; or setting a time for the display, and displaying the monitoring data if the current time reaches the set time; or if the display operation of the user is monitored, the monitoring data is displayed locally. Another display mode is remote display, such as one of remote display is display in the form of a mail report, that is, monitor data of a third party service is presented in the form of a table, and the data to be presented is sent to a receiving party through mail. For example, the remote display may specify a mail template, such as specifying explanatory text, an error type description, a service name and a corresponding URL (Uniform Resource Locator ), a monitored project name, etc. in the mail, so as to implement a monitoring report for quickly accessing the third party service.
According to the service monitoring method, if the service layer of the electronic equipment detects that the running time reaches the timing time, the service layer of the electronic equipment acquires the monitoring data of at least one third party service from the monitoring layer of the electronic equipment, the service layer of the electronic equipment uploads the acquired monitoring data to the interface layer of the electronic equipment, and the interface layer of the electronic equipment outputs the acquired monitoring data to realize timing acquisition and display of the monitoring data.
In this embodiment, the service monitoring method described above may further set which monitoring data to acquire by the user, for example, the service monitoring method further includes: displaying a setting window on an interface layer of the electronic equipment; the interface layer of the electronic equipment acquires monitoring indexes set by a user in a setting window; and the interface layer of the electronic equipment uploads the monitoring index to the service layer of the electronic equipment, wherein the monitoring index is used for indicating the service layer of the electronic equipment to acquire monitoring data corresponding to the monitoring index from all monitoring data.
The setting window is provided with a text box, a user can input monitoring indexes in the text box, and the monitoring indexes can correspond to one third party service so as to set the respectively matched monitoring indexes for different third party services. The user may display some reference data, such as an identifier of the third party service and a monitoring index corresponding to the third party service, when the user inputs the monitoring index in the text box, and the user may set the monitoring index for the third party service with reference to these data. For example, the setting window has a drop-down frame, in which the identifier of the third party service and the monitoring index corresponding to the third party service are displayed, and the user can select from the drop-down frame to set monitoring on any third party service. In addition, the user can set up which monitoring data to acquire, and can set up the display mode and the transmission mode of the monitoring data, which is not described in detail in this embodiment.
In this embodiment, as shown in fig. 5, an application scenario of the service monitoring method is shown, where a software architecture of an electronic device includes an interface layer, a service layer, and a monitoring layer. The interface layer comprises large platforms for providing the third party service, and a user can initiate a service request for the third party service of the large platforms. The service layer comprises a first service component and a second service component, wherein the first service component is used for responding to the service request and calling a third party service to process the service request, and the first service component can also acquire the monitoring data exposed by the interface layer, so that the monitoring data of the third party service are acquired; the second service component is used for acquiring the monitoring data from the monitoring layer, the second service component can acquire the monitoring data when receiving a display request triggered by a user, or the interface layer is provided with a timing task, the timing task corresponds to a timing time, and if the running time of the electronic equipment reaches the timing time of the timing task, the second service component is triggered to acquire the monitoring data from the monitoring layer. Whether a user-triggered display request is received or triggered by a timed task, the second service component may extract corresponding monitoring data, such as a service identifier carried in the display request or a timed task-designated service identifier, and so on.
In addition, the first service component can provide a proxy service, the proxy service can analyze whether the service request has annotation data, if the service request has the annotation data, the proxy service can intercept the service request, and the proxy service invokes a third party service to process the service request; if the proxy service is forbidden to be used because of no annotation data in the service request, the target service directly calls the third party service, and monitoring data of the third party service is not needed to be monitored in the case. For example, the proxy service may be a qiyihao-monitor service, the second service component may provide an mp-longvideo-monitor-alert proxy service, obtain monitoring data through the mp-longvideo-monitor-alert proxy service, integrate a promethaus component in the monitoring layer, store the monitoring data by using the promethaus component, and be capable of extracting the matched monitoring data according to the service identifier, and upload the data to the second service component.
The second service component may extract monitoring data of one third party service at a time, or may extract monitoring data of a third party service in an abnormal state, for example, the second service component extracts a third party service in an abnormal state for a certain period of time, and displays the monitoring data of the abnormal third party service in a manner shown in table 1.
Table 1 monitoring data of abnormal third party services
For the foregoing method embodiments, for simplicity of explanation, the methodologies are shown as a series of acts, but one of ordinary skill in the art will appreciate that the present application is not limited by the order of acts, as some steps may, in accordance with the present application, occur in other orders or concurrently. Further, those skilled in the art will also appreciate that the embodiments described in the specification are all preferred embodiments, and that the acts and modules referred to are not necessarily required for the present application.
Corresponding to the method embodiment, the embodiment of the application also provides an electronic device, which comprises: an interface layer, a service layer, and a monitoring layer, as shown in fig. 5. The interface layer is used for receiving a service request of a third party service, uploading the service request to the service layer, wherein the target service is composed of at least one third party service, and the service request is used for indicating to call the third party service composing the target service.
And the service layer is used for responding to the service request, calling the third party service pointed by the service request to process the service request, acquiring the monitoring data of the third party service in the process of calling the third party service to process the service request, and uploading the monitoring data of the third party service to the monitoring layer.
The monitoring layer determines the service quality of the third party service based on the monitoring data of the third party service, wherein the service quality of the third party service is used for indicating whether the third party service is abnormal or not and indicating the reason of the third party service abnormality when the third party service is abnormal.
In some exemplary embodiments, the service layer is configured to parse the service request to determine whether the service request is annotated with annotation data, and if it is determined that the service request is annotated with annotation data, enable proxy services of the target service. The service layer is used for intercepting the service request through the proxy service, sending the service request to the third party service through the proxy service so as to call the third party service to process the service request, and receiving monitoring data sent by the third party service through the proxy service in the process of calling the third party service to process the service request.
In some exemplary embodiments, the interface layer is further configured to receive a display request, where the display request carries a service identifier, and upload the display request to the service layer. And the service layer is also used for responding to the display request, extracting the monitoring data of the third party service pointed by the service identifier from the monitoring layer of the electronic equipment and uploading the monitoring data of the third party service pointed by the service identifier to the interface layer. And the interface layer is also used for outputting monitoring data of the third party service pointed by the service identifier.
In some exemplary embodiments, the service layer is further configured to, if the runtime arrival timing is detected, obtain monitoring data of at least one third party service from the monitoring layer, and upload the obtained monitoring data to the interface layer of the electronic device. And the interface layer is also used for outputting the acquired monitoring data.
In some exemplary embodiments, the interface layer is further configured to display a setting window, obtain a monitoring index set by a user in the setting window, upload the monitoring index to the service layer, and the monitoring index is used to instruct the service layer to obtain monitoring data corresponding to the monitoring index from all the monitoring data.
It should be noted that, each embodiment in the present specification may be described in a progressive manner, and features described in each embodiment in the present specification may be replaced or combined with each other, and each embodiment is mainly described as different from other embodiments, and identical and similar parts between the embodiments are referred to each other. For the apparatus class embodiments, the description is relatively simple as it is substantially similar to the method embodiments, and reference is made to the description of the method embodiments for relevant points.
Finally, it is further noted that relational terms such as first and second, and the like are 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. Moreover, 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 one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
The foregoing is merely a preferred embodiment of the present application and it should be noted that modifications and adaptations to those skilled in the art may be made without departing from the principles of the present application, which are intended to be comprehended within the scope of the present application.

Claims (10)

1. A method of service monitoring, the method comprising:
the method comprises the steps that an interface layer of electronic equipment receives a service request of a third party service, a target service is composed of at least one third party service, and the service request is used for indicating to call the third party service composing the target service;
the interface layer of the electronic equipment uploads the service request to the service layer of the electronic equipment;
The service layer of the electronic equipment responds to the service request, calls a third party service pointed by the service request to process the service request, and obtains monitoring data of the third party service in the process of calling the third party service to process the service request;
the service layer of the electronic equipment uploads the monitoring data of the third party service to the monitoring layer of the electronic equipment;
and the monitoring layer of the electronic equipment determines the service quality of the third party service based on the monitoring data of the third party service, wherein the service quality of the third party service is used for indicating whether the third party service is abnormal or not and indicating the reason of the third party service abnormality when the third party service is abnormal.
2. The method of claim 1, wherein the service layer of the electronic device, in response to the service request, invoking a third party service to which the service request is directed to process the service request, and wherein obtaining the monitoring data of the third party service during invoking the third party service to process the service request comprises:
the service layer of the electronic equipment analyzes the service request to determine whether annotation data are marked in the service request;
If the service layer of the electronic equipment determines that the service request is marked with annotation data, enabling proxy service of target service;
the service layer of the electronic equipment intercepts the service request through the proxy service, and sends the service request to the third party service through the proxy service so as to call the third party service to process the service request;
and the service layer of the electronic equipment receives monitoring data sent by the third party service through the proxy service in the process of calling the third party service to process the service request.
3. The method of claim 1, wherein the monitoring layer of the electronic device determining the quality of service of the third party service based on the monitoring data of the third party service comprises:
the monitoring layer of the electronic equipment identifies the monitoring data of the third party service and determines an error code corresponding to the third party service;
and the monitoring layer of the electronic equipment determines the abnormal type when the third party service is abnormal based on the error code.
4. A method according to any one of claims 1 to 3, characterized in that the method further comprises:
The interface layer of the electronic equipment receives a display request, wherein the display request carries a service identifier;
the interface layer of the electronic equipment uploads the display request to the service layer of the electronic equipment;
the service layer of the electronic equipment responds to the display request, and monitoring data of the third party service pointed by the service identifier is extracted from the monitoring layer of the electronic equipment;
the service layer of the electronic equipment uploads the monitoring data of the third party service pointed by the service identifier to the interface layer of the electronic equipment;
and the interface layer of the electronic equipment outputs the monitoring data of the third party service pointed by the service identifier.
5. A method according to any one of claims 1 to 3, characterized in that the method further comprises:
if the service layer of the electronic equipment detects that the running time reaches the timing time, acquiring monitoring data of at least one third party service from the monitoring layer of the electronic equipment;
the service layer of the electronic equipment uploads the acquired monitoring data to the interface layer of the electronic equipment;
and the interface layer of the electronic equipment outputs the acquired monitoring data.
6. A method according to any one of claims 1 to 3, characterized in that the method further comprises:
The interface layer of the electronic equipment displays a setting window;
the interface layer of the electronic equipment acquires monitoring indexes set by a user in the setting window;
and the interface layer of the electronic equipment uploads the monitoring index to the service layer of the electronic equipment, wherein the monitoring index is used for indicating the service layer of the electronic equipment to acquire monitoring data corresponding to the monitoring index from all monitoring data.
7. An electronic device, the electronic device comprising: the system comprises an interface layer, a service layer and a monitoring layer;
the interface layer is used for receiving a service request of a third party service, uploading the service request to the service layer, wherein a target service consists of at least one third party service, and the service request is used for indicating to call the third party service which consists of the target service;
the service layer is used for responding to the service request, calling a third party service pointed by the service request to process the service request, acquiring monitoring data of the third party service in the process of calling the third party service to process the service request, and uploading the monitoring data of the third party service to the monitoring layer;
the monitoring layer determines the service quality of the third party service based on the monitoring data of the third party service, wherein the service quality of the third party service is used for indicating whether the third party service is abnormal or not and indicating the reason of the third party service abnormality when the third party service is abnormal.
8. The electronic device of claim 7, wherein the service layer is configured to parse the service request to determine whether annotation data is marked in the service request, and if it is determined that annotation data is marked in the service request, enable proxy service of the target service;
the service layer is configured to intercept the service request through the proxy service, send the service request to the third party service through the proxy service, so as to invoke the third party service to process the service request, and receive, through the proxy service, monitoring data sent by the third party service in a process of invoking the third party service to process the service request.
9. The electronic device according to claim 7 or 8, wherein the interface layer is further configured to receive a display request, where the display request carries a service identifier, and upload the display request to the service layer;
the service layer is further configured to extract, from the monitoring layer of the electronic device, monitoring data of the third party service pointed by the service identifier in response to the display request, and upload the monitoring data of the third party service pointed by the service identifier to the interface layer;
And the interface layer is also used for outputting the monitoring data of the third party service pointed by the service identifier.
10. The electronic device according to claim 7 or 8, wherein the service layer is further configured to obtain monitoring data of at least one third party service from the monitoring layer if the runtime arrival timing time is detected, and upload the obtained monitoring data to an interface layer of the electronic device;
the interface layer is also used for outputting the acquired monitoring data.
CN202110954445.3A 2021-08-19 2021-08-19 Service monitoring method and device Active CN113672460B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110954445.3A CN113672460B (en) 2021-08-19 2021-08-19 Service monitoring method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110954445.3A CN113672460B (en) 2021-08-19 2021-08-19 Service monitoring method and device

Publications (2)

Publication Number Publication Date
CN113672460A CN113672460A (en) 2021-11-19
CN113672460B true CN113672460B (en) 2023-10-03

Family

ID=78543953

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110954445.3A Active CN113672460B (en) 2021-08-19 2021-08-19 Service monitoring method and device

Country Status (1)

Country Link
CN (1) CN113672460B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115037636A (en) * 2022-06-06 2022-09-09 阿里云计算有限公司 Service quality perception method and device, electronic equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104410550A (en) * 2014-12-10 2015-03-11 深圳中兴网信科技有限公司 Web service monitoring method and web service monitoring device
CN110290212A (en) * 2019-06-28 2019-09-27 浙江大搜车软件技术有限公司 Service call recording method, device, computer equipment and storage medium
CN111198804A (en) * 2019-12-30 2020-05-26 中电工业互联网有限公司 Gateway-based industrial internet platform third-party micro-service monitoring and early warning method
CN112988520A (en) * 2021-04-22 2021-06-18 北京搜狐新媒体信息技术有限公司 Service call link monitoring method and device

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9898734B2 (en) * 2012-12-19 2018-02-20 Deutsche Telekom Ag Method and system for terminal device-based communication between third-party applications and an electronic wallet
US9558105B2 (en) * 2013-03-15 2017-01-31 Ca, Inc. Transactional boundaries for virtual model generation
KR20150075224A (en) * 2013-12-24 2015-07-03 주식회사 케이티 Apparatus and method for providing of control service

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104410550A (en) * 2014-12-10 2015-03-11 深圳中兴网信科技有限公司 Web service monitoring method and web service monitoring device
CN110290212A (en) * 2019-06-28 2019-09-27 浙江大搜车软件技术有限公司 Service call recording method, device, computer equipment and storage medium
CN111198804A (en) * 2019-12-30 2020-05-26 中电工业互联网有限公司 Gateway-based industrial internet platform third-party micro-service monitoring and early warning method
CN112988520A (en) * 2021-04-22 2021-06-18 北京搜狐新媒体信息技术有限公司 Service call link monitoring method and device

Also Published As

Publication number Publication date
CN113672460A (en) 2021-11-19

Similar Documents

Publication Publication Date Title
US10019338B1 (en) User interface with real-time visual playback along with synchronous textual analysis log display and event/time index for anomalous behavior detection in applications
US10423958B2 (en) Method, apparatus and system for voice verification
US10262341B2 (en) Resource downloading method and device
CN111522711B (en) Data monitoring processing system, method, execution end, monitoring end and electronic equipment
CA3152018A1 (en) Business parameter collecting method, device, computer equipment and storage medium
CN109005096B (en) Application interaction method and device
CN105338564B (en) A kind of client adaptation method, client, server and system
CN105553770B (en) Data acquisition control method and device
CN113672460B (en) Service monitoring method and device
WO2009145659A1 (en) Method for transmitting measured advertising and/or information and a system for carrying out said method
US9830802B2 (en) System and method for automated posting of alarm information to news feed
CN109327530B (en) Information processing method, device, electronic equipment and storage medium
CN110399723B (en) Vulnerability detection method and device, storage medium and electronic device
KR101744696B1 (en) Method, device, program and recording medium for filtering information
US9307430B1 (en) Method and system for SMS messaging verification
CN109714425A (en) Communication means and device
CN113610581A (en) Advertisement monitoring method and device and terminal
CN103577326B (en) DEBUG method and device
CN105262876A (en) Conversation processing method, method for providing number information of telephone number, and device
WO2013039833A1 (en) System and method for relating internet usage with mobile equipment
CN112671615B (en) Method, system and storage medium for collecting front-end user operation behavior data
CN109218275B (en) Application interaction method and device
CN112559278B (en) Method and device for acquiring operation data
CN115729547A (en) Method, system and device for processing buried point data, storage medium and electronic equipment
CN117155890B (en) Method and device for processing applet message and electronic equipment

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