CN117221171A - Interface call abnormality detection method, device, computer equipment and storage medium - Google Patents

Interface call abnormality detection method, device, computer equipment and storage medium Download PDF

Info

Publication number
CN117221171A
CN117221171A CN202311021734.3A CN202311021734A CN117221171A CN 117221171 A CN117221171 A CN 117221171A CN 202311021734 A CN202311021734 A CN 202311021734A CN 117221171 A CN117221171 A CN 117221171A
Authority
CN
China
Prior art keywords
time
time frame
long
short
call
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
CN202311021734.3A
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.)
Bank of China Ltd
Original Assignee
Bank of China 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 Bank of China Ltd filed Critical Bank of China Ltd
Priority to CN202311021734.3A priority Critical patent/CN117221171A/en
Publication of CN117221171A publication Critical patent/CN117221171A/en
Pending legal-status Critical Current

Links

Classifications

    • 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
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Telephonic Communication Services (AREA)

Abstract

The application relates to an interface call abnormality detection method, an interface call abnormality detection device, a computer device, a storage medium and a computer program product. The method comprises the following steps: acquiring call information of an interface to be detected; the calling information comprises a plurality of calling time nodes and response time lengths corresponding to the calling time nodes; obtaining detection signals according to the plurality of calling time nodes and response time lengths corresponding to the calling time nodes; framing the detection signal to obtain long-time frame energy of each long-time frame; the frame length of each long time frame comprises a plurality of adjacent calling time nodes; and when the interface to be detected is determined to have abnormal call according to the energy of each long time frame, outputting alarm prompt information. By adopting the method, the accuracy of the call abnormality detection of the interface can be improved.

Description

Interface call abnormality detection method, device, computer equipment and storage medium
Technical Field
The present application relates to the field of data processing technologies, and in particular, to a method, an apparatus, a computer device, a storage medium, and a computer program product for detecting interface call abnormality.
Background
In gateway systems, a fixed threshold is generally used to compare with an interface parameter to determine an interface state, for example, when the interface parameter is an interface response duration, and when the interface call duration is greater than a duration threshold, an interface call abnormality is determined.
However, some interfaces have larger call quantity, and in some time periods, because of the problem of network fluctuation, the response time of the interfaces is higher than a threshold value, so that the gateway system gives an alarm that the interfaces cannot be used, false alarm is caused, and the accuracy of detecting abnormal call of the interfaces is reduced.
Disclosure of Invention
In view of the foregoing, it is desirable to provide an interface call abnormality detection method, apparatus, computer device, computer-readable storage medium, and computer program product that can improve the accuracy of detecting interface call abnormalities.
In a first aspect, the present application provides a method for detecting interface call exceptions. The method comprises the following steps:
acquiring call information of an interface to be detected; the call information comprises a plurality of call time nodes and response time durations corresponding to the call time nodes;
obtaining detection signals according to a plurality of calling time nodes and response time lengths corresponding to the calling time nodes;
carrying out framing treatment on the detection signals to obtain long-time frame energy of each long-time frame; the frame length of each long time frame comprises a plurality of adjacent calling time nodes;
and outputting alarm prompt information when the interface to be detected is determined to have abnormal call according to the energy of each long time frame.
In one embodiment, the determining, according to the energy of each long time frame, that the interface to be detected has a call abnormality includes:
obtaining a long-time frame score corresponding to each long-time frame according to the energy of each long-time frame and the energy threshold;
when framing and windowing are carried out on the detection signals, obtaining target scores corresponding to short time frames in the detection signals according to the scores of the long time frames; wherein each of the long time frames includes a preset number of short time frames, each of the short time frames including at least one of the plurality of adjacent call time nodes;
and determining that the interface to be detected is abnormal in calling according to the target score corresponding to each short-time frame.
In one embodiment, when the detecting signal is windowed in frames, the obtaining the target score corresponding to each short time frame in the detecting signal according to each long time frame score includes:
according to the long time frame scores, obtaining short time frame scores corresponding to each short time frame in a window when the length of each short time frame is moved; wherein the window comprises a preset number of short-time frames;
and counting the short-time frame score corresponding to each short-time frame in the detection signal, and obtaining the target score corresponding to each short-time frame in the detection signal.
In one embodiment, the determining that the interface to be detected has a call abnormality according to the target score corresponding to each short-time frame includes:
acquiring a plurality of target short-time frames when the target score is larger than a score threshold value;
and when the total short-time frames corresponding to the target short-time frames are larger than the preset number, determining that the call of the interface to be detected is abnormal.
In one embodiment, the obtaining the long-time frame score corresponding to each long-time frame according to the energy of each long-time frame and the energy threshold value includes:
when the energy of the long time frame is smaller than or equal to the energy threshold value, determining the corresponding long time frame score as a first score;
when the energy of the long time frame is larger than the energy threshold value, determining the corresponding long time frame score as a second score; the second score is greater than the first score.
In a second aspect, the application further provides an interface call abnormality detection device. The device comprises:
the information acquisition module is used for acquiring calling information of the interface to be detected; the call information comprises a plurality of call time nodes and response time durations corresponding to the call time nodes;
the signal acquisition module is used for acquiring detection signals according to a plurality of calling time nodes and response time lengths corresponding to the calling time nodes;
The signal processing module is used for carrying out framing processing on the detection signals to obtain long-time frame energy of each long-time frame; the frame length of each long time frame comprises a plurality of adjacent calling time nodes;
and the control module is used for outputting alarm prompt information when the interface to be detected is determined to have abnormal call according to the energy of each long time frame.
In a third aspect, the present application also provides a computer device. The computer device comprises a memory storing a computer program and a processor which when executing the computer program performs the steps of:
acquiring call information of an interface to be detected; the call information comprises a plurality of call time nodes and response time durations corresponding to the call time nodes;
obtaining detection signals according to a plurality of calling time nodes and response time lengths corresponding to the calling time nodes;
carrying out framing treatment on the detection signals to obtain long-time frame energy of each long-time frame; the frame length of each long time frame comprises a plurality of adjacent calling time nodes;
and outputting alarm prompt information when the interface to be detected is determined to have abnormal call according to the energy of each long time frame.
In a fourth aspect, the present application also provides a computer-readable storage medium. The computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of:
acquiring call information of an interface to be detected; the call information comprises a plurality of call time nodes and response time durations corresponding to the call time nodes;
obtaining detection signals according to a plurality of calling time nodes and response time lengths corresponding to the calling time nodes;
carrying out framing treatment on the detection signals to obtain long-time frame energy of each long-time frame; the frame length of each long time frame comprises a plurality of adjacent calling time nodes;
and outputting alarm prompt information when the interface to be detected is determined to have abnormal call according to the energy of each long time frame.
In a fifth aspect, the present application also provides a computer program product. The computer program product comprises a computer program which, when executed by a processor, implements the steps of:
acquiring call information of an interface to be detected; the call information comprises a plurality of call time nodes and response time durations corresponding to the call time nodes;
Obtaining detection signals according to a plurality of calling time nodes and response time lengths corresponding to the calling time nodes;
carrying out framing treatment on the detection signals to obtain long-time frame energy of each long-time frame; the frame length of each long time frame comprises a plurality of adjacent calling time nodes;
and outputting alarm prompt information when the interface to be detected is determined to have abnormal call according to the energy of each long time frame.
According to the interface call abnormality detection method, the device, the computer equipment, the storage medium and the computer program product, the plurality of call time nodes of the interface to be detected and the response time corresponding to each call time node are obtained, so that detection signals can be obtained according to the plurality of call time nodes and the response time corresponding to each call time node, the detection signals are subjected to framing processing, when long-time frame energy corresponding to each long-time frame is obtained, the occurrence of call abnormality of the interface to be detected can be determined according to each long-time frame energy, alarm prompt information is output, the performance of the interface to be detected can be maintained in time by subsequent maintenance personnel, and the timeliness of maintenance of the interface is improved; therefore, when the interface to be detected is called next time, the response time of the interface to be detected can be kept normal, and the user experience is improved. Compared with the existing interface call abnormality detection method, the method provided by the application has the advantages that when the call abnormality of the interface to be detected is detected from the signal angle, the false alarm rate caused by single-stage threshold judgment is effectively reduced, and the accuracy rate of the call abnormality detection of the interface is improved.
Drawings
FIG. 1 is a diagram of an application environment for an interface call anomaly detection method in one embodiment;
FIG. 2 is a flow diagram of a method for detecting interface call exceptions in one embodiment;
FIG. 3 is a flow chart illustrating determining that an interface to be detected has a call exception according to energy of each long time frame in one embodiment;
FIG. 4 is a flow chart of obtaining a target score corresponding to each short time frame in a detection signal according to each long time frame score when the detection signal is windowed in frames in one embodiment;
FIG. 5 is a flowchart illustrating determining that an interface to be detected has a call abnormality according to a target score corresponding to each short time frame in one embodiment;
FIG. 6 is a flowchart of obtaining a long-time frame score corresponding to each long-time frame according to energy and an energy threshold of each long-time frame in one embodiment;
FIG. 7 is a flowchart of an interface call exception detection method according to another embodiment;
FIG. 8 is a block diagram of an interface call anomaly detection device in one embodiment;
fig. 9 is an internal structural diagram of a computer device in one embodiment.
Detailed Description
The present application will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present application more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the application.
The interface call abnormality detection method provided by the embodiment of the application can be applied to an application environment shown in fig. 1. Wherein the terminal 102 communicates with the server 104 via a network. The data storage system may store data that the server 104 needs to process, and in this embodiment, the data storage system may store call information of the interface to be detected. The data storage system may be integrated on the server 104 or may be located on a cloud or other network server.
Specifically, the terminal 102 transmits call information of the interface to be detected to the server 104, where the call information includes a plurality of call time nodes and response durations corresponding to the call time nodes, so that the server 104 may obtain the call information of the interface to be detected. Further, the server 104 obtains a detection signal according to the plurality of calling time nodes and the response time periods corresponding to the calling time nodes, and the server 104 obtains the long-time frame energy of each long-time frame by carrying out framing processing on the detection signal, wherein the frame length of each long-time frame comprises a plurality of adjacent calling time nodes. Further, the server 104 determines, according to the energy of each long time frame, when the interface to be detected is abnormal in call, outputs alarm prompt information.
The terminal 102 may be, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers, and the like. The server 104 may be implemented as a stand-alone server or as a server cluster of multiple servers.
In one embodiment, as shown in fig. 2, an interface call anomaly detection method is provided, and the method is applied to the server 104 in fig. 1 for illustration, and includes the following steps:
s202, obtaining calling information of an interface to be detected; the call information comprises a plurality of call time nodes and response time durations corresponding to the call time nodes.
In this embodiment, the interface to be detected is an interface for implementing a functional service, and the user invokes the interface to be detected through the user terminal, so that the functional service can be provided for the user, for example, the functional service is a video playing service or the like. The calling time node refers to the time of calling the interface to be detected, and the response time length refers to the time length from the start of calling the interface to be detected to the success of calling the interface to be detected. For example, when the time length reaches 500 milliseconds, the interface to be detected is successfully called, the calling time node is 10 points, and the response time length is 500 milliseconds.
It should be noted that, at the same time, the same interface to be detected may be called by multiple users, and the corresponding response time periods are different for different users, so that at the same time, the response time period corresponding to the same interface to be detected is the sum of the response time periods corresponding to multiple users.
S204, obtaining detection signals according to the plurality of calling time nodes and response time lengths corresponding to the calling time nodes.
In this embodiment, the server may be implemented in various possible manners, and obtain the detection signal according to the multiple call time nodes and the response time periods corresponding to the call time nodes, so long as the obtained detection signal may be used to detect whether the interface to be detected calls an exception.
In one embodiment, each response time length may be arranged according to a corresponding calling time node to obtain a detection signal, specifically, according to a calling sequence of the calling time nodes, each calling time node is taken as an abscissa of the detection signal, a response time length corresponding to each calling time node is taken as an ordinate of the detection signal, and the detection signal is a one-dimensional digital signal.
S206, framing the detection signal to obtain the long-time frame energy of each long-time frame.
In this embodiment, the frame length of each long time frame includes a plurality of adjacent call time nodes. For example, in one long frame, the adjacent call time nodes are 10 points and 10 points for 10 minutes, respectively, in other words, the call time range of who is in the long frame is 10 minutes. The long-time frame energy refers to areas corresponding to a plurality of adjacent calling time nodes and corresponding response time durations, specifically, the square sum of all response time durations in each long-time frame is determined as the long-time frame energy of each long-time frame.
S208, when the interface to be detected is determined to have abnormal call according to the energy of each long time frame, alarm prompt information is output.
In this embodiment, the server may be implemented in various possible manners, and determine that the interface to be detected has a call abnormality according to the energy of each long time frame, so long as whether the interface to be detected has a call abnormality in a corresponding time range can be accurately detected based on the energy of each long time frame.
In one embodiment, a total amount of long time frames is obtained when the energy of the long time frames exceeds the energy range, and if the total amount of the long time frames is greater than a preset threshold, it is determined that the interface to be detected has a call abnormality. The total amount of long time frames refers to the number of all long time frames that the energy of the long time frames exceeds the energy range.
It can be understood that when the interface to be detected calls normally, that is, when the response time length of the interface to be detected is stable, the corresponding long-time frame energy is in the energy range. If the energy of the long time frame exceeds the energy range, the method indicates that the interface to be detected has abnormal call in the time range corresponding to the long time frame, namely the response time of the interface to be detected is longer. Therefore, when the total amount of the long time frames is larger than the total amount threshold value, the fact that calling abnormality occurs to the interface to be detected in a plurality of time ranges is indicated, and the probability of calling abnormality to the interface to be detected is relatively high, so that the fact that calling abnormality to the interface to be detected occurs can be determined.
In this embodiment, the alarm prompt information may be output to the maintenance terminal, so that when a maintenance person sees the alarm prompt information on the maintenance terminal, the performance of the interface to be detected may be maintained. Specifically, when the user terminal receives the alarm prompt information, the alarm prompt information may be voice broadcast to a maintainer, where the alarm prompt information includes an interface name of an interface to be detected and a call abnormality detection result of the interface to be detected, and the call abnormality detection result includes, but is not limited to: calling a longer response time of the interface to be detected, and the like, wherein the longer response time refers to the fact that the response time exceeds a time threshold.
In summary, based on the method shown in fig. 2, by obtaining a plurality of calling time nodes of an interface to be detected and response time periods corresponding to the calling time nodes, a detection signal can be obtained according to the plurality of calling time nodes and the response time periods corresponding to the calling time nodes, and then framing processing is performed on the detection signal, when long-time frame energy corresponding to each long-time frame is obtained, the occurrence of abnormal calling of the interface to be detected can be determined according to each long-time frame energy, and further alarm prompt information is output, so that subsequent maintenance personnel can conveniently maintain the performance of the interface to be detected in time, and the timeliness of maintaining the interface is improved; therefore, when the interface to be detected is called next time, the response time of the interface to be detected can be kept normal, and the user experience is improved. Compared with the existing interface call abnormality detection method, the method provided by the application has the advantages that when the call abnormality of the interface to be detected is detected from the signal angle, the false alarm rate caused by single-stage threshold judgment is effectively reduced, and the accuracy rate of the call abnormality detection of the interface is improved.
In one embodiment, as shown in fig. 3, a flowchart for determining that an interface to be detected has a call exception according to energy of each long time frame is provided, and the method is applied to the server 104 in fig. 1, for example, and includes the following steps:
S302, obtaining a long time frame score corresponding to each long time frame according to the energy of each long time frame and the energy threshold value.
In this embodiment, the long-time frame score corresponding to each long-time frame may be set according to the difference between the energy of each long-time frame and the energy threshold. Specifically, when the difference is less than or equal to the difference threshold, the long-time frame score is determined to be a first preset score, for example, the first preset score is 0. When the difference is greater than the difference threshold, the long time frame score is determined to be a second preset score, for example, the second preset score is 1. The larger the preset score is, the larger the probability of calling abnormality of the signal to be detected in the time range corresponding to each long time frame is.
S304, when framing and windowing is carried out on the detection signal, the target score corresponding to each short time frame in the detection signal is obtained according to the scores of each long time frame.
In this embodiment, each long time frame includes a preset number of short time frames, and each short time frame includes at least one call time node of a plurality of adjacent call time nodes. For example, one long time frame includes 2 adjacent calling time nodes, and 2 adjacent calling time nodes are respectively 10 points and 10 minutes. When the preset number is 2, the long time frames comprise 2 short time frames, one short time frame refers to a time range in which the calling time node is from 10 points to 10 points and 5 minutes, and the other short time frame refers to a time range in which the calling time node is from 10 points and 5 minutes to 10 points and 10 minutes.
The method can be implemented in various possible modes, and the target score corresponding to each short time frame in the detection signal is obtained according to the score of each long time frame. In some embodiments, the long time frame score may be uniformly divided into corresponding short time frames, so that when the detection signal is subjected to framing and windowing, the score corresponding to each short time frame in the detection signal is counted, and the target score corresponding to each short time frame in the detection signal may be obtained.
S306, determining that the interface to be detected has abnormal call according to the target score corresponding to each short time frame.
Specifically, the target scores corresponding to the short time frames may be compared with the score threshold, respectively, and a plurality of short time frames having target scores greater than the score threshold may be extracted. And adding the response time lengths corresponding to the short-time frames to obtain the target response time length. If the target response time is longer than a preset threshold, determining that the interface to be detected is abnormal in calling.
In summary, based on the method shown in fig. 3, according to the long time frame score corresponding to each long time frame in the detection signal, the target score corresponding to each short time frame in the detection signal is obtained by framing and windowing the detection signal, and further, according to the target score corresponding to each short time frame, it is determined that the interface to be detected has call abnormality. Therefore, after the call information of the interface to be detected is converted into the signal, call abnormality detection is carried out on the interface to be detected from the angle of signal processing, and compared with the existing interface call abnormality detection method, the false alarm rate caused by single-stage threshold judgment is effectively reduced, and the accuracy rate of call abnormality detection of the interface is improved.
In one embodiment, as shown in fig. 4, a flowchart of obtaining a target score corresponding to each short time frame in a detection signal according to each long time frame score when the detection signal is windowed in frames is provided, and the method is applied to the server 104 in fig. 1, for example, and includes the following steps:
s402, according to the long time frame scores, obtaining a short time frame score corresponding to each short time frame in the window when the short time frame length is moved.
In this embodiment, each time the short-time frame length is moved, the window includes a preset number of short-time frames, and the short-time frame score corresponding to the short-time frame in the window is determined as the corresponding long-time frame score by determining the long-time frame corresponding to the short-time frame in the window. In other words, when determining a long time frame corresponding to a short time frame in the window, the short time frame score corresponding to the short time frame in the window is the same as the corresponding long time frame score.
For example, when the long time frame includes 2 calling time nodes with a calling time range within 10 minutes, the long time frame corresponding to the long time frame has a score of 1, and when one short time frame refers to a time range from 10 points to 10 points for 5 minutes, the score corresponding to the short time frame is 1; similarly, when the calling time node is in the time range of 5 minutes at 10 points to 10 minutes at 10 points, the score corresponding to the short time frame is also 1.
Note that, the score is calculated twice for any one of the short-time frames except for the first short-time frame in the first window and the last short-time frame in the last window. Thus, the score of each short-time frame in the plurality of long-time frames of the detection signal is counted, and the target corresponding to each short-time frame can be obtained.
For convenience of description, the short-time frame and the long-time frame are described by way of example with reference numerals. For example, when the preset number is 2, the sequence number of the first long time frame is A1, the A1 includes 2 short time frames, the sequence numbers are 1-2, the long time frame score corresponding to the first long time frame is 1, and the short time frame scores of the sequence numbers 1-2 are 1. The sequence number of the second long time frame is A2, A2 comprises 2 short time frames, the sequence numbers are 3-4 respectively, the long time frame score corresponding to the second long time frame is 0, and the short time frame scores of the sequence numbers are 3-4 are 0. The sequence number of the third long time frame is A3, the A3 comprises 2 short time frames, the sequence numbers are 5-6 respectively, the long time frame score corresponding to the third long time frame is 0, and the short time frame scores of the sequence numbers are 5-6 respectively are all 0. The serial number of the fourth long time frame is A4, A4 comprises 2 short time frames, the long time frame score corresponding to the fourth long time frame is 1, and the short time frame scores of serial numbers 7-8 are all 1. The serial number of the fifth long time frame is A5, A5 comprises 2 short time frames, the long time frame score corresponding to the fifth long time frame is 1, and the short time frame scores with serial numbers of 9-10 are all 1.
First, the first window includes a short-time frame number 1 and a short-time frame number 2, and the short-time frame number 1 is scored as 1, and the short-time frame number 2 is scored as 1. When the frame shift degree is short-time frame length, the second window includes short-time frame number 2 and short-time frame number 3, and at this time, the short-time frame number 2 score becomes 2 and the short-time frame number 3 score becomes 0. When the frame shift is continued, the third window includes a short-time frame with a sequence number of 3 and a short-time frame with a sequence number of 4, the short-time frame score with a sequence number of 3 becomes 1, and the short-time frame score with a sequence number of 4 becomes 0. When the frame shift is continued, the fourth window includes a short-time frame with a sequence number of 4 and a short-time frame with a sequence number of 5, the short-time frame score with a sequence number of 4 becomes 1, and the short-time frame score with a sequence number of 5 becomes 0. When the frame shift is continued, the fifth window includes a short-time frame with a sequence number of 5 and a short-time frame with a sequence number of 6, the short-time frame score with a sequence number of 5 becomes 1, and the short-time frame score with a sequence number of 6 becomes 0. When the frame shift is continued, the sixth window includes a short-time frame with a sequence number of 6 and a short-time frame with a sequence number of 7, the short-time frame score with a sequence number of 6 becomes 1, and the short-time frame score with a sequence number of 7 becomes 1. When the frame shift is continued, the seventh window includes a short-time frame with a sequence number of 7 and a short-time frame with a sequence number of 8, the short-time frame score with a sequence number of 7 becomes 2, and the short-time frame score with a sequence number of 8 becomes 1.
S404, counting short-time frame scores corresponding to each short-time frame in the detection signal, and obtaining target scores corresponding to the short-time frames in the detection signal.
Specifically, in combination with S402, for a short-time frame with sequence number 1, its short-time frame target score is 1; for short-time frames with sequence number of 2, the target score of the short-time frames is 2; for short-time frames with sequence number 3, the short-time frame target score is 1.
In summary, based on the method shown in fig. 4, the detection signal is processed by frame windowing, so that when the target score corresponding to each short-time frame in the detection signal is calculated according to the score of each long-time frame, the target scores corresponding to the short-time frames integrate different adjacent short-time frame scores, so that the judgment of each short-time frame integrates the information of the whole long-time frame, the detection result of each short-time frame is more accurate, and the detection accuracy can be improved when the interface to be detected calls are determined to be abnormal through the target scores of each short-time frame.
In one embodiment, as shown in fig. 5, a flowchart of determining that an interface to be detected has a call exception according to a target score corresponding to each short time frame is provided, and the method is applied to the server 104 in fig. 1, for example, and includes the following steps:
S502, acquiring a plurality of target short-time frames when the target score is larger than a score threshold.
S504, determining that the call abnormality occurs in the interface call to be detected when the total short-time frames corresponding to the short-time frames are larger than the preset number.
It can be understood that when the interface to be detected calls normally, that is, when the response time length of the interface to be detected is called to be stable (that is, the response time length is less than or equal to the time length threshold value), the total amount of the corresponding short-time frames is less than or equal to the preset amount. If the total amount of the short-time frames is greater than the preset amount, the fact that the interface to be detected has call abnormality in the time range corresponding to the short-time frames is indicated, namely the response time of the interface to be detected is longer (namely the response time is longer than a time threshold). When the total amount of the short-time frames is larger than the preset amount, the fact that calling abnormality occurs to the interface to be detected in a plurality of time ranges is indicated, so that the probability of calling abnormality of the interface to be detected is relatively high, and the fact that calling abnormality occurs to the interface to be detected can be determined.
In summary, based on the method shown in fig. 5, the application determines whether the interface to be detected has the call abnormality by integrating the call abnormality conditions of the interface to be detected in a plurality of time ranges, and compared with the existing interface call abnormality detection method, the application effectively reduces the false alarm rate caused by single-stage threshold judgment and improves the accuracy of call abnormality detection of the interface.
In one embodiment, as shown in fig. 6, a flowchart of obtaining a long time frame score corresponding to each long time frame according to energy and energy threshold of each long time frame is provided, and the method is applied to the server 104 in fig. 1, for example, and includes the following steps:
s602, when the long-time frame energy is less than or equal to the energy threshold, determining the corresponding long-time frame score as the first score.
S604, when the long time frame energy is greater than the energy threshold, determining the corresponding long time frame score as the second score.
In summary, based on the method shown in fig. 6, different long-time frame scores can be set according to the magnitude relation between the energy of the long-time frame and the energy threshold, so that when the interface to be detected is determined to have call abnormality based on the obtained scores of the long-time frames, the accuracy of call abnormality detection of the interface is improved.
In combination with the foregoing, in one embodiment, as shown in fig. 7, there is provided an interface call anomaly detection method, taking the application of the method to the server 104 in fig. 1 as an example, including the following steps:
s702, obtaining calling information of an interface to be detected; the call information comprises a plurality of call time nodes and response time durations corresponding to the call time nodes.
S704, sequencing the response time durations according to the corresponding calling time nodes to obtain detection signals.
S706, framing the detection signal to obtain long-time frame energy of each long-time frame; wherein, the frame length of each long time frame comprises a plurality of adjacent calling time nodes.
S708, when the energy of the long time frame is less than or equal to the energy threshold, determining the corresponding long time frame score as a first score; when the energy of the long time frame is larger than the energy threshold value, determining the corresponding long time frame score as a second score; the second score is greater than the first score.
S710, according to the long time frame scores, obtaining a short time frame score corresponding to each short time frame in the window when the length of each short time frame is moved; the window comprises a preset number of short-time frames, each long-time frame comprises a preset number of short-time frames, and each short-time frame comprises at least one calling time node in a plurality of adjacent calling time nodes.
S712, counting short-time frame scores corresponding to each short-time frame in the detection signal, and obtaining target scores corresponding to each short-time frame in the detection signal.
S714, a plurality of target short-time frames when the target score is larger than the score threshold value are acquired.
S716, when the total short-time frames corresponding to the short-time frames of the targets are larger than the preset number, determining that the call of the interface to be detected is abnormal, and outputting alarm prompt information.
The specific content of S702-S716 may be described with reference to the foregoing content adaptation descriptions, which are not repeated here.
It should be understood that, although the steps in the flowcharts related to the above embodiments are sequentially shown as indicated by arrows, these steps are not necessarily sequentially performed in the order indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in the flowcharts described in the above embodiments may include a plurality of steps or a plurality of stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of the steps or stages is not necessarily performed sequentially, but may be performed alternately or alternately with at least some of the other steps or stages.
Based on the same inventive concept, the embodiment of the application also provides an interface call abnormality detection device for realizing the above related interface call abnormality detection method. The implementation scheme of the device for solving the problem is similar to that described in the method, so the specific limitation of the embodiment of the device for detecting the interface call abnormality provided in the following may be referred to the limitation of the method for detecting the interface call abnormality hereinabove, and will not be repeated herein.
In one embodiment, as shown in fig. 8, there is provided an interface call abnormality detection apparatus including: an information acquisition module 802, a signal acquisition module 804, a signal processing module 806, and a control module 808, wherein:
an information obtaining module 802, configured to obtain call information of an interface to be detected; the call information comprises a plurality of call time nodes and response time durations corresponding to the call time nodes.
The signal obtaining module 804 is configured to obtain a detection signal according to the multiple call time nodes and response durations corresponding to the call time nodes.
A signal processing module 806, configured to perform frame-splitting processing on the detection signal to obtain long-time frame energy of each long-time frame; wherein, the frame length of each long time frame comprises a plurality of adjacent calling time nodes.
And the control module 808 is used for outputting alarm prompt information when the interface to be detected is determined to have abnormal call according to the energy of each long time frame.
In one embodiment, the control module 808 is further configured to: obtaining a long-time frame score corresponding to each long-time frame according to the energy of each long-time frame and the energy threshold; when framing and windowing is carried out on the detection signal, obtaining a target score corresponding to each short time frame in the detection signal according to the score of each long time frame; each long time frame comprises a preset number of short time frames, and each short time frame comprises at least one calling time node in a plurality of adjacent calling time nodes; and determining that the interface to be detected has abnormal call according to the target score corresponding to each short time frame.
In one embodiment, the control module 808 is further configured to: obtaining a short-time frame score corresponding to each short-time frame in the window when the length of each short-time frame is moved according to the scores of the long-time frames; wherein the window comprises a preset number of short-time frames; and counting the short-time frame scores corresponding to each short-time frame in the detection signal, and obtaining the target scores corresponding to the short-time frames in the detection signal.
In one embodiment, the control module 808 is further configured to: acquiring a plurality of target short-time frames when the target score is larger than a score threshold value; and when the total short-time frames corresponding to the short-time frames of the targets are larger than the preset number, determining that the call of the interface to be detected is abnormal.
In one embodiment, the control module 808 is further configured to: when the energy of the long time frame is smaller than or equal to the energy threshold value, determining the corresponding long time frame score as a first score; when the energy of the long time frame is larger than the energy threshold value, determining the corresponding long time frame score as a second score; the second score is greater than the first score.
In one embodiment, the signal obtaining module 804 is further configured to sort each response duration according to the corresponding call time node, so as to obtain a detection signal.
The above-described modules in the interface call abnormality detection apparatus may be implemented in whole or in part by software, hardware, or a combination thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In one embodiment, a computer device is provided, which may be a server, and the internal structure of which may be as shown in fig. 9. The computer device includes a processor, a memory, an Input/Output interface (I/O) and a communication interface. The processor, the memory and the input/output interface are connected through a system bus, and the communication interface is connected to the system bus through the input/output interface. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The database of the computer device is used for storing call information of the interface to be detected. The input/output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used for communicating with an external terminal through a network connection. The computer program, when executed by a processor, implements an interface call anomaly detection method.
It will be appreciated by persons skilled in the art that the architecture shown in fig. 9 is merely a block diagram of some of the architecture relevant to the present inventive arrangements and is not limiting as to the computer device to which the present inventive arrangements are applicable, and that a particular computer device may include more or fewer components than shown, or may combine some of the components, or have a different arrangement of components.
In one embodiment, a computer device is provided comprising a memory and a processor, the memory having stored therein a computer program, the processor when executing the computer program performing the steps of: acquiring call information of an interface to be detected; the calling information comprises a plurality of calling time nodes and response time lengths corresponding to the calling time nodes; obtaining detection signals according to the plurality of calling time nodes and response time lengths corresponding to the calling time nodes; framing the detection signal to obtain long-time frame energy of each long-time frame; the frame length of each long time frame comprises a plurality of adjacent calling time nodes; and when the interface to be detected is determined to have abnormal call according to the energy of each long time frame, outputting alarm prompt information.
In one embodiment, the processor when executing the computer program further performs the steps of: obtaining a long-time frame score corresponding to each long-time frame according to the energy of each long-time frame and the energy threshold; when framing and windowing is carried out on the detection signal, obtaining a target score corresponding to each short time frame in the detection signal according to the score of each long time frame; each long time frame comprises a preset number of short time frames, and each short time frame comprises at least one calling time node in a plurality of adjacent calling time nodes; and determining that the interface to be detected has abnormal call according to the target score corresponding to each short time frame.
In one embodiment, the processor when executing the computer program further performs the steps of: obtaining a short-time frame score corresponding to each short-time frame in the window when the length of each short-time frame is moved according to the scores of the long-time frames; wherein the window comprises a preset number of short-time frames; and counting the short-time frame scores corresponding to each short-time frame in the detection signal, and obtaining the target scores corresponding to the short-time frames in the detection signal.
In one embodiment, the processor when executing the computer program further performs the steps of: acquiring a plurality of target short-time frames when the target score is larger than a score threshold value; and when the total short-time frames corresponding to the short-time frames of the targets are larger than the preset number, determining that the call of the interface to be detected is abnormal.
In one embodiment, the processor when executing the computer program further performs the steps of: when the energy of the long time frame is smaller than or equal to the energy threshold value, determining the corresponding long time frame score as a first score; when the energy of the long time frame is larger than the energy threshold value, determining the corresponding long time frame score as a second score; the second score is greater than the first score.
In one embodiment, the processor when executing the computer program further performs the steps of: sequencing the response time durations according to the corresponding calling time nodes to obtain detection signals.
In one embodiment, a computer readable storage medium is provided having a computer program stored thereon, which when executed by a processor, performs the steps of: acquiring call information of an interface to be detected; the calling information comprises a plurality of calling time nodes and response time lengths corresponding to the calling time nodes; obtaining detection signals according to the plurality of calling time nodes and response time lengths corresponding to the calling time nodes; framing the detection signal to obtain long-time frame energy of each long-time frame; the frame length of each long time frame comprises a plurality of adjacent calling time nodes; and when the interface to be detected is determined to have abnormal call according to the energy of each long time frame, outputting alarm prompt information.
In one embodiment, the computer program when executed by the processor further performs the steps of: obtaining a long-time frame score corresponding to each long-time frame according to the energy of each long-time frame and the energy threshold; when framing and windowing is carried out on the detection signal, obtaining a target score corresponding to each short time frame in the detection signal according to the score of each long time frame; each long time frame comprises a preset number of short time frames, and each short time frame comprises at least one calling time node in a plurality of adjacent calling time nodes; and determining that the interface to be detected has abnormal call according to the target score corresponding to each short time frame.
In one embodiment, the computer program when executed by the processor further performs the steps of: obtaining a short-time frame score corresponding to each short-time frame in the window when the length of each short-time frame is moved according to the scores of the long-time frames; wherein the window comprises a preset number of short-time frames; and counting the short-time frame scores corresponding to each short-time frame in the detection signal, and obtaining the target scores corresponding to the short-time frames in the detection signal.
In one embodiment, the computer program when executed by the processor further performs the steps of: acquiring a plurality of target short-time frames when the target score is larger than a score threshold value; and when the total short-time frames corresponding to the short-time frames of the targets are larger than the preset number, determining that the call of the interface to be detected is abnormal.
In one embodiment, the computer program when executed by the processor further performs the steps of: when the energy of the long time frame is smaller than or equal to the energy threshold value, determining the corresponding long time frame score as a first score; when the energy of the long time frame is larger than the energy threshold value, determining the corresponding long time frame score as a second score; the second score is greater than the first score.
In one embodiment, the computer program when executed by the processor further performs the steps of: sequencing the response time durations according to the corresponding calling time nodes to obtain detection signals.
In one embodiment, a computer program product is provided comprising a computer program which, when executed by a processor, performs the steps of: acquiring call information of an interface to be detected; the calling information comprises a plurality of calling time nodes and response time lengths corresponding to the calling time nodes; obtaining detection signals according to the plurality of calling time nodes and response time lengths corresponding to the calling time nodes; framing the detection signal to obtain long-time frame energy of each long-time frame; the frame length of each long time frame comprises a plurality of adjacent calling time nodes; and when the interface to be detected is determined to have abnormal call according to the energy of each long time frame, outputting alarm prompt information.
In one embodiment, the computer program when executed by the processor further performs the steps of: obtaining a long-time frame score corresponding to each long-time frame according to the energy of each long-time frame and the energy threshold; when framing and windowing is carried out on the detection signal, obtaining a target score corresponding to each short time frame in the detection signal according to the score of each long time frame; each long time frame comprises a preset number of short time frames, and each short time frame comprises at least one calling time node in a plurality of adjacent calling time nodes; and determining that the interface to be detected has abnormal call according to the target score corresponding to each short time frame.
In one embodiment, the computer program when executed by the processor further performs the steps of: obtaining a short-time frame score corresponding to each short-time frame in the window when the length of each short-time frame is moved according to the scores of the long-time frames; wherein the window comprises a preset number of short-time frames; and counting the short-time frame scores corresponding to each short-time frame in the detection signal, and obtaining the target scores corresponding to the short-time frames in the detection signal.
In one embodiment, the computer program when executed by the processor further performs the steps of: acquiring a plurality of target short-time frames when the target score is larger than a score threshold value; and when the total short-time frames corresponding to the short-time frames of the targets are larger than the preset number, determining that the call of the interface to be detected is abnormal.
In one embodiment, the computer program when executed by the processor further performs the steps of: when the energy of the long time frame is smaller than or equal to the energy threshold value, determining the corresponding long time frame score as a first score; when the energy of the long time frame is larger than the energy threshold value, determining the corresponding long time frame score as a second score; the second score is greater than the first score.
In one embodiment, the computer program when executed by the processor further performs the steps of: sequencing the response time durations according to the corresponding calling time nodes to obtain detection signals.
It should be noted that, the user information (including but not limited to user equipment information, user personal information, etc.) and the data (including but not limited to data for analysis, stored data, presented data, etc.) related to the present application are information and data authorized by the user or sufficiently authorized by each party, and the collection, use and processing of the related data need to comply with the related laws and regulations and standards of the related country and region.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, database, or other medium used in embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, high density embedded nonvolatile Memory, resistive random access Memory (ReRAM), magnetic random access Memory (Magnetoresistive Random Access Memory, MRAM), ferroelectric Memory (Ferroelectric Random Access Memory, FRAM), phase change Memory (Phase Change Memory, PCM), graphene Memory, and the like. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory, and the like. By way of illustration, and not limitation, RAM can be in the form of a variety of forms, such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM), and the like. The databases referred to in the embodiments provided herein may include at least one of a relational database and a non-relational database. The non-relational database may include, but is not limited to, a blockchain-based distributed database, and the like. The processor referred to in the embodiments provided in the present application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic unit, a data processing logic unit based on quantum computing, or the like, but is not limited thereto.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The foregoing examples illustrate only a few embodiments of the application and are described in detail herein without thereby limiting the scope of the application. It should be noted that it will be apparent to those skilled in the art that several variations and modifications can be made without departing from the spirit of the application, which are all within the scope of the application. Accordingly, the scope of the application should be assessed as that of the appended claims.

Claims (10)

1. An interface call anomaly detection method, the method comprising:
acquiring call information of an interface to be detected; the call information comprises a plurality of call time nodes and response time durations corresponding to the call time nodes;
obtaining detection signals according to a plurality of calling time nodes and response time lengths corresponding to the calling time nodes;
Carrying out framing treatment on the detection signals to obtain long-time frame energy of each long-time frame; the frame length of each long time frame comprises a plurality of adjacent calling time nodes;
and outputting alarm prompt information when the interface to be detected is determined to have abnormal call according to the energy of each long time frame.
2. The method according to claim 1, wherein determining that the interface to be detected has a call exception according to the long time frame energy comprises:
obtaining a long-time frame score corresponding to each long-time frame according to the energy of each long-time frame and the energy threshold;
when framing and windowing are carried out on the detection signals, obtaining target scores corresponding to short time frames in the detection signals according to the scores of the long time frames; wherein each of the long time frames includes a preset number of short time frames, each of the short time frames including at least one of the plurality of adjacent call time nodes;
and determining that the interface to be detected is abnormal in calling according to the target score corresponding to each short-time frame.
3. The method according to claim 2, wherein the step of obtaining the target score corresponding to each short time frame in the detection signal according to each long time frame score when the detection signal is subjected to frame windowing comprises:
According to the long time frame scores, obtaining short time frame scores corresponding to each short time frame in a window when the length of each short time frame is moved; wherein the window comprises a preset number of short-time frames;
and counting the short-time frame score corresponding to each short-time frame in the detection signal, and obtaining the target score corresponding to each short-time frame in the detection signal.
4. The method according to claim 2, wherein the determining that the interface to be detected has a call abnormality according to the target score corresponding to each short-time frame includes:
acquiring a plurality of target short-time frames when the target score is larger than a score threshold value;
and when the total short-time frames corresponding to the target short-time frames are larger than the preset number, determining that the call of the interface to be detected is abnormal.
5. The method according to claim 2, wherein the obtaining the long-time frame score corresponding to each long-time frame according to the energy of each long-time frame and the energy threshold value comprises:
when the energy of the long time frame is smaller than or equal to the energy threshold value, determining the corresponding long time frame score as a first score;
when the energy of the long time frame is larger than the energy threshold value, determining the corresponding long time frame score as a second score; the second score is greater than the first score.
6. The method according to claim 1, wherein the obtaining the detection signal according to the plurality of call time nodes and the response time periods corresponding to the call time nodes includes:
and sequencing the response time according to the corresponding calling time nodes to obtain the detection signals.
7. An interface call anomaly detection device, the device comprising:
the information acquisition module is used for acquiring calling information of the interface to be detected; the call information comprises a plurality of call time nodes and response time durations corresponding to the call time nodes;
the signal acquisition module is used for acquiring detection signals according to a plurality of calling time nodes and response time lengths corresponding to the calling time nodes;
the signal processing module is used for carrying out framing processing on the detection signals to obtain long-time frame energy of each long-time frame; the frame length of each long time frame comprises a plurality of adjacent calling time nodes;
and the control module is used for outputting alarm prompt information when the interface to be detected is determined to have abnormal call according to the energy of each long time frame.
8. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the method of any of claims 1 to 6 when the computer program is executed.
9. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 6.
10. A computer program product comprising a computer program, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 6.
CN202311021734.3A 2023-08-14 2023-08-14 Interface call abnormality detection method, device, computer equipment and storage medium Pending CN117221171A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311021734.3A CN117221171A (en) 2023-08-14 2023-08-14 Interface call abnormality detection method, device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311021734.3A CN117221171A (en) 2023-08-14 2023-08-14 Interface call abnormality detection method, device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN117221171A true CN117221171A (en) 2023-12-12

Family

ID=89039769

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311021734.3A Pending CN117221171A (en) 2023-08-14 2023-08-14 Interface call abnormality detection method, device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117221171A (en)

Similar Documents

Publication Publication Date Title
CN109032829B (en) Data anomaly detection method and device, computer equipment and storage medium
CN109412867A (en) A kind of alarm association merging method, device, system, equipment and storage medium
CN105187674B (en) Compliance checking method and device for service recording
CN113535454A (en) Method and device for detecting log data abnormity
CN116629435A (en) Risk prediction method, risk prediction device, computer equipment and storage medium
CN116933035A (en) Data anomaly detection method, device, computer equipment and storage medium
CN116991675A (en) Abnormal access monitoring method and device, computer equipment and storage medium
CN117221171A (en) Interface call abnormality detection method, device, computer equipment and storage medium
CN114738294B (en) Water pump water shortage detection method and device, computer equipment and medium
CN117439913A (en) Transaction service monitoring method, device and computer equipment
CN116938769B (en) Flow anomaly detection method, electronic device, and computer-readable storage medium
CN111738848B (en) Method, device, computer equipment and storage medium for generating characteristic data
CN116578455A (en) Change risk monitoring method, device, computer equipment and storage medium
CN117112355A (en) Method, device, equipment, storage medium and program product for monitoring log file
CN117240521A (en) Abnormal data detection method, device, computer equipment and storage medium
CN117112378A (en) Page stay time statistical method, device, computer equipment and storage medium
CN116225828A (en) Alarm method, device, equipment, medium and product based on interface call volume
CN117131488A (en) Early warning method and device for face recognition attack, computer equipment and storage medium
CN116483658A (en) Method, device, system, equipment and storage medium for monitoring server performance
CN117056307A (en) Database management method, apparatus, device, storage medium, and program product
CN117149481A (en) Abnormality repairing method, abnormality repairing device, computer device and storage medium
CN117251225A (en) Application automatic exit method, device, computer equipment and storage medium
CN117041015A (en) Network fault detection method, device, computer equipment and storage medium
CN116860492A (en) Interface abnormality detection method, device, computer equipment and storage medium
CN117522138A (en) Method, device, equipment and medium for identifying testing risk of financial business system

Legal Events

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