CN116208513A - Gateway health degree prediction method and device - Google Patents

Gateway health degree prediction method and device Download PDF

Info

Publication number
CN116208513A
CN116208513A CN202111440204.3A CN202111440204A CN116208513A CN 116208513 A CN116208513 A CN 116208513A CN 202111440204 A CN202111440204 A CN 202111440204A CN 116208513 A CN116208513 A CN 116208513A
Authority
CN
China
Prior art keywords
preset
index data
data
type
api
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111440204.3A
Other languages
Chinese (zh)
Inventor
滕滨
肖爱元
王一寒
王静
张琳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Mobile Communications Group Co Ltd
China Mobile Information Technology Co Ltd
Original Assignee
China Mobile Communications Group Co Ltd
China Mobile Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Mobile Communications Group Co Ltd, China Mobile Information Technology Co Ltd filed Critical China Mobile Communications Group Co Ltd
Priority to CN202111440204.3A priority Critical patent/CN116208513A/en
Publication of CN116208513A publication Critical patent/CN116208513A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/14Network analysis or design
    • H04L41/147Network analysis or design for predicting network behaviour
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0805Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02ATECHNOLOGIES FOR ADAPTATION TO CLIMATE CHANGE
    • Y02A90/00Technologies having an indirect contribution to adaptation to climate change
    • Y02A90/10Information and communication technologies [ICT] supporting adaptation to climate change, e.g. for weather forecasting or climate simulation

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Environmental & Geological Engineering (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The application provides a method and a device for predicting health of a gateway. The method comprises the following steps: clustering all index data acquired from an API application programming interface gateway according to preset classification conditions, and determining preset data types of all index data; inputting each index data in the preset data type into a prediction model obtained by training according to each historical index data corresponding to the preset data type, and obtaining a health score corresponding to the preset data type; and determining the health degree of the API gateway according to the health degree scores corresponding to the preset data types. The health degree prediction method of the gateway can predict the health degree of the API gateway, so that the operation and maintenance efficiency of network service is improved, and the operation and maintenance cost is reduced.

Description

Gateway health degree prediction method and device
Technical Field
The application relates to the technical field of networks, in particular to a method and a device for predicting the health of a gateway.
Background
The enterprise network service generally has a client and a server, and an API (Application Programming Interface ) gateway is between the client and the server, and is configured to receive the requests of the calling parties such as the client or the external partner in a unified manner, perform a certain checksum logic process according to different logics of each interface, and forward the checksum logic process to the server.
The API gateway can realize the functions of identity verification, monitoring, load balancing, caching, request fragmentation and management, static response processing and the like, and is an important ring in network communication, so the health of the API gateway is very important. However, in the related art, only when the health of the API gateway has a problem, the operation and maintenance staff passively collects data to analyze, and cannot timely make a judgment on the health of the API gateway, which results in low operation and maintenance efficiency for the whole network service and greatly improves the operation and maintenance cost.
Disclosure of Invention
The embodiment of the application provides a method and a device for predicting the health degree of a gateway, which can predict the health degree of an API gateway so as to improve the operation and maintenance efficiency of network services and reduce the operation and maintenance cost.
In a first aspect, an embodiment of the present application provides a method for predicting health of a gateway, including:
clustering all index data acquired from an API application programming interface gateway according to preset classification conditions, and determining preset data types of all index data;
inputting each index data in the preset data type into a prediction model obtained by training according to each historical index data corresponding to the preset data type, and obtaining a health score corresponding to the preset data type;
And determining the health degree of the API gateway according to the health degree scores corresponding to the preset data types.
In one embodiment, the clustering the index data collected from the API gateway according to a preset classification condition, and determining a preset data type of the index data includes:
clustering the index data according to the access times of the API gateway in a preset period, and determining the preset data type of the index data with the access times larger than a preset value and the preset data type of the index data with the access times smaller than or equal to the preset value.
In one embodiment, clustering each of the index data according to the number of accesses by the API gateway in a first preset period, determining a preset data type of each of the index data having the number of accesses greater than a preset value, and a preset data type of each of the index data having the number of accesses less than or equal to the preset value, includes:
clustering the index data according to the system types corresponding to the index data to obtain the index data of the system types;
Clustering each index data in the system type according to the access times of the API gateway in a preset period, and determining the preset data type of each index data with the access times larger than a preset value in the system type and the preset data type of each index data with the access times smaller than or equal to the preset value in the system type;
wherein the preset value is determined according to the system type.
In one embodiment, the clustering the index data collected from the API gateway according to a preset classification condition, and determining a preset data type of the index data includes:
clustering the index data according to the API response time corresponding to the index data, and determining the preset data type of the index data with the corresponding API response time being longer than the preset time length and the preset data type of the index data with the API response time being shorter than or equal to the preset time length.
In one embodiment, the clustering each of the index data according to the API response time corresponding to each of the index data, determining the preset data type of each of the index data with the corresponding API response time greater than the preset duration, and the preset data type of each of the index data with the API response time less than or equal to the preset duration, includes:
Clustering the index data according to the system types corresponding to the index data to obtain the index data of the system types;
clustering each index data in the system type according to the API response time corresponding to each index data in the system type, determining the preset data type of each index data with the corresponding API response time being longer than the preset duration in the system type, and determining the preset data type of each index data with the API response time being shorter than or equal to the preset duration in the system type;
the preset duration is determined according to the system type.
In one embodiment, determining the health of the API gateway according to each health score corresponding to each of the preset data types includes:
comparing the health score corresponding to the preset data type with a preset fusing threshold corresponding to the preset data type to obtain a comparison result corresponding to the preset data type;
and when the health score is larger than the preset fusing threshold value according to the comparison results corresponding to the preset data types, judging that the API gateway is normal.
In one embodiment, further comprising:
and closing the API gateway when any comparison result in the comparison results is that the health score is smaller than or equal to the preset fusing threshold value.
In a second aspect, an embodiment of the present application provides a device for predicting health of a gateway, including:
the data type determining module is used for clustering all index data acquired from the API application programming interface gateway according to preset classification conditions and determining preset data types of all the index data;
the health degree score acquisition module is used for inputting each index data in the preset data type into a prediction model obtained by training according to each historical index data corresponding to the preset data type to acquire a health degree score corresponding to the preset data type;
and the health degree prediction module is used for determining the health degree of the API gateway according to each health degree score corresponding to each preset data type.
In a third aspect, an embodiment of the present application provides an electronic device, including a processor and a memory storing a computer program, where the processor implements the steps of the method for predicting the health of a gateway according to the first aspect when executing the program.
In a fourth aspect, embodiments of the present application provide a computer program product comprising a computer program which, when executed by a processor, implements the steps of the method for predicting the health of a gateway according to the first aspect.
According to the method and the device for predicting the health degree of the gateway, after the index data acquired from the API gateway are clustered, the index data of each preset data type are input into the prediction model trained by the historical index data, the health degree score corresponding to each preset data type is obtained, the health degree prediction of the API gateway is realized according to the health degree scores corresponding to each preset data type, the health degree representation of the API gateway can be completed through the index data of the API gateway, when the problem of health of the API gateway is avoided, the data are collected passively for analysis, the health condition of the API gateway is detected and predicted actively, the operation and maintenance efficiency of network service is improved, and the operation and maintenance cost is reduced.
Drawings
For a clearer description of the present application or of the prior art, the drawings that are used in the description of the embodiments or of the prior art will be briefly described, it being apparent that the drawings in the description below are some embodiments of the present application, and that other drawings may be obtained from these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a flow chart of a method for predicting the health of a gateway according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of a health prediction device of a gateway according to the present invention;
fig. 3 is a schematic structural diagram of an electronic device provided by the present invention.
Detailed Description
For the purposes of making the objects, technical solutions and advantages of the present application more apparent, the technical solutions in the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application, and it is apparent that the described embodiments are some, but not all, embodiments of the present application. All other embodiments, which can be made by one of ordinary skill in the art based on the embodiments herein without making any inventive effort, are intended to be within the scope of the present application.
Embodiments of the present application are described in detail below with reference to the accompanying drawings.
Referring to fig. 1, one of the flow diagrams of the method for predicting the health of the gateway according to the embodiment of the present invention is applied to an electronic device, where the electronic device may be a server or a terminal device, and is used for performing health prediction of an API gateway. As shown in fig. 1, the method for predicting the health of a gateway provided in this embodiment includes:
Step 101, clustering all index data acquired from an API application programming interface gateway according to preset classification conditions, and determining preset data types of all index data;
102, inputting each index data in the preset data type into a prediction model obtained by training according to each historical index data corresponding to the preset data type, and obtaining a health score corresponding to the preset data type;
step 103, determining the health degree of the API gateway according to the health degree scores corresponding to the preset data types.
After clustering all index data acquired from the API gateway, inputting index data of each preset data type into a prediction model trained by historical index data to obtain health scores corresponding to each preset data type, so that health prediction of the API gateway is realized according to the health scores corresponding to the preset data types, health representation of the API gateway can be completed through all index data of the API gateway, and when problems of health of the API gateway are avoided, data are collected passively for analysis, and health conditions of the API gateway are detected and predicted actively, so that operation and maintenance efficiency of network service is improved, and operation and maintenance cost is reduced.
In step 101, index data of the API gateway is collected from the API gateway by a collector in advance. The collector is a script for collecting index data, and the script can be installed in a gateway of the API in a plug-in mode.
In an embodiment, each index data includes multi-dimensional data such as an API log of the API gateway and other operation and maintenance data, where the operation and maintenance data includes external related data such as a system attribute, a system type, a request time, and the like corresponding to the API request, and data of the gateway itself such as a working time of the API gateway.
In an embodiment, each index data may be a specific type of API request log and multidimensional data in the AIP related background component, for example, only some API request logs corresponding to systems with high priority and multidimensional data in the API related background component are collected. The system with high priority can be a pre-designated self-developed system, a pre-designated third party system or other pre-designated assessment platform, etc. Therefore, the data volume to be processed is reduced, and the processing efficiency of processing each acquired index data is improved.
After the index data are collected, the index data can be cleaned and converted to form structured data, and the structured data are transmitted into a message queue, so that the subsequent processing is facilitated.
In one embodiment, the index data may be clustered using a KMEANS algorithm, which is a partition-based clustering algorithm, where distances are used as criteria for similarity measurement between data objects, i.e., the smaller the distance between data objects, the higher their similarity, and the more likely they are in the same class cluster. The central idea is to determine a constant K in advance, wherein the constant K means the final clustering category number, randomly selecting an initial point as a centroid, classifying sample points into the most similar categories by calculating the similarity between each sample and the centroid, then, recalculate the centroid of each category (namely, the center of the category), repeating the process until the centroid is not changed, and finally, determining the category to which each sample belongs and the centroid of each category.
Assume that the set of extracted index data is (x 1, x2, …, xn), and each xi is a vector of d dimensions. The purpose of K-means clustering is to divide the raw data into K classes, s= { S1, S2, …, sk }, given the value of the type group number K (k.ltoreq.n).
In an embodiment, k=2, i.e. the preset data type includes a primary index data type and a secondary index data type. The degree of influence of different preset data types on the health degree of the API gateway is different. The primary index data type represents a data type with larger influence on the health degree of the API gateway, and the secondary index data type represents a data type with smaller influence on the health degree of the API gateway. The index data in the main index data type is the main index data, and the index data in the secondary index data type is the secondary index data.
In an embodiment, the preset classification condition may be classification according to a system type corresponding to each index data. Each system type is preset with a corresponding preset priority. If the system type is an independently developed system, the importance degree is higher, so that the preset priority is higher; the system type is a third party system or other assessment platform, and the preset priority is lower. Exemplary, after each index data is collected, each index data is clustered according to the system type corresponding to each index data, and the system type corresponding to each index data is determined. If the index data is index data about an autonomous system, the system type corresponding to the index data is the autonomous system.
After determining the system type of each index data, dividing each index data corresponding to the system type with preset priority higher than the designated level into the same preset data type, specifically the main index data type, so as to obtain each main index data; and dividing each index data corresponding to the system type with the preset priority less than or equal to the designated level into the same preset data type, specifically the secondary index data type, so as to obtain each secondary index data.
And classifying the index data according to the importance degree of the system type, and determining the main index data and the secondary index data, so that the subsequent health degree prediction of the API gateway is more targeted.
In an embodiment, in addition to the system type as the classification condition, the number of API accesses may be used as the classification basis. Specifically, the clustering the index data collected from the API gateway according to a preset classification condition to determine a preset data type of each index data includes:
clustering the index data according to the access times of the API gateway in a preset period, and determining the preset data type of the index data with the access times larger than a preset value and the preset data type of the index data with the access times smaller than or equal to the preset value.
In an embodiment, clustering is performed on each index data according to the number of times each index data is accessed by the API in a preset period, each index data with the number of times of API access greater than a preset value is divided into primary index data, and each index data with the number of times of API access less than or equal to the preset value is divided into secondary index data. The preset value can be set according to actual conditions.
In one embodiment, if the number of times a certain index data is accessed by the API is greater than a predetermined value, it may be determined that the index data is accessed dynamically, i.e. the index data is accessed frequently. Otherwise, the static access is determined.
Since the number of API accesses is large in a short time, it is indicated that the API accesses are frequent, and problems are likely to occur. Therefore, each index data is clustered according to the API access times, so that the follow-up access conditions of the API gateway can be pertinently supervised, and the accuracy of the follow-up health degree prediction of the API gateway is further improved.
To further improve accuracy of subsequent health prediction for an API gateway, in an embodiment, clustering each of the index data according to a number of accesses by the API gateway in a first preset period, determining a preset data type of each of the index data having a number of accesses greater than a preset value, and a preset data type of each of the index data having a number of accesses less than or equal to the preset value, includes:
clustering the index data according to the system types corresponding to the index data to obtain the index data of the system types;
clustering each index data in the system type according to the access times of the API gateway in a preset period, and determining the preset data type of each index data with the access times larger than a preset value in the system type and the preset data type of each index data with the access times smaller than or equal to the preset value in the system type;
Wherein the preset value is determined according to the system type.
In one embodiment, binding of different system types to different preset values is performed in advance. If the system type is an independently developed system, the preset value of the corresponding API access times is a preset value A; the system type is a third party system, and the preset value of the corresponding API access times is a preset value B. After the index data are obtained, clustering is carried out on the index data according to the system types to obtain the index data of the system types, such as the index data of a third-party system corresponding to the system types. And clustering the index data of which the corresponding system type is the third party system according to the access times of the API gateway, acquiring the index data of which the access times of the API are greater than the preset value B as main index data, and acquiring the index data of which the access times of the API are less than or equal to the preset value B as secondary index data. The system type is the index data of an independently developed system or other assessment platform. And the system type clustering and the access frequency clustering are combined, and all index data are divided to obtain all main index data and all secondary index data. Because factors of system types and API access times are considered, classification results of the index data are more accurate, and accordingly prediction results are more accurate when the health degree of the API gateway is predicted according to the classified index data.
Considering that the speed of the API access time determines the network response quality, the normal operation and maintenance of the system of the data are affected, namely, the speed of the API access time can effectively reflect the health degree of the API gateway, so that in order to improve the accuracy of the health degree prediction of the API gateway, in an embodiment, the API response time can be used as the classification basis of each index data.
Specifically, clustering each index data according to the corresponding API response time of each index data, and determining the preset data type of each index data with the corresponding API response time being longer than the preset duration and the preset data type of each index data with the API response time being shorter than or equal to the preset duration.
In an embodiment, clustering is performed on each index data according to the corresponding API response time of each index data, each index data with the corresponding API response time smaller than the preset duration is divided into primary index data, and each index data with the API access frequency greater than or equal to the preset duration is divided into secondary index data. The preset time length can be set according to actual conditions. If the API response time is smaller than or equal to the preset duration, the API response is faster, the network connection is free from problems, the system operates normally, and the corresponding index data has little influence on the health of the API gateway, so that the API gateway can be divided into secondary index data; if the API response time is longer than the preset duration, it indicates that the API response is slower, possibly caused by network congestion or a problem with the gateway, and the corresponding index data has a greater influence on the health degree of the API gateway, so that the API response time can be divided into main index data. Therefore, when the health degree of the API gateway is predicted subsequently, the health degree of the API gateway can be predicted according to the network response quality, and the accuracy of the health degree prediction of the subsequent API gateway is improved.
In order to further improve accuracy of subsequent health prediction for an API gateway, in an embodiment, clustering each of the index data according to an API response time corresponding to each of the index data, determining a preset data type of each of the index data having an API response time greater than a preset duration, and a preset data type of each of the index data having an API response time less than or equal to the preset duration, includes:
clustering the index data according to the system types corresponding to the index data to obtain the index data of the system types;
clustering each index data in the system type according to the API response time corresponding to each index data in the system type, determining the preset data type of each index data with the corresponding API response time being longer than the preset duration in the system type, and determining the preset data type of each index data with the API response time being shorter than or equal to the preset duration in the system type;
the preset duration is determined according to the system type.
In an embodiment, binding of different system types for different preset durations is performed in advance. If the system type is an independently developed system, the preset duration of the corresponding API response time is preset duration 1; the system type is a third party system, and the preset duration of the corresponding API response time is preset duration 2. After the index data are obtained, clustering is carried out on the index data according to the system types to obtain the index data of the system types, such as the index data of a third-party system corresponding to the system types. And clustering the index data of which the corresponding system type is the third-party system according to the corresponding API response time, acquiring the index data of which the corresponding API response time is longer than the preset duration 2 as main index data, and acquiring the index data of which the corresponding API response time is shorter than or equal to the preset duration 2 as secondary index data. The system type is the index data of an independently developed system or other assessment platform. And the system type clustering and the API response time clustering are combined, and all index data are divided to obtain all main index data and all secondary index data. Because factors of system type and API response time are considered, the classification result of each index data is more accurate, and therefore, when the health degree of the API gateway is predicted according to each classified index data, the prediction result is more accurate.
In an embodiment, binding of different system types with different preset values and different preset durations may also be performed in advance. If the system type is an independently developed system, the preset value of the corresponding API access times is a preset value A, and the preset duration of the corresponding API response time is a preset duration 1; the system type is a third party system, the preset value of the corresponding API access times is a preset value B, and the preset duration of the corresponding API response time is a preset duration 2. After the index data are obtained, clustering is carried out on the index data according to the system types to obtain the index data of the system types, such as the index data of a third-party system corresponding to the system types. And clustering the index data of which the corresponding system type is the third party system according to the corresponding API access times and the corresponding API response time to obtain the index data of which the API access times are greater than a preset value B and the corresponding API response time is greater than a preset duration 2 as main index data, and taking other index data as secondary index data. The system type is the index data of an independently developed system or other assessment platform. And the system type, the access times of the API gateway and the clustering of the API response time are combined, and all index data are divided to obtain all main index data and all secondary index data. Because factors of system type, access times of the API gateway and API response time are considered, classification results of the index data are more accurate, and accordingly prediction results are more accurate when the health degree of the API gateway is predicted according to the classified index data.
In step 102, taking a preset data type as an example of a primary index data type and a secondary index data type, each primary index data in the primary index data type is input into a first prediction model trained by historical primary index data of the primary index data type, so as to obtain a first health score. And inputting each secondary index data in the secondary index data type into a second prediction model trained by the historical secondary index data of the secondary index data type to obtain a second health score.
In an embodiment, after the first health degree score and the second health degree score are obtained, each primary index data is used as a training sample of the first prediction model, the first prediction model is optimally trained, each secondary index data is used as a training sample of the second prediction model, and the second prediction model is optimally trained, so that the accuracy of the prediction model is higher, and the predicted score is more accurate.
In an embodiment, after the health score corresponding to each preset data type is obtained, each health score may be sent to a display interface of the designated terminal, and visual display is performed on each health score. For example, when the preset data types are the primary index data type and the secondary index data type, the health score corresponding to the primary index data type may be displayed through the display interface, and the index control for displaying the health score corresponding to the secondary index data type may be generated at the display interface. When a user clicks the index control through the appointed terminal, displaying the health score corresponding to the secondary index data type on the display interface; and if the user does not click on the index control, hiding the health score corresponding to the secondary index data type.
In step 103, after obtaining each health score corresponding to each preset data type, each health score may be weighted according to a preset weight corresponding to each preset data type, so as to determine the health of the API gateway.
In view of determining the health of the API gateway by weighting, the impact of some of the index data may be diluted, resulting in a final predicted health of the API gateway that may not be accurate. To improve accuracy of the predicted health of the API gateway, in an embodiment, determining the health of the API gateway according to each health score corresponding to each preset data type includes:
comparing the health score corresponding to the preset data type with a preset fusing threshold corresponding to the preset data type to obtain a comparison result corresponding to the preset data type;
and when the health score is larger than the preset fusing threshold value according to the comparison results corresponding to the preset data types, judging that the API gateway is normal.
The preset data types include a primary index data type preset with a corresponding first preset fusing threshold and a secondary index data type preset with a corresponding second preset fusing threshold. After the health score of the primary index data type and the health score of the secondary index data type are obtained, the health score of the primary index data type is compared with a first preset fusing threshold value, and the health score of the secondary index data type is compared with a second preset fusing threshold value. And if the health score of the primary index data type is larger than a first preset fusing threshold, and the health score of the secondary index data type is larger than a second preset fusing threshold, judging that the API gateway is normal.
To enable easier control, in an embodiment, the method further includes:
and closing the API gateway when any comparison result in the comparison results is that the health score is smaller than or equal to the preset fusing threshold value.
For example, when the health score of the primary index data type is less than or equal to a first preset fusing threshold, or the health score of the secondary index data type is less than or equal to a second preset fusing threshold, it is determined that the health of the API gateway is abnormal, a fusing mechanism is triggered at this time, and the API gateway is fused and closed by an API gateway fuse.
When the health score is smaller than or equal to a preset fusing threshold, fusing is actively triggered, so that investment of service resources at the rear end of the API gateway can be reduced, and meanwhile, the processing efficiency of the problem of the API gateway is improved.
In an embodiment, when the API gateway is turned off due to triggering of fusing, the information of the fused API gateway may be obtained to generate an alarm, and the alarm is uploaded to the background, and the information of the fused API gateway, such as the identifier of the API gateway, is displayed on the display interface of the designated terminal, so as to further improve the processing efficiency.
The health degree prediction device of the gateway provided by the invention is described below, and the health degree prediction device of the gateway described below and the health degree prediction method of the gateway described above can be correspondingly referred to each other.
In one embodiment, as shown in fig. 2, there is provided a health prediction apparatus of a gateway, including:
the data type determining module 210 is configured to cluster each index data collected from the API application programming interface gateway according to a preset classification condition, and determine a preset data type of each index data;
the health score obtaining module 220 is configured to input each index data in the preset data type into a prediction model obtained by training according to each historical index data corresponding to the preset data type, and obtain a health score corresponding to the preset data type;
the health prediction module 230 is configured to determine the health of the API gateway according to each health score corresponding to each preset data type.
After clustering all index data acquired from the API gateway, inputting index data of each preset data type into a prediction model trained by historical index data to obtain health scores corresponding to each preset data type, so that health prediction of the API gateway is realized according to the health scores corresponding to the preset data types, health representation of the API gateway can be completed through all index data of the API gateway, and when problems of health of the API gateway are avoided, data are collected passively for analysis, and health conditions of the API gateway are detected and predicted actively, so that operation and maintenance efficiency of network service is improved, and operation and maintenance cost is reduced.
In one embodiment, the data type determination module 210 is specifically configured to:
clustering the index data according to the access times of the API gateway in a preset period, and determining the preset data type of the index data with the access times larger than a preset value and the preset data type of the index data with the access times smaller than or equal to the preset value.
In one embodiment, the data type determination module 210 is specifically configured to:
clustering the index data according to the system types corresponding to the index data to obtain the index data of the system types;
clustering each index data in the system type according to the access times of the API gateway in a preset period, and determining the preset data type of each index data with the access times larger than a preset value in the system type and the preset data type of each index data with the access times smaller than or equal to the preset value in the system type;
wherein the preset value is determined according to the system type.
In one embodiment, the data type determination module 210 is specifically configured to:
clustering the index data according to the API response time corresponding to the index data, and determining the preset data type of the index data with the corresponding API response time being longer than the preset time length and the preset data type of the index data with the API response time being shorter than or equal to the preset time length.
In one embodiment, the data type determination module 210 is specifically configured to:
clustering the index data according to the system types corresponding to the index data to obtain the index data of the system types;
clustering each index data in the system type according to the API response time corresponding to each index data in the system type, determining the preset data type of each index data with the corresponding API response time being longer than the preset duration in the system type, and determining the preset data type of each index data with the API response time being shorter than or equal to the preset duration in the system type;
the preset duration is determined according to the system type.
In one embodiment, the health prediction module 230 is specifically configured to:
comparing the health score corresponding to the preset data type with a preset fusing threshold corresponding to the preset data type to obtain a comparison result corresponding to the preset data type;
and when the health score is larger than the preset fusing threshold value according to the comparison results corresponding to the preset data types, judging that the API gateway is normal.
In one embodiment, the health prediction module 230 is further configured to:
and closing the API gateway when any comparison result in the comparison results is that the health score is smaller than or equal to the preset fusing threshold value.
Fig. 3 illustrates a physical schematic diagram of an electronic device, as shown in fig. 3, where the electronic device may include: processor 810, communication interface (Communication Interface) 820, memory 830, and communication bus 840, wherein processor 810, communication interface 820, memory 830 accomplish communication with each other through communication bus 840. The processor 810 may call a computer program in the memory 830 to perform the steps of the gateway health prediction method, including, for example:
clustering all index data acquired from an API application programming interface gateway according to preset classification conditions, and determining preset data types of all index data;
inputting each index data in the preset data type into a prediction model obtained by training according to each historical index data corresponding to the preset data type, and obtaining a health score corresponding to the preset data type;
and determining the health degree of the API gateway according to the health degree scores corresponding to the preset data types.
Further, the logic instructions in the memory 830 described above may be implemented in the form of software functional units and may be stored in a computer-readable storage medium when sold or used as a stand-alone product. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
In another aspect, embodiments of the present application further provide a computer program product, where the computer program product includes a computer program, where the computer program may be stored on a non-transitory computer readable storage medium, where the computer program when executed by a processor is capable of executing the steps of the method for predicting the health of a gateway provided in the foregoing embodiments, where the method includes:
Clustering all index data acquired from an API application programming interface gateway according to preset classification conditions, and determining preset data types of all index data;
inputting each index data in the preset data type into a prediction model obtained by training according to each historical index data corresponding to the preset data type, and obtaining a health score corresponding to the preset data type;
and determining the health degree of the API gateway according to the health degree scores corresponding to the preset data types.
In another aspect, embodiments of the present application further provide a processor-readable storage medium storing a computer program for causing a processor to perform the steps of the method provided in the above embodiments, for example, including:
clustering all index data acquired from an API application programming interface gateway according to preset classification conditions, and determining preset data types of all index data;
inputting each index data in the preset data type into a prediction model obtained by training according to each historical index data corresponding to the preset data type, and obtaining a health score corresponding to the preset data type;
And determining the health degree of the API gateway according to the health degree scores corresponding to the preset data types.
The processor-readable storage medium may be any available medium or data storage device that can be accessed by a processor, including, but not limited to, magnetic storage (e.g., floppy disks, hard disks, magnetic tape, magneto-optical disks (MOs), etc.), optical storage (e.g., CD, DVD, BD, HVD, etc.), semiconductor storage (e.g., ROM, EPROM, EEPROM, nonvolatile storage (NAND FLASH), solid State Disk (SSD)), and the like.
The apparatus embodiments described above are merely illustrative, wherein the elements illustrated as separate elements may or may not be physically separate, and the elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
From the above description of the embodiments, it will be apparent to those skilled in the art that the embodiments may be implemented by means of software plus necessary general hardware platforms, or of course may be implemented by means of hardware. Based on this understanding, the foregoing technical solution may be embodied essentially or in a part contributing to the prior art in the form of a software product, which may be stored in a computer readable storage medium, such as ROM/RAM, a magnetic disk, an optical disk, etc., including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method described in the respective embodiments or some parts of the embodiments.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present application, and are not limiting thereof; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the corresponding technical solutions.

Claims (10)

1. A method for predicting the health of a gateway, comprising:
clustering all index data acquired from an API application programming interface gateway according to preset classification conditions, and determining preset data types of all index data;
inputting each index data in the preset data type into a prediction model obtained by training according to each historical index data corresponding to the preset data type, and obtaining a health score corresponding to the preset data type;
and determining the health degree of the API gateway according to the health degree scores corresponding to the preset data types.
2. The method for predicting the health of a gateway according to claim 1, wherein clustering the index data collected from the API gateway according to a predetermined classification condition, determining a predetermined data type of the index data, includes:
Clustering the index data according to the access times of the API gateway in a preset period, and determining the preset data type of the index data with the access times larger than a preset value and the preset data type of the index data with the access times smaller than or equal to the preset value.
3. The method according to claim 2, wherein clustering each of the index data according to the number of accesses by the API gateway in a first preset period of time, determining a preset data type of each of the index data having the number of accesses greater than a preset value, and a preset data type of each of the index data having the number of accesses less than or equal to the preset value, comprises:
clustering the index data according to the system types corresponding to the index data to obtain the index data of the system types;
clustering each index data in the system type according to the access times of the API gateway in a preset period, and determining the preset data type of each index data with the access times larger than a preset value in the system type and the preset data type of each index data with the access times smaller than or equal to the preset value in the system type;
Wherein the preset value is determined according to the system type.
4. The method for predicting the health of a gateway according to claim 1, wherein clustering the index data collected from the API gateway according to a predetermined classification condition, determining a predetermined data type of the index data, includes:
clustering the index data according to the API response time corresponding to the index data, and determining the preset data type of the index data with the corresponding API response time being longer than the preset time length and the preset data type of the index data with the API response time being shorter than or equal to the preset time length.
5. The method for predicting the health of a gateway according to claim 4, wherein said clustering each of the index data according to the API response time corresponding to each of the index data, determining the preset data type of each of the index data having the corresponding API response time greater than a preset duration, and the preset data type of each of the index data having the API response time less than or equal to the preset duration, comprises:
clustering the index data according to the system types corresponding to the index data to obtain the index data of the system types;
Clustering each index data in the system type according to the API response time corresponding to each index data in the system type, determining the preset data type of each index data with the corresponding API response time being longer than the preset duration in the system type, and determining the preset data type of each index data with the API response time being shorter than or equal to the preset duration in the system type;
the preset duration is determined according to the system type.
6. The method for predicting the health of a gateway according to any one of claims 1 to 5, wherein determining the health of the API gateway according to the health score corresponding to each of the preset data types includes:
comparing the health score corresponding to the preset data type with a preset fusing threshold corresponding to the preset data type to obtain a comparison result corresponding to the preset data type;
and when the health score is larger than the preset fusing threshold value according to the comparison results corresponding to the preset data types, judging that the API gateway is normal.
7. The method of claim 6, further comprising:
And closing the API gateway when any comparison result in the comparison results is that the health score is smaller than or equal to the preset fusing threshold value.
8. A health prediction apparatus of a gateway, comprising:
the data type determining module is used for clustering all index data acquired from the API application programming interface gateway according to preset classification conditions and determining preset data types of all the index data;
the health degree score acquisition module is used for inputting each index data in the preset data type into a prediction model obtained by training according to each historical index data corresponding to the preset data type to acquire a health degree score corresponding to the preset data type;
and the health degree prediction module is used for determining the health degree of the API gateway according to each health degree score corresponding to each preset data type.
9. An electronic device comprising a processor and a memory storing a computer program, characterized in that the processor implements the steps of the method for predicting the health of a gateway according to any one of claims 1 to 7 when executing the computer program.
10. A computer program product comprising a computer program, characterized in that the computer program when executed by a processor implements the steps of the method for predicting the health of a gateway according to any one of claims 1 to 7.
CN202111440204.3A 2021-11-30 2021-11-30 Gateway health degree prediction method and device Pending CN116208513A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111440204.3A CN116208513A (en) 2021-11-30 2021-11-30 Gateway health degree prediction method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111440204.3A CN116208513A (en) 2021-11-30 2021-11-30 Gateway health degree prediction method and device

Publications (1)

Publication Number Publication Date
CN116208513A true CN116208513A (en) 2023-06-02

Family

ID=86506337

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111440204.3A Pending CN116208513A (en) 2021-11-30 2021-11-30 Gateway health degree prediction method and device

Country Status (1)

Country Link
CN (1) CN116208513A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117221049A (en) * 2023-09-26 2023-12-12 石家庄常宏智能科技有限公司 Gateway data intelligent acquisition method and system
CN118413454A (en) * 2024-06-27 2024-07-30 新华三人工智能科技有限公司 Abnormality prediction method and device of network equipment and electronic equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106886481A (en) * 2017-02-28 2017-06-23 深圳市华傲数据技术有限公司 A kind of system health degree static analysis Forecasting Methodology and device
CN111092811A (en) * 2018-10-24 2020-05-01 北京金山云网络技术有限公司 Request processing method and device, API gateway and readable storage medium
CN111756579A (en) * 2020-06-24 2020-10-09 北京百度网讯科技有限公司 Abnormity early warning method, device, equipment and storage medium
CN112527601A (en) * 2020-12-17 2021-03-19 航天信息股份有限公司 Monitoring early warning method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106886481A (en) * 2017-02-28 2017-06-23 深圳市华傲数据技术有限公司 A kind of system health degree static analysis Forecasting Methodology and device
CN111092811A (en) * 2018-10-24 2020-05-01 北京金山云网络技术有限公司 Request processing method and device, API gateway and readable storage medium
CN111756579A (en) * 2020-06-24 2020-10-09 北京百度网讯科技有限公司 Abnormity early warning method, device, equipment and storage medium
CN112527601A (en) * 2020-12-17 2021-03-19 航天信息股份有限公司 Monitoring early warning method and device

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117221049A (en) * 2023-09-26 2023-12-12 石家庄常宏智能科技有限公司 Gateway data intelligent acquisition method and system
CN117221049B (en) * 2023-09-26 2024-04-09 石家庄常宏智能科技有限公司 Gateway data intelligent acquisition method and system
CN118413454A (en) * 2024-06-27 2024-07-30 新华三人工智能科技有限公司 Abnormality prediction method and device of network equipment and electronic equipment
CN118413454B (en) * 2024-06-27 2024-09-17 新华三人工智能科技有限公司 Abnormality prediction method and device of network equipment and electronic equipment

Similar Documents

Publication Publication Date Title
WO2021109578A1 (en) Method and apparatus for alarm prediction during service operation and maintenance, and electronic device
CN105590055B (en) Method and device for identifying user credible behaviors in network interaction system
CN112800116B (en) Method and device for detecting abnormity of service data
US10922206B2 (en) Systems and methods for determining performance metrics of remote relational databases
CN111709028B (en) Network security state evaluation and attack prediction method
KR20220114986A (en) Apparatus for VNF Anomaly Detection based on Machine Learning for Virtual Network Management and a method thereof
CN116208513A (en) Gateway health degree prediction method and device
CN111177714A (en) Abnormal behavior detection method and device, computer equipment and storage medium
CN110942190A (en) Queuing time prediction method and device, computer equipment and storage medium
CN110166344B (en) Identity identification method, device and related equipment
CN111061948B (en) User tag recommendation method and device, computer equipment and storage medium
CA3032981A1 (en) Detection of operational threats using artificial intelligence
CN110162958B (en) Method, apparatus and recording medium for calculating comprehensive credit score of device
CN111835536B (en) Flow prediction method and device
CN117675387B (en) Network security risk prediction method and system based on user behavior analysis
WO2022121164A1 (en) Suspension-causing sensitive word prediction method and apparatus, and computer device and storage medium
CN114238885A (en) User abnormal login behavior identification method and device, computer equipment and storage medium
CN110704614B (en) Information processing method and device for predicting user group type in application
CN111625720B (en) Method, device, equipment and medium for determining execution strategy of data decision item
CN113282920A (en) Log abnormity detection method and device, computer equipment and storage medium
CN114511095A (en) Data processing method and device, computing equipment and storage medium
CN109145115B (en) Product public opinion discovery method, device, computer equipment and storage medium
CN114997879B (en) Payment routing method, device, equipment and storage medium
CN114363082A (en) Network attack detection method, device, equipment and computer readable storage medium
CN113296951A (en) Resource allocation scheme determination method and equipment

Legal Events

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