CN116361101A - Method, device, medium and equipment for improving usability of application program interface - Google Patents

Method, device, medium and equipment for improving usability of application program interface Download PDF

Info

Publication number
CN116361101A
CN116361101A CN202111629480.4A CN202111629480A CN116361101A CN 116361101 A CN116361101 A CN 116361101A CN 202111629480 A CN202111629480 A CN 202111629480A CN 116361101 A CN116361101 A CN 116361101A
Authority
CN
China
Prior art keywords
application program
program interface
abnormal
current state
current
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.)
Pending
Application number
CN202111629480.4A
Other languages
Chinese (zh)
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.)
Momenta Suzhou Technology Co Ltd
Original Assignee
Momenta Suzhou Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Momenta Suzhou Technology Co Ltd filed Critical Momenta Suzhou Technology Co Ltd
Priority to CN202111629480.4A priority Critical patent/CN116361101A/en
Publication of CN116361101A publication Critical patent/CN116361101A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/302Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a software system
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3051Monitoring arrangements for monitoring the configuration of the computing system or of the computing system component, e.g. monitoring the presence of processing resources, peripherals, I/O links, software programs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/36Software reuse
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Computing Systems (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Quality & Reliability (AREA)
  • Mathematical Physics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The application discloses a method, a device, a medium and equipment for improving the usability of an application program interface, and belongs to the technical field of application programs. Judging whether the application program interface is in a normal state according to the returned data characteristic true value and the current returned data characteristic to obtain the current state of the application program interface; if the current state of the application program interface is abnormal, timely notifying relevant technicians of the information that the current state is abnormal to repair, and timely notifying the relevant technicians of repair results; the return data feature true value is obtained according to the normal return data feature definition of the application program interface. According to the application program interface monitoring method and device, the abnormal state of the application program interface is effectively monitored in real time, related personnel are informed of maintenance in time, and the usability of the application program is improved, so that the related application program service can ensure that the usability index is achieved.

Description

Method, device, medium and equipment for improving usability of application program interface
Technical Field
The present invention relates to the field of application programs, and in particular, to a method, an apparatus, a medium, and a device for improving usability of an application program interface.
Background
There are increasing numbers of current application services, a large portion of which require the assurance of availability indicators. The availability index of the related application program service can be ensured by improving the availability of the application program interface. There is a need for a solution that improves the usability of application program interfaces.
Disclosure of Invention
Aiming at the problems in the prior art, the application mainly provides a method, a device, a medium and equipment for improving the availability of an application program interface, which dynamically shrink and expand capacity according to the real-time utilization rate of a computer server, and adjust the number of computer resources in a service cluster, so that the service cost is greatly reduced while the service efficiency is improved.
In order to achieve the above purpose, a technical scheme adopted in the application is as follows: there is provided an application program interface availability improving method, comprising:
the method comprises the steps of monitoring a process of obtaining returned data by using an application program interface in real time to obtain current returned data characteristics;
judging whether the application program interface is in a normal state according to the returned data characteristic true value and the current returned data characteristic to obtain the current state of the application program interface; if the current state of the application program interface is abnormal, timely notifying relevant technicians of the information that the current state is abnormal to repair, and timely notifying the relevant technicians of repair results; the return data feature true value is obtained according to the normal return data feature definition of the application program interface.
The other technical scheme adopted by the application is as follows: there is provided an application program interface availability improving apparatus including:
the monitoring module is used for monitoring the process of acquiring the return data by using the application program interface in real time to obtain the current return data characteristics; the state acquisition module is used for judging whether the application program interface is in a normal state according to the returned data characteristic true value and the current returned data characteristic to obtain the current state of the application program interface; the notification module is used for timely notifying relevant technicians of the information of the abnormal current state if the current state of the application program interface is abnormal, and timely notifying the relevant technicians of the repair result; the return data feature true value is obtained according to the normal return data feature definition of the application program interface.
The other technical scheme adopted by the application is as follows: there is provided a computer readable storage medium storing computer instructions operable to perform the application program interface availability improvement method of the above-described scheme.
The other technical scheme adopted by the application is as follows: there is provided a computer device comprising a processor and a memory storing computer instructions operable to perform the application program interface availability improvement method of the above-described aspects.
The beneficial effect that this application's technical scheme can reach is: an application program interface usability improving method, device, medium and equipment. According to the application program interface monitoring method and device, through the abnormal state of the application program interface, whether the application program interface is accessible or not is not, real-time effective monitoring is carried out, relevant personnel are informed of maintenance in time, and the usability of the application program is improved, so that the service of the relevant application program can ensure that the usability index is achieved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, a brief description will be given below of the drawings that are needed in the embodiments or the prior art descriptions, it being obvious that the drawings in the following description are some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort to a person skilled in the art.
FIG. 1 is a flow chart of one embodiment of an application program interface availability enhancement method of the present application;
FIG. 2 is a flow chart of one embodiment of an application program interface availability enhancement method of the present application;
FIG. 3 is a flow chart of one embodiment of an application interface usability enhancing apparatus of the present application;
FIG. 4 is a flow chart of one embodiment of an application interface availability enhancement device of the present application;
specific embodiments of the present disclosure have been shown by way of the above drawings and will be described in more detail below. These drawings and the written description are not intended to limit the scope of the disclosed concepts in any way, but rather to illustrate the disclosed concepts to those skilled in the art by reference to specific embodiments.
Detailed Description
The preferred embodiments of the present application will be described in detail below with reference to the drawings so that the advantages and features of the present application can be more easily understood by those skilled in the art, thereby making a clearer and more definite definition of the protection scope of the present application.
It is noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises an element.
Availability refers to the percentage of time that system services can run normally, and for many systems, four 9 availability (99.99% availability, or about 50 minutes of system outage time per year) can be considered high availability, which can guarantee availability indicators for relevant application services by increasing application interface availability. There is a need for a solution that improves the usability of application program interfaces.
In order to solve the technical problems, the method, the device, the medium and the equipment for improving the usability of the application program interface are used for periodically and self-setting semantic inquiry on the service interface to be monitored, judging whether the corresponding interface is in a normal state according to the returned http state code, response time, a data header and data content, and triggering an alarm if the corresponding interface is abnormal, and sending relevant mail/enterprise WeChat application/enterprise WeChat robot/enterprise group/sting and other chat tools. After the service is greatly guaranteed to be problematic, related personnel can repair the service in time. Meanwhile, each normal record and each abnormal record can be inserted into the database, so that the subsequent calculation of the availability index is facilitated.
The following describes the technical solution of the present application in detail with specific embodiments in conjunction with the accompanying drawings. The following embodiments may be combined with each other, and some embodiments may not be repeated for the same or similar concepts or processes.
FIG. 1 illustrates one embodiment of an application program interface availability enhancement method of the present application.
In the specific embodiment shown in fig. 1, the method for improving the usability of an application program interface of the present application includes a process S101 of monitoring a process of acquiring return data by using an application program interface in real time to obtain a current return data feature; step S102, judging whether the application program interface is in a normal state according to the returned data characteristic true value and the current returned data characteristic to obtain the current state of the application program interface; if the current state of the application program interface is abnormal, the process S103 timely informs the related technicians of the information that the current state is abnormal to repair, and timely informs the related technicians of the repair result, wherein the return data feature true value is obtained according to the normal return data feature customization of the application program interface.
According to the application program interface monitoring method and device, the abnormal state of the application program interface is effectively monitored in real time, related personnel are informed of maintenance in time, and the usability of the application program is improved, so that the related application program service can ensure that the usability index is achieved.
The process S101 represents a process of monitoring the process of obtaining the return data by using the application program interface in real time, so as to obtain the current return data feature, which can be beneficial to judging whether the current state of the corresponding interface is normal according to the current return data feature.
In an optional embodiment of the present application, the number of application program interfaces is plural, and the process of monitoring the process of acquiring the return data by using the application program interfaces in real time includes monitoring the process of acquiring the corresponding current return data by using the application program interfaces in a timing polling manner.
In an alternative embodiment of the present application, the process of monitoring the process of acquiring the return data using the application program interface in real time includes monitoring the process of acquiring the return data using the application program interface at a predetermined frequency, for example, setting the monitoring frequency to 1 time/second.
In an optional embodiment of the present application, the current returned data feature includes at least one of a correct HTTP status code, a correct data header, a correct data content, and a preset response time threshold of the current returned data, so as to facilitate determining whether the status of the application program interface is normal according to one of the features, rather than merely determining whether the status of the interface is normal according to that the interface cannot be accessed.
The process S102 is a process of judging whether the application program interface is in a normal state according to the feature truth value of the returned data and the feature of the current returned data, so as to obtain the current state of the application program interface, and the process can be convenient for reminding the related technicians according to the current state, so that the related technicians can timely master the state of the interface, and perform maintenance in real time.
In an alternative embodiment of the present application, the return data characteristic truth value includes at least one of a correct HTTP status code, a correct data header, a correct data content, and a preset response time threshold.
Optionally, the preset response time threshold is a normal response time of a corresponding interface, and the corresponding time of an application program interface is normally several tens millimeters to several hundreds of milliseconds.
In an optional embodiment of the present application, the process of determining whether the application program interface is in a normal state according to the returned data feature true value and the current returned data feature to obtain the current state of the application program interface includes:
the first judging process is used for judging whether the HTTP status code of the current returned data is the same as the correct HTTP status code, if so, determining the HTTP status code as normal, otherwise, determining the HTTP status code as abnormal; a second judging process of judging whether the data header of the current returned data is the same as the correct data header, if so, determining the data header as normal, otherwise, determining the data header as abnormal; a third judging process of judging whether the data content of the current returned data is the same as the correct data content, if so, determining the data content as normal, otherwise, determining the data content as abnormal; and/or, a fourth judging process, judging whether the response time consumed by the current return data is smaller than a response time threshold value, if so, determining the response time as normal, otherwise, determining the response time as abnormal; and judging whether the application program interface is in a normal state according to the result of the first judging process, the result of the second judging process, the result of the third judging process or the result of the fourth judging process, so as to obtain the current state of the application program interface.
In an optional specific embodiment of the present application, the process of determining whether the application program interface is in a normal state according to the result of the first determination process, the result of the second determination process, the result of the third determination process, or the result of the fourth determination process, where the process of obtaining the current state of the application program interface includes determining the current state of the application program interface as abnormal if the result of the first determination process is that the number of times of the HTTP status code abnormality exceeds a preset first time threshold, the result of the second determination process is that the number of times of the data header abnormality exceeds a preset second time threshold, the result of the third determination process is that the number of times of the data content abnormality exceeds a preset third time threshold, or the result of the fourth determination process is that the number of times of the response time abnormality exceeds a preset fourth time threshold; otherwise, the current state of the application program interface is determined to be normal.
In an optional embodiment of the present application, the return data feature truth value includes a correct HTTP status code, the process of determining whether the application program interface is in a normal state according to the return data feature truth value and the current return data feature, and the process of obtaining the current state of the application program interface includes a first determining process, determining whether the HTTP status code of the current return data is the same as the correct HTTP status code, if so, determining the HTTP status code as normal, and if not, determining the HTTP status code as abnormal; and according to the condition of the HTTP status code, if the abnormal times of the HTTP status code exceeds a preset first time threshold value, for example, 1 time, determining the current state of the application program interface as abnormal, otherwise, determining the current state of the application program interface as normal.
The optional specific example selectively sets whether the interface state is normal or not according to the HTTP state code only according to specific requirements.
In an alternative embodiment of the present application, the return data feature truth value includes a correct HTTP status code, and a correct data header; the process of judging whether the application program interface is in a normal state according to the feature true value of the returned data and the feature of the current returned data, and obtaining the current state of the application program interface comprises a first judging process, wherein the first judging process judges whether the HTTP state code of the current returned data is the same as the correct HTTP state code, if so, the HTTP state code is determined to be normal, otherwise, the HTTP state code is determined to be abnormal, and/or a second judging process judges whether the data header of the current returned data is the same as the correct data header, if so, the data header is determined to be normal, otherwise, the data header is determined to be abnormal;
if the number of abnormal HTTP status codes exceeds a preset first time threshold, for example, 1 time; or if the number of times of abnormality of the data header exceeds a preset second number of times threshold, for example, 2 times, determining the current state of the application program interface as abnormal, otherwise, determining the current state of the application program interface as normal.
The optional specific example selectively sets whether the interface states of the two items of the HTTP state code and the data header are normal or not according to specific requirements, and judges relative to one item of selection, if one item of the two items is abnormal, the abnormal state can be found, and therefore the abnormal state of the application program interface can be found more timely.
In an optional embodiment of the present application, the return data feature truth value includes a correct HTTP status code, a correct data header, a correct data content, and a preset response time threshold; the process of judging whether the application program interface is in a normal state according to the feature true value of the returned data and the feature of the current returned data to obtain the current state of the application program interface comprises a first judging process, a second judging process, a third judging process and/or a second judging process, wherein the process of judging whether the data header of the current returned data is the same as the correct data header or not is carried out, if so, the data header is determined to be normal, otherwise, the data header is determined to be abnormal;
if the number of abnormal HTTP status codes exceeds a preset first time threshold, for example, 1 time; the number of data header anomalies exceeds a preset second number of times threshold, for example 2 times; the number of anomalies in the data content exceeds a preset third threshold of times, for example 1 time; or if the number of response time anomalies exceeds a preset fourth number threshold, for example 1, determining the current state of the application program interface as anomalous, otherwise determining the current state of the application program interface as normal.
The optional specific example selectively sets whether the interface states of the four items, namely the HTTP state code, the data header, the correct data content and the preset response time threshold value, are normal according to specific requirements, and can find the abnormal state only if one item in the four items is abnormal relative to the judgment of selecting one item, so that the abnormal state of the application program interface can be found more timely.
If the current state of the application program interface is abnormal, the process S103 indicates that the current state is abnormal, and the relevant technical personnel is timely notified of the repair result to the relevant technical personnel, so that the relevant technical personnel can conveniently and timely acquire the abnormal state information of the application program interface and repair the abnormal state information, thereby avoiding downtime and improving the availability of application program services.
In an optional embodiment of the present application, the timely notifying the related technicians of the information with the abnormal current state for repairing includes sending a notification to the information with the abnormal current state of the application program interface set as an emergency for 24 hours according to the emergency degree of the application program interface set in advance manually, and sending a notification to the information with the abnormal current state of the application program interface set as a non-emergency only in working time;
for interfaces requiring emergency treatment, such as application program interfaces requiring service for 24 hours, the abnormal state requires attention of related personnel at all times so as to ensure the normal operation of key application program services; for interfaces that do not require emergency treatment, such as interfaces that require service at work hours, it is desirable that only relevant staff pay attention at work hours.
In an alternative embodiment of the present application, the information that the current state is abnormal is sent to the relevant technician once every a preset time period, so that the relevant technician can be prevented from missing the notification or forgetting the notification.
Optionally, the number of times of sending the information of which the current state is abnormal to the related technician does not exceed a preset fifth time threshold. Specifically, if the related technician has received the information that the current state is abnormal, a repair work is being performed, and at this time, the system continuously sends notification information to affect the normal work of the related technician.
In an optional embodiment of the present application, the process of timely notifying the relevant technician of the repair result includes, if the state of the application program interface is restored to the normal state after the repair is successful, sending the information that the current state is normal to the relevant technician; if the repair fails, the information that the current state is abnormal is continuously sent to inform relevant technicians until the repair is successful, so that the interface with the abnormal state can be ensured to be repaired to a state of recovering normal operation.
Optionally, the information that the current state is normal and the information that the current state is abnormal respectively include a normal flag, for example, an "OK" flag or an abnormal flag "F", an application program interface name, an application program interface address, a version update time of the application program interface, a notification frequency threshold value, a notification frequency, a data feature that an abnormality occurs, and other information, which can facilitate a technician to quickly perform a corresponding repair operation.
FIG. 2 illustrates one embodiment of an application program interface availability enhancement method of the present application.
In the specific embodiment shown in fig. 2, the method for improving the usability of an application program interface further includes, in step S204, recording a current state of the application program interface. Specifically, the state of the application program interface when accessed each time is recorded, not only the abnormal state condition is recorded, but also the normal state condition is recorded, so that the availability index can be calculated conveniently according to the abnormal state condition, analysis and optimization can be further carried out, and the availability of the related application program is continuously improved.
FIG. 3 illustrates one embodiment of an application program interface availability enhancing apparatus of the present application.
In the specific embodiment shown in fig. 3, the application program interface availability improving device includes a monitoring module 301, configured to monitor, in real time, a process of acquiring return data by using an application program interface, so as to obtain a current return data feature; the state acquisition module 302 is configured to determine whether the application program interface is in a normal state according to the returned data feature true value and the current returned data feature, so as to obtain a current state of the application program interface; the notification module 303 is configured to, if the current state of the application program interface is abnormal, timely notify relevant technicians of information that the current state is abnormal to repair, and timely notify the relevant technicians of a repair result; the return data feature true value is obtained according to the normal return data feature definition of the application program interface.
The monitoring module 301, configured to monitor in real time a process of acquiring the return data by using the application program interface, obtains a current return data feature, and can be used to determine whether the current state of the corresponding interface is normal according to the current return data feature.
In an optional embodiment of the present application, the number of the application program interfaces is multiple, and the monitoring module 301 is configured to monitor, in a manner of timing polling, a process of acquiring the corresponding current return data by using the multiple application program interfaces respectively.
In an alternative embodiment of the present application, the monitoring module 301 may monitor the process of acquiring the return data by using the application program interface at a predetermined frequency, for example, the monitoring frequency is set to 1 time/second.
In an optional embodiment of the present application, the current returned data feature includes at least one of a correct HTTP status code, a correct data header, a correct data content, and a preset response time threshold of the current returned data, so as to facilitate determining whether the status of the application program interface is normal according to one of the features, rather than merely determining whether the status of the interface is normal according to that the interface cannot be accessed.
The state acquisition module 302, configured to determine whether the application program interface is in a normal state according to the true value of the returned data feature and the current returned data feature, can be convenient for reminding related technicians according to the current state, so that the related technicians can timely master the state of the interface and perform maintenance in real time.
In an alternative embodiment of the present application, the return data characteristic truth value includes at least one of a correct HTTP status code, a correct data header, a correct data content, and a preset response time threshold.
In an alternative embodiment of the present application, the state obtaining module 302 is configured to perform a first determining process, to determine whether the HTTP status code of the current returned data is the same as the correct HTTP status code, if so, determine the HTTP status code as normal, otherwise determine the HTTP status code as abnormal; a second judging process of judging whether the data header of the current returned data is the same as the correct data header, if so, determining the data header as normal, otherwise, determining the data header as abnormal; a third judging process of judging whether the data content of the current returned data is the same as the correct data content, if so, determining the data content as normal, otherwise, determining the data content as abnormal; and/or, a fourth judging process, judging whether the response time consumed by the current return data is smaller than a response time threshold value, if so, determining the response time as normal, otherwise, determining the response time as abnormal; and judging whether the application program interface is in a normal state according to the result of the first judging process, the result of the second judging process, the result of the third judging process or the result of the fourth judging process, so as to obtain the current state of the application program interface.
In an optional specific embodiment of the present application, the process of determining whether the application program interface is in a normal state according to the result of the first determination process, the result of the second determination process, the result of the third determination process, or the result of the fourth determination process, where the process of obtaining the current state of the application program interface includes determining the current state of the application program interface as abnormal if the result of the first determination process is that the number of times of the HTTP status code abnormality exceeds a preset first time threshold, the result of the second determination process is that the number of times of the data header abnormality exceeds a preset second time threshold, the result of the third determination process is that the number of times of the data content abnormality exceeds a preset third time threshold, or the result of the fourth determination process is that the number of times of the response time abnormality exceeds a preset fourth time threshold; otherwise, the current state of the application program interface is determined to be normal.
If the current state of the application program interface is abnormal, the method is used for timely notifying the related technicians of the information that the current state is abnormal to repair, and timely notifying the related technicians of the repair result to the notification module 303 of the related technicians, so that the related technicians can conveniently and timely acquire the abnormal state information of the application program interface and repair, thereby avoiding downtime and improving the availability of application program services.
In an alternative embodiment of the present application, the notification module 303 may be configured to send a notification for 24 hours to the information that the current state of the application program interface set as the emergency is abnormal, and send a notification for only the working time to the information that the current state of the application program interface set as the non-emergency is abnormal, according to the emergency degree of the application program interface set in advance manually; for interfaces requiring emergency treatment, such as application program interfaces requiring service for 24 hours, the abnormal state requires attention of related personnel at all times so as to ensure the normal operation of key application program services; for interfaces that do not require emergency treatment, such as interfaces that require service at work hours, it is desirable that only relevant staff pay attention at work hours.
In an alternative embodiment of the present application, the notification module 303 can be configured to send the information that the current state is abnormal to the related technician once every a preset period of time, so that the related technician can be prevented from missing the notification or forgetting the notification. Optionally, the number of times of sending the information of which the current state is abnormal to the related technician does not exceed a preset fifth time threshold. Specifically, if the related technician has received the information that the current state is abnormal, a repair work is being performed, and at this time, the system continuously sends notification information to affect the normal work of the related technician.
In an optional embodiment of the present application, the notification module 303 is configured to send, to a relevant technician, information that the current state is normal if the state of the repairing successful application program interface is restored to the normal state; if the repair fails, the information that the current state is abnormal is continuously sent to inform relevant technicians until the repair is successful, so that the interface with the abnormal state can be ensured to be repaired to a state of recovering normal operation.
FIG. 4 illustrates one embodiment of an application program interface usability enhancing device of the present application.
In the specific embodiment shown in fig. 4, the application program interface availability improving apparatus further includes a recording module 404 configured to record the current state of the application program interface. Specifically, the state of the application program interface when accessed each time is recorded, not only the abnormal state condition is recorded, but also the normal state condition is recorded, so that the availability index can be calculated conveniently according to the abnormal state condition, analysis and optimization can be further carried out, and the availability of the related application program is continuously improved.
The device for improving the usability of the extended application program interface provided by the application can be used for executing the method for improving the usability of the extended application program interface described in any embodiment, and the implementation principle and the technical effect are similar and are not repeated here.
In a specific embodiment of the present application, the functional modules in an application program interface availability enhancing device may be directly in hardware, in a software module executed by a processor, or in a combination of the two.
The software modules may reside in RAM memory, flash memory, ROM memory, EPRO0M memory, EEPROM memory, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art. An exemplary storage medium is coupled to the processor such the processor can read information from, and write information to, the storage medium.
The processor may be a central processing unit (English: central Processing Unit; CPU; for short), or other general purpose processor, digital signal processor (English: digital Signal Processor; for short DSP), application specific integrated circuit (English: application Specific Integrated Circuit; ASIC; for short), field programmable gate array (English: field Programmable Gate Array; FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or any combination thereof, etc. A general purpose processor may be a microprocessor, but in the alternative, the processor may be any conventional processor, controller, microcontroller, or state machine. A processor may also be implemented as a combination of computing devices, e.g., a combination of a DSP and a microprocessor, a plurality of microprocessors, one or more microprocessors in conjunction with a DSP core, or any other such configuration. In the alternative, the storage medium may be integral to the processor. The processor and the storage medium may reside in an ASIC. The ASIC may reside in a user terminal. In the alternative, the processor and the storage medium may reside as discrete components in a user terminal.
In another embodiment of the present application, a computer readable storage medium storing computer instructions operable to perform the method of extending an application program interface availability improvement method of the above.
In another embodiment of the present application, a computer device includes a processor and a memory storing computer instructions operable to perform the application program interface availability enhancement method of the above-described aspects.
In the several embodiments provided in this application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of elements is merely a logical functional division, and there may be additional divisions of actual implementation, e.g., multiple elements or components may be combined or integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed over a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
The foregoing is only examples of the present application, and is not intended to limit the scope of the patent application, and all equivalent structural changes made by the specification and drawings of the present application, or direct or indirect application in other related technical fields, are included in the scope of the patent protection of the present application.

Claims (10)

1. A method for improving the usability of an application program interface, which is characterized in that,
the method comprises the steps of monitoring a process of obtaining returned data by using an application program interface in real time to obtain current returned data characteristics;
judging whether the application program interface is in a normal state according to the returned data characteristic true value and the current returned data characteristic to obtain the current state of the application program interface;
if the current state of the application program interface is abnormal, timely notifying relevant technicians of the information that the current state is abnormal to repair, and timely notifying the relevant technicians of repair results;
the return data feature true value is obtained according to the normal return data feature definition of the application program interface.
2. The method for improving usability of an application program interface according to claim 1,
the return data characteristic truth value comprises: at least one of a correct HTTP status code, a correct data header, a correct data content, and a preset response time threshold;
the process of judging whether the application program interface is in a normal state according to the returned data characteristic true value and the current returned data characteristic to obtain the current state of the application program interface comprises,
a first judging process, judging whether the HTTP status code of the current returned data is the same as the correct HTTP status code, if so, determining the HTTP status code as normal, otherwise, determining the HTTP status code as abnormal;
a second judging process, judging whether the data header of the current returned data is the same as the correct data header, if so, determining the data header as normal, otherwise, determining the data header as abnormal;
a third judging process of judging whether the data content of the current returned data is the same as the correct data content or not, if so, determining the data content as normal, otherwise, determining the data content as abnormal; and/or
A fourth judging process of judging whether the response time consumed by the current return data is smaller than the response time threshold, if so, determining the response time as normal, otherwise, determining the response time as abnormal;
and judging whether the application program interface is in a normal state according to the result of the first judging process, the result of the second judging process, the result of the third judging process or the result of the fourth judging process, so as to obtain the current state of the application program interface.
3. The method for improving usability of an application program interface according to claim 2, wherein the step of determining whether the application program interface is in a normal state based on the first determination result, the second determination result, the third determination result, or the fourth determination result includes,
if the result of the first judging process is that the abnormal number of HTTP status codes exceeds a preset first time threshold, the result of the second judging process is that the abnormal number of data headers exceeds a preset second time threshold, the result of the third judging process is that the abnormal number of data contents exceeds a preset third time threshold, or the result of the fourth judging process is that the abnormal number of response time exceeds a preset fourth time threshold, determining the current state of the application program interface as abnormal;
otherwise, the current state of the application program interface is determined to be normal.
4. The method of claim 1, wherein notifying the technician of the abnormal current status in time comprises,
and according to the emergency degree of the application program interface preset manually, sending a notification for 24 hours to the information that the current state of the application program interface is abnormal and sending the notification only in working time to the information that the current state of the application program interface is abnormal.
5. The method of claim 1, wherein the step of notifying the technician of the abnormality in the current state in time comprises,
and sending the information of the abnormal current state to the related technicians once every preset time length, wherein the frequency of sending the information of the abnormal current state to the related technicians does not exceed a preset fifth frequency threshold.
6. The method for improving usability of an application program interface according to claim 1, wherein the process of notifying the related technician of the repair result in time comprises,
if the state of the application program interface is restored to the normal state after the restoration is successful, the information that the current state is normal is sent to the related technicians;
if the repair fails, continuing to send the information that the current state is abnormal to inform the related technicians until the repair is successful.
7. The method for improving usability of an application program interface of claim 1, further comprising,
and recording the current state of the application program interface.
8. An application program interface usability improving apparatus, comprising,
the monitoring module is used for monitoring the process of acquiring the return data by using the application program interface in real time to obtain the current return data characteristics;
the state acquisition module is used for judging whether the application program interface is in a normal state according to the returned data characteristic true value and the current returned data characteristic to obtain the current state of the application program interface;
the notification module is used for timely notifying relevant technicians of the information that the current state is abnormal if the current state of the application program interface is abnormal, and timely notifying the relevant technicians of the repair result;
the return data feature true value is obtained according to the normal return data feature definition of the application program interface.
9. A computer readable storage medium storing computer instructions operable to perform the application program interface availability improvement method of any one of claims 1-7.
10. A computer device comprising a processor and a memory, the memory storing computer instructions, wherein the processor operates the computer instructions to perform the application program interface availability improvement method of any one of claims 1-7.
CN202111629480.4A 2021-12-28 2021-12-28 Method, device, medium and equipment for improving usability of application program interface Pending CN116361101A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111629480.4A CN116361101A (en) 2021-12-28 2021-12-28 Method, device, medium and equipment for improving usability of application program interface

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111629480.4A CN116361101A (en) 2021-12-28 2021-12-28 Method, device, medium and equipment for improving usability of application program interface

Publications (1)

Publication Number Publication Date
CN116361101A true CN116361101A (en) 2023-06-30

Family

ID=86910649

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111629480.4A Pending CN116361101A (en) 2021-12-28 2021-12-28 Method, device, medium and equipment for improving usability of application program interface

Country Status (1)

Country Link
CN (1) CN116361101A (en)

Similar Documents

Publication Publication Date Title
CN109522287B (en) Monitoring method, system, equipment and medium for distributed file storage cluster
CN108512689B (en) Micro-service monitoring method and server
CN110661659A (en) Alarm method, device and system and electronic equipment
CN107329877B (en) Air ticket business monitoring and executing system and method
CN112115026B (en) Server cluster monitoring method and device, electronic equipment and readable storage medium
US8161326B2 (en) Method and system for managing information technology (IT) infrastructural elements
CN111274052A (en) Data distribution method, server, and computer-readable storage medium
CN110928716B (en) Scheduling task exception handling method and device
CN113176978A (en) Monitoring method, system and device based on log file and readable storage medium
CN114201201A (en) Method, device and equipment for detecting abnormity of business system
CN113746703B (en) Abnormal link monitoring method, system and device
CN109240863A (en) A kind of cpu fault localization method, device, equipment and storage medium
CN113438113A (en) Monitoring and maintaining method and system for equipment operation abnormity based on Internet of things
CN110363381B (en) Information processing method and device
CN110674149B (en) Service data processing method and device, computer equipment and storage medium
CN110011845B (en) Log collection method and system
CN112910733A (en) Full link monitoring system and method based on big data
CN116361101A (en) Method, device, medium and equipment for improving usability of application program interface
JP2010015246A (en) Failure information analysis management system
CN113472881B (en) Statistical method and device for online terminal equipment
CN112910684B (en) Method and terminal for monitoring key data through real-time streaming platform
CN114356722A (en) Monitoring alarm method, system, equipment and storage medium for server cluster
CN112686644A (en) Project operation state monitoring method, system, equipment and storage medium
CN112035315A (en) Webpage data monitoring method and device, computer equipment and storage medium
CN112416701A (en) Service data monitoring method and device, computer equipment and readable 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