Interface stability evaluation method and device, electronic equipment and storage medium
By clustering and anomaly detection of interface operation data, combined with a preset model to evaluate interface stability, the problem of insufficient post-event alarms in existing technologies is solved, enabling early identification and risk avoidance of interface stability, and improving the operational stability and security of the system.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CISDI INFORMATION TECH CO LTD
- Filing Date
- 2026-03-30
- Publication Date
- 2026-06-09
AI Technical Summary
In existing technologies, interface stability assessment mainly relies on post-event alarms, which makes it difficult to identify potential risks before anomalies occur. This may lead to production interruptions and safety accidents, and is difficult to meet the needs of application scenarios with high stability requirements.
By acquiring interface operation data, we perform indicator data clustering and anomaly detection, use a preset anomaly detection model to identify suspected abnormal data, train the model with historical data to conduct stability assessment, generate stability scores and trend charts, and monitor the interface status in real time.
It improves the visibility of interface operation, helps to identify potential risks in advance, avoids production interruptions and security incidents, and enhances the overall operational stability of the application integration platform.
Smart Images

Figure CN122173869A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to an interface stability evaluation method, apparatus, electronic device, and storage medium. Background Technology
[0002] In the context of digital transformation, various business systems can interconnect through interfaces, and application integration platforms typically need to uniformly host the interface resources of a large number of business systems. As a key carrier for business collaboration between systems, the operational stability of interfaces directly affects the continuity and reliability of business processes. Therefore, having sufficient visibility into the operational status of interfaces is a necessary prerequisite for carrying out a series of lifecycle management actions around interfaces, including planning, operation, and governance.
[0003] In related technologies, application integration platforms generally possess interface operation monitoring and alarm capabilities, enabling notifications via alarms after interface anomalies occur. However, such solutions are mostly post-event response mechanisms, primarily used for locating and handling anomalies after they occur, and are insufficient for effectively identifying and mitigating potential interface risks before anomalies occur. As the scale of interface calls and business complexity increase, the limitations of these post-event alarm methods in ensuring interface operational quality become increasingly apparent. Especially in application scenarios such as industrial production, where operational quality and stability requirements are extremely high, interface anomalies can directly lead to production interruptions or even safety accidents, and such scenarios typically adopt a zero-tolerance policy for production accidents. In such scenarios, relying solely on post-event alarms is insufficient to meet the management needs for interface operational stability. Summary of the Invention
[0004] This application provides an interface stability assessment method, apparatus, electronic device, and storage medium to address the technical problem that interface stability assessments in related technologies are all post-event response mechanisms, which make it difficult to effectively identify and avoid potential risks to the interface before an anomaly occurs, potentially leading to production interruptions or even safety accidents, and failing to meet the management requirements for interface operational stability.
[0005] This application provides an interface stability assessment method, which includes: acquiring interface operation data of a target interface for a preset time period; statistically analyzing interface indicator data of the target interface according to a first period based on all interface operation data; clustering the interface indicator data within a second period to obtain abnormal interface indicator data, and recording the first period corresponding to the abnormal interface indicator data as an abnormal period point, wherein the first period is shorter than the second period in the time dimension; determining the current abnormal ratio of the interface indicator data based on the number of abnormal period points and the number of first periods corresponding to the interface indicator data within the second period; and determining the current stability score of the target interface based on the current abnormal ratio corresponding to all interface indicator data, so as to assess the stability of the target interface.
[0006] In one embodiment of this application, after clustering the interface indicator data within the second period, the method further includes: recording the isolated interface indicator data after clustering as suspected abnormal data; determining the abnormal confidence level of the suspected abnormal data; and if the abnormal confidence level is greater than a preset confidence threshold, determining the suspected abnormal data as the abnormal interface indicator data.
[0007] In one embodiment of this application, determining the anomaly confidence level of the suspected abnormal data includes: inputting the suspected abnormal data into a preset anomaly detection model to obtain the anomaly confidence level of the suspected abnormal data; wherein, the training method of the preset anomaly detection model includes: acquiring historical training data of the target interface, the historical training data including multiple historical indicator data and the data state of each historical indicator data, the data state including normal or abnormal; training an initial model based on the historical training data until the model converges to obtain the preset anomaly detection model.
[0008] In one embodiment of this application, after inputting the suspected abnormal data into a preset anomaly detection model to obtain the anomaly confidence level of the suspected abnormal data, the method further includes: displaying the abnormal interface indicator data; receiving the anomaly determination result of the abnormal interface indicator data, wherein the anomaly determination result is normal or abnormal; determining the abnormal interface indicator data and the anomaly determination result of the abnormal interface indicator data as the current training data; retraining the preset anomaly detection model based on the current training data; and performing anomaly detection on subsequent suspected abnormal data based on the trained preset anomaly detection model.
[0009] In one embodiment of this application, determining the current stability score of the target interface based on the current anomaly ratio corresponding to all interface indicator data includes: obtaining the historical latency, historical throughput, historical latency, current throughput, current latency, and the historical anomaly ratio corresponding to each interface indicator data of the target interface; determining the ratio difference corresponding to the interface indicator data based on the historical anomaly ratio and the current anomaly ratio corresponding to the same interface indicator data, thereby obtaining the ratio difference corresponding to each interface indicator data; determining the throughput difference based on the historical throughput and the current throughput; determining the latency difference based on the historical latency and the current latency; and determining the current stability score based on the throughput difference, the latency difference, the ratio difference corresponding to all interface indicator data, and the interface error rate.
[0010] In one embodiment of this application, the method further includes at least one of the following: obtaining the historical stability score of the target interface during the required viewing period, determining a stability trend chart based on the historical stability score and the current stability score, and displaying it; if there are multiple target interfaces, identifying target interfaces whose current stability score is less than a preset score threshold as risk interfaces, and generating a risk interface list based on all risk interfaces; persistently storing the current stability score, stability status, number of abnormal periodic points, fluctuation amplitude, target interface identifier, and second period timestamp of the target interface at the interface granularity, wherein the stability status is determined based on the current stability score, and the fluctuation amplitude is determined based on the current stability score and the historical stability score of the previous second period; if there are multiple target interfaces, determining a rating level based on the current stability score of each target interface, counting the number of target interfaces corresponding to each rating level, and then determining the interface proportion of the target interfaces corresponding to each rating level, and generating a stability distribution chart based on the interface proportion.
[0011] In one embodiment of this application, the interface indicator data of the target interface is statistically analyzed according to all interface operation data in a first cycle, including: determining the initial indicator data of the target interface according to all interface operation data in a first cycle, wherein the initial indicator data is continuous data; discretizing the initial indicator data to obtain discrete indicator data; and standardizing the discrete indicator data to obtain the interface indicator data.
[0012] This application embodiment also provides an interface stability assessment device, the device comprising: an acquisition module, configured to acquire interface operation data of a target interface for a preset time period; an indicator data determination module, configured to statistically analyze interface indicator data of the target interface according to a first period based on all interface operation data; an anomaly identification module, configured to cluster the interface indicator data within a second period to obtain abnormal interface indicator data, and to record the first period corresponding to the abnormal interface indicator data as an abnormal period point, wherein the first period is shorter than the second period in the time dimension; an anomaly ratio determination module, configured to determine the current anomaly ratio of the interface indicator data based on the number of abnormal period points and the number of first periods corresponding to the interface indicator data within the second period; and a stability assessment module, configured to determine the current stability score of the target interface based on the current anomaly ratio corresponding to all interface indicator data, so as to perform stability assessment on the target interface.
[0013] This application also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the steps of the method described in any of the above embodiments.
[0014] This application also provides an electronic device, including: a memory storing a computer program thereon; and a processor for executing the computer program in the memory to implement the steps of the method described in any of the above embodiments.
[0015] Beneficial Effects: This application proposes an interface stability assessment method, apparatus, electronic device, and storage medium. The method acquires interface operation data of a target interface over a preset time period; statistically analyzes interface indicator data of the target interface according to a first cycle based on all interface operation data; clusters the interface indicator data within a second cycle to obtain abnormal interface indicator data, and records the first cycle corresponding to the abnormal interface indicator data as an abnormal cycle point, where the first cycle is shorter than the second cycle in time; determines the current abnormal ratio of the interface indicator data based on the number of abnormal cycle points and the number of first cycles corresponding to the interface indicator data within the second cycle; and determines the current stability score of the target interface based on the current abnormal ratio corresponding to all interface indicator data, thereby assessing the stability of the target interface. By processing and analyzing the operation data generated during interface operation, the visibility of interface operation status can be improved, helping inspection or maintenance personnel to discover potential risks before anomalies occur, proactively identify potential risks, and promptly avoid risks, thereby largely preventing production interruptions and minimizing the occurrence of security incidents. When this method is applied to an application integration platform, it can improve the overall operational stability of the platform and its supporting business systems, meeting the management requirements for interface operation stability. Attached Figure Description
[0016] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application. It is obvious that the drawings described below are merely some embodiments of this application, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort.
[0017] In the attached diagram:
[0018] Figure 1 A flowchart illustrating an interface stability evaluation method provided in an embodiment of this application; Figure 2 A specific process of an interface stability evaluation method provided in an embodiment of this application. Figure 3 A schematic diagram of an interface stability evaluation device provided in an embodiment of this application; Figure 4 A schematic diagram of the interface stability evaluation system provided in an embodiment of this application; Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0019] The following specific examples illustrate the implementation of this application. Those skilled in the art can easily understand other advantages and effects of this application from the content disclosed in this specification. This application can also be implemented or applied through other different specific embodiments. Various details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of this application. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.
[0020] It should be noted that the illustrations provided in the following embodiments are only schematic representations of the basic concept of this application. The drawings only show the components related to this application and are not drawn according to the actual number, shape and size of the components in the actual implementation. In the actual implementation, the shape, quantity and proportion of each component can be arbitrarily changed, and the layout of the components may also be more complex.
[0021] In the following description, numerous details are explored to provide a more thorough explanation of embodiments of the present application. However, it will be apparent to those skilled in the art that embodiments of the present application may be practiced without these specific details. In other embodiments, well-known structures and devices are shown in block diagram form rather than in detail to substantially avoid making embodiments of the present application difficult to understand.
[0022] Please see Figure 1 , Figure 1 A flowchart illustrating an interface stability evaluation method provided in an embodiment of this application is shown below. Figure 1 As shown, the method includes the following steps: Step S110: Obtain the interface operation data of the target interface for the preset time period.
[0023] The interface operation data includes, but is not limited to, data that characterizes the interface status, such as call time, completion time, amount of data processed, and processing status.
[0024] As an example, API runtime data can be collected in a high-concurrency manner using a message queue (such as Kafka).
[0025] The preset time period can be either continuous data collection for a certain duration or real-time data collection, and the interface stability is evaluated based on the interface operation data over a recent period.
[0026] As an example, this method can be used to evaluate the stability of multiple interfaces of an application integration platform. At least a portion of the interfaces in the application integration platform are selected as target interfaces, and runtime data is collected for each interface separately.
[0027] Step S120: Based on all the interface operation data, the interface indicator data of the target interface is statistically analyzed according to the first cycle.
[0028] In one embodiment, the interface indicator data of the target interface is statistically analyzed according to all interface operation data in a first cycle, including: determining the initial indicator data of the target interface according to all interface operation data in a first cycle, wherein the initial indicator data is continuous data; discretizing the initial indicator data to obtain discrete indicator data; and standardizing the discrete indicator data to obtain interface indicator data.
[0029] The runtime data for a target interface can be one or more items, such as call time, completion time, amount of data processed, processing status, etc. For each item of runtime data, the metric data is calculated separately for the first cycle.
[0030] As an example, the first cycle could be every minute or other cycle time set by those skilled in the art.
[0031] As an example, initial metric data can be calculated based on API runtime data, such as one or more of the following: number of calls, maximum QPS (queries per second), maximum response time, call success rate, throughput, and exception rate. For instance, if the first period is 1 second, and API runtime data is generated every 1 second, then the initial metric data can be based on all API runtime data within that 1 second. For example, the maximum QPS within 1 second can be used as the maximum QPS, the sum of all call counts within 1 second as the call count, the maximum response time within 1 second as the maximum response time, and the call success rate can be calculated based on the result (success or failure) of each call within 1 second.
[0032] In one embodiment, API runtime data and API metrics data can be collected and stored using a monitoring metrics framework (such as Prometheus, VictoriaMetrics, etc.) to provide a data foundation for subsequent analysis and other functions. For example, open-source monitoring components (such as Prometheus) can be used to collect API status data (API runtime data), supporting real-time collection of API status data (such as call count, response time, call success rate, throughput, exception rate, etc.) at a minute-by-minute granularity, and persistently storing it in a time-series database (such as InfluxDB, VictoriaMetrics, etc.).
[0033] As an example, after obtaining the initial indicator data, before discretization, data cleaning and other operations can be performed to facilitate subsequent data analysis.
[0034] If the interface operation data is continuous, the subsequent initial indicator data may also be continuous. In this case, to facilitate subsequent analysis, the initial indicator data can be discretized. According to preset discretization rules, the initial indicator data is divided into intervals based on numerical range, distribution characteristics, or business thresholds, and data falling within the same interval is mapped to the corresponding discrete representation, resulting in discrete indicator data. This reduces the impact of data fluctuations on the evaluation process. Subsequently, the discretized data undergoes standardization processing. According to preset standardization rules, the discretized data is standardized by scaling or range normalization to obtain interface indicator data, ensuring that the processed data meets the expected data distribution or value range. This interface indicator data meets the input data standard of the preset anomaly detection model in subsequent embodiments, and the data standard of this interface indicator data is consistent with that of historical indicator data in the historical training data.
[0035] As an example, discretization rules can set corresponding interval mapping relationships based on different data types. If an initial indicator data falls into a certain interval, the mapped data can be found based on the interval mapping relationship, serving as the discrete indicator data. For example, based on the distribution of minute-level indicator data within a period, the data can be divided into intervals to reduce the impact of extreme values on the subsequent evaluation process. Suppose the statistical period is 3 minutes, and the call count indicators are 5, 20, and 90, the interval mapping relationships are [1,10]->1, [11,100]->2, [101,1000]->3... (the interval mapping relationship settings are only examples, and those skilled in the art can choose according to their needs). The discrete indicator data obtained after discretization are 1, 2, 2.
[0036] An exemplary approach to standardization is to remove null values and organize the discretized data into a structure that facilitates subsequent clustering, such as uniformly normalizing the values and mapping them to the interval [0, 1].
[0037] Step S130: Cluster the interface indicator data in the second period to obtain abnormal interface indicator data, and record the first period corresponding to the abnormal interface indicator data as the abnormal period point.
[0038] The first period is shorter than the second period in terms of time. The second period can be obtained by taking a time window of a certain length from a continuous period of time. For example, the first period is every minute, and the second period can be every day, every week, etc.
[0039] As an example, the first period for different abnormal interface indicator data can be the same or different, and the second period for different abnormal interface indicator data can also be the same or different. The specific period values can be selected by those skilled in the art as needed. Similarly, the first and second periods used for the same abnormal interface indicator data items for different target interfaces can also be the same or different, and the specific selection can be made by those skilled in the art as needed.
[0040] As an example, this clustering method can be implemented using density-based clustering algorithms such as DBSCAN. Through clustering, automatic anomaly identification can be achieved.
[0041] In some embodiments, after clustering the interface indicator data within the second period, the method further includes: recording the clustered isolated interface indicator data as suspected abnormal data; determining the abnormal confidence level of the suspected abnormal data; and if the abnormal confidence level is greater than a preset confidence threshold, determining the suspected abnormal data as abnormal interface indicator data.
[0042] Clustering can identify isolated data that differs from the majority of the data, but these isolated data (suspected outliers) are not necessarily true outliers and require further evaluation.
[0043] Following the above embodiments, determining the anomaly confidence level of suspected abnormal data includes: inputting the suspected abnormal data into a preset anomaly detection model to obtain the anomaly confidence level of the suspected abnormal data; wherein, the training method of the preset anomaly detection model includes: acquiring historical training data of the target interface, the historical training data including multiple historical indicator data and the data status of each historical indicator data, the data status including normal or abnormal; training the initial model based on the historical training data until the model converges to obtain the preset anomaly detection model.
[0044] The specific training methods can be implemented in ways known to those skilled in the art, and will not be elaborated here.
[0045] As an example, a corresponding anomaly detection sub-model is trained for each interface metric data of each target interface, and a preset anomaly detection model is generated based on these anomaly detection sub-models corresponding to the interface metric data of all items of all target interfaces.
[0046] As an example, the initial model could be a model such as the HoeffdingTree model.
[0047] In the anomaly identification process, a hybrid approach combining unsupervised machine learning (clustering) and supervised machine learning (pre-defined anomaly detection model) is adopted. Unsupervised machine learning is used to compare sample features with themselves to effectively extract anomalies. Supervised machine learning is used to train a model that better matches the user's judgment, thereby improving the accuracy of anomaly feedback and enhancing the accuracy of anomaly interface indicator data identification.
[0048] Following the above embodiments, after inputting suspected abnormal data into a preset anomaly detection model and obtaining the anomaly confidence level of the suspected abnormal data, the method further includes: displaying abnormal interface indicator data; receiving the anomaly determination result of the abnormal interface indicator data, wherein the anomaly determination result is normal or abnormal; determining the abnormal interface indicator data and the anomaly determination result of the abnormal interface indicator data as the current training data; retraining the preset anomaly detection model based on the current training data; and performing anomaly detection on subsequent suspected abnormal data based on the trained preset anomaly detection model.
[0049] As an example, anomaly detection results can be determined through methods such as manual judgment and then input into the system. The evaluation results are visualized, allowing users to confirm or correct them. Feedback data is returned to the model training and optimization module and stored in historical data to drive model iteration and updates. After receiving user feedback, the feedback content, along with corresponding interface identifiers, time information, prediction results, and actual conditions, are structured and stored in the model training data warehouse, forming a closed-loop data chain of "prediction—feedback—optimization—retraining." The stored feedback data is not only used for model retraining but also serves as a basis for subsequent auditing and performance evaluation, ensuring the traceability of the optimization process and the transparency of model evolution.
[0050] In this way, the preset anomaly detection model can be optimized in real time, further improving the accuracy of the method in evaluating the target interface.
[0051] Step S140: Determine the current abnormal ratio of the interface indicator data based on the number of abnormal period points and the number of the first period corresponding to the interface indicator data in the second period.
[0052] For each interface metric data point, the total number of calls within the current second period (including the first period) is calculated. The current anomaly rate for that interface metric data point is determined by the ratio of the number of abnormal period points to this total. For example, taking the interface metric data as call count, the second period as 1 hour, and the first period as 1 minute, if there is one call every minute within 1 hour, the total is 60, and there are 3 abnormal period points, then the current anomaly rate is 3 / 60 = 5%. Another example: taking the interface metric data as call count, the second period as 1 hour, and the first period as 1 minute, if there is one call every minute for the first 20 minutes within 1 hour, the total is 20, and there are 3 abnormal period points, then the current anomaly rate is 3 / 20 = 15%. Yet another example: taking the interface metric data as call count, the second period as 1 hour, and the first period as 1 minute, if there are 15 time points with call counts within 1 hour, the total is 15, and there are 3 abnormal period points, then the current anomaly rate is 3 / 15 = 20%. The current anomaly rate can be calculated for each interface metric using this method.
[0053] Step S150: Determine the current stability score of the target interface based on the current anomaly ratio corresponding to all interface indicator data, so as to conduct a stability assessment of the target interface.
[0054] As an example, if the current stability score is below the warning threshold, the interface is identified as unstable or abnormal and classified as stable. If the current stability score is above or equal to the warning threshold, the stability state of the target interface is determined to be stable.
[0055] In some embodiments, the current stability score of the target interface is determined based on the current anomaly ratio corresponding to all interface metric data, including: obtaining the historical latency, historical throughput, current throughput, current latency, and the historical anomaly ratio corresponding to each interface metric data of the target interface; determining the ratio difference corresponding to the interface metric data based on the historical anomaly ratio and the current anomaly ratio corresponding to the same interface metric data, thereby obtaining the ratio difference corresponding to each interface metric data; determining the throughput difference based on the historical throughput and the current throughput; determining the latency difference based on the historical latency and the current latency; and determining the current stability score based on the throughput difference, latency difference, the ratio difference corresponding to all interface metric data, and the interface error rate.
[0056] As an example, the current stability score can be determined based on at least one of the following: ratio difference, throughput difference, time difference, and interface error rate.
[0057] As an example, ratio differences, throughput differences, and time consumption differences can be determined through relative difference rates, percentage difference rates, or the quotient of current data and historical data. Preset coefficients are set for different interface metric data items, throughput, and time consumption, and then a weighted average is used to calculate the current stability score.
[0058] The interface error rate can be determined by the ratio of the number of failed accesses in the second cycle to the total number of accesses.
[0059] In one embodiment, the method further includes at least one of the following: Obtain the historical stability score of the target interface for the time period to be viewed, determine the stability trend chart based on the historical stability score and the current stability score, and display it. As an example, the time period to be viewed can be selected according to the user's needs, such as the most recent month, the most recent year, etc., and the stability trend chart can be a trend curve of stability score over time, etc. If there are multiple target interfaces, the target interfaces whose current stability score is less than the preset score threshold are identified as risk interfaces, and a risk interface list is generated based on all risk interfaces. The current stability score, stability status, number of abnormal period points, fluctuation amplitude, target interface identifier, and second period timestamp of the target interface are persistently stored at the interface granularity. The stability status is determined based on the current stability score, and the fluctuation amplitude is determined based on the current stability score and the historical stability score of the previous second period. If there are multiple target interfaces, determine the rating level based on the current stability score of each target interface, count the number of target interfaces corresponding to each rating level, and then determine the interface proportion of the target interfaces corresponding to each rating level. Generate a stability distribution map based on the interface proportion.
[0060] As an example, the above data (stability scores, interface metrics data obtained at various time stages, interface operation data, etc.) can be visualized. For instance, stability trend charts, stability distribution charts, and risk interface lists can be displayed, supporting filtering and sorting by time period, system module, or interface type. Users can view the stability changes of interfaces at different periods, intuitively understanding the trend of stability improvement or degradation. At the same time, a multi-dimensional analysis interface is provided, establishing multi-dimensional analysis views such as business modules, system sources, call frequency, and time. It supports cross-statistical and correlation analysis based on any indicator (such as failure rate, average response time, anomaly rate, etc.) and provides a feedback mechanism for manual judgment of accuracy and feedback.
[0061] As an example, the stability distribution chart is an overview chart. For example, the scores are divided into five levels: [0, 50), [50, 80), [80, 90), [90, 95), and [95, 100]. The proportion of interfaces corresponding to each level is counted and displayed in a pie chart using red, orange, yellow, blue, and green respectively.
[0062] The stability trend chart has two granularities: overview and interface. The overview shows the changes in the number of interfaces at each level, while the interface granularity shows the changes in the stability score of the current interface.
[0063] Each second period calculates the current stability score and stores it as the historical stability score along with the corresponding second period, so you can query the historical stability score for a specific day or time period.
[0064] As an example, target interfaces can be pre-grouped. When storing data, the group identifier is associated with the historical stability score and the corresponding second period. Subsequently, the group identifier can be used to view the historical stability score and trend of a target interface in a certain group.
[0065] As an example, interface metric data can also be associated with and stored with the historical stability score of the target interface, making it easier to query interface metric data for different projects later. The interface stability assessment method provided in the above embodiments obtains the interface operation data of the target interface during a preset time period; statistically analyzes the interface indicator data of the target interface according to a first cycle based on all the interface operation data; clusters the interface indicator data within a second cycle to obtain abnormal interface indicator data, and records the first cycle corresponding to the abnormal interface indicator data as an abnormal cycle point, wherein the first cycle is shorter than the second cycle in the time dimension; determines the current abnormal ratio of the interface indicator data based on the number of abnormal cycle points and the number of first cycles corresponding to the interface indicator data within the second cycle; and determines the current stability score of the target interface based on the current abnormal ratio corresponding to all interface indicator data, so as to assess the stability of the target interface. By processing and analyzing the operation data generated during the interface operation, the visibility of the interface operation status can be improved, helping inspection or maintenance personnel to discover potential risks of the interface before anomalies occur, identify potential risks in advance, avoid risks in a timely manner, basically avoid production interruptions, and minimize the occurrence of security accidents. When this method is applied to an application integration platform, it can improve the overall operational stability of the platform and its supporting business systems and meet the management requirements of interface operation stability.
[0066] When the method provided in the above embodiments is applied to the interface stability assessment of the application integration platform, it can assess the stability of the interfaces hosted on the platform, assist inspection personnel in discovering interface anomalies in advance, reduce the system failure rate, improve the overall operational stability, realize the collaborative assessment of interface stability and anomalies, form a closed-loop mechanism of assessment and feedback, improve the accuracy and interpretability of interface stability assessment, and is suitable for multi-interface operation scenarios in the integration platform.
[0067] Please see Figure 2 , Figure 2 A schematic flowchart illustrating a specific method for evaluating interface stability according to an embodiment of this application is shown below. Figure 2As shown, firstly, the raw data (initial indicator data) is discretized. According to preset discretization rules, the raw data is divided into intervals based on numerical range, distribution characteristics, or business thresholds. Data falling within the same interval are mapped to corresponding discrete representations, thereby reducing the impact of data fluctuations on the evaluation process. Subsequently, the discretized data is standardized. According to preset standardization rules, the discretized data is scaled or normalized to ensure that the processed data meets the expected data distribution or value range. Next, operational statistical data features (interface indicator data) are extracted. Density-based clustering algorithms (such as DBSCAN) are used to cluster the operational statistical data, enabling automatic anomaly identification and obtaining anomaly points. These anomaly points are then fed back to users. The user feedback on anomaly point judgments is collected to construct training data (data processing). The HoeffdingTree model is optimized, and the anomaly points in subsequent feedback are refined to improve the accuracy of anomaly warnings. In the outlier identification stage, a hybrid approach combining unsupervised and supervised machine learning was adopted. Unsupervised machine learning was used to self-compare sample features, effectively extracting outliers. Supervised machine learning was used to train a model that better aligns with user judgment, thereby improving the accuracy of outlier feedback. Based on the number of extracted outliers, combined with the number of interface indicator data points present in the second period (the number of outlier period points), the outlier ratio of the interface was calculated. This ratio, along with the interface's historical outlier ratio and other multi-dimensional indicators such as latency and throughput, was weighted to calculate the interface's stability score, thus achieving the stability assessment score.
[0068] By combining real-time and historical data and utilizing a trained model, the above methods enable dynamic evaluation of the interface's operational status. This allows for the timely detection of performance fluctuations and anomalies, effectively improving the stability and reliability of the interface. Based on the data obtained through this process, the system provides a stability overview and multi-dimensional analysis, not only grasping the overall health of the interface but also delving into specific indicators and time dimensions for analysis. This helps operations and maintenance personnel quickly locate problems and develop optimization measures.
[0069] See Figure 3 , Figure 3 A schematic diagram of the interface stability evaluation device provided in an embodiment of this application is shown below. Figure 3As shown, this embodiment of the invention also provides an interface stability assessment device 300, which includes: an acquisition module 310, used to acquire interface operation data of a target interface for a preset time period; an indicator data determination module 320, used to statistically analyze interface indicator data of the target interface according to a first period based on all interface operation data; an anomaly identification module 330, used to cluster the interface indicator data within a second period to obtain abnormal interface indicator data, and to record the first period corresponding to the abnormal interface indicator data as an abnormal period point, wherein the first period is shorter than the second period in the time dimension; an anomaly ratio determination module 340, used to determine the current anomaly ratio of the interface indicator data based on the number of abnormal period points and the number of first periods corresponding to the interface indicator data within the second period; and a stability assessment module 350, used to determine the current stability score of the target interface based on the current anomaly ratio corresponding to all interface indicator data, so as to perform stability assessment on the target interface.
[0070] See Figure 4 , Figure 4 A schematic diagram of the interface stability evaluation system provided in an embodiment of this application is shown below. Figure 4 As shown, the system includes a data acquisition and processing module, a model training and optimization module, and a results display and feedback module. Among them: The data acquisition and processing module includes a data acquisition module (acquisition module) and a data processing module. It collects interface runtime status data (interface runtime data) to form the foundational data source for training and evaluation. It supports the collection, processing, and storage of interface metric data (such as interface response time, call success rate, throughput, and exception rate). As an example, it can collect and process interface runtime status data in real time and persist it, forming the foundational data source for training and evaluation. For instance, it can collect, process, and store runtime status data such as the number of interface calls, response time, call success rate, throughput, and exception rate in real time. The data acquisition module uses a message queue mechanism to collect interface runtime status data concurrently and distributes the status data to subsequent processing modules. The data processing module retrieves interface runtime status data from the message queue, performs merging and other processing on the status data to obtain interface metric data, and stores the interface metric data based on a monitoring metric framework.
[0071] The model training and optimization module, including stability assessment, outlier assessment (outlier identification module), and feedback optimization, can build, optimize, and iterate the model based on interface status data (interface operation data) and user feedback information (outlier determination results). It identifies outliers (outlier cycle points) and assigns a stability score to the interface, optimizing the model based on user feedback. It is used for model building, optimization, and iteration based on historical data and feedback information. The outlier assessment unit uses a density-based clustering algorithm to identify outliers; the stability assessment unit calculates the interface stability score by weighting the outlier ratio in conjunction with multi-dimensional indicators such as interface error rate, response time (maximum latency), and throughput; the model feedback optimization unit receives accuracy feedback information from the results display and feedback module and adaptively adjusts the model parameters to improve the predictive accuracy of the evaluated model.
[0072] As an example, multi-dimensional indicators such as interface error rate, outlier ratio, maximum latency, and throughput can be mapped to data between [0, 1]. Then, the mapped data can be weighted and averaged according to the preset weights corresponding to each data item to obtain the interface stability score during the detection period (including multiple second periods).
[0073] The results display and feedback module, including stability overview, multi-dimensional analysis, and accuracy feedback, is responsible for visualizing the evaluation results, allowing users to confirm or correct the results (input for anomaly detection results), returning feedback data (anomaly detection results) to the model training and optimization module, and storing it in historical data to drive iterative updates of the model (preset anomaly detection model). It guides users in optimizing the interface and supports user feedback on evaluation results, driving model iterative updates. The stability overview unit displays the overall interface stability results; the multi-dimensional analysis unit performs multi-indicator, multi-dimensional visualization analysis based on specific anomalies and various operational data; the accuracy feedback unit allows users to judge the accuracy of anomalies based on actual conditions and provide feedback, which the system then sends back to the model feedback optimization unit in the model training and optimization module.
[0074] Specific limitations regarding the interface stability assessment device can be found in the limitations of the interface stability assessment method described above, and will not be repeated here. Each module in the aforementioned interface stability assessment device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in hardware or independently of the processor in the electronic device, or stored in software in the memory of the electronic device, so that the processor can call and execute the corresponding operations of each module.
[0075] In this embodiment, the interface stability evaluation device is essentially set up with multiple modules to execute the interface stability evaluation method in any of the above embodiments. The specific functions and technical effects can be referred to in the above embodiments, and will not be repeated here.
[0076] See Figure 5 , Figure 5 A schematic diagram of the structure of an electronic device provided in an embodiment of this application is shown below. Figure 5 As shown, this embodiment of the invention also provides an electronic device 500, including a processor 501, a memory 502, and a communication bus 503; the communication bus 503 is used to connect the processor 501 and the memory 502; the processor 501 is used to execute a computer program stored in the memory 502 to implement the method provided in any of the above embodiments.
[0077] This invention also provides a computer-readable storage medium having a computer program stored thereon, the computer program being used to cause a computer to perform the method described in any of the above embodiments.
[0078] This application also provides a computer-readable storage medium storing one or more modules (programs) that, when applied to a device, enable the device to execute the instructions included in the steps provided in this application.
[0079] This application also provides a computer program product, including a computer program or instructions, which, when executed by a processor, can implement the steps and corresponding content of the aforementioned method embodiments.
[0080] It should be noted that the computer-readable medium described in this disclosure can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this disclosure, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this disclosure, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.
[0081] The aforementioned computer-readable medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device.
[0082] Computer program code for performing the operations of this disclosure can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, as well as conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0083] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of methods and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0084] It should be understood that the terms "first," "second," etc., used in this application are used to distinguish similar objects and do not necessarily indicate a specific order or sequence. The technical features to which these terms are used can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in a sequence other than that shown in the figures or text.
[0085] It should be understood that although the flowcharts provided in the embodiments of this application indicate the various steps with arrows, the order indicated by the arrows does not necessarily limit the implementation order of these steps. Those skilled in the art can perform these steps in other orders according to different implementation scenarios and requirements.
[0086] The above embodiments are merely illustrative of the principles and effects of this application and are not intended to limit this application. Any person skilled in the art can modify or alter the above embodiments without departing from the spirit and scope of this application. Therefore, all equivalent modifications or alterations made by those skilled in the art without departing from the spirit and technical concept disclosed in this application should still be covered by the claims of this application.
Claims
1. A method for evaluating interface stability, characterized in that, The method includes: Obtain the interface operation data of the target interface within a preset time period; Based on all the interface operation data, the interface indicator data of the target interface is statistically analyzed according to the first cycle; Cluster the interface indicator data within the second period to obtain abnormal interface indicator data, and record the first period corresponding to the abnormal interface indicator data as the abnormal period point, wherein the first period is shorter than the second period in the time dimension. The current abnormality ratio of the interface indicator data is determined based on the number of abnormal period points and the number of the first period corresponding to the interface indicator data in the second period. The current stability score of the target interface is determined based on the current anomaly ratio corresponding to all interface indicator data, so as to evaluate the stability of the target interface.
2. The interface stability evaluation method as described in claim 1, characterized in that, After clustering the interface metric data within the second period, the method further includes: Isolated interface metric data after clustering are recorded as suspected abnormal data; Determine the anomaly confidence level of the suspected abnormal data; If the anomaly confidence level is greater than a preset confidence threshold, the suspected anomaly data is identified as the anomaly interface indicator data.
3. The interface stability evaluation method as described in claim 2, characterized in that, Determining the anomaly confidence level of the suspected anomalous data includes: The suspected abnormal data is input into a preset anomaly detection model to obtain the anomaly confidence level of the suspected abnormal data; The training methods for the preset anomaly detection model include: Obtain historical training data for the target interface. The historical training data includes multiple historical indicator data and the data status of each historical indicator data, which includes normal or abnormal. The initial model is trained based on the historical training data until the model converges, thus obtaining the preset anomaly detection model.
4. The interface stability evaluation method as described in claim 3, characterized in that, After inputting the suspected abnormal data into a preset anomaly detection model and obtaining the anomaly confidence level of the suspected abnormal data, the method further includes: Display the abnormal interface indicator data; Receive the anomaly determination result of the abnormal interface indicator data, wherein the anomaly determination result is normal or abnormal; The abnormal interface indicator data and the abnormality determination result of the abnormal interface indicator data are determined as the current training data; The preset anomaly detection model is retrained based on the current training data, and the trained preset anomaly detection model is used to detect subsequent suspected anomalies.
5. The interface stability evaluation method as described in any one of claims 1-4, characterized in that, The current stability score of the target interface is determined based on the current anomaly ratio corresponding to all interface indicator data, including: Obtain the historical latency, historical throughput, historical latency, current throughput, current latency, and the historical anomaly ratio corresponding to each interface metric data of the target interface; The ratio difference corresponding to the interface indicator data is determined by the historical anomaly ratio and the current anomaly ratio corresponding to the same interface indicator data, and then the ratio difference corresponding to each interface indicator data is obtained. The throughput difference is determined based on the historical throughput and the current throughput; The time difference is determined based on the historical time consumption and the current time consumption; The current stability score is determined based on the throughput difference, time difference, ratio difference corresponding to all interface indicator data, and interface error rate.
6. The interface stability evaluation method according to any one of claims 1-4, characterized in that, The method further includes at least one of the following: Obtain the historical stability score of the target interface within the specified time period, determine a stability trend chart based on the historical stability score and the current stability score, and display it. If there are multiple target interfaces, the target interfaces whose current stability score is less than a preset score threshold are identified as risk interfaces, and a risk interface list is generated based on all risk interfaces. The current stability score, stability status, number of abnormal period points, fluctuation amplitude, target interface identifier, and second period timestamp of the target interface are persistently stored at the interface granularity. The stability status is determined based on the current stability score, and the fluctuation amplitude is determined based on the current stability score and the historical stability score of the previous second period. If there are multiple target interfaces, a rating level is determined based on the current stability score of each target interface. The number of target interfaces corresponding to each rating level is counted, and then the interface proportion of the target interfaces corresponding to each rating level is determined. A stability distribution map is generated based on the interface proportion.
7. The interface stability evaluation method as described in any one of claims 1-4, characterized in that, Based on all interface operation data, the interface metrics data of the target interface are statistically analyzed according to the first cycle, including: The initial indicator data of the target interface is determined according to all the interface operation data in the first cycle, and the initial indicator data is continuous data; The initial index data is discretized to obtain discrete index data; The discrete index data is standardized to obtain the interface index data.
8. An interface stability evaluation device, characterized in that, The device includes: The acquisition module is used to acquire the interface operation data of the target interface within a preset time period; The indicator data determination module is used to statistically analyze the interface indicator data of the target interface according to the first cycle based on all interface operation data. An anomaly identification module is used to cluster the interface indicator data within the second period to obtain abnormal interface indicator data, and to record the first period corresponding to the abnormal interface indicator data as an abnormal period point, wherein the first period is shorter than the second period in the time dimension. An anomaly ratio determination module is used to determine the current anomaly ratio of the interface indicator data based on the number of anomaly period points and the number of the first period corresponding to the interface indicator data in the second period. The stability assessment module is used to determine the current stability score of the target interface based on the current anomaly ratio corresponding to all interface indicator data, so as to perform stability assessment on the target interface.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the method as described in any one of claims 1 to 7.
10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the method as described in any one of claims 1 to 7.