CN107846321B - Interface monitoring method and device and electronic equipment - Google Patents

Interface monitoring method and device and electronic equipment Download PDF

Info

Publication number
CN107846321B
CN107846321B CN201610833707.XA CN201610833707A CN107846321B CN 107846321 B CN107846321 B CN 107846321B CN 201610833707 A CN201610833707 A CN 201610833707A CN 107846321 B CN107846321 B CN 107846321B
Authority
CN
China
Prior art keywords
monitoring
interface
information
monitored
request
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
CN201610833707.XA
Other languages
Chinese (zh)
Other versions
CN107846321A (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.)
Alibaba Group Holding Ltd
Original Assignee
Alibaba Group Holding 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 Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201610833707.XA priority Critical patent/CN107846321B/en
Publication of CN107846321A publication Critical patent/CN107846321A/en
Application granted granted Critical
Publication of CN107846321B publication Critical patent/CN107846321B/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
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • 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
    • H04L41/0631Management of faults, events, alarms or notifications using root cause analysis; using analysis of correlation between notifications, alarms or events based on decision criteria, e.g. hierarchy, tree or time analysis
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • H04L67/025Protocols based on web technology, e.g. hypertext transfer protocol [HTTP] for remote control or remote monitoring of applications

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Environmental & Geological Engineering (AREA)
  • Debugging And Monitoring (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The application discloses a monitoring method and device of an interface and electronic equipment. The monitoring method of the interface comprises the following steps: acquiring monitoring parameters corresponding to an interface to be monitored; generating a monitoring request aiming at the interface to be monitored according to the monitoring parameters; sending the monitoring request to the interface to be monitored; and receiving response information returned by the interface based on the monitoring request. According to the technical scheme, the configured monitoring parameters are assembled according to the corresponding specifications of the interface to be monitored by the monitoring parameters configured for the interface, so that the monitoring parameters generate the monitoring request corresponding to the interface format, the monitoring process of the interface is simplified, the operation is convenient, the efficiency of the monitoring interface is improved, and the problems of high cost and low speed when the on-line service interface is monitored are solved.

Description

Interface monitoring method and device and electronic equipment
Technical Field
The present application relates to the field of communications technologies, and in particular, to a method for monitoring an interface and a method for monitoring a service interface; the application also relates to a monitoring device of the interface, a monitoring device of the service interface and an electronic device.
Background
With the rapid development of network technology, the internet has gained rapid popularity and wide application, and has become an indispensable tool in people's work and life. When communication is carried out in a network, an online service interface is generally accessed to a third party; an accessing third party may access the data through the interface. An access request can also be initiated to an interface of a third party to acquire data of the third party.
At present, in order to maintain normal access of data, monitoring of an on-line service interface is often involved; such as monitoring the performance or status of providing a particular interface. In the existing monitoring scheme for the interface, three parts are included: preparing a monitoring request, initiating the monitoring request and verifying a returned result, and a research and development worker needs to write a code for splicing parameters, initiating the request and verifying the returned result aiming at each interface.
Therefore, under the existing monitoring scheme of the interface, the monitoring process of the interface is complicated, the operation is inconvenient, and the efficiency of monitoring the interface is low. Especially, if the number of the monitored interfaces is large, the cost of writing codes for each online service interface is high, the speed is slow, and the processing burden of monitoring is heavy in this case, so that the overall management of the monitoring task of the interfaces becomes complicated.
Disclosure of Invention
The present application provides a monitoring method of an interface and a monitoring device of an interface to solve the above problems in the prior art. The application also relates to an electronic device.
The application provides a monitoring method of an interface, which comprises the following steps:
acquiring monitoring parameters corresponding to an interface to be monitored;
generating a monitoring request aiming at the interface to be monitored according to the monitoring parameters;
sending the monitoring request to the interface to be monitored;
and receiving response information returned by the interface based on the monitoring request.
Optionally, the monitoring parameters include: interface information and monitoring items.
Optionally, the interface information at least includes: name information of the interface and type identification of the interface.
Optionally, the generating a monitoring request for the interface to be monitored according to the monitoring parameter includes:
acquiring a corresponding monitoring request according to the type identification of the interface in the monitoring parameter;
and enabling the monitoring request to carry the monitoring item in the monitoring parameter.
Optionally, before the step of obtaining the monitoring parameter corresponding to the interface to be monitored, the method includes:
and configuring monitoring parameters of the interface.
Optionally, the configuring the monitoring parameters of the interface includes:
receiving name information of the interface input in a preset interface, and selecting a type identifier of the interface;
receiving a monitoring item to be monitored of the interface input in a preset interface.
Optionally, after the step of configuring the monitoring parameters of the interface, the method includes:
and storing the monitoring parameters of the interface in a configuration database.
Optionally, the monitoring parameters further include: a monitoring period;
correspondingly, before the step of obtaining the monitoring parameters corresponding to the interface to be monitored, the method includes:
starting a timer for timing refreshing time, and judging whether the time information recorded by the timer reaches the monitoring period;
if yes, executing the step of obtaining the monitoring parameters corresponding to the interface to be monitored, and refreshing the time information recorded by the timer.
Optionally, the monitoring parameters further include: checking the field;
correspondingly, when the response information returned by the interface based on the monitoring request is received, the response information also carries verification information.
Optionally, after the step of receiving the response information returned by the interface based on the monitoring request, the method includes:
judging whether a check field in the monitoring parameter corresponds to the check information or not;
if yes, storing the response information in a monitoring database;
if not, generating monitoring alarm information and sending the alarm information.
Correspondingly, this application still provides a monitoring device of interface, the monitoring device of interface includes:
the monitoring parameter acquiring unit is used for acquiring monitoring parameters corresponding to the interface to be monitored;
the monitoring request generating unit is used for generating a monitoring request aiming at the interface to be monitored according to the monitoring parameters;
a monitoring request sending unit, configured to send the monitoring request to the interface to be monitored;
and the response information receiving unit is used for receiving the response information returned by the interface based on the monitoring request.
Optionally, the monitoring parameter obtaining unit is specifically configured to obtain interface information and a monitoring item corresponding to an interface to be monitored.
Optionally, the monitoring parameter obtaining unit is specifically configured to obtain at least name information of an interface corresponding to the interface to be monitored, a type identifier of the interface, and a monitoring item.
Optionally, the monitoring request generating unit includes:
a request obtaining subunit, configured to obtain a corresponding monitoring request according to the type identifier of the interface in the monitoring parameter;
and the request generation subunit is used for enabling the monitoring request to carry the monitoring item in the monitoring parameter.
Optionally, the monitoring device of the interface further includes:
and the monitoring parameter configuration unit is used for configuring the monitoring parameters of the interface before the monitoring parameters corresponding to the interface to be monitored are obtained.
Optionally, the monitoring parameter configuration unit includes:
the interface name type receiving subunit is used for receiving the name information of the interface input in a preset interface and selecting the type identifier of the interface;
and the monitoring item receiving subunit is used for receiving the monitoring item to be monitored of the interface input in a preset interface.
Optionally, the monitoring parameter configuration unit further includes:
and the monitoring parameter storage subunit is used for storing the monitoring parameters of the interface into a configuration database after the monitoring parameters of the interface are configured.
Optionally, the monitoring parameter obtaining unit is specifically configured to obtain interface information, a monitoring item, and a monitoring period corresponding to an interface to be monitored;
correspondingly, the method also comprises the following steps:
a timer starting unit, configured to start a timer for timing refresh time before the monitoring parameter corresponding to the interface to be monitored is obtained, and determine whether time information recorded by the timer reaches the monitoring period;
and the monitoring parameter acquisition triggering unit is used for receiving the judgment result of the timer starting unit, if so, triggering the monitoring parameter acquisition unit and refreshing the time information recorded by the timer.
Optionally, the monitoring parameter obtaining unit is specifically configured to obtain interface information, a monitoring item, and a check field corresponding to an interface to be monitored;
correspondingly, the response information receiving unit is specifically configured to receive, when receiving the response information returned by the interface based on the monitoring request, the verification information carried in the response information.
Optionally, the monitoring device of the interface further includes:
a check information determining unit, configured to determine, after receiving response information returned by the interface based on the monitoring request, whether a check field in the monitoring parameter corresponds to the check information;
the response information storage unit is used for receiving the judgment result of the verification information judgment unit, and if the judgment result is positive, the response information is stored in a monitoring database;
and the warning information generating unit is used for receiving the judgment result of the checking information judging unit, if not, generating monitoring warning information and sending the warning information.
In addition, the present application also provides an electronic device, including:
a display;
a processor;
the memory is used for storing an interface monitoring program, and when the program is read and executed by the processor, the program executes the following operation of acquiring monitoring parameters corresponding to an interface to be monitored; generating a monitoring request aiming at the interface to be monitored according to the monitoring parameters; sending the monitoring request to the interface to be monitored; and receiving response information returned by the interface based on the monitoring request.
In addition, the present application provides a method for monitoring a service interface, where the method for monitoring a service interface includes:
acquiring a monitoring parameter corresponding to a service interface to be monitored;
generating a monitoring request aiming at the service interface to be monitored according to the monitoring parameters;
sending the monitoring request to the service interface to be monitored;
and receiving response information returned by the service interface based on the monitoring request.
Optionally, the service interface includes: the method is applied to service interfaces of voyages.
Optionally, the monitoring parameters include: service interface information and monitoring items.
Optionally, the service interface information at least includes: name information of the service interface and a type identifier of the service interface;
the monitoring item at least comprises: interface performance parameters, response time, and feedback-based flight information query over the service interface.
Optionally, the flight information includes: travel routes, travel attractions, and flight information.
Optionally, the generating a monitoring request for the service interface to be monitored according to the monitoring parameter includes:
acquiring a corresponding monitoring request according to the type identification of the service interface in the monitoring parameter;
and enabling the monitoring request to carry the monitoring item in the monitoring parameter.
Correspondingly, the present application further provides a monitoring device for a service interface, where the monitoring device for a service interface includes:
the monitoring parameter acquiring unit is used for acquiring monitoring parameters corresponding to the service interface to be monitored;
a monitoring request generating unit, configured to generate a monitoring request for the service interface to be monitored according to the monitoring parameter;
a monitoring request sending unit, configured to send the monitoring request to the service interface to be monitored;
and the response information receiving unit is used for receiving the response information returned by the service interface based on the monitoring request.
Optionally, the monitoring parameter obtaining unit is specifically configured to obtain a monitoring parameter corresponding to a flight service interface to be monitored.
Optionally, the monitoring parameter obtaining unit is specifically configured to obtain service interface information and a monitoring item corresponding to a service interface to be monitored.
Optionally, the monitoring parameter obtaining unit is specifically configured to obtain at least name information of a service interface corresponding to a service interface to be monitored and a type identifier of the service interface; and service interface performance parameters, response time and flight information fed back based on service interface inquiry.
Optionally, the monitoring parameter obtaining unit obtains flight information based on service interface query feedback, including: travel routes, travel attractions, and flight information.
Optionally, the monitoring request generating unit includes:
a request obtaining subunit, configured to obtain a corresponding monitoring request according to the type identifier of the service interface in the monitoring parameter;
and the request generation subunit is used for enabling the monitoring request to carry the monitoring item in the monitoring parameter.
Compared with the prior art, the method has the following advantages:
according to the monitoring method and device for the interface and the electronic equipment, the monitoring parameters corresponding to the interface to be monitored are obtained; generating a monitoring request aiming at the interface to be monitored according to the monitoring parameters; sending the monitoring request to the interface to be monitored; and receiving response information returned by the interface based on the monitoring request. According to the technical scheme, the configured monitoring parameters are assembled according to the corresponding specifications of the interface to be monitored by the monitoring parameters configured for the interface, so that the monitoring parameters generate the monitoring request corresponding to the interface format, the monitoring process of the interface is simplified, the operation is convenient, the efficiency of the monitoring interface is improved, and the problems of high cost and low speed when the on-line service interface is monitored are solved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments described in the present application, and other drawings can be obtained by those skilled in the art according to the drawings.
Fig. 1 shows a flow chart of a monitoring method of an interface provided according to an embodiment of the present application;
FIG. 2 illustrates a schematic diagram of a monitoring interface provided in accordance with an embodiment of the present application;
FIG. 3 illustrates a flow diagram of monitoring parameters of a configuration interface provided in accordance with an embodiment of the present application;
FIG. 4 illustrates a flow chart provided in accordance with an embodiment of the present application for determining whether time information recorded by a timer reaches a monitoring period;
FIG. 5 illustrates a flow diagram for generating a monitoring request for an interface to be monitored according to monitoring parameters, provided in accordance with an embodiment of the present application;
fig. 6 shows a flowchart for determining whether a check field in a monitoring parameter corresponds to check information according to an embodiment of the present application;
FIG. 7 shows a schematic diagram of a monitoring device of an interface provided according to an embodiment of the present application;
FIG. 8 shows a schematic view of an electronic device provided in accordance with an embodiment of the present application;
FIG. 9 shows a flow diagram of a method of monitoring a traffic interface provided in accordance with an embodiment of the present application;
fig. 10 shows a schematic diagram of a monitoring device of a traffic interface provided according to an embodiment of the present application.
Detailed Description
In order that the above objects, features and advantages of the present application can be more clearly understood, the present application will be described in further detail with reference to the accompanying drawings and specific embodiments. It should be noted that the embodiments and features of the embodiments of the present application may be combined with each other without conflict.
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present application. This application is capable of implementation in many different ways than those herein set forth and of similar import by those skilled in the art without departing from the spirit and scope of this application, and it is therefore not limited to the specific implementations disclosed below.
The embodiment of the application provides a monitoring method of an interface and a monitoring method of a service interface; the application also relates to a monitoring device of the interface, a monitoring device of the service interface and an electronic device. Details are described in the following examples one by one.
At present, in order to maintain normal access of data, monitoring of an on-line service interface is often involved; such as monitoring the performance or status of providing a particular interface. In the existing monitoring scheme for the interface, three parts are included: preparing a monitoring request, initiating the monitoring request and verifying a returned result, and requiring a developer to write a code for splicing the parameters, initiating the request and verifying the returned result aiming at each interface. Therefore, under the existing monitoring scheme of the interface, the monitoring process of the interface is more complicated, the operation is inconvenient, and the efficiency of monitoring the interface is low. Especially, if the number of the monitored interfaces is large, the cost of writing codes for each online service interface is high, the speed is slow, and the processing load of monitoring is heavy in this case, so that the overall management of the monitoring task of the interfaces becomes complicated. Aiming at the problem, according to the technical scheme, the configured monitoring parameters are assembled according to the corresponding specifications of the interface to be monitored by the monitoring parameters configured for the interface, so that the monitoring parameters generate the monitoring request corresponding to the interface format, the monitoring process of the interface is simplified, the operation is convenient, the efficiency of the monitoring interface is improved, and the problems of high cost and low speed when the on-line service interface is monitored are solved.
The embodiment of the application provides an interface monitoring method. The monitoring method of the interface comprises the following steps:
please refer to fig. 1 and fig. 2, which respectively show a flowchart of a monitoring method of an interface provided according to an embodiment of the present application and a schematic diagram of a monitoring interface provided according to an embodiment of the present application;
the monitoring method of the interface comprises the following steps:
step S101, acquiring monitoring parameters corresponding to the interface to be monitored.
In this embodiment, the obtaining of the monitoring parameter corresponding to the interface to be monitored may be implemented by the following method: and acquiring the monitoring parameters corresponding to the interface from a configuration database according to the name of the interface to be monitored.
In this embodiment, the preset monitoring parameters of each interface may be obtained from the configuration database. The monitoring parameters described in the embodiments of the present application include at least two aspects: interface information and monitoring items. The interface information is basic information of the interface, and at least comprises name information of the interface and a type identifier of the interface, wherein the name information of the interface can be single interface name information, and can also be a combination of the interface name and the type attribute of the interface; the monitoring item is as follows: the interface is the specific object being monitored. For example: the monitoring item may include: a combination of on-line interface performance monitoring, on-line interface availability monitoring, or on-line interface response time monitoring, etc.
It can be understood that the monitoring parameters of the interface are various, and one item, a combination of several items or other monitoring items can be selected from the monitoring items according to the specific needs in use. The above-mentioned settings of the monitoring items are all modifications of the specific embodiments, which do not depart from the core of the present application, and therefore all fall within the scope of the present application.
Because the monitoring parameters corresponding to the interface are obtained from the configuration database, the obtaining of the monitoring parameters corresponding to the interface to be monitored includes the following two ways according to the different storage ways of the monitoring parameters in the configuration database:
the first is that: if the interface information and the monitoring items in the monitoring parameters are respectively stored in different database tables in a configuration database, respectively acquiring the interface information of the interface and the monitoring items of the interface from the database tables, and taking the acquired interface information of the interface and the monitoring items of the interface as the monitoring parameters of the interface.
For example: and if the interface information and the monitoring items in the monitoring parameters are respectively stored in an interface information table and a monitoring table in a configuration database, inquiring the interface information table according to the name of the interface to be monitored, acquiring a record corresponding to the name of the interface to be monitored, inquiring the monitoring table according to the name, and acquiring a record corresponding to the name of the interface to be monitored.
Secondly, the following steps: if the interface information and the monitoring items in the monitoring parameters are stored in the same database table in a configuration database, reading records from the database table, acquiring the interface information of the interface and the monitoring items of the interface, and taking the acquired interface information of the interface and the monitoring items of the interface as the monitoring parameters of the interface.
For example: and if the interface information and the monitoring items in the monitoring parameters are stored in an interface information table in a configuration database, inquiring the interface information table through the name of the interface to be monitored, and acquiring a record corresponding to the name of the interface to be monitored.
In order to obtain the monitoring parameters corresponding to each interface when step S101 is executed, before the monitoring parameters corresponding to the interface to be monitored are obtained in step S101, the monitoring parameters of each interface need to be configured in advance, and the configuration of the monitoring parameters of the interface may be implemented in the following manner: inputting name information of each interface, type identification of the interface and a monitoring item.
The monitoring parameters of the configuration interface specifically include steps S100-1 to S100-2, which are further described below with reference to fig. 3.
Referring to fig. 3, a flow diagram of monitoring parameters of a configuration interface provided according to an embodiment of the present application is shown.
The monitoring parameters of the configuration interface comprise:
and S100-1, receiving the name information of the interface input in a preset interface, and selecting the type identifier of the interface.
In this embodiment, the receiving of the name information of the interface input in the preset interface and the selecting of the type identifier of the interface may be implemented in the following manner: starting a preset interface configuration page, receiving name information of an interface input in the page by a user in the page, and selecting a type identifier of the interface from interface types displayed in the page after the name information of the interface is input.
It should be noted that the preset interface configuration page may be a page in a web browser, or may be a display page of an application program.
In specific implementation, the receiving of the name information of the interface input in the preset interface may be in a manner of displaying a text input box. Specifically, a text input box can be displayed in a display area in a preset page, and data information input by a user through an external input device (keyboard) is received; the type identifier of the selection interface can select the control by displaying the corresponding identifier. The identification selection control may include a variety of forms, such as: and if the displayed identification selection control is in a drop-down list or table form, the step receives the selection operation of the user on the type identification of the interface displayed in the list or table. For example: the type identification of the exposed interface is single-clicked through an external input device (mouse).
It can be understood that since interfaces can be classified into four limited categories from the broad category: the remote call interface, the data query interface, the file type interface and the data communication interface, so the type identifier of the interface displayed in the identifier selection control in the step is the remote call, the data query file type and the data communication.
And S100-2, receiving a monitoring item to be monitored of the interface input in a preset interface.
In this embodiment, the receiving of the monitoring item to be monitored, which is input in the preset interface, of the interface may be implemented in the following manner: and receiving a monitoring item to be monitored of the interface input in the page by a user in a running preset interface configuration page.
In a specific implementation, the receiving of the monitoring item to be monitored of the interface input in the preset interface may be in a manner of displaying a text input box. Specifically, a text input box may be displayed in a display area in a preset page, and data information input by a user through an external input device (keyboard) may be received.
In order to enable the monitoring parameters of the configured interface to be used repeatedly, and avoid the need of repeatedly configuring the monitoring parameters each time the interface is monitored, the monitoring parameters of the interface need to be stored in a configuration database after the step of configuring the monitoring parameters of the interface.
It should be noted that, when storing the monitoring parameters of the interface, one of the following two ways may be adopted:
the first is that: and respectively storing the name information, the type identifier and the monitoring item of the configured interface in different database tables in a configuration database.
For example: storing the name information and the type identification of the interface in an interface information table in a configuration database, wherein the interface information table at least comprises: the name information of the interface and the type identification of the interface are two fields; and enabling the monitoring items of the interface to be in a monitoring table in a configuration database, wherein the monitoring table at least comprises: the method comprises two fields of interface name information and monitoring items, wherein the name information field of the interface in the monitoring table corresponds to the name information field of the interface in the interface information table, and then the name information field of the interface in the monitoring table is used as an external key of the interface information table.
It should be noted that the definition of the foreign key is mainly to maintain the integrity of the database, and the foreign key is used for association with another database table. Is a field that can determine another database table record for maintaining data consistency.
Secondly, the following steps: and storing the name information, the type identification and the monitoring item of the configured interface in the same database table in a configuration database.
For example: storing the name information, the type identifier and the monitoring item of the interface in an interface information table in a configuration database, wherein the interface information table at least comprises: name information of the interface and monitoring items.
In order to enable the monitoring parameters of the configured interface to be used repeatedly, a specific interface can be monitored for multiple times, the situation that the monitoring parameters need to be configured repeatedly when the interface is monitored every time is avoided, and when the monitoring parameters of the interface are configured, the configured monitoring parameters of the interface also comprise a monitoring period.
It will be appreciated that the monitoring period is the time interval during which the interface is monitored. The monitoring period may be preset empirically by a person skilled in the art, for example: 1 minute, 5 minutes, or 10 minutes, etc.
If the monitoring parameters further include a monitoring period when the monitoring parameters of the interface are configured, after the step S100-2 is executed to receive the monitoring item to be monitored of the interface input in the preset interface, the monitoring period of the interface input in the preset interface needs to be received.
In this embodiment, the receiving of the monitoring period of the interface input in the preset interface may be implemented in the following manner: and receiving the monitoring period of the interface input in the page by a user in a running preset interface configuration page.
In a specific implementation, the receiving of the monitoring period of the interface input in the preset interface may be in a manner of displaying a text input box. Specifically, a text input box may be displayed in a display area in a preset page, and data information input by a user through an external input device (keyboard) may be received.
Since the monitoring period of the interface is configured when the monitoring parameter of the interface is configured, and correspondingly, the monitoring of the interface is triggered by timing the monitoring period, before the step S101 is executed to obtain the monitoring parameter corresponding to the interface to be monitored, the steps S100-3 to S100-4 are specifically included, which is further described below with reference to fig. 4.
Referring to fig. 4, a flowchart for determining whether time information recorded by a timer reaches a monitoring period is shown according to an embodiment of the present application.
And step S100-3, starting a timer for timing refreshing time, and judging whether the time information recorded by the timer reaches the monitoring period.
In this embodiment, the starting of the timer for timing the refresh time, and determining whether the time information recorded by the timer reaches the monitoring period, may be implemented as follows: starting a timer used for timing and refreshing time in a system, acquiring the length of time information recorded by the timer in real time, and judging whether the time information recorded by the timer reaches the monitoring period.
It will be appreciated that the monitoring period may be preset empirically by one skilled in the art, for example: 1 minute, 5 minutes, or 10 minutes, etc. Taking 1 minute as an example, after a timer for timing and refreshing time in a system is started, the length of time information recorded by the timer is acquired in real time, whether the time information recorded by the timer reaches 1 minute or not is judged, if yes, the step S100-4 is executed,
and S100-4, if yes, executing the step of acquiring the monitoring parameters corresponding to the interface to be monitored, and refreshing the time information recorded by the timer.
The step of receiving the judgment result in the step of S100-3, if the length of the time information recorded by the timer in real time reaches 1 minute, executing the step of obtaining the monitoring parameter corresponding to the interface to be monitored, and refreshing the time information recorded by the timer.
In this embodiment, the step of obtaining the monitoring parameter corresponding to the interface to be monitored and the step of refreshing the time information recorded by the timer may be implemented in the following manner: and triggering and executing the step S101 to acquire the monitoring parameters corresponding to the interface to be monitored, and clearing the time information recorded in the timer.
In order to be able to verify the correctness of the monitoring data of the interface, when configuring the monitoring parameters of the interface, the configured monitoring parameters of the interface further include a check field.
It can be understood that the check field is a field for checking the response information returned after monitoring the interface. The check field can be set to any field according to different interfaces. For example: the check field may be set to have a status value, not be empty in the returned response message, or be set according to the type of information collected by the particular interface.
If the monitoring parameters further include a check field when the monitoring parameters of the interface are configured, after the step S100-2 is executed to receive the monitoring item to be monitored of the interface input in the preset interface, the check field of the interface input in the preset interface needs to be received.
In this embodiment, the receiving of the check field of the interface input in the preset interface may be implemented in the following manner: and receiving a check field of the interface input in the page by a user in a running preset interface configuration page.
In a specific implementation, the receiving of the check field of the interface input in the preset interface may be in a manner of displaying a text input box. Specifically, a text input box may be displayed in a display area in a preset page, and data information input by a user through an external input device (keyboard) may be received.
It should be noted that, when configuring the monitoring parameters of the interface, in addition to configuring the interface information and the monitoring items, the monitoring period of the interface may be configured, or the check field of the interface may be configured, or the monitoring period and the check field of the interface may be configured at the same time, which is not limited herein.
Step S103, generating a monitoring request aiming at the interface to be monitored according to the monitoring parameters.
In this embodiment, the generating of the monitoring request for the interface to be monitored according to the monitoring parameter may be implemented in the following manner: and splicing the acquired monitoring parameters into a preset monitoring request corresponding to the interface to generate a monitoring request of the interface to be monitored.
It should be noted that, the different interfaces correspond to different interface access requests (monitoring requests), that is: each interface can only recognize and receive access requests corresponding to the type or form of the interface, and the interfaces can be divided into four limited types from the broad category: the remote call interface, the data query interface, the file class interface, and the data communication interface, so a monitoring request corresponding to the specification of each interface type and lacking specific parameters can be generated in advance.
It can be understood that, when configuring the monitoring parameters of the interface, the name information of the configured interface, the type identifier of the interface, and the monitoring item only include corresponding parameter names or specific parameter values, so when executing step S103 to generate the monitoring request for the interface to be monitored according to the monitoring parameters, the monitoring parameters are put into the monitoring request which is generated in advance and corresponds to the specification of each interface type and lacks specific parameters, so as to generate the monitoring request for the interface to be monitored, and the generating of the monitoring request for the interface to be monitored according to the monitoring parameters specifically includes steps S103-1 to S103-2, which is further described below with reference to fig. 5.
Referring to fig. 5, a flowchart of generating a monitoring request for an interface to be monitored according to a monitoring parameter according to an embodiment of the present application is shown.
The generating of the monitoring request for the interface to be monitored according to the monitoring parameters includes:
step S103-1, acquiring a corresponding monitoring request according to the type identification of the interface in the monitoring parameter.
For example: and if the type identifier of the interface in the monitoring parameters is the type of other interfaces, acquiring a corresponding monitoring request, which is generated in advance, corresponds to the specification of the data query interface and lacks specific parameters.
And step S103-2, enabling the monitoring request to carry the monitoring item in the monitoring parameter.
In this embodiment, the enabling of the monitoring request to carry the monitoring item in the monitoring parameter may be implemented in the following manner: and putting the parameter name or the specific parameter value of the monitoring item in the monitoring parameters into the monitoring request which is acquired in the step S103-1 and lacks the specific parameters.
It should be noted that, if a check field of an interface is also configured when the monitoring parameter is configured, the monitoring request also needs to be made to carry the check field in the monitoring parameter when step S103-2 is executed.
Step S105, sending the monitoring request to the interface to be monitored.
In this embodiment, the sending of the monitoring request to the interface to be monitored may be implemented in the following manner: and after the connection is carried out through network protocols such as TCP/IP connection and the like, the monitoring request is sent to the interface to be monitored. For example: and sending the monitoring request to the interface to be monitored through the Ethernet.
It should be noted that the network may be an ethernet or an internal bus (e.g., PCIe bus).
And step S107, receiving response information returned by the interface based on the monitoring request.
In this embodiment, the receiving of the response information returned by the interface based on the monitoring request may be implemented in the following manner: and after the connection is carried out through network protocols such as TCP/IP connection and the like, response information returned by the interface based on the monitoring request is received.
It should be noted that the response information includes: and the interface acquires the monitoring data corresponding to the monitoring item according to the monitoring item in the monitoring request. For example: and if the monitoring item is the response time monitoring of the online interface, the returned response information is the response time (300ms) of the interface.
It will be appreciated that corresponding but different parameters are included in the monitoring request and response information. At the same time, there may be some parameters in common between the monitoring request and the response message, such as: type identification of the interface, name information of the interface, and the like.
In order to be able to check the correctness of the monitoring data of the interface, when the monitoring parameters of the interface are configured, the configured monitoring parameters of the interface may further include a check field, and if the monitoring request carries the check field in the monitoring parameters in step S103, when the response information returned by the interface based on the monitoring request is received in step S107, the check information carried in the response information also needs to be checked.
The verifying the verification information carried in the response information specifically includes steps S108-1 to S108-3, which will be further described with reference to fig. 6.
Referring to fig. 6, it shows that whether the check field in the monitoring parameter corresponds to the check information is determined according to an embodiment of the present application.
The verifying the verification information carried in the response information includes:
step S108-1, judging whether the check field in the monitoring parameter corresponds to the check information.
In this embodiment, it is determined whether conditions corresponding to the check information are different according to differences of check fields in the monitoring parameters, and specifically, if the check fields have status values, it is determined whether the check fields (status values) in the response information returned after the monitoring request monitors the interface have status values;
if the check field is that the returned response information is not empty, judging whether the returned response information is empty or not after the monitoring request monitors the interface;
and if the check field is set according to the type of the information acquired by the specific interface, judging whether response information returned after the monitoring request monitors the interface corresponds to the type of the acquired information.
It can be understood that after the check field is set to have a status value, after the monitoring request monitors the interface, if the monitoring is successful, the check field (status value) in the returned response message has a status value; if the monitoring fails, the check field in the returned response information is empty;
after the response information with the check field returned is not empty, monitoring the interface by the monitoring request, and if the monitoring is successful, at least including the monitoring data corresponding to the monitoring item in the returned response information; if the monitoring fails, monitoring data corresponding to the monitoring item may not be acquired in the returned response information, that is: the response message is null;
the check field is set according to the type of information collected by a specific interface, for example: if the system is a navigation system, the information collected by the interface may be travel information, and if the location of the travel information is sea island, the type of the information collected in the returned response information must be sea island.
And S108-2, if yes, storing the response information in a monitoring database.
This step receives the determination result in step S108-1, and if the check field in the monitoring parameter corresponds to the check information, the step of storing the response information in the monitoring database is performed.
In this embodiment, the monitoring database may be a database different from the configuration database, or the response information may be stored in the configuration database, but the response information is stored in a monitoring corresponding data table in the configuration database.
And S108-3, if not, generating monitoring alarm information and sending the alarm information.
The step of receiving the judgment result in the step of S108-1, if the check field in the monitoring parameter does not correspond to the check information, executing the step of generating monitoring alarm information and sending the alarm information.
In this embodiment, the generating of the monitoring alarm information and the sending of the alarm information may be implemented by: and generating alarm information with the content of the failure monitoring, and sending the alarm information in a mode of notifying an email.
In practical application, besides the method of using the announcement mail, at least any one of the following items can be used:
voice alarm or pop-up alarm box, etc.
Wherein, under the condition of voice alarm, the abnormality of the prior service interface can be prompted; alternatively, information indicating the occurrence of an abnormal condition may be presented. Under the condition of popping up the alarm frame, the information of abnormal conditions of the online service interface can be prompted in the alarm frame.
In this embodiment, after the response information is stored in the database, the response information stored in the database may be viewed in a preset interface. Specifically, a preset response information page is started, the stored response information is arranged in the current interface according to a set format, the arranged response information is displayed, and the displayed response information at least comprises: status values of response information, monitoring data for monitoring items, and locations of interfaces generating response information, etc.
It should be noted that the preset response information page may be a page in a web browser, or may be a display page of an application program.
In the foregoing embodiment, a method for monitoring an interface is provided, and the present application further provides a device for monitoring an interface, where the method corresponds to the method for monitoring an interface. Since the embodiments of the apparatus are substantially similar to the embodiments of the method, they have been described in a relatively simple manner, and reference may be made to the description of the embodiments of the method for relevant points. The device embodiments described below are merely illustrative. The monitoring device of the interface comprises the following embodiments:
referring to fig. 7, a schematic diagram of a monitoring device of an interface provided according to an embodiment of the present application is shown.
The monitoring device of the interface comprises: a monitoring parameter acquisition unit 701, a monitoring request generation unit 703, a monitoring request transmission unit 705, and a response information reception unit 707;
the monitoring parameter obtaining unit 701 is configured to obtain a monitoring parameter corresponding to an interface to be monitored;
the monitoring request generating unit 703 is configured to generate a monitoring request for the interface to be monitored according to the monitoring parameter;
the monitoring request sending unit 705 is configured to send the monitoring request to the interface to be monitored;
the response information receiving unit 707 is configured to receive response information returned by the interface based on the monitoring request.
Optionally, the monitoring parameter obtaining unit 701 is specifically configured to obtain interface information and a monitoring item corresponding to an interface to be monitored.
Optionally, the monitoring parameter obtaining unit 701 is specifically configured to obtain at least name information of an interface corresponding to the interface to be monitored, a type identifier of the interface, and a monitoring item.
Optionally, the monitoring request generating 703 includes: a request acquisition subunit and a request generation subunit;
the request acquisition subunit is configured to acquire a corresponding monitoring request according to the type identifier of the interface in the monitoring parameter;
and the request generation subunit is configured to enable the monitoring request to carry the monitoring item in the monitoring parameter.
Optionally, the monitoring device of the interface further includes: a monitoring parameter configuration unit;
the monitoring parameter configuration unit is configured to configure the monitoring parameters of the interface before the monitoring parameters corresponding to the interface to be monitored are acquired.
Optionally, the monitoring parameter configuration unit includes: the interface name type receiving subunit and the monitoring item receiving subunit are connected;
the interface name type receiving subunit is used for receiving the name information of the interface input in a preset interface and selecting the type identifier of the interface;
the monitoring item receiving subunit is configured to receive a monitoring item to be monitored, which is input in a preset interface, of the interface.
Optionally, the monitoring parameter configuration unit further includes: a monitoring parameter storage subunit;
and the monitoring parameter storage subunit is used for storing the monitoring parameters of the interface into a configuration database after the monitoring parameters of the interface are configured.
Optionally, the monitoring parameter obtaining unit 701 is specifically configured to obtain interface information, a monitoring item, and a monitoring period corresponding to an interface to be monitored;
correspondingly, the monitoring device of the interface further comprises: the system comprises a timer starting unit and a monitoring parameter acquisition triggering unit;
the timer starting unit is configured to start a timer for timing a refresh time before the monitoring parameter corresponding to the interface to be monitored is acquired, and determine whether time information recorded by the timer reaches the monitoring period;
and the monitoring parameter acquisition triggering unit is used for receiving the judgment result of the timer starting unit, if so, triggering the monitoring parameter acquisition unit and refreshing the time information recorded by the timer.
Optionally, the monitoring parameter obtaining unit 701 is specifically configured to obtain interface information, a monitoring item, and a check field corresponding to an interface to be monitored;
correspondingly, the response information receiving unit 707 is specifically configured to receive, when receiving response information returned by the interface based on the monitoring request, verification information carried in the response information.
Optionally, the monitoring device of the interface further includes: the device comprises a check information judging unit, a response information storage unit and an alarm information generating unit;
the check information judging unit is configured to judge whether a check field in the monitoring parameter corresponds to the check information after receiving response information returned by the interface based on the monitoring request;
the response information storage unit is used for receiving the judgment result of the verification information judgment unit, and if the judgment result is positive, the response information is stored in a monitoring database;
and the alarm information generating unit is used for receiving the judgment result of the check information judging unit, if not, generating monitoring alarm information and sending the alarm information.
In the above embodiment, a method and a device for monitoring an interface are provided, and an electronic device is also provided in the present application; the electronic equipment comprises the following embodiments:
referring to fig. 8, a schematic diagram of an electronic device provided according to an embodiment of the application is shown.
The electronic device includes: a display 801; a processor 803; a memory 805;
the memory 805 is used for storing an interface monitoring program, and when the program is read and executed by the processor, the program executes the following operations of acquiring monitoring parameters corresponding to an interface to be monitored; generating a monitoring request aiming at the interface to be monitored according to the monitoring parameters; sending the monitoring request to the interface to be monitored; and receiving response information returned by the interface based on the monitoring request.
In the above embodiments, an interface monitoring method, an interface monitoring apparatus, and an electronic device are provided, and in addition, a service interface monitoring method is also provided in the present application; the embodiment of the monitoring method of the service interface comprises the following steps:
referring to fig. 9, a flowchart of a monitoring method of a service interface provided according to an embodiment of the present application is shown.
The monitoring method of the service interface comprises the following steps:
step S901, obtaining a monitoring parameter corresponding to a service interface to be monitored.
In this embodiment, the obtaining of the monitoring parameter corresponding to the service interface to be monitored may be implemented by the following method: and acquiring the monitoring parameters corresponding to the service interface from a configuration database according to the name of the service interface to be monitored.
In this embodiment, the preset monitoring parameters of each service interface may be obtained from the configuration database. The monitoring parameters described in the embodiments of the present application include at least two aspects: service interface information and monitoring items. The service interface information is basic information of the service interface, and at least comprises name information of the service interface and a type identifier of the service interface, wherein the name information of the service interface can be single name information of the service interface or a combination of the name of the service interface and a type attribute of the service interface; the monitoring item is as follows: the specific object for which the traffic interface is monitored. For example: the monitoring item comprises: the method comprises the following steps of monitoring the performance of an online service interface, monitoring the availability of the online service interface, monitoring the response time of the online service interface, inquiring and feeding back flight information based on the service interface, and the like.
In this embodiment, the service interface is applied to a voyage website and is a service interface applied to a voyage. The service interface is a web service interface that provides syntactic interoperability support for different applications on the internet using a range of standard specifications. The application utilizing the web service technology for interaction only needs to follow the corresponding web service interface without considering respective internal implementation, thereby greatly reducing the coupling degree between different services and increasing the flexibility. According to the classification of the interface function, the interface can be divided into a navigation information inquiry interface, a navigation on-line consultation interface and the like.
It should be noted that, because the service interface is applied to the flight website, the information that is queried and fed back by the service interface is flight information, and the flight information may be: travel routes, travel attractions, and flight information.
It can be understood that the monitoring parameters of the service interface are various, and one or a combination of several monitoring items can be selected from the monitoring items according to the specific needs during use, or other monitoring items can be set according to needs. The above-mentioned settings of the monitoring items are all modifications of the specific embodiments, which do not depart from the core of the present application, and therefore all fall within the scope of the present application. For example: and monitoring the access performance of the navigation information inquiry interface and the on-line consultation interface of the navigation, or monitoring the response time of feedback information after the inquiry information is set for the navigation information inquiry interface.
In order to be able to check the correctness of the monitoring data of the service interface, when configuring the monitoring parameters of the service interface, the configured monitoring parameters of the service interface further include a check field.
It can be understood that the check field is a field for checking the response information returned after monitoring the service interface. The check field can be set to any field according to different service interfaces. For example: the check field may be set to have a status value, not be empty in the returned response message, or be set according to the type of information collected by a specific service interface.
For example: if the business interface is a navigation information inquiry interface, the check field can be set as a field related to inquiry information fed back by the inquiry interface, when the navigation hotspot is inquired in summer, the check field is set as keywords such as seaside or sunstroke avoidance, and whether the navigation hotspot keyword fed back by the navigation inquiry interface is related to the check field is checked.
Step S903, generating a monitoring request aiming at the service interface to be monitored according to the monitoring parameters.
In this embodiment, the generating of the monitoring request for the service interface to be monitored according to the monitoring parameter may be implemented in the following manner: and splicing the acquired monitoring parameters into a preset monitoring request corresponding to the service interface to generate a monitoring request of the service interface to be monitored.
It should be noted that, the different service interfaces correspond to different service interface access requests (monitoring requests), that is: each interface can only recognize and receive access requests corresponding to the type or form of the interface, and the interfaces can be divided into four limited types from the broad category: the remote call interface, the data query interface, the file class interface, and the data communication interface, so a monitoring request corresponding to the specification of each interface type and lacking specific parameters can be generated in advance.
It can be understood that, when configuring the monitoring parameters of the service interface, the name information of the configured service interface, the type identifier of the service interface, and the monitoring item only include the corresponding parameter name or the specific parameter value, so when executing step S903 to generate the monitoring request for the service interface to be monitored according to the monitoring parameters, the monitoring parameters are put into the monitoring request which is generated in advance and corresponds to the specification of each service interface type and lacks the specific parameters, and the monitoring request for the service interface to be monitored is generated.
Specifically, the generating a monitoring request for the service interface to be monitored according to the monitoring parameter includes the following steps:
acquiring a corresponding monitoring request according to the type identification of the service interface in the monitoring parameter;
and enabling the monitoring request to carry the monitoring item in the monitoring parameter.
Step S905, sending the monitoring request to the service interface to be monitored.
In this embodiment, the sending of the monitoring request to the service interface to be monitored may be implemented in the following manner: and after the connection is carried out through network protocols such as TCP/IP connection and the like, the monitoring request is sent to the service interface to be monitored. For example: and sending the monitoring request to the service interface to be monitored through the Ethernet.
Step S907, receiving response information returned by the service interface based on the monitoring request.
In this embodiment, the receiving of the response information returned by the service interface based on the monitoring request may be implemented in the following manner: and after the connection is carried out through network protocols such as TCP/IP connection and the like, response information returned by the service interface based on the monitoring request is received.
It should be noted that the response information includes: and the service interface acquires the monitoring data corresponding to the monitoring item according to the monitoring item in the monitoring request. For example: and if the monitoring item is response time monitoring of the online service interface, the returned response information is the response time (300ms) of the service interface.
In the foregoing embodiment, a method for monitoring a service interface is provided, which corresponds to the method for monitoring a service interface. Since the embodiments of the apparatus are substantially similar to the embodiments of the method, they have been described in a relatively simple manner, and reference may be made to the description of the embodiments of the method for relevant points. The device embodiments described below are merely illustrative. The embodiment of the monitoring device of the service interface is as follows:
referring to fig. 10, a schematic diagram of a monitoring apparatus of a service interface provided according to an embodiment of the present application is shown.
The monitoring device of the service interface comprises: a monitoring parameter acquisition unit 1001, a monitoring request generation unit 1003, a monitoring request transmission unit 1005, and a response information reception unit 1007;
the monitoring parameter obtaining unit 1001 is configured to obtain a monitoring parameter corresponding to a service interface to be monitored;
the monitoring request generation unit 1003 is configured to generate a monitoring request for the service interface to be monitored according to the monitoring parameter;
the monitoring request sending unit 1005 is configured to send the monitoring request to the service interface to be monitored;
the response information receiving unit 1007 is configured to receive response information returned by the service interface based on the monitoring request.
Optionally, the monitoring parameter obtaining unit 1001 is specifically configured to obtain a monitoring parameter corresponding to a flight service interface to be monitored.
Optionally, the monitoring parameter obtaining unit 1001 is specifically configured to obtain service interface information and a monitoring item corresponding to a service interface to be monitored.
Optionally, the monitoring parameter obtaining unit 1001 is specifically configured to obtain at least name information of a service interface corresponding to a service interface to be monitored and a type identifier of the service interface; and service interface performance parameters, response time and flight information fed back based on service interface inquiry.
Optionally, the monitoring parameter obtaining unit 1001 obtains flight information based on service interface query feedback, including: travel routes, travel attractions, and flight information.
Optionally, the monitoring request generating unit 1003 includes:
a request obtaining subunit, configured to obtain a corresponding monitoring request according to the type identifier of the service interface in the monitoring parameter;
and the request generation subunit is used for enabling the monitoring request to carry the monitoring item in the monitoring parameter.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
1. Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include non-transitory computer readable media (transient media), such as modulated data signals and carrier waves.
2. As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
Although the present application has been described with reference to the preferred embodiments, it is not intended to limit the present application, and any person skilled in the art can make variations and modifications without departing from the spirit and scope of the present application, therefore, the scope of the present application should be limited by the scope of the claims.

Claims (28)

1. A method for monitoring an interface, comprising:
configuring monitoring parameters of an interface to be monitored, and storing the monitoring parameters of the interface in a configuration database so that the configured monitoring parameters of the interface can be repeatedly used; acquiring monitoring parameters corresponding to an interface to be monitored, wherein the interface is an online service interface, the monitoring parameters comprise a check field, the check field is set according to the type of information acquired by the interface, and the check field is used for checking the correctness of response information returned after the interface is monitored;
generating a monitoring request aiming at the interface to be monitored according to the monitoring parameters;
sending the monitoring request to the interface to be monitored;
receiving response information returned by the interface based on the monitoring request, wherein the response information also carries verification information;
and checking whether the check information in the response information corresponds to the check field in the monitoring parameters.
2. The method for monitoring an interface of claim 1, wherein the monitoring parameters further comprises: interface information and monitoring items.
3. The method for monitoring an interface according to claim 2, wherein the interface information at least comprises: name information of the interface and type identification of the interface.
4. The method for monitoring an interface according to claim 3, wherein the generating a monitoring request for the interface to be monitored according to the monitoring parameter includes:
acquiring a corresponding monitoring request according to the type identification of the interface in the monitoring parameter;
and enabling the monitoring request to carry the monitoring item in the monitoring parameter.
5. The method for monitoring the interface according to any one of claims 1 to 4, wherein the configuring the monitoring parameters of the interface comprises:
receiving name information of the interface input in a preset interface, and selecting a type identifier of the interface;
receiving a monitoring item to be monitored of the interface input in a preset interface.
6. The method of monitoring an interface of claim 1, wherein the monitoring parameters further comprises: a monitoring period;
correspondingly, before the step of obtaining the monitoring parameters corresponding to the interface to be monitored, the method includes:
starting a timer for timing refreshing time, and judging whether the time information recorded by the timer reaches the monitoring period;
and if so, executing the step of acquiring the monitoring parameters corresponding to the interface to be monitored, and refreshing the time information recorded by the timer.
7. The method for monitoring an interface according to claim 1, after the step of receiving response information returned by the interface based on the monitoring request, comprising:
judging whether a check field in the monitoring parameter corresponds to the check information or not;
if yes, storing the response information in a monitoring database;
if not, generating monitoring alarm information and sending the alarm information.
8. An interface monitoring device, comprising:
the monitoring parameter configuration unit is used for configuring the monitoring parameters of the interface before acquiring the monitoring parameters corresponding to the interface to be monitored; the monitoring parameter configuration unit further includes: the monitoring parameter storage subunit is used for storing the monitoring parameters of the interface into a configuration database after the monitoring parameters of the interface are configured, so that the configured monitoring parameters of the interface can be used repeatedly;
the monitoring parameter acquiring unit is used for acquiring monitoring parameters corresponding to an interface to be monitored, the interface is an online service interface, the monitoring parameters comprise check fields, the check fields are set according to the type of information acquired by the interface, and the check fields are used for checking the correctness of response information returned after the interface is monitored;
the monitoring request generating unit is used for generating a monitoring request aiming at the interface to be monitored according to the monitoring parameters;
a monitoring request sending unit, configured to send the monitoring request to the interface to be monitored;
a response information receiving unit, configured to receive response information returned by the interface based on the monitoring request, and receive verification information carried in the response information;
and checking whether the check information in the response information corresponds to the check field of the monitoring parameter.
9. The device for monitoring an interface according to claim 8, wherein the monitoring parameter obtaining unit is specifically configured to obtain interface information and a monitoring item corresponding to the interface to be monitored.
10. The device for monitoring an interface according to claim 9, wherein the monitoring parameter obtaining unit is specifically configured to obtain at least name information of an interface corresponding to the interface to be monitored, a type identifier of the interface, and a monitoring item.
11. The interface monitoring apparatus according to claim 10, wherein the monitoring request generation unit includes:
a request obtaining subunit, configured to obtain a corresponding monitoring request according to the type identifier of the interface in the monitoring parameter;
and the request generation subunit is used for enabling the monitoring request to carry the monitoring item in the monitoring parameter.
12. The monitoring device of the interface according to any one of claims 8 to 11, wherein the monitoring parameter configuration unit includes:
the interface name type receiving subunit is used for receiving the name information of the interface input in a preset interface and selecting the type identifier of the interface;
and the monitoring item receiving subunit is used for receiving the monitoring item to be monitored of the interface input in a preset interface.
13. The device for monitoring an interface according to claim 8, wherein the monitoring parameter obtaining unit is specifically configured to obtain interface information, a monitoring item, and a monitoring period corresponding to the interface to be monitored;
correspondingly, the method also comprises the following steps:
a timer starting unit, configured to start a timer for timing refresh time before the monitoring parameter corresponding to the interface to be monitored is obtained, and determine whether time information recorded by the timer reaches the monitoring period;
and the monitoring parameter acquisition triggering unit is used for receiving the judgment result of the timer starting unit, if so, triggering the monitoring parameter acquisition unit and refreshing the time information recorded by the timer.
14. The device for monitoring an interface according to claim 8, wherein the monitoring parameter obtaining unit is specifically configured to obtain interface information, a monitoring item, and a check field corresponding to the interface to be monitored.
15. The monitoring device of an interface of claim 14, further comprising:
a check information determining unit, configured to determine, after receiving response information returned by the interface based on the monitoring request, whether a check field in the monitoring parameter corresponds to the check information;
the response information storage unit is used for receiving the judgment result of the verification information judgment unit, and if the judgment result is positive, the response information is stored in a monitoring database;
and the warning information generating unit is used for receiving the judgment result of the checking information judging unit, if not, generating monitoring warning information and sending the warning information.
16. An electronic device, characterized in that the electronic device comprises:
a display;
a processor;
a memory for storing an interface monitoring program, which, when read and executed by the processor, performs the operations of configuring monitoring parameters of an interface to be monitored, and storing the monitoring parameters of the interface in a configuration database so that the configured monitoring parameters of the interface can be used repeatedly; acquiring monitoring parameters corresponding to an interface to be monitored, wherein the interface is an online service interface, the monitoring parameters comprise a check field, the check field is set according to the type of information acquired by the interface, and the check field is used for checking the correctness of response information returned after the interface is monitored; generating a monitoring request aiming at the interface to be monitored according to the monitoring parameters; sending the monitoring request to the interface to be monitored; receiving response information returned by the interface based on the monitoring request, wherein the response information also carries verification information; and checking whether the check information in the response information corresponds to the check field in the monitoring parameters.
17. A method for monitoring a service interface, comprising:
configuring monitoring parameters of an interface to be monitored, and storing the monitoring parameters of the interface in a configuration database so that the configured monitoring parameters of the interface can be repeatedly used; acquiring monitoring parameters corresponding to a service interface to be monitored, wherein the service interface is a service interface applied to a flight system, the monitoring parameters comprise check fields, the check fields are set according to the type of flight information acquired by the service interface, and the check fields are used for checking the correctness of response information returned after the service interface is monitored;
generating a monitoring request aiming at the service interface to be monitored according to the monitoring parameters;
sending the monitoring request to the service interface to be monitored;
receiving response information returned by the service interface based on the monitoring request, wherein the response information also carries verification information;
and checking whether the check information in the response information corresponds to the check field in the monitoring parameters.
18. The method of claim 17, wherein the service interface comprises: the method is applied to service interfaces of voyages.
19. The method of claim 18, wherein the monitoring parameters comprise: service interface information and monitoring items.
20. The method for monitoring service interfaces according to claim 19, wherein the service interface information at least includes: name information of the service interface and a type identifier of the service interface;
the monitoring item at least comprises: interface performance parameters, response time, and business interface-based query feedback flight information.
21. The method for monitoring a service interface of claim 20, wherein the flight information comprises: travel routes, travel attractions, and flight information.
22. The method for monitoring a service interface according to claim 21, wherein the generating a monitoring request for the service interface to be monitored according to the monitoring parameter includes:
acquiring a corresponding monitoring request according to the type identification of the service interface in the monitoring parameter;
and enabling the monitoring request to carry the monitoring item in the monitoring parameter.
23. A device for monitoring a traffic interface, comprising:
the monitoring parameter configuration unit is used for configuring the monitoring parameters of the interface before acquiring the monitoring parameters corresponding to the interface to be monitored; the monitoring parameter configuration unit further includes: the monitoring parameter storage subunit is used for storing the monitoring parameters of the interface into a configuration database after the monitoring parameters of the interface are configured, so that the configured monitoring parameters of the interface can be used repeatedly;
the monitoring system comprises a monitoring parameter acquisition unit, a monitoring parameter acquisition unit and a monitoring parameter processing unit, wherein the monitoring parameter acquisition unit is used for acquiring a monitoring parameter corresponding to a service interface to be monitored, the service interface is a service interface applied to a flight system, the monitoring parameter comprises a check field, and the check field is set according to the type of flight information acquired by the service interface; the check field is used for checking the correctness of response information returned after the service interface is monitored;
a monitoring request generating unit, configured to generate a monitoring request for the service interface to be monitored according to the monitoring parameter;
a monitoring request sending unit, configured to send the monitoring request to the service interface to be monitored;
a response information receiving unit, configured to receive response information returned by the service interface based on the monitoring request, and receive verification information carried in the response information; and checking whether the check information in the response information corresponds to the check field in the monitoring parameters.
24. The apparatus for monitoring a service interface according to claim 23, wherein the monitoring parameter obtaining unit is specifically configured to obtain a monitoring parameter corresponding to a flight service interface to be monitored.
25. The apparatus for monitoring a service interface according to claim 24, wherein the monitoring parameter obtaining unit is specifically configured to obtain service interface information and a monitoring item corresponding to a service interface to be monitored.
26. The apparatus for monitoring a service interface according to claim 25, wherein the monitoring parameter obtaining unit is specifically configured to obtain at least name information of a service interface corresponding to the service interface to be monitored and a type identifier of the service interface; and service interface performance parameters, response time and flight information fed back based on service interface inquiry.
27. The apparatus for monitoring service interfaces according to claim 26, wherein the monitoring parameter obtaining unit obtains the flight information based on the service interface query feedback, and the monitoring parameter obtaining unit includes: travel routes, travel attractions, and flight information.
28. The apparatus for monitoring a service interface according to claim 25, wherein the monitoring request generating unit includes:
a request obtaining subunit, configured to obtain a corresponding monitoring request according to the type identifier of the service interface in the monitoring parameter;
and the request generation subunit is used for enabling the monitoring request to carry the monitoring item in the monitoring parameter.
CN201610833707.XA 2016-09-19 2016-09-19 Interface monitoring method and device and electronic equipment Active CN107846321B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610833707.XA CN107846321B (en) 2016-09-19 2016-09-19 Interface monitoring method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610833707.XA CN107846321B (en) 2016-09-19 2016-09-19 Interface monitoring method and device and electronic equipment

Publications (2)

Publication Number Publication Date
CN107846321A CN107846321A (en) 2018-03-27
CN107846321B true CN107846321B (en) 2022-03-11

Family

ID=61656813

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610833707.XA Active CN107846321B (en) 2016-09-19 2016-09-19 Interface monitoring method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN107846321B (en)

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111143151B (en) * 2018-11-02 2023-11-17 菜鸟智能物流控股有限公司 Service monitoring method and device and electronic equipment
CN110278124A (en) * 2019-06-18 2019-09-24 努比亚技术有限公司 The monitoring method of interface, device and computer readable storage medium on line
CN110290190A (en) * 2019-06-18 2019-09-27 深圳前海微众银行股份有限公司 A kind of method, monitored device and monitoring server acquiring data
CN111159524A (en) * 2019-12-30 2020-05-15 北京同邦卓益科技有限公司 Monitoring method and system, and storage medium
CN111737084B (en) * 2020-06-22 2024-05-14 苏州科韵激光科技有限公司 Information monitoring method, device, intelligent equipment, computer equipment and medium
CN113886216A (en) * 2020-07-03 2022-01-04 腾讯科技(深圳)有限公司 Interface test and tool configuration method, device, electronic equipment and storage medium
CN111884882A (en) * 2020-07-29 2020-11-03 北京千丁互联科技有限公司 Monitoring coverage rate detection method and device
CN112612674A (en) * 2020-12-25 2021-04-06 北京三快在线科技有限公司 Method, device, equipment and computer readable storage medium for monitoring buried point data
CN112817883A (en) * 2021-01-11 2021-05-18 深圳力维智联技术有限公司 Method, device and system for adapting interface platform and computer readable storage medium
CN113722191B (en) * 2021-11-04 2022-03-04 企查查科技有限公司 Page monitoring method, device, equipment and computer readable storage medium
CN114978869A (en) * 2022-07-15 2022-08-30 数研院(福建)信息产业发展有限公司 Configurable interface state automatic judgment method and system

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101267425A (en) * 2007-03-16 2008-09-17 上海贝电实业股份有限公司 Inter-board interface communication protocol for dynamic environment distributed monitoring system
CN103514075A (en) * 2012-06-18 2014-01-15 腾讯科技(深圳)有限公司 Method and device for monitoring API function calling in mobile terminal
CN105516266A (en) * 2015-11-30 2016-04-20 华为技术有限公司 Service monitoring methods and system, and related devices

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7013297B2 (en) * 2001-02-27 2006-03-14 Microsoft Corporation Expert system for generating user interfaces
CN100550852C (en) * 2007-01-18 2009-10-14 华为技术有限公司 A kind of method and device thereof of realizing mass port backpressure
CN101625686B (en) * 2008-07-08 2016-04-06 阿里巴巴集团控股有限公司 A kind of method and system of monitoring data consistency between plurality of databases
CN103139001A (en) * 2011-11-29 2013-06-05 西安西嵌通信技术有限公司 Power supplying equipment monitoring system in communications
CN103618790A (en) * 2013-11-28 2014-03-05 深圳先进技术研究院 Method and system for obtaining API service
EP2891972A1 (en) * 2013-12-10 2015-07-08 Escrita Inteligente, LDA Printer interface analysis device
CN104579830B (en) * 2014-12-25 2018-05-25 小米科技有限责任公司 service monitoring method and device
CN104767653B (en) * 2015-01-29 2018-09-04 小米科技有限责任公司 A kind of method and apparatus of network interface monitoring
CN104683219B (en) * 2015-02-13 2018-01-19 腾讯科技(深圳)有限公司 Information interacting method and device
CN105407015A (en) * 2015-11-24 2016-03-16 北京远特科技股份有限公司 Business platform, monitoring platform, and business monitoring system and method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101267425A (en) * 2007-03-16 2008-09-17 上海贝电实业股份有限公司 Inter-board interface communication protocol for dynamic environment distributed monitoring system
CN103514075A (en) * 2012-06-18 2014-01-15 腾讯科技(深圳)有限公司 Method and device for monitoring API function calling in mobile terminal
CN105516266A (en) * 2015-11-30 2016-04-20 华为技术有限公司 Service monitoring methods and system, and related devices

Also Published As

Publication number Publication date
CN107846321A (en) 2018-03-27

Similar Documents

Publication Publication Date Title
CN107846321B (en) Interface monitoring method and device and electronic equipment
US20180365085A1 (en) Method and apparatus for monitoring client applications
US9176945B1 (en) Extracting data from messages for multiple accounts
US20150081824A1 (en) Forgotten Attachment Detection
CN108737132B (en) Alarm information processing method and device
CN110162512B (en) Log retrieval method, device and storage medium
WO2018040913A1 (en) Interface display method and device
EP2973047A1 (en) Methods for managing applications using semantic modeling and tagging and devices thereof
JP2012526320A (en) Method and system for search using search engine indexing and index
EP3188051B1 (en) Systems and methods for search template generation
CN106547646B (en) Data backup and recovery method and data backup and recovery device
CN110971571A (en) Website domain name verification method and related device
CN105354195B (en) Information searching method and device
CN110784377A (en) Method for uniformly managing cloud monitoring data in multi-cloud environment
CN110659186A (en) Alarm information reporting method and device
CN107220260B (en) Page display method and device
CN111723245A (en) Method for establishing incidence relation of different types of storage objects in data storage system
CN112035555B (en) Information display method, device and equipment
CN110336731B (en) User matching method and device in group
CN104125130B (en) A kind of safety prompt function method, device and communication system
CN110019357B (en) Database query script generation method and device
CN110245177A (en) A kind of deriving method of million grades of data
CN110532248B (en) CMDB-based server application information acquisition and adjustment method
CN112860292A (en) Configuration management method and device based on application
CN115914358A (en) Message pushing method and device, electronic equipment and computer storage medium

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