Capability portrait determination method and device and electronic equipment
By obtaining and analyzing the multi-dimensional capability indicator data of the API, and combining the call log to determine the API's capability portrait, the problem of insufficient supervision of API capabilities in the existing technology is solved, and the accurate evaluation and optimization of the API is achieved.
Patent Information
- Application Number
- CN202510229425.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-27
- Publication Date
- 2025-05-30
AI Technical Summary
In the prior art, there is insufficient supervision of API capabilities and lack of effective evaluation methods, which leads to the inability to accurately identify API capabilities.
By obtaining the API's ability indicator data in multiple dimensions, using the ability evaluation model for analysis, calculating dimension scores and indicator scores, and combining the API's call logs, determine the API's ability image.
It realizes in-depth analysis and quantitative evaluation of the multi-dimensional performance of the API, accurately evaluates the comprehensive capabilities of the API, and supports refined management and efficient optimization of API resources.
Smart Images

Figure CN120066917A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing, and in particular, to a method, apparatus, and electronic device for determining an ability profile. Background Art
[0002] In the wave of digital transformation, the API (Application Programming Interface) as a bridge connecting different systems and services has become increasingly important. With the popularization of the ability open platform and the construction of the enterprise-level API ecosystem, the number of APIs has shown an explosive growth, and its role in business has become more and more critical. However, the rapid growth of APIs has also brought a series of challenges, especially in terms of ability management and performance optimization.
[0003] The API ability management methods in the related art often focus on function implementation and basic performance monitoring, lacking in-depth analysis of the multi-dimensional performance of APIs. Specifically, first, due to the ambiguity of the API ability quality, it is difficult for enterprises to accurately measure the actual performance and value of APIs, including response time, stability, resource consumption, and business impact, etc.; second, with the wide use of APIs, security risks and compliance issues have become increasingly prominent, but there is a lack of effective evaluation means; third, there are a large number of "zombie" APIs and poorly performing abilities in the system, which not only occupy valuable system resources but also affect business continuity and user experience, but there is a lack of timely identification and optimization mechanisms.
[0004] Furthermore, with the change of business requirements and the introduction of new technologies, the iterative development of APIs has become even more important. However, the evaluation methods in the related art are difficult to provide a quantitative basis for API improvement, making it difficult for enterprises to make scientific decisions during the API iteration process, thus affecting the efficiency and effectiveness of enterprise digital transformation.
[0005] In view of the above problems, no effective solution has been proposed yet. Summary of the Invention
[0006] The embodiments of the present application provide a method, apparatus, and electronic device for determining an ability profile, so as to at least solve the technical problem that the API ability cannot be accurately identified due to insufficient supervision of API ability and lack of effective evaluation means in the related art.
[0007] According to one aspect of the embodiments of the present application, a method for determining an ability profile is provided, including: obtaining ability metric data of an application programming interface (API) in multiple dimensions, where the ability metric data is used to reflect the service capabilities and performance metrics of the API in multiple dimensions; analyzing the ability metric data through an ability evaluation model to obtain dimension scores of the API in multiple dimensions, where the dimension scores are used to represent the quantitative evaluation scores of the API in multiple dimensions; determining an index score of the API based on the dimension scores and preset dimension weights, where the preset dimension weights include the weights of the evaluation attributes of the API in multiple dimensions, and the index score is used to represent the comprehensive evaluation score of the API in multiple dimensions relative to the preset dimension weights; obtaining the call log of the API, and determining the ability profile of the API based on the call log and the index score, where the call log is used to represent the usage situation and behavior pattern of the API, and the ability profile is used to represent the comprehensive ability level of the API in multiple dimensions.
[0008] Optionally, before obtaining the ability metric data of the application programming interface (API) in multiple dimensions, the method further includes: determining multiple evaluation dimensions of the API, where the multiple evaluation dimensions at least include the business importance, call volume, construction compliance, ability stability, and security compliance of the API; determining a first evaluation attribute corresponding to the business importance, a second evaluation attribute corresponding to the call volume, a third evaluation attribute corresponding to the construction compliance, a fourth evaluation attribute corresponding to the ability stability, and a fifth evaluation attribute corresponding to the security compliance.
[0009] Optionally, the preset dimension weights include: a first dimension weight corresponding to the first evaluation attribute, a second dimension weight corresponding to the second evaluation attribute, a third dimension weight corresponding to the third evaluation attribute, a fourth dimension weight corresponding to the fourth evaluation attribute, and a fifth dimension weight corresponding to the fifth evaluation attribute.
[0010] Optionally, determine the metric score of the API based on the dimension scores and preset dimension weights, including: determining the first metric score based on the first dimension score and the first dimension weight, determining the second metric score based on the second dimension score and the second dimension weight, determining the third metric score based on the third dimension score and the third dimension weight, determining the fourth metric score based on the fourth dimension score and the fourth dimension weight, determining the fifth metric score based on the fifth dimension score and the fifth dimension weight, where the first dimension score is used to represent the dimension score corresponding to the business importance, the second dimension score is used to represent the dimension score corresponding to the call volume, the third dimension score is used to represent the dimension score corresponding to the construction compliance, the fourth dimension score is used to represent the dimension score corresponding to the ability stability, and the fifth dimension score is used to represent the dimension score corresponding to the security compliance; determine the metric score of the API based on the first metric score, the second metric score, the third metric score, the fourth metric score, and the fifth metric score.
[0011] Optionally, the method further includes: determining the basic data of the API, where the basic data at least includes data related to the business system, business type, priority, and sensitive information of the API; screening the basic data, and regularly extracting the ability metric data from the basic data according to a preset time period.
[0012] Optionally, after obtaining the ability metric data of the application programming interface (API) in multiple dimensions, the method further includes: performing data cleaning on the ability metric data, where the data cleaning includes processing missing values and outliers in the ability metric data; uniformly converting the ability metric data after data cleaning into a target format, and determining the initial feature data from the ability metric data after format conversion; performing feature engineering on the initial feature data to obtain the target feature data, where the feature engineering includes performing label encoding, binary conversion, and polynomial feature generation on the initial feature data.
[0013] Optionally, determine the ability portrait of the API based on the call log and the metric score, including: obtaining the ability analysis flow data and access behavior characteristics of the API in the call log, where the ability analysis flow data is used to reflect the running state and performance state of the API, and the access behavior characteristics are used to reflect the call pattern and behavior characteristics of the API; jointly determining the ability portrait of the API based on the ability analysis flow data, the access behavior characteristics, and the metric score.
[0014] According to another aspect of the embodiments of the present application, there is also provided an apparatus for determining an ability profile, including: an acquisition module, configured to acquire ability metric data of an application programming interface (API) in multiple dimensions, where the ability metric data is used to reflect the service ability and performance metrics of the API in multiple dimensions; an analysis module, configured to analyze the ability metric data through an ability evaluation model to obtain dimension scores of the API in multiple dimensions, where the dimension scores are used to represent the quantitative evaluation scores of the API in multiple dimensions; a first determination module, configured to determine an index score of the API according to the dimension scores and preset dimension weights, where the preset dimension weights include the weights of the evaluation attributes of the API in multiple dimensions, and the index score is used to represent the comprehensive evaluation score of the API in multiple dimensions relative to the preset dimension weights; a second determination module, configured to acquire the call log of the API, and determine the ability profile of the API according to the call log and the index score, where the call log is used to represent the usage situation and behavior pattern of the API, and the ability profile is used to represent the comprehensive ability level of the API in multiple dimensions.
[0015] According to yet another aspect of the embodiments of the present application, there is also provided an electronic device, including: a memory and a processor, where the memory is configured to store program instructions; the processor is connected to the memory and is configured to execute to implement the above method for determining an ability profile.
[0016] According to still another aspect of the embodiments of the present application, there is also provided a non-volatile storage medium, where the non-volatile storage medium includes a stored computer program, and the device where the non-volatile storage medium is located executes the above method for determining an ability profile by running the computer program.
[0017] According to still another aspect of the embodiments of the present application, there is also provided a computer program product, including computer instructions, where the computer instructions, when executed by a processor, implement the above method for determining an ability profile.
[0018] In the embodiments of the present application, by obtaining the capability index data of an application programming interface (API) in multiple dimensions, where the capability index data is used to reflect the service capabilities and performance metrics of the API in multiple dimensions; analyzing the capability index data through a capability evaluation model to obtain the dimension scores of the API in multiple dimensions, where the dimension scores are used to represent the quantitative evaluation scores of the API in multiple dimensions; determining the index score of the API based on the dimension scores and preset dimension weights, where the preset dimension weights include the weights of the evaluation attributes of the API in multiple dimensions, and the index score is used to represent the comprehensive evaluation score of the API in multiple dimensions relative to the preset dimension weights; obtaining the call logs of the API, and determining the capability portrait of the API based on the call logs and the index score, where the call logs are used to represent the usage situation and behavior patterns of the API, and the capability portrait is used to represent the comprehensive capability level of the API in multiple dimensions, the purpose of accurately evaluating and quantifying the comprehensive capabilities of the API is achieved, thereby realizing the technical effects of refined management and efficient optimization of API resources, and further solving the technical problem that in the related art, due to insufficient supervision of API capabilities and lack of effective evaluation means, the capabilities of the API cannot be accurately identified. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] The drawings described herein are used to provide a further understanding of the present application and form a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation to the present application. In the drawings:
[0020] Figure 1 is a hardware structure diagram of a computer terminal for implementing a method for determining a capability portrait according to an embodiment of the present application;
[0021] Figure 2 is a flowchart of a method for determining a capability portrait according to an embodiment of the present application;
[0022] Figure 3 is a structure diagram of a device for determining a capability portrait according to an embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0023] In order to enable those skilled in the art to better understand the solutions of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.
[0024] It should be noted that the terms "first", "second", etc. in the description, claims and the above-mentioned drawings of this application are used to distinguish similar objects, and do not necessarily have to be used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances, so that the embodiments of the present application described here can be implemented in an order other than those illustrated or described here. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device that includes a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices.
[0025] First, some nouns or terms that appear in the process of explaining the embodiments of this application are applicable to the following explanations:
[0026] API (Application Programming Interface): An interface that allows different software applications to interact. It defines how software components communicate with each other, including data formats, call methods, formats of return results, etc. APIs enable developers to utilize existing functions and services without having to understand the underlying implementation details, thus improving the efficiency and flexibility of software development.
[0027] DSA (Data Segmentation Algorithm): Used to split large amounts of data into smaller and more manageable segments for more efficient processing and analysis. It can automatically adjust the segmentation method according to the characteristics of the data (such as time, space or content), is applicable to the processing of dynamic data sets, and helps to improve the efficiency and accuracy of data analysis.
[0028] Data cleaning: Refers to the process of detecting and correcting or deleting errors, inconsistencies or missing values in a data set. This includes filling in missing values, identifying outliers, removing duplicate data, etc., with the aim of improving data quality and ensuring the accuracy of data analysis.
[0029] Feature engineering: An important link in machine learning and data analysis, which involves selecting, constructing and transforming features from raw data to improve the prediction performance of the model. It includes steps such as label encoding, One Hot Encoding, polynomial feature generation, data partitioning, data normalization and feature dimensionality reduction.
[0030] Capability profile: A comprehensive performance description of an API in multiple dimensions (such as call frequency, response time, stability, security and business value). It visually displays the capabilities and performance of the API to help manage and optimize API resources.
[0031] To solve the problem of poor API recognition ability in related technologies, an embodiment of the present application provides a method for determining an ability portrait, which can run on Figure 1 the computer terminal shown below. The computer terminal will be described as follows.
[0032] The method embodiment for determining the ability portrait provided by the embodiment of the present application can be executed on a mobile terminal, a computer terminal or a similar computing device. Figure 1 The following shows a hardware structure block diagram of a computer terminal for implementing the method for determining the ability portrait. As Figure 1 shown, the computer terminal 10 may include one or more processors (the processors may include, but are not limited to, processing devices such as a microprocessor MCU or a programmable logic device FPGA, shown as 102a, 102b,..., 102n in the figure), a memory 104 for storing data, and a transmission module 106 for communication functions connected by wired and / or wireless networks. In addition, it may further include: a display, a keyboard, a cursor control device, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of the I / O interface), a network interface, and a BUS bus. Those of ordinary skill in the art can understand that Figure 1 the structure shown is only schematic and does not limit the structure of the above-mentioned electronic device. For example, the computer terminal 10 may further include more or fewer components than those shown in Figure 1 or have a different configuration from that shown in Figure 1 the figure.
[0033] It should be noted that the above one or more processors and / or other data processing circuits are generally referred to as "data processing circuits" in this article. The data processing circuit may be embodied in whole or in part as software, hardware, firmware, or any arbitrary combination thereof. In addition, the data processing circuit may be a single independent processing module, or be incorporated in whole or in part into any one of the other elements in the computer terminal 10. As involved in the embodiment of the present application, the data processing circuit is used for processor control (such as the selection of a variable resistance terminal path connected to an interface).
[0034] The memory 104 can be used to store software programs and modules of application software, such as the program instructions / data storage device corresponding to the method for determining the capability profile in the embodiments of the present application. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory 104, that is, implements the method for determining the capability profile described above. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memories, or other non-volatile solid-state memories. In some instances, the memory 104 may further include a memory remotely disposed relative to the processor, and these remote memories can be connected to the computer terminal 10 through a network. Examples of the above network include but are not limited to the Internet, an enterprise intranet, a local area network, a mobile communication network, and combinations thereof.
[0035] The transmission module 106 is used to receive or send data via a network. Specific examples of the above network may include a wireless network provided by a communication provider of the computer terminal 10. In one instance, the transmission module 106 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices through a base station and thus communicate with the Internet. In one instance, the transmission module 106 may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0036] The display can be, for example, a touch-screen liquid crystal display (LCD), which enables a user to interact with the user interface of the computer terminal 10.
[0037] It should be noted here that in some alternative embodiments, the above Figure 1 shown computer terminal may include hardware elements (including circuits), software elements (including computer code stored on a computer-readable medium), or a combination of both hardware elements and software elements. It should be pointed out that Figure 1 is only an example of a specific specific instance, and is intended to show the types of components that may exist in the above computer terminal.
[0038] Under the above operating environment, an embodiment of a method for determining a capability profile is provided in the embodiments of the present application. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order than here.
[0039] Figure 2 is a flowchart of a method for determining a capability profile according to an embodiment of the present application, as Figure 2As shown in the figure, the method includes the following steps:
[0040] Step S202: Obtain the capability index data of the application programming interface (API) in multiple dimensions, where the capability index data is used to reflect the service capabilities and performance metrics of the API in multiple dimensions.
[0041] In the above step S202, the capability index data is used to reflect the performance of the API in different aspects, including but not limited to the capability index data of the API in dimensions such as business importance, call volume, construction compliance, capability stability, and security compliance, which are used to reflect the business value, usage frequency, compliance with construction specifications, operation stability, and security of the API.
[0042] Step S204: Analyze the capability index data through a capability evaluation model to obtain the dimension scores of the API in multiple dimensions, where the dimension scores are used to represent the quantitative evaluation scores of the API in multiple dimensions.
[0043] In the above step S204, a pre-constructed capability evaluation model and corresponding quality evaluation algorithms can be used to deeply analyze the capability index data collected in step S202 to extract the eigenvalue in each dimension. For example, business importance may involve the priority of the API, the ability to process sensitive data, the degree of association with the business, etc.; call volume may involve the daily call times of the API, the stability of the call frequency, etc. Through the analysis of the capability evaluation model, the capability index of each dimension can be converted into specific dimension scores, which are the basis for quantitatively evaluating the performance and service capabilities of the API.
[0044] Step S206: Determine the index score of the API based on the dimension scores and preset dimension weights, where the preset dimension weights include the weights of the evaluation attributes of the API in multiple dimensions, and the index score is used to represent the comprehensive evaluation score of the API in multiple dimensions relative to the preset dimension weights.
[0045] In the above step S206, the comprehensive index score of the API can be calculated based on the dimension scores obtained from step S204 and the preset dimension weights. Among them, the dimension weights reflect the importance of different dimensions in the overall evaluation. For example, business importance may be given a higher weight because it is directly related to the impact of the API on the enterprise's business. The index score is obtained through weighted average calculation, which comprehensively considers the performance capabilities of the API in all dimensions and is a quantitative result reflecting the comprehensive capabilities of the API.
[0046] Step S208: Obtain the call logs of the API, and determine the capability portrait of the API based on the call logs and the metric scores. Herein, the call logs are used to represent the usage situation and behavior patterns of the API, and the capability portrait is used to represent the comprehensive capability level of the API in multiple dimensions.
[0047] In the above step S208, by combining the collected API call logs with the metric scores, the capability portrait of the API can be generated. Among them, the call logs contain detailed records of the API usage situation, such as call time, call frequency, call duration, identity information of the caller, etc., which helps to deeply understand the actual usage pattern and performance of the API. The capability portrait synthesizes all quantified and non-quantified API information, including but not limited to dimension scores, characteristics of call frequency, abnormal call situations, security compliance, etc., and presents it in a visual way, which helps to intuitively understand and manage the capabilities of the API.
[0048] Through the above steps S202 to S208, the purpose of accurately evaluating and quantifying the comprehensive capabilities of the API is achieved, thus realizing the technical effects of refined management and efficient optimization of API resources, and further solving the technical problem that it is impossible to accurately identify the capabilities of the API due to insufficient supervision of API capabilities and lack of effective evaluation means in the related technologies. The following is a detailed description.
[0049] Optionally, before obtaining the capability metric data of the application programming interface (API) in multiple dimensions, that is, before step S202, the above method further includes: determining multiple evaluation dimensions of the API, where the multiple evaluation dimensions at least include the business importance degree of the API, call volume, construction compliance, capability stability, and security compliance; determining a first evaluation attribute corresponding to the business importance degree, determining a second evaluation attribute corresponding to the call volume, determining a third evaluation attribute corresponding to the construction compliance, determining a fourth evaluation attribute corresponding to the capability stability, and determining a fifth evaluation attribute corresponding to the security compliance.
[0050] In the embodiment of the present application, determining the multiple evaluation dimensions of the API and the corresponding evaluation attributes is a prerequisite for constructing the capability portrait, which lays a foundation for subsequent multi-dimensional data analysis and capability evaluation.
[0051] Specifically, first define at least five evaluation dimensions of the API, such as the business importance degree of the API, call volume, construction compliance, capability stability, and security compliance. These dimensions comprehensively cover the key performance and service characteristics of the API in the enterprise ecosystem, including its business value, usage frequency, degree of compliance with specifications, operational reliability, and security, etc.
[0052] Secondly, clarify the evaluation attributes corresponding to each evaluation dimension. For example, the first evaluation attribute may include attributes such as the system to which the API belongs, whether it is a network-wide API, priority, sensitive data processing ability, and whether it is accessible via the public network; the second evaluation attribute may include attributes such as the daily call volume of the API, call volume variance, and month-on-month ratio; the third evaluation attribute may include attributes such as the subscription volume of the API, rate limiting policy, timeout duration, call volume review, and data consistency; the fourth evaluation attribute may include attributes such as the call success rate, call failure rate, and average elapsed time of the API in the past three months; the fifth evaluation attribute may include attributes such as the abnormal call volume of the API, access during abnormal periods, data desensitization level, and authentication policy.
[0053] Generally speaking, the above evaluation attributes not only reflect the static characteristics of the API, such as the system to which it belongs and the business type, but also consider the dynamic performance, such as the change and stability of the call volume. In addition, considerations related to security and compliance are also included, which are crucial aspects of API management in the modern digital environment. The clear division of attributes makes the subsequent data collection work more organized, and at the same time provides a clear framework for applying complex ability evaluation models and quality evaluation algorithms, enabling more accurate quantification of the API's performance in each dimension and providing solid data support for generating the ability profile.
[0054] Furthermore, it is also necessary to determine the preset dimension weights corresponding to the above business importance, call volume, construction compliance, ability stability, and security compliance. Among them, the preset dimension weights include: the first dimension weight corresponding to the first evaluation attribute, the second dimension weight corresponding to the second evaluation attribute, the third dimension weight corresponding to the third evaluation attribute, the fourth dimension weight corresponding to the fourth evaluation attribute, and the fifth dimension weight corresponding to the fifth evaluation attribute.
[0055] In the embodiments of the present application, the determination of the preset dimension weights fully considers the status and role of the API in the enterprise's digital ability opening strategy. For example, the first dimension weight corresponding to the business importance may be given a higher weight because it directly affects the correlation between the API and the core business and the contribution to the enterprise value; the second dimension weight corresponding to the call volume reflects the actual usage frequency and user needs of the API; the third dimension weight corresponding to the construction compliance and the fourth weight corresponding to the ability stability reflect the emphasis on the standardization and reliability of the API; the fifth weight corresponding to the security compliance emphasizes the requirements for the security protection of the API to avoid data leakage and illegal access.
[0056] By setting different dimensional weights for each evaluation attribute, the ability of the API can be evaluated more scientifically and reasonably, avoiding the limitations of single-dimensional evaluation, and ensuring the comprehensiveness and accuracy of the portrait. This comprehensive evaluation mechanism based on multi-dimensional weights not only helps to accurately identify the advantages and disadvantages of the API, but also guides enterprises to conduct targeted optimization and adjustment of the API, improving the efficiency and security of the overall API ecosystem.
[0057] Before step S202, the above method further includes: determining the basic data of the API, where the basic data at least includes data related to the business system, business type, priority, and sensitive information of the API; screening the basic data, and regularly extracting the capability index data from the basic data according to a preset time period.
[0058] In the embodiment of the present application, the capability index data is determined in the following manner: First, determine the basic data of the API, including but not limited to identifying the business system to which the API belongs, such as the digital life system, the Xiaoyi Butler system, etc.; clarify the business type of the API service to judge its role and value in the enterprise ecosystem; determine the priority of the API, which is used to reflect the impact degree of the API on the enterprise business continuity and user experience; and evaluate whether the API involves sensitive information, which is used to measure the security compliance of the API. Secondly, screen and filter the collected basic data to determine an effective data set. For example, the basic data may contain a large amount of information. By screening and filtering, non-critical or redundant data can be removed, and the information directly affecting the API ability evaluation is retained. Finally, by setting a preset time period, regularly extract the capability index data from the screened basic data to ensure the timeliness and pertinence of the collected data. Among them, the preset time period can be daily, weekly or monthly. Regularly extracting data helps to track the change trend of the API performance and timely discover potential problems. For example, fluctuations in the call volume, the occurrence of abnormal access, and the decline in the ability stability can all be captured in a timely manner through regular data extraction, providing timely data support for the continuous optimization and iteration of the API.
[0059] Optionally, before step S204, the above method further includes: performing data cleaning on the capability index data, where the data cleaning includes processing missing values and outliers in the capability index data; uniformly converting the capability index data after data cleaning into a target format, and determining the initial feature data from the capability index data after format conversion; performing feature engineering on the initial feature data to obtain the target feature data, where the feature engineering includes label encoding, binary conversion, and polynomial feature generation on the initial feature data.
[0060] In the embodiments of this application, preprocessing the ability index data is an essential part of constructing the API ability portrait, which ensures the data quality of the input to the subsequent analysis model. The specific steps can be as follows:
[0061] S1: Clean the ability index data. For example, by using AI algorithms such as SimpleImputer to handle missing values, it can intelligently fill or delete the missing data, reducing the negative impact of data missing on model training. At the same time, use statistical methods or machine learning models to identify and process outliers, avoiding the deviation of abnormal data from the results, ensuring the healthy state of the data set, and laying a solid foundation for subsequent analysis.
[0062] S2: Uniformly convert the ability index data into the target format for model processing. For example, convert all timestamps into a unified time format, and encode the text data into numerical or vector forms, ensuring data standardization and format consistency, which is convenient for the model to identify and process.
[0063] S3: Extract the initial feature data that constitutes the API ability portrait from the uniformly formatted data. These feature data cover indicators in multiple dimensions such as business importance, call volume, construction compliance, ability, and security compliance. The initial feature data is used to represent the original state of the API in each evaluation dimension and is the basis for further feature engineering and quality assessment. Subsequently, through feature engineering, preprocess the initial feature data, including label encoding the categorical variables (converting to numerical representation), using One Hot Encoding to perform binary conversion on multi-class features (converting each category into independent binary features), and generating polynomial features (generating higher-order features by combining the original features) to increase the model's expressive ability and capture potential interaction relationships between features. Finally, the obtained target feature data is the API ability feature data set suitable for model training and prediction, and these feature data can more accurately reflect the ability and performance of the API.
[0064] S4: Scientifically divide the data set into a training set, a validation set, and a test set, which is an important means for evaluating model performance, avoiding overfitting, and adjusting hyperparameters. By testing and validating on different data sets, the generalization ability and effectiveness of the model can be ensured, and the model can be optimized to better meet the requirements of API ability portrait construction.
[0065] S5: Normalize or standardize the divided data set through MinMaxScaler or StandardScaler to eliminate the influence of feature dimensions, ensure the fairness of the contribution of different features in the model, avoid the phenomenon that some features dominate the model results due to large dimensions, and improve the efficiency and accuracy of model training.
[0066] S6: Reduce the data dimension of the data set by methods such as feature selection or principal component analysis (PCA), and remove redundant feature variables.
[0067] S7: For data with time attributes, such as the daily call volume of APIs, etc., an AI time series model can be used for processing, which can identify patterns and trends in the time series, provide the model with predictive ability in the time dimension, and thus optimize the analysis of API call frequency and periodic changes.
[0068] In the above step S206, determine the metric score of the API according to the dimension score and the preset dimension weight, including: determine the first metric score according to the first dimension score and the first dimension weight, determine the second metric score according to the second dimension score and the second dimension weight, determine the third metric score according to the third dimension score and the third dimension weight, determine the fourth metric score according to the fourth dimension score and the fourth dimension weight, determine the fifth metric score according to the fifth dimension score and the fifth dimension weight, where the first dimension score is used to represent the dimension score corresponding to the business importance, the second dimension score is used to represent the dimension score corresponding to the call volume, the third dimension score is used to represent the dimension score corresponding to the construction compliance, the fourth dimension score is used to represent the dimension score corresponding to the ability stability, the fifth dimension score is used to represent the dimension score corresponding to the security compliance; determine the metric score of the API according to the first metric score, the second metric score, the third metric score, the fourth metric score and the fifth metric score.
[0069] In the embodiments of the present application, by quantifying the importance of each dimension and combining the actual dimension scores, the performance and value of the API can be comprehensively evaluated. Specifically, according to the first dimension score and the first dimension weight of the business importance, the first metric score reflecting the status and role of the API in the business can be determined; similarly, the second dimension score and the second dimension weight of the call volume determine the second metric score related to the usage frequency; the third dimension score and the third dimension weight of the construction compliance ensure the third metric score that the API follows the enterprise policies and industry standards; the fourth dimension score and the fourth dimension weight of the ability stability reflect the fourth metric score of the reliability and response speed of the API operation; finally, the fifth dimension score and the fifth dimension weight of the security compliance are used to measure the ability of the API to process sensitive information and resist security threats of the fifth metric score.
[0070] In the above process, the weight setting for each dimension is adjusted as needed according to the enterprise strategy and business scenarios, aiming to accurately reflect the actual performance and potential value of the API. The metric scores obtained through calculation can not only intuitively display the ability level of the API for both the API provider and users, but also provide data-based optimization suggestions for enterprise decision-makers, helping to identify API functions that need improvement and enhancing the overall quality and security of the API.
[0071] In the above step S208, determine the ability profile of the API based on the call logs and metric scores, including: obtaining the ability analysis flow data and access behavior characteristics of the API in the call logs, where the ability analysis flow data is used to reflect the running state and performance state of the API, and the access behavior characteristics are used to reflect the call patterns and behavior characteristics of the API; jointly determine the ability profile of the API based on the ability analysis flow data, access behavior characteristics, and metric scores.
[0072] In the embodiments of the present application, by integrating the actual operation data of the API and the quantitative evaluation results, the ability profile of the API can be constructed, thereby comprehensively reflecting the comprehensive performance and potential risks of the API.
[0073] Specifically, first, the ability analysis flow data and access behavior characteristics can be obtained through the call logs. Among them, the ability analysis flow data covers the running state and performance state of the API, and it can provide key performance indicators such as the API response time, success rate, and failure rate, helping to understand the running efficiency and stability of the API in the actual environment. The access behavior characteristics focus on the call patterns and behavior characteristics of the API, including the call frequency, call distribution, and abnormal call detection of the API. These information is crucial for evaluating the usage efficiency of the API, user behavior analysis, and identification of potential security threats.
[0074] Furthermore, combining the ability analysis flow data, access behavior characteristics, and the previously determined metric scores, comprehensively analyze the API from multiple perspectives. Among them, the metric scores of dimensions such as business importance, call volume, construction compliance, ability stability, and security compliance complement the actual operation data of the API in the call logs, jointly depicting the ability profile of the API. This ability profile not only reflects the quality of the API at the technical level, but also reveals its role in the business, user usage, and security compliance status, providing valuable references for the optimization, maintenance, and security policy formulation of the API.
[0075] In the embodiments of the present application, by integrating data in multiple dimensions such as the importance of the business, the call volume, the construction compliance, the stability of the capabilities, and the security compliance, and using AI technology for in-depth data cleaning, formatting, feature engineering processing, and standardized analysis, it is possible to comprehensively and accurately evaluate the capabilities and performance of the API. Especially in the intelligent preprocessing and multi-dimensional quantitative evaluation of the capability index data, the present application not only improves the data quality and analysis efficiency, but also realizes an in-depth insight into the comprehensive performance of the API through refined weight allocation and index score determination, providing a scientific basis for the optimization and upgrade of the API and risk management, and demonstrating significant innovation and practical value in the field of API management.
[0076] According to the embodiments of the present application, a device for determining a capability portrait is provided. It should be noted that the device for determining a capability portrait in the embodiments of the present application can be used to execute the method for determining a capability portrait provided in the embodiments of the present application. The following introduces the device for determining a capability portrait provided in the embodiments of the present application.
[0077] Figure 3 is a structural diagram of a device for determining a capability portrait according to the embodiments of the present application. As Figure 3 shown, the device includes:
[0078] An acquisition module 30, configured to acquire capability index data of an application programming interface (API) in multiple dimensions, where the capability index data is used to reflect the service capabilities and performance indicators of the API in multiple dimensions;
[0079] An analysis module 32, configured to analyze the capability index data through a capability evaluation model to obtain dimension scores of the API in multiple dimensions, where the dimension scores are used to represent the quantitative evaluation scores of the API in multiple dimensions;
[0080] A first determination module 34, configured to determine an index score of the API based on the dimension scores and preset dimension weights, where the preset dimension weights include the weights of the evaluation attributes of the API in multiple dimensions, and the index score is used to represent the comprehensive evaluation score of the API in multiple dimensions relative to the preset dimension weights;
[0081] A second determination module 36, configured to acquire the call log of the API, and determine the capability portrait of the API based on the call log and the index score, where the call log is used to represent the usage situation and behavior pattern of the API, and the capability portrait is used to represent the comprehensive capability level of the API in multiple dimensions.
[0082] Through the acquisition module, analysis module, first determination module, and second determination module in the above-mentioned API comprehensive ability portrait determination device, the purpose of accurately evaluating and quantifying the comprehensive ability of the API is achieved, thereby realizing the technical effect of refined management and efficient optimization of API resources, and further solving the technical problem that in the related art, due to insufficient supervision of API capabilities and lack of effective evaluation means, the API capabilities cannot be accurately identified.
[0083] In the API comprehensive ability portrait determination device provided in the embodiment of the present application, the first determination module is further configured to determine a first index score according to the first dimension score and the first dimension weight, determine a second index score according to the second dimension score and the second dimension weight, determine a third index score according to the third dimension score and the third dimension weight, determine a fourth index score according to the fourth dimension score and the fourth dimension weight, and determine a fifth index score according to the fifth dimension score and the fifth dimension weight. Among them, the first dimension score is used to represent the dimension score corresponding to the business importance, the second dimension score is used to represent the dimension score corresponding to the call volume, the third dimension score is used to represent the dimension score corresponding to the construction compliance, the fourth dimension score is used to represent the dimension score corresponding to the ability stability, and the fifth dimension score is used to represent the dimension score corresponding to the security compliance; determine the API index score according to the first index score, the second index score, the third index score, the fourth index score, and the fifth index score.
[0084] In the API comprehensive ability portrait determination device provided in the embodiment of the present application, the second determination module is further configured to obtain the ability analysis flow data and access behavior characteristics of the API in the call log. Among them, the ability analysis flow data is used to reflect the running state and performance state of the API, and the access behavior characteristics are used to reflect the call mode and behavior characteristics of the API; jointly determine the API comprehensive ability portrait according to the ability analysis flow data, the access behavior characteristics, and the index score.
[0085] In the API comprehensive ability portrait determination device provided in the embodiment of the present application, it further includes a processing module 38, which is configured to determine multiple evaluation dimensions of the API. Among them, the multiple evaluation dimensions at least include the business importance, call volume, construction compliance, ability stability, and security compliance of the API; determine a first evaluation attribute corresponding to the business importance, determine a second evaluation attribute corresponding to the call volume, determine a third evaluation attribute corresponding to the construction compliance, determine a fourth evaluation attribute corresponding to the ability stability, and determine a fifth evaluation attribute corresponding to the security compliance.
[0086] In the apparatus for determining the capability profile provided by the embodiments of the present application, the processing module is further configured to determine the basic data of the API, where the basic data at least includes data related to the business system, business type, priority, and sensitive information of the API; screen the basic data, and regularly extract the capability index data from the basic data according to a preset time period.
[0087] In the apparatus for determining the capability profile provided by the embodiments of the present application, the processing module is further configured to perform data cleaning on the capability index data, where the data cleaning includes processing missing values and outliers in the capability index data; uniformly convert the capability index data after data cleaning into a target format, and determine the initial feature data from the capability index data after format conversion; perform feature engineering on the initial feature data to obtain the target feature data, where the feature engineering includes performing label encoding, binary conversion, and polynomial feature generation on the initial feature data.
[0088] The embodiments of the present application further provide an electronic device, including: a memory and a processor, where the memory is used to store program instructions; the processor is connected to the memory and is used to execute the method for determining the above-mentioned capability profile.
[0089] It should be noted that the above-mentioned electronic device is used to execute Figure 2 the method for determining the capability profile shown, so the relevant explanations in the method for determining the capability profile also apply to this electronic device, and will not be elaborated here.
[0090] The embodiments of the present application further provide a non-volatile storage medium, which includes a stored computer program, where the device where the non-volatile storage medium is located executes the method for determining the above-mentioned capability profile by running the computer program.
[0091] It should be noted that the above-mentioned non-volatile storage medium is used to execute Figure 2 the method for determining the capability profile shown, so the relevant explanations in the method for determining the capability profile also apply to this non-volatile storage medium, and will not be elaborated here.
[0092] The embodiments of the present application further provide a computer program product, including computer instructions, where the computer instructions implement the method for determining the above-mentioned capability profile when executed by a processor.
[0093] It should be noted that the above-mentioned computer program product is used to execute Figure 2 the method for determining the capability profile shown, so the relevant explanations in the method for determining the capability profile also apply to this computer program product, and will not be elaborated here.
[0094] The serial numbers of the embodiments of the present application above are only for description and do not represent the advantages and disadvantages of the embodiments.
[0095] In the above embodiments of the present application, the descriptions of the various embodiments have their own emphases. For the parts not described in detail in a certain embodiment, reference may be made to the relevant descriptions of other embodiments.
[0096] In the several embodiments provided by the present application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only illustrative. For example, the division of the units can be a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed coupling or direct coupling or communication connection to each other can be through some interfaces. The indirect coupling or communication connection of units or modules can be in an electrical or other form.
[0097] The units described as separate components may or may not be physically separated. The components displayed as units may or may not be physical units, that is, they can be located in one place or distributed to multiple units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0098] In addition, in each embodiment of the present application, the functional units can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit. The above integrated units can be implemented in the form of hardware or in the form of software functional units.
[0099] If the above integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, a server or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application. And the foregoing storage medium includes: USB flash drives, read-only memories (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), mobile hard disks, magnetic disks or optical disks and other various media that can store program codes.
[0100] The above are only the preferred embodiments of the present application. It should be noted that for those of ordinary skill in the art, without departing from the principle of the present application, several improvements and refinements can be made, and these improvements and refinements should also be regarded as the protection scope of the present application.
Claims
1. A method for determining a capability profile, characterized in that: include: Acquire capability indicator data of an application program interface (API) in multiple dimensions, wherein the capability indicator data is used to reflect the service capability and performance indicators of the API in the multiple dimensions; Analyze the capability indicator data through a capability evaluation model to obtain dimension scores of the API in the multiple dimensions, wherein the dimension scores are used to represent quantitative evaluation scores of the API in the multiple dimensions; Determine the indicator score of the API according to the dimension score and the preset dimension weight, wherein the preset dimension weight includes the weight of the evaluation attribute of the API under the multiple dimensions, and the indicator score is used to represent the comprehensive evaluation score of the API under the multiple dimensions relative to the preset dimension weight; Obtain the call log of the API, and determine the capability profile of the API based on the call log and the indicator score, wherein the call log is used to represent the usage and behavior pattern of the API, and the capability profile is used to represent the comprehensive capability level of the API in the multiple dimensions.
2. The method according to claim 1, characterized in that: Before obtaining the capability indicator data of the application program interface API in multiple dimensions, the method further includes: Determining multiple evaluation dimensions of the API, wherein the multiple evaluation dimensions include at least business importance, call volume, construction compliance, capability stability, and security compliance of the API; Determine a first evaluation attribute corresponding to the business importance, determine a second evaluation attribute corresponding to the call volume, determine a third evaluation attribute corresponding to the construction compliance, determine a fourth evaluation attribute corresponding to the capability stability, and determine a fifth evaluation attribute corresponding to the security compliance.
3. The method according to claim 2, characterized in that The preset dimension weights include: a first dimension weight corresponding to the first evaluation attribute, a second dimension weight corresponding to the second evaluation attribute, a third dimension weight corresponding to the third evaluation attribute, a fourth dimension weight corresponding to the fourth evaluation attribute, and a fifth dimension weight corresponding to the fifth evaluation attribute.
4. The method according to claim 3, characterized in that Determining the indicator score of the API according to the dimension score and the preset dimension weight includes: Determine a first indicator score according to the first dimension score and the first dimension weight, determine a second indicator score according to the second dimension score and the second dimension weight, determine a third indicator score according to the third dimension score and the third dimension weight, determine a fourth indicator score according to the fourth dimension score and the fourth dimension weight, and determine a fifth indicator score according to the fifth dimension score and the fifth dimension weight, wherein the first dimension score is used to represent the dimension score corresponding to the importance of the business, the second dimension score is used to represent the dimension score corresponding to the call volume, the third dimension score is used to represent the dimension score corresponding to the construction compliance, the fourth dimension score is used to represent the dimension score corresponding to the capability stability, and the fifth dimension score is used to represent the dimension score corresponding to the security compliance; An indicator score for the API is determined based on the first indicator score, the second indicator score, the third indicator score, the fourth indicator score, and the fifth indicator score.
5. The method according to claim 1, characterized in that The method further comprises: Determine basic data of the API, wherein the basic data includes at least data related to the service system, service type, priority and sensitive information of the API; The basic data is screened, and the capability indicator data is periodically extracted from the basic data according to a preset time period.
6. The method according to claim 1, characterized in that After obtaining the capability indicator data of the application program interface API in multiple dimensions, the method further includes: Performing data cleaning on the capability indicator data, wherein the data cleaning includes performing missing value processing and outlier processing on the capability indicator data; The capability indicator data after data cleaning are uniformly converted into a target format, and initial feature data are determined from the capability indicator data after format conversion; Feature engineering is performed on the initial feature data to obtain target feature data, wherein the feature engineering includes label encoding, binary conversion and polynomial feature generation on the initial feature data.
7. The method according to claim 1, characterized in that Determining the capability profile of the API according to the call log and the indicator score includes: Acquire capability analysis flow data and access behavior characteristics of the API in the call log, wherein the capability analysis flow data is used to reflect the operation status and performance status of the API, and the access behavior characteristics are used to reflect the call mode and behavior characteristics of the API; The capability profile of the API is jointly determined based on the capability analysis flow data, the access behavior characteristics and the indicator score.
8. A device for determining a capability profile, characterized in that: include: An acquisition module, used to acquire capability indicator data of an application program interface API in multiple dimensions, wherein the capability indicator data is used to reflect the service capability and performance indicators of the API in the multiple dimensions; An analysis module, used to analyze the capability indicator data through a capability evaluation model to obtain dimension scores of the API under the multiple dimensions, wherein the dimension scores are used to represent quantitative evaluation scores of the API under the multiple dimensions; A first determination module is used to determine the indicator score of the API according to the dimension score and the preset dimension weight, wherein the preset dimension weight includes the weight of the evaluation attribute of the API under the multiple dimensions, and the indicator score is used to represent the comprehensive evaluation score of the API under the multiple dimensions relative to the preset dimension weight; The second determination module is used to obtain the call log of the API and determine the capability portrait of the API based on the call log and the indicator score, wherein the call log is used to represent the usage and behavior pattern of the API, and the capability portrait is used to represent the comprehensive capability level of the API in the multiple dimensions.
9. An electronic device, characterized in that: include: A memory and a processor, wherein the memory is used to store program instructions; The processor is connected to the memory and is used to execute the method for determining the capability portrait as described in any one of claims 1 to 7.
10. A non-volatile storage medium, characterized in that: The non-volatile storage medium includes a stored computer program, wherein the device where the non-volatile storage medium is located executes the method for determining the capability portrait described in any one of claims 1 to 7 by running the computer program.
11. A computer program product comprising computer instructions, characterized in that: When the computer instructions are executed by a processor, the method for determining the capability portrait described in any one of claims 1 to 7 is implemented.