[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN107948744B - Interface detection method, interface detection device, and computer-readable storage medium - Google Patents

Interface detection method, interface detection device, and computer-readable storage medium Download PDF

Info

Publication number
CN107948744B
CN107948744B CN201711334290.3A CN201711334290A CN107948744B CN 107948744 B CN107948744 B CN 107948744B CN 201711334290 A CN201711334290 A CN 201711334290A CN 107948744 B CN107948744 B CN 107948744B
Authority
CN
China
Prior art keywords
interface
monitored
service
detection
terminal
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
CN201711334290.3A
Other languages
Chinese (zh)
Other versions
CN107948744A (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.)
Shenzhen leynew Network Media Co Ltd
Original Assignee
Shenzhen Leiniao Network Media 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 Shenzhen Leiniao Network Media Co ltd filed Critical Shenzhen Leiniao Network Media Co ltd
Priority to CN201711334290.3A priority Critical patent/CN107948744B/en
Publication of CN107948744A publication Critical patent/CN107948744A/en
Application granted granted Critical
Publication of CN107948744B publication Critical patent/CN107948744B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/442Monitoring of processes or resources, e.g. detecting the failure of a recording device, monitoring the downstream bandwidth, the number of times a movie has been viewed, the storage space available from the internal hard disk
    • H04N21/4424Monitoring of the internal components or processes of the client device, e.g. CPU or memory load, processing speed, timer, counter or percentage of the hard disk space used
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N17/00Diagnosis, testing or measuring for television systems or their details
    • H04N17/004Diagnosis, testing or measuring for television systems or their details for digital television systems
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/442Monitoring of processes or resources, e.g. detecting the failure of a recording device, monitoring the downstream bandwidth, the number of times a movie has been viewed, the storage space available from the internal hard disk
    • H04N21/4425Monitoring of client processing errors or hardware failure

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Databases & Information Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • General Health & Medical Sciences (AREA)
  • Telephonic Communication Services (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention discloses an interface detection method, interface detection equipment and a computer readable storage medium, wherein the interface detection method comprises the following steps: when detecting that the terminal calls the interface to be monitored, acquiring an interface return value of the interface to be monitored; when the interface return value is detected to be an abnormal value, executing interface abnormal processing according to the abnormal value, and outputting an alarm prompt; and when detecting that the interface return value is a normal value, recording the detection process in a detection log so as to be convenient for a user to consult. The method and the device ensure the normal operation of the interface of the intelligent terminal, shorten the technical debugging period of the intelligent terminal, accelerate the working efficiency of developers in abnormal positioning and technical debugging, improve the self-checking efficiency of the intelligent terminal and greatly improve the use experience of users.

Description

Interface detection method, interface detection device, and computer-readable storage medium
Technical Field
The present invention relates to the field of interface detection technologies, and in particular, to an interface detection method, an interface detection device, and a computer-readable storage medium.
Background
With the rapid development of intelligent terminal technology, smart televisions are also more and more popular at present. Under the background of the vigorous development of the intelligent television, more and more functions of the intelligent television meet more and more functional requirements of users, the use experience of the users is greatly improved, and the users can conveniently and quickly enjoy the intelligent service of the intelligent television.
However, with the higher integration degree of the functional services, the requirement of the smart television for ensuring the safe and stable operation of various functional services is higher. At present, the traditional solution is to collect the records of the running logs in the smart television for positioning and debugging, but the method needs to consume a large amount of time, and users cannot enjoy the functional service in time.
Therefore, how to quickly judge and position the operation problem of the smart television is a problem to be solved urgently at present.
Disclosure of Invention
The invention mainly aims to provide an interface detection method, interface detection equipment and a computer readable storage medium, and aims to solve the technical problems that a traditional intelligent terminal cannot be quickly positioned and debugged, and the safe and stable operation of various functional services is guaranteed.
In order to achieve the above object, an embodiment of the present invention provides an interface detection method, where the interface detection method is applied to a terminal, and the interface detection method includes:
when detecting that the terminal calls the interface to be monitored, acquiring an interface return value of the interface to be monitored;
when the interface return value is detected to be an abnormal value, executing interface abnormal processing according to the abnormal value, and outputting an alarm prompt;
and when detecting that the interface return value is a normal value, recording the detection process in a detection log so as to be convenient for a user to consult.
Preferably, when it is detected that the interface return value is a normal value, the step of recording the current detection process in the detection log so that the user can refer to the detection log includes:
when detecting that the interface return value is a normal value, acquiring an analysis rule of the interface to be monitored;
acquiring a service code of an interface to be monitored, and judging whether the service code is a service error code or not according to a resolution rule;
and when the service code is detected not to be the service error code, recording the detection process in a detection log so as to be convenient for a user to consult.
Preferably, the step of obtaining the service code of the interface to be monitored and judging whether the service code is a service error code according to the parsing rule further includes:
and when the service code is detected to be the service error code, performing service error processing based on the service error code, and outputting an alarm prompt.
Preferably, after the step of executing the service error processing based on the service error code and outputting the alarm prompt when it is detected that the service code is the service error code, the method further includes:
and when the service code of the interface to be monitored, which is acquired by the terminal within the preset times after the service error processing, is the service error code, acquiring the service downloading service of the interface to be monitored so as to repair the interface to be monitored.
Preferably, after the step of executing the interface exception processing according to the abnormal value and outputting the alarm prompt when the interface return value is detected to be the abnormal value, the method further includes:
when the interface return value of the interface to be monitored, which is acquired by the terminal within the preset times after the interface exception processing, is an abnormal value, acquiring an emergency standby interface corresponding to the interface to be monitored;
and outputting an alarm prompt, and using the emergency standby interface as an interface to be monitored for calling.
Preferably, the interface detection method further includes:
when detecting that the terminal calls the interface to be monitored and cannot obtain an interface return value of the interface to be monitored, obtaining an emergency standby interface corresponding to the interface to be monitored;
and outputting an alarm prompt, and using the emergency standby interface as an interface to be monitored for calling.
In addition, to achieve the above object, the present invention further provides an interface detecting apparatus, including: a memory, a processor, a communication bus, and an interface detection program stored on the memory,
the communication bus is used for realizing communication connection between the processor and the memory;
the processor is configured to execute the interface detection program to implement the following steps:
when detecting that the terminal calls the interface to be monitored, acquiring an interface return value of the interface to be monitored;
when the interface return value is detected to be an abnormal value, executing interface abnormal processing according to the abnormal value, and outputting an alarm prompt;
and when detecting that the interface return value is a normal value, recording the detection process in a detection log so as to be convenient for a user to consult.
Preferably, when it is detected that the interface return value is a normal value, the step of recording the current detection process in the detection log so that the user can refer to the detection log includes:
when detecting that the interface return value is a normal value, acquiring an analysis rule of the interface to be monitored;
acquiring a service code of an interface to be monitored, and judging whether the service code is a service error code or not according to a resolution rule;
and when the service code is detected not to be the service error code, recording the detection process in a detection log so as to be convenient for a user to consult.
Preferably, the step of obtaining the service code of the interface to be monitored and judging whether the service code is a service error code according to the parsing rule further includes:
and when the service code is detected to be the service error code, performing service error processing based on the service error code, and outputting an alarm prompt.
Preferably, after the step of executing the service error processing based on the service error code and outputting the alarm prompt when it is detected that the service code is the service error code, the method further includes:
and when the service code of the interface to be monitored, which is acquired by the terminal within the preset times after the service error processing, is the service error code, acquiring the service downloading service of the interface to be monitored so as to repair the interface to be monitored.
Preferably, after the step of executing the interface exception processing according to the abnormal value and outputting the alarm prompt when the interface return value is detected to be the abnormal value, the method further includes:
when the interface return value of the interface to be monitored, which is acquired by the terminal within the preset times after the interface exception processing, is an abnormal value, acquiring an emergency standby interface corresponding to the interface to be monitored;
and outputting an alarm prompt, and using the emergency standby interface as an interface to be monitored for calling.
Preferably, the interface detection method further includes:
when detecting that the terminal calls the interface to be monitored and cannot obtain an interface return value of the interface to be monitored, obtaining an emergency standby interface corresponding to the interface to be monitored;
and outputting an alarm prompt, and using the emergency standby interface as an interface to be monitored for calling.
Further, to achieve the above object, the present invention also provides a computer-readable storage medium storing one or more programs, the one or more programs being executable by one or more processors for:
when detecting that the terminal calls the interface to be monitored, acquiring an interface return value of the interface to be monitored;
when the interface return value is detected to be an abnormal value, executing interface abnormal processing according to the abnormal value, and outputting an alarm prompt;
and when detecting that the interface return value is a normal value, recording the detection process in a detection log so as to be convenient for a user to consult.
The method comprises the steps of acquiring an interface return value of an interface to be monitored when a terminal calls the interface to be monitored; when the interface return value is detected to be an abnormal value, executing interface abnormal processing according to the abnormal value, and outputting an alarm prompt; and when detecting that the interface return value is a normal value, recording the detection process in a detection log so as to be convenient for a user to consult. Through the mode, the technical problems that a traditional intelligent terminal cannot be quickly positioned and debugged and safe and stable operation of various functional services is guaranteed are solved, the interface to be monitored of the intelligent terminal is monitored in real time, so that abnormal conditions possibly existing at the interface to be monitored of the intelligent terminal are actively detected when the intelligent terminal cannot normally operate, technical errors are quickly eliminated according to a corresponding abnormal processing strategy, and the intelligent terminal is quickly returned to a normal operation state. The method and the device ensure the normal operation of the interface of the intelligent terminal, shorten the technical debugging period of the intelligent terminal, accelerate the working efficiency of developers in abnormal positioning and technical debugging, improve the self-checking efficiency of the intelligent terminal and greatly improve the use experience of users.
Drawings
FIG. 1 is a schematic flow chart illustrating a first embodiment of an interface detection method according to the present invention;
FIG. 2 is a flowchart illustrating a second embodiment of an interface detection method according to the present invention;
FIG. 3 is a functional block diagram of the interface detecting device according to the present invention;
fig. 4 is a schematic device structure diagram of a hardware operating environment related to the method according to the embodiment of the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The invention provides an interface detection method, which is applied to a terminal, and in a first embodiment of the interface detection method, referring to fig. 1, the interface detection method comprises the following steps:
step S10, when detecting that the terminal calls the interface to be monitored, acquiring an interface return value of the interface to be monitored;
the interface to be monitored is an interface which is preset in the terminal and is used as a monitoring object, and the terminal can configure all the interfaces to be monitored into the interface to be monitored in advance so as to monitor the interface to be monitored at any time. Generally, in the process of calling the interface to be monitored, a corresponding interface return value is generated according to the calling condition. The interface return value refers to the actual calling condition of the interface to be monitored in the calling process. The calling condition may be whether the interface call is successful, may be data traffic in the interface call process, may be a delay rate of the network request, and the like. The interface to be monitored records the calling conditions of the interfaces, and generates an interface return value according to the different calling conditions and preset rules, wherein the interface return value represents the calling condition of the interface to be monitored. Therefore, the terminal acquires the interface return value of the interface to be monitored in the process of calling the interface to be monitored.
It can be understood that the interface to be monitored may interface to a plurality of functional services in the process of being invoked, and some of the functional services may be capable of being normally interfaced while some of the functional services are incapable of being normally interfaced, that is, the interface return value may present different invocation situations for different functional services, that is, the interface return value of one interface to be monitored may be more than one, but a plurality of interface return values exist, and respectively correspond to different functional services.
Step S20, when the interface return value is detected to be an abnormal value, the interface abnormal processing is executed according to the abnormal value, and an alarm prompt is output;
in the terminal calling process, the interface return value generally represents the calling condition in the form of 0, 1, -1, and the specific calling condition can be corresponded to the specific calling instance through the preset rule. Under normal conditions, the interface return value received by the terminal divides normal conditions and abnormal conditions according to the setting in the preset rule, namely, the calling conditions represented by the interface return value are normal and abnormal through numerical values. For example, if the interface return value should return to 1 under normal conditions, but the actual condition is that the interface return value acquired by the terminal is 0 or-1, then the interface return value of the interface to be monitored at this time is an abnormal value, and the abnormal value proves that the interface to be monitored called by the current terminal cannot normally operate, and an abnormal operation condition occurs.
Since modern intelligent terminals are all products with very high integration level, abnormal operation on a certain interface may affect the normal operation of the whole terminal, and in order to eliminate the technical problem, the terminal needs to analyze the abnormal value to cope with the current abnormal condition of interface calling.
In this embodiment, the terminal will make a corresponding processing policy on the abnormal condition that may occur in advance, and the processing policies are all stored in the database of the terminal. Since the abnormal condition occurs mainly in the process of interface calling, the abnormal detection processing can be performed for the interface according to the specific situation of the abnormal value.
And searching a corresponding exception handling strategy in a database of the terminal according to the exception value, wherein the exception handling strategy is generally to inspect a specific exception link in a calling process of the interface to be monitored so as to obtain an exception reason. The abnormal reason of the interface to be monitored can be that the interface to be monitored is continuously called within a preset time; or the unit transmission data volume reaches a threshold value; or the interface to be monitored is blocked when a network signal is requested, and the like, and of course, the abnormal reason includes, but is not limited to, the above, and the abnormal value is both the manifestation of the abnormal condition and the location of the abnormal reason.
And when the interface exception processing is executed according to the abnormal value and after the interface exception processing is finished, the terminal outputs an alarm prompt according to specific conditions. The alarm prompt is a prompt for a processing process and a notice prompt for a user to operate the terminal.
In step S30, when the interface return value is detected to be a normal value, the current detection process is recorded in the detection log so as to be referred by the user.
On the contrary, when the terminal detects that the interface return value is a normal value, it is proved that the current flow of the interface to be monitored in the calling process is completely normal, and no calling error occurs, that is, the connection between the interface to be monitored and the external function service is normal, and the normal connection between the interface to be monitored and the external function service means that the interface to be monitored can normally call the external function service. And the terminal can conveniently look up the related record information by subsequent users, record the detection process in the detection log and store the detection process in the database of the terminal.
The method comprises the steps of acquiring an interface return value of an interface to be monitored when a terminal calls the interface to be monitored; when the interface return value is detected to be an abnormal value, executing interface abnormal processing according to the abnormal value, and outputting an alarm prompt; and when detecting that the interface return value is a normal value, recording the detection process in a detection log so as to be convenient for a user to consult. Through the mode, the technical problems that a traditional intelligent terminal cannot be quickly positioned and debugged and safe and stable operation of various functional services is guaranteed are solved, the interface to be monitored of the intelligent terminal is monitored in real time, so that abnormal conditions possibly existing at the interface to be monitored of the intelligent terminal are actively detected when the intelligent terminal cannot normally operate, technical errors are quickly eliminated according to a corresponding abnormal processing strategy, and the intelligent terminal is quickly returned to a normal operation state. The method and the device ensure the normal operation of the interface of the intelligent terminal, shorten the technical debugging period of the intelligent terminal, accelerate the working efficiency of developers in abnormal positioning and technical debugging, improve the self-checking efficiency of the intelligent terminal and greatly improve the use experience of users.
Further, on the basis of the first embodiment of the interface detection method of the present invention, a second embodiment of the interface detection method of the present invention is proposed, and with reference to fig. 2, the difference from the foregoing embodiment is that, when it is detected that the interface return value is a normal value, the step of recording the current detection flow in the detection log so as to be referred by the user includes:
step S31, when detecting that the interface return value is a normal value, acquiring the analysis rule of the interface to be monitored;
when the terminal detects that the interface return value is a normal value, the terminal proves that the current interface to be monitored can be normally connected with the external function service, but the normal correspondence that the interface to be monitored can obtain the external function service cannot be guaranteed. Since the external function service is called, the external function service is firstly operated under normal business logic, that is, the interface to be monitored needs to be firstly connected with the external function service, and correct data is acquired from the external function service, and the correct data needs to be considered from multiple dimensions such as data format, acquisition time and acquisition method. And judging whether the interface to be monitored normally executes the service flow, and acquiring the analysis rule of the interface to be monitored by the terminal. The analysis rule refers to the detection of the execution flow of the interface to be monitored and the analysis of whether the service flow can be normally executed.
Step S32, acquiring the service code of the interface to be monitored, and judging whether the service code is a service error code according to the analysis rule;
after acquiring the corresponding service data, the interface to be monitored feeds back a service code. The service code refers to that in the process of calling the interface to be monitored, the interface to be monitored returns a service code according to the actual condition of calling the service data, and the service code is divided into two states including a service correct code and a service error code. The service correct code means that the interface to be monitored can obtain correct functional service data, and the service error code means that the functional service data obtained by the interface to be monitored is wrong or invalid. The service code needs to be resolved through the interface flow to determine whether it is correct or incorrect. Therefore, when the terminal detects that the interface playback value is a normal value, the terminal needs to acquire the analysis rule of the interface to be monitored. Therefore, the terminal needs to acquire the service code in the interface to be monitored, and determine whether the service code is a service error code according to the analysis rule.
Step S33, when detecting that the service code is not a service error code, recording the detection process in a detection log for the user to look up;
when the service code is detected not to be the service error code, it is proved that all the processes executed by the interface to be monitored in the detection process are correct, which means that the calling process of the interface is correct, and the terminal can record the detection process in the detection log so as to be convenient for the follow-up user to look up.
And step S34, when the service code is detected to be the service error code, performing service error processing based on the service error code, and outputting an alarm prompt.
When the service code is detected to be a service error code, it is proved that the current interface to be monitored cannot normally acquire normal service data in the process of calling the external function service, that is, the interface to be monitored has a service logic error, which may be in the process of flow design, code design, or the like. Since the service error code can represent an error in a certain link of the service flow, the terminal can locate the error in the service logic of the current interface to be monitored through the service error code, and prestore all possibly expected errors in the service logic on the terminal, and make a corresponding processing mechanism based on the errors. When the service error code is detected, the terminal can acquire a specific service error processing mechanism prestored in the terminal according to the service error code, perform service error processing according to the service error mechanism, and output an alarm prompt.
Further, on the basis of the second embodiment of the interface detection method of the present invention, a third embodiment of the interface detection method of the present invention is proposed, which is different from the foregoing embodiments in that, when it is detected that the service code is a service error code, the step of performing service error processing based on the service error code and outputting an alarm prompt further includes:
step S35, when the service code of the interface to be monitored, which is obtained by the terminal within the preset number of times after the service error processing, is the service error code, obtaining a service download service of the interface to be monitored, so as to repair the interface to be monitored.
After the service error processing, the terminal sets a preset number of times of recalling for the interface to be monitored, the service error processing is the repair of the service logic flow and the service logic design on the interface to be monitored, and if the terminal still obtains the service error code within the preset number of times after the repair, the terminal is proved to be incapable of repairing the error on the current interface to be monitored. In this embodiment, an online repair method is provided, in which a terminal is connected to a service provider corresponding to an interface to be monitored, and a service logic flow or a service logic design of the interface to be monitored is downloaded to replace the service logic flow or the service logic design of the interface to be monitored of the terminal itself. Because the technical service provided by the service provider is the latest stable service, the business logic flow or the business logic design is more perfect and stable, and the problem that the intelligent terminal cannot normally operate due to business errors can be avoided.
Further, on the basis of the first embodiment of the interface detection method of the present invention, a fourth embodiment of the interface detection method of the present invention is proposed, which is different from the foregoing embodiments in that, after the step of performing the interface abnormality processing based on the abnormal value and outputting the alarm prompt when the interface return value is detected to be the abnormal value, the method further includes:
step S40, when the interface return value of the interface to be monitored, which is obtained by the terminal within the preset times, is an abnormal value after the interface exception processing, obtaining an emergency standby interface corresponding to the interface to be monitored;
and step S50, outputting an alarm prompt, and using the emergency standby interface as the interface to be monitored for calling.
After the interface exception processing, the interface to be monitored can repair, restart and initialize itself to eliminate the exception condition of the interface to be monitored in code design or business logic design, so as to restore the interface to be monitored to a normal calling state. However, it is assumed that after the terminal performs exception processing on the interface to be monitored, the interface return value returned by the interface to be monitored is always an abnormal value and is still an abnormal value in the process of multiple times of exception processing or multiple times of recall. This means that the interface to be monitored cannot complete its functional flow, and belongs to an unavailable interface. In this embodiment, a preset number of times is set for the interface to be monitored as a threshold judgment, and when all interface return values obtained by the terminal are abnormal values within the preset number of times, the terminal discontinues using the interface to be monitored as a call interface and uses an emergency standby interface of the interface to be monitored instead. The emergency standby interface refers to that when the terminal sets the interface to be monitored as the calling interface, a corresponding standby interface is also set, and the standby debit interface has a relatively simple function relative to the interface to be monitored or is slightly inferior in functional efficiency, but can realize the basic function of the interface to be monitored.
It can be understood that the emergency standby interface is only used as an emergency standby, in the process that the emergency standby interface is used as a temporary replacement interface of the interface to be monitored, the terminal can output an alarm prompt in time, the terminal can inform development and maintenance personnel to maintain the interface to be monitored, after the interface to be monitored is recovered to be normal, the terminal can restart the interface to be monitored, and the emergency standby interface is used as a standby interface in an emergency.
Further, on the basis of the fourth embodiment of the interface detection method of the present invention, a fifth embodiment of the interface detection method of the present invention is proposed, which is different from the foregoing embodiments in that the interface detection method further includes:
step S60, when detecting that the terminal calls the interface to be monitored and cannot obtain the interface return value of the interface to be monitored, obtaining an emergency standby interface corresponding to the interface to be monitored;
and step S70, outputting an alarm prompt, and using the emergency standby interface as the interface to be monitored for calling.
In real life, there may be an extreme scenario where the interface to be monitored is damaged due to internal design or external force, so that the terminal cannot monitor and detect the interface to be monitored. At this time, since the interface to be monitored has lost effectiveness, it cannot play a role, and even if the terminal calls the interface to be monitored, the interface return value of the interface to be monitored cannot be normally obtained. And the interface to be monitored cannot play a role, at the moment, the terminal uses the interface to be monitored as a calling interface and uses the emergency standby interface of the interface to be monitored. The emergency standby interface is utilized to complete the basic function of the interface to be monitored, and the terminal outputs an alarm prompt to inform development and maintenance personnel to maintain the interface to be monitored in the process of temporarily replacing the interface to be monitored by the emergency standby interface. After the interface to be monitored is recovered to normal, the terminal restarts the interface to be monitored, and the emergency standby interface is used as a standby interface in emergency.
Referring to fig. 3 and fig. 4, fig. 3 is a schematic diagram of functional modules of the interface detection device of the present invention, and fig. 4 is a schematic diagram of a device structure of a hardware operating environment related to a method according to an embodiment of the present invention.
The terminal of the embodiment of the invention can be a PC, and can also be a terminal device such as a smart phone, a tablet computer, an electronic book reader, an MP3(Moving Picture Experts Group Audio Layer III, dynamic video Experts compression standard Audio Layer 3) player, an MP4(Moving Picture Experts Group Audio Layer IV, dynamic video Experts compression standard Audio Layer 4) player, a portable computer and the like.
As shown in fig. 4, the interface detecting apparatus may include: a processor 1001, such as a CPU, a memory 1005, and a communication bus 1002. The communication bus 1002 is used for realizing connection communication between the processor 1001 and the memory 1005. The memory 1005 may be a high-speed RAM memory or a non-volatile memory (e.g., a magnetic disk memory). The memory 1005 may alternatively be a storage device separate from the processor 1001.
Optionally, the interface detection device may further include a user interface, a network interface, a camera, RF (Radio Frequency) circuitry, a sensor, audio circuitry, a WiFi module, and so on. The user interface may comprise a Display screen (Display), an input unit such as a Keyboard (Keyboard), and the optional user interface may also comprise a standard wired interface, a wireless interface. The network interface may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface).
Those skilled in the art will appreciate that the interface detection apparatus configuration shown in FIG. 4 does not constitute a limitation of the interface detection apparatus and may include more or fewer components than shown, or some components in combination, or a different arrangement of components.
As shown in fig. 4, a memory 1005, which is a kind of computer storage medium, may include therein an operating system, a network communication module, and an interface detection program. The operating system is a program that manages and controls the interface detection device hardware and software resources, supporting the operation of the interface detection program as well as other software and/or programs. The network communication module is used to implement communication between the components inside the memory 1005 and with other hardware and software in the interface detection device.
In the interface detection apparatus shown in fig. 4, the processor 1001 is configured to execute an interface detection program stored in the memory 1005, and implement the following steps:
when detecting that the terminal calls the interface to be monitored, acquiring an interface return value of the interface to be monitored;
when the interface return value is detected to be an abnormal value, executing interface abnormal processing according to the abnormal value, and outputting an alarm prompt;
and when detecting that the interface return value is a normal value, recording the detection process in a detection log so as to be convenient for a user to consult.
Further, when it is detected that the interface return value is a normal value, recording the current detection process in a detection log, so that a user can refer the detection process, including:
when detecting that the interface return value is a normal value, acquiring an analysis rule of the interface to be monitored;
acquiring a service code of an interface to be monitored, and judging whether the service code is a service error code or not according to a resolution rule;
and when the service code is detected not to be the service error code, recording the detection process in a detection log so as to be convenient for a user to consult.
Further, the step of obtaining the service code of the interface to be monitored and judging whether the service code is a service error code according to the parsing rule further includes:
and when the service code is detected to be the service error code, performing service error processing based on the service error code, and outputting an alarm prompt.
Further, when it is detected that the service code is a service error code, the step of performing service error processing based on the service error code and outputting an alarm prompt further includes:
and when the service code of the interface to be monitored, which is acquired by the terminal within the preset times after the service error processing, is the service error code, acquiring the service downloading service of the interface to be monitored so as to repair the interface to be monitored.
Further, when it is detected that the interface return value is an abnormal value, the step of executing the interface exception processing according to the abnormal value and outputting the alarm prompt further includes:
when the interface return value of the interface to be monitored, which is acquired by the terminal within the preset times after the interface exception processing, is an abnormal value, acquiring an emergency standby interface corresponding to the interface to be monitored;
and outputting an alarm prompt, and using the emergency standby interface as an interface to be monitored for calling.
Further, the interface detection method further includes:
when detecting that the terminal calls the interface to be monitored and cannot obtain an interface return value of the interface to be monitored, obtaining an emergency standby interface corresponding to the interface to be monitored;
and outputting an alarm prompt, and using the emergency standby interface as an interface to be monitored for calling.
The specific implementation of the interface detection device of the present invention is substantially the same as that of each embodiment of the interface detection method described above, and is not described herein again.
The present invention also provides a computer readable storage medium storing one or more programs, the one or more programs being further executable by one or more processors for:
when detecting that the terminal calls the interface to be monitored, acquiring an interface return value of the interface to be monitored;
when the interface return value is detected to be an abnormal value, executing interface abnormal processing according to the abnormal value, and outputting an alarm prompt;
and when detecting that the interface return value is a normal value, recording the detection process in a detection log so as to be convenient for a user to consult.
The specific implementation of the computer-readable storage medium of the present invention is substantially the same as the embodiments of the interface detection method described above, and is not described herein again.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (8)

1. An interface detection method is applied to a terminal, and is characterized in that the interface detection method comprises the following steps:
when detecting that the terminal calls the interface to be monitored, acquiring an interface return value of the interface to be monitored;
when the interface return value is detected to be an abnormal value, executing interface abnormal processing according to the abnormal value, and outputting an alarm prompt, wherein the alarm prompt is a prompt for a processing process and a notice prompt for a user operation terminal;
when the interface return value of the interface to be monitored, which is acquired by the terminal within the preset times after the interface exception processing, is an abnormal value, acquiring an emergency standby interface corresponding to the interface to be monitored;
outputting an alarm prompt, and using the emergency standby interface as an interface to be monitored for calling;
when detecting that the interface return value is a normal value, recording the detection process in a detection log so as to be convenient for a user to look up;
the interface detection method further comprises the following steps:
when the terminal is detected to call the interface to be monitored and cannot acquire the interface return value of the interface to be monitored, acquiring an emergency standby interface corresponding to the interface to be monitored, wherein the interface to be monitored is damaged due to internal design or external force, so that the terminal cannot monitor and detect the interface to be monitored to acquire the interface return value.
2. The interface detecting method according to claim 1, wherein the step of recording the current detection process in the detection log when detecting that the interface return value is a normal value, so that the user refers to the detection log includes:
when detecting that the interface return value is a normal value, acquiring an analysis rule of the interface to be monitored;
acquiring a service code of an interface to be monitored, and judging whether the service code is a service error code or not according to a resolution rule;
and when the service code is detected not to be the service error code, recording the detection process in a detection log so as to be convenient for a user to consult.
3. The interface detection method according to claim 2, wherein the step of obtaining the service code of the interface to be monitored and determining whether the service code is a service error code according to the parsing rule further comprises:
and when the service code is detected to be the service error code, performing service error processing based on the service error code, and outputting an alarm prompt.
4. The interface detection method of claim 3,
when the step of detecting that the service code is the service error code, the step of executing service error processing based on the service error code and outputting an alarm prompt further comprises:
and when the service code of the interface to be monitored, which is acquired by the terminal within the preset times after the service error processing, is the service error code, acquiring the service downloading service of the interface to be monitored so as to repair the interface to be monitored.
5. An interface detection device, comprising: a memory, a processor, a communication bus, and an interface detection program stored on the memory, the interface detection program when executed by the processor implementing the steps of:
when detecting that the terminal calls the interface to be monitored, acquiring an interface return value of the interface to be monitored;
when the interface return value is detected to be an abnormal value, executing interface abnormal processing according to the abnormal value, and outputting an alarm prompt, wherein the alarm prompt is a prompt for a processing process and a notice prompt for a user operation terminal;
when the interface return value of the interface to be monitored, which is acquired by the terminal within the preset times after the interface exception processing, is an abnormal value, acquiring an emergency standby interface corresponding to the interface to be monitored;
outputting an alarm prompt, and using the emergency standby interface as an interface to be monitored for calling;
when detecting that the interface return value is a normal value, recording the detection process in a detection log so as to be convenient for a user to look up;
wherein the interface detection program when executed by the processor further implements the steps of:
when the terminal is detected to call the interface to be monitored and cannot acquire the interface return value of the interface to be monitored, acquiring an emergency standby interface corresponding to the interface to be monitored, wherein the interface to be monitored is damaged due to internal design or external force, so that the terminal cannot monitor and detect the interface to be monitored to acquire the interface return value.
6. The interface detection device of claim 5, wherein the interface detection program when executed by the processor further performs the steps of:
when detecting that the interface return value is a normal value, acquiring an analysis rule of the interface to be monitored;
acquiring a service code of an interface to be monitored, and judging whether the service code is a service error code or not according to a resolution rule;
and when the service code is detected not to be the service error code, recording the detection process in a detection log so as to be convenient for a user to consult.
7. Interface detection device according to claim 5, wherein the interface detection program, when executed by the processor, further implements the steps of the interface detection method according to any one of claims 3 to 4.
8. A computer-readable storage medium, having stored thereon an interface detection program which, when executed by a processor, implements the steps of the interface detection method of any one of claims 1 to 4.
CN201711334290.3A 2017-12-13 2017-12-13 Interface detection method, interface detection device, and computer-readable storage medium Active CN107948744B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711334290.3A CN107948744B (en) 2017-12-13 2017-12-13 Interface detection method, interface detection device, and computer-readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711334290.3A CN107948744B (en) 2017-12-13 2017-12-13 Interface detection method, interface detection device, and computer-readable storage medium

Publications (2)

Publication Number Publication Date
CN107948744A CN107948744A (en) 2018-04-20
CN107948744B true CN107948744B (en) 2021-11-09

Family

ID=61943092

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711334290.3A Active CN107948744B (en) 2017-12-13 2017-12-13 Interface detection method, interface detection device, and computer-readable storage medium

Country Status (1)

Country Link
CN (1) CN107948744B (en)

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109728969B (en) * 2018-05-18 2022-04-15 平安普惠企业管理有限公司 Abnormal user detection method of application software, monitoring server and storage medium
CN110752962A (en) * 2018-07-23 2020-02-04 北京奇虎科技有限公司 Monitoring method and device of advertisement interface
CN110109818A (en) * 2019-03-15 2019-08-09 平安城市建设科技(深圳)有限公司 Monitoring method, device, terminal and the readable storage medium storing program for executing of back end interface data
CN110049139B (en) * 2019-05-05 2022-06-14 广东电网有限责任公司 Service proxy forwarding service system
CN110336690B (en) * 2019-05-23 2022-09-20 平安银行股份有限公司 Service request processing method, device, equipment and computer readable storage medium
CN110278124A (en) * 2019-06-18 2019-09-24 努比亚技术有限公司 The monitoring method of interface, device and computer readable storage medium on line
CN110955547B (en) * 2019-10-31 2022-03-22 北京浪潮数据技术有限公司 Management method, system, equipment and readable storage medium for interface abnormal information
CN111737129B (en) * 2020-06-19 2024-08-16 北京同邦卓益科技有限公司 Service control method, device, computer readable medium and electronic equipment
CN112486719B (en) * 2020-12-14 2023-07-04 上海万物新生环保科技集团有限公司 Method and equipment for RPC interface call failure processing
CN113971508A (en) * 2021-09-30 2022-01-25 北京蓝海医信科技有限公司 Method and device for processing interface call exception based on information integration platform
CN117112292B (en) * 2023-01-20 2024-05-14 荣耀终端有限公司 Abnormal restarting processing method and device

Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101247617A (en) * 2008-01-16 2008-08-20 中兴通讯股份有限公司 Apparatus and method for mobile communication service fault automatic detection
CN101610427A (en) * 2008-06-16 2009-12-23 中兴通讯股份有限公司 Interface message processor (IMP) calls implementation method and system
CN102413052A (en) * 2011-11-30 2012-04-11 华为技术有限公司 Method, device and system for accessing network
CN103139178A (en) * 2011-12-01 2013-06-05 腾讯数码(天津)有限公司 Validation method and device of internet open platform data request interface
CN104155971A (en) * 2014-08-07 2014-11-19 北京九五智驾信息技术股份有限公司 Self-diagnosis method for vehicle diagnosis apparatus protocols by vehicle diagnosis apparatus
CN105159728A (en) * 2015-09-25 2015-12-16 青岛海信宽带多媒体技术有限公司 Method and device for obtaining NTP time information based on android system
CN105512806A (en) * 2015-11-30 2016-04-20 国网浙江省电力公司电力科学研究院 Access method and system of data of unified vehicle management platform to mass platform
CN106059794A (en) * 2016-05-13 2016-10-26 努比亚技术有限公司 Monitoring method and monitoring apparatus
CN106301995A (en) * 2015-06-24 2017-01-04 北京京东尚科信息技术有限公司 The method and apparatus that a kind of automatic detection interface service is abnormal
CN106649045A (en) * 2016-12-30 2017-05-10 重庆腾帆科技有限公司 Third-party interface exception monitoring device
CN106776324A (en) * 2016-12-19 2017-05-31 广州酷狗计算机科技有限公司 Interface test method and device
CN107122258A (en) * 2017-04-18 2017-09-01 上海雷腾软件股份有限公司 Method and apparatus for the state code check of test interface
CN108880847A (en) * 2017-05-16 2018-11-23 北京微影时代科技有限公司 A kind of method and device of positioning failure

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102736975B (en) * 2011-04-13 2016-01-20 国民技术股份有限公司 A kind of method of testing that trusted computing password support platform is tested and system
CN103746861A (en) * 2013-10-29 2014-04-23 汉柏科技有限公司 Service inter-status mutual detection method
KR20170096451A (en) * 2016-02-16 2017-08-24 한국인터넷진흥원 Method and apparatus for analysing dynamic behavior of malicious application
CN105847083A (en) * 2016-03-22 2016-08-10 乐视云计算有限公司 Business centralized monitoring method and system
CN106506199A (en) * 2016-10-21 2017-03-15 乐视控股(北京)有限公司 The automatic monitoring method and device of interface in system line
CN106528372B (en) * 2016-10-26 2020-03-24 珠海许继芝电网自动化有限公司 Program operation monitoring system and method
CN107104815A (en) * 2017-01-17 2017-08-29 国家电网公司 A kind of method and device that Authority and Domain Based Management configuration distributing is realized to IMS network

Patent Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101247617A (en) * 2008-01-16 2008-08-20 中兴通讯股份有限公司 Apparatus and method for mobile communication service fault automatic detection
CN101610427A (en) * 2008-06-16 2009-12-23 中兴通讯股份有限公司 Interface message processor (IMP) calls implementation method and system
CN102413052A (en) * 2011-11-30 2012-04-11 华为技术有限公司 Method, device and system for accessing network
CN103139178A (en) * 2011-12-01 2013-06-05 腾讯数码(天津)有限公司 Validation method and device of internet open platform data request interface
CN104155971A (en) * 2014-08-07 2014-11-19 北京九五智驾信息技术股份有限公司 Self-diagnosis method for vehicle diagnosis apparatus protocols by vehicle diagnosis apparatus
CN106301995A (en) * 2015-06-24 2017-01-04 北京京东尚科信息技术有限公司 The method and apparatus that a kind of automatic detection interface service is abnormal
CN105159728A (en) * 2015-09-25 2015-12-16 青岛海信宽带多媒体技术有限公司 Method and device for obtaining NTP time information based on android system
CN105512806A (en) * 2015-11-30 2016-04-20 国网浙江省电力公司电力科学研究院 Access method and system of data of unified vehicle management platform to mass platform
CN106059794A (en) * 2016-05-13 2016-10-26 努比亚技术有限公司 Monitoring method and monitoring apparatus
CN106776324A (en) * 2016-12-19 2017-05-31 广州酷狗计算机科技有限公司 Interface test method and device
CN106649045A (en) * 2016-12-30 2017-05-10 重庆腾帆科技有限公司 Third-party interface exception monitoring device
CN107122258A (en) * 2017-04-18 2017-09-01 上海雷腾软件股份有限公司 Method and apparatus for the state code check of test interface
CN108880847A (en) * 2017-05-16 2018-11-23 北京微影时代科技有限公司 A kind of method and device of positioning failure

Also Published As

Publication number Publication date
CN107948744A (en) 2018-04-20

Similar Documents

Publication Publication Date Title
CN107948744B (en) Interface detection method, interface detection device, and computer-readable storage medium
CN109726072B (en) WebLogic server monitoring and alarming method, device and system and computer storage medium
US20190332513A1 (en) Method and apparatus for dealing with abnormality of application program and storage medium
CN107704360B (en) Monitoring data processing method, equipment, server and storage medium
CN109901881B (en) Plug-in loading method and device of application program, computer equipment and storage medium
CN110515821B (en) Event processing method based on buried point, electronic equipment and computer storage medium
US11438249B2 (en) Cluster management method, apparatus and system
CN106294108B (en) Application program testing method and device
US20150121344A1 (en) Method, apparatus and computer readable medium for automatic debugging and error prevention
CN104572318A (en) Report information obtaining method, device, equipment and system
CN102306119A (en) System for capturing global exception and method
CN109753419A (en) A kind of method and device of the abnormal log information of all applications of non-invasive monitoring Android system
CN105847446B (en) Method, device and system for acquiring network data
CN110727581A (en) Collapse positioning method and electronic equipment
CN113704117A (en) Algorithm testing system, method and device
CN104809054A (en) Method and system for realizing program testing
CN111061448A (en) Log information display method and device, electronic equipment and storage medium
CN112241362B (en) Test method, test device, server and storage medium
CN109669836B (en) Intelligent IT operation and maintenance analysis method, device, equipment and readable storage medium
CN117271374A (en) Simulation test method, device and equipment for chip and storage medium
CN106940647B (en) Code management method and device
CN110611576B (en) Data quality monitoring method, device, equipment and storage medium
CN112799910A (en) Hierarchical monitoring method and device
CN108063693B (en) Information uploading method and terminal equipment
CN111510432A (en) Safety monitoring method, device and equipment for website abnormity

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
TA01 Transfer of patent application right

Effective date of registration: 20200210

Address after: 201, room 518000, building A, No. 1, front Bay Road, Qianhai Shenzhen Guangdong Shenzhen Hong Kong cooperation zone (Qianhai business secretary)

Applicant after: Shenzhen leynew Network Media Co Ltd

Address before: 518000 Guangdong city of Shenzhen province Qianhai Shenzhen Hong Kong cooperation zone before Bay Road No. 1 building 201 room A (located in Shenzhen Qianhai business secretary Co. Ltd.)

Applicant before: Shenzhen leynew Mdt InfoTech Ltd

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant