Interface monitoring method, monitoring device, terminal device, and storage medium
The interface monitoring method addresses the lack of timely detection of abnormal API interfaces by performing multi-dimensional fusion processing on operational information, improving detection accuracy and enhancing Web server security.
Patent Information
- Application Number
- JP2024552005
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2023-02-13
- Filing Date
- 2023-12-19
- Publication Date
- 2025-04-01
- Estimated Expiration
- 2043-12-19
AI Technical Summary
Existing systems lack timely detection of abnormal API interfaces in CGI applications, leading to security vulnerabilities in Web servers.
An interface monitoring method that responds to data requests, parses operational information, performs multi-dimensional fusion processing, and matches the results with a health fusion index to generate health diagnosis information, enhancing security by improving detection accuracy.
The method improves the accuracy of interface monitoring and enhances the security of Web servers by timely detecting abnormal API interfaces.
Smart Images

Figure 0007654212000001_ABST
Abstract
Description
Cross-references to related documents
[0001] This application claims priority to a Chinese patent application bearing application number 202310103447.0, filed with the China Patent Office on February 13, 2023, and entitled "Interface monitoring method, monitoring device, terminal device, and storage medium", the entire contents of which are incorporated herein by reference. [Technical field]
[0002] The present application relates to the technical field of information security, and in particular to an interface monitoring method, a monitoring device, a terminal device, and a storage medium. [Background technology]
[0003] The Common Gateway Interface (CGI) is a specification for external programs that run on a web server, allowing programs written in CGI to extend the functionality of the server. CGI applications can interact with browsers and can also communicate with external data sources, such as database servers, through a data API interface to retrieve data from the database servers.
[0004] With the rapid development of 5G networks and the continuous deepening of the digital transformation of the industry, the common gateway interface is becoming a major challenge in edge computing risks. In particular, there are many open interfaces for CGI applications, and protection measures are lacking, which often leads to attacks on interfaces and incidents of infiltrating into application systems through interfaces to steal data. However, there is still little research on the risks of interfaces.
[0005] Therefore, there are many API interfaces open to CGI applications, and it is necessary to propose a solution to face the problem of not being able to timely detect abnormal API interfaces. Summary of the Invention [Problem to be solved by the invention]
[0006] The main object of the present application is to provide an interface monitoring method, a monitoring device, a terminal device, and a storage medium for solving the technical problem that there are many API interfaces open to CGI applications and abnormal API interfaces cannot be detected in a timely manner, thereby improving the accuracy of interface monitoring and further improving the security of Web servers. [Means for solving the problem]
[0007] In order to achieve the above object, a method for monitoring an interface according to the present invention includes: Responding to data requests from the interface; Parsing the data request to obtain different dimensions of operational information; performing a multi-dimensional fusion process on the operation information to obtain a corresponding multi-dimensional fusion index; and matching the multi-dimensional fusion index with a preset health fusion index to generate health diagnosis information of the interface.
[0008] In one embodiment, the step of performing a multi-dimensional fusion process on the driving information to obtain a corresponding multi-dimensional fusion index includes: compressing the driving information to obtain feature estimates; performing a weighting calculation on the feature estimates to obtain corresponding optimal weight values; and fusing the optimal weight values through a preset fusion algorithm to obtain the multi-dimensional fusion index.
[0009] In one embodiment, the step of generating health diagnosis information of the interface by matching the multi-dimensional fusion index with a preset health fusion index includes: Detecting whether the multidimensional fusion index matches the health fusion index; If the multi-dimension fusion index is consistent with the health fusion index, then declaring that the interface is in a normal state; and If the multidimensional fusion index does not match the health fusion index, determining a risk level of the interface.
[0010] In one embodiment, after the step of determining a risk level of the interface, The method further includes inputting the driving information into a preset data correction model to obtain simulation data after deviation is corrected; The data correction model is derived based on pre-established historical data requirements.
[0011] In one embodiment, before the step of inputting the driving information into a preset data correction model to obtain simulation data after the deviation is corrected, the step further comprises: said historical data requests being a training set; Creating a revised model of the initial data; and inputting the training set into the correction model of the initial data to fit deviations to obtain the data correction model.
[0012] In one embodiment, before the step of matching the multi-dimensional fusion index with a preset health fusion index to generate health diagnosis information of the interface, further: Extracting features in the training set to obtain feature values of different dimensional interfaces; and and fusing feature values of the interfaces to generate the health fusion index.
[0013] In one embodiment, after the step of matching the multidimensional fusion index with a preset health fusion index to generate health checkup information of the interface, displaying one or more of the multidimensional fusion index, driving information, and health checkup information by setting a visualization interface in advance.
[0014] In an embodiment of the present application, an interface monitoring device is further proposed. The interface monitoring device includes: a request response module for responding to data requests of the interface; a request analysis module for analyzing the data request to obtain different dimensions of operation information; an information fusion module for performing multi-dimensional fusion processing on the operation information to obtain a corresponding multi-dimensional fusion index; and an index matching module for matching the multi-dimensional fusion index with a preset health fusion index to generate health examination information of the interface.
[0015] An embodiment of the present application further proposes a terminal device, comprising: a memory, a processor, and an interface monitoring program stored in the memory and operable on the processor, the interface monitoring program, when executed by the processor, realizing the steps of the interface monitoring method as described above.
[0016] The present invention also proposes a computer-readable storage medium having an interface monitoring program stored therein, the interface monitoring program implementing the steps of the interface monitoring method as described above when executed by a processor. Effect of the Invention
[0017] The interface monitoring method, monitoring device, terminal device and storage medium proposed in the embodiment of the present invention respond to the data request of the interface, analyze the data request, obtain operation information of different dimensions, perform multi-dimensional fusion processing on the operation information, obtain corresponding multi-dimensional fusion index, and compare the multi-dimensional fusion index with a preset health fusion index to generate health diagnosis information of the interface. In this way, by multi-dimensionally fusing the operation information of different dimensions of the interface, the technical problem that there are many API interfaces open to CGI applications and abnormal API interfaces cannot be timely detected can be solved, the accuracy of interface monitoring can be improved, and the security of the Web server can be further improved. Based on the proposal of the present invention, starting from the interface risk rules existing in the information security of the computer field, a health fusion index based on the data request of the historical interface is constructed, and the validity of the interface monitoring method proposed by the present invention is verified by the health fusion index, that is, the accuracy of interface monitoring is obviously improved by the method of the present invention. [Brief description of the drawings]
[0018] [Figure 1] 1 is a schematic diagram of functional blocks of a terminal device to which an interface monitoring device according to the present invention belongs; [Diagram 2] 2 is a flowchart of a first exemplary embodiment of a method for monitoring an interface according to the present invention; [Diagram 3] 4 is a flowchart of a second exemplary embodiment of a method for monitoring an interface according to the present invention; [Figure 4] 4 is a flowchart of a third exemplary embodiment of a method for monitoring an interface according to the present invention; [Diagram 5] 11 is a flowchart of a fourth exemplary embodiment of a method for monitoring an interface according to the present invention; [Figure 6] 13 is a flowchart of a fifth exemplary embodiment of a method for monitoring an interface according to the present invention; DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0019] The realization of the object, the functional features and advantages of the present application will be further explained with reference to the drawings in conjunction with the embodiments.
[0020] It should be noted that the specific examples described herein are merely for the purpose of interpreting the present invention and are not intended to limit the present invention.
[0021] The main solution of the embodiment of the present invention is to "respond to a data request of an interface, analyze the data request to obtain operation information of different dimensions, perform multi-dimensional fusion processing on the operation information, obtain corresponding multi-dimensional fusion indexes, and compare the multi-dimensional fusion indexes with a preset health fusion index to generate health diagnosis information of the interface". By multi-dimensionally fusing operation information of different dimensions of an interface, the technical problem that there are many API interfaces open to CGI applications and abnormal API interfaces cannot be timely detected can be solved, the accuracy of interface monitoring can be improved, and the security of Web servers can be further improved. Based on the solution of the present invention, starting from the interface risk rules existing in the information security of the computer field, a health fusion index based on the data request of a historical interface is constructed, and the validity of the interface monitoring method proposed by the present invention is verified by the health fusion index. Finally, the accuracy of the interface monitored by the method of the present invention is obviously improved.
[0022] In the embodiment of the present invention, with the rapid development of 5G networks and the continuous deepening of the digital transformation of the industry, the common gateway interface is becoming a major challenge in edge computing risks. In particular, there are many open interfaces for CGI applications, and protection measures are lacking, so attacks on interfaces and events of infiltrating into application systems through interfaces to steal data often occur. However, there are still few existing researches on the risks of interfaces.
[0023] Therefore, the technical proposal in the embodiment of the present invention takes into account the practical problem of detecting abnormal API interfaces, and combines the data processing capabilities of the plural fusion method to design an interface monitoring method based on plural fusion, thereby solving the technical problem that there are many API interfaces open to CGI applications and abnormal API interfaces cannot be detected in a timely manner, improving the accuracy of interface monitoring and further enhancing the security of Web servers.
[0024] Specifically, refer to Fig. 1. Fig. 1 is a schematic diagram of functional blocks of a terminal device to which an interface monitoring device according to the present invention belongs. The interface monitoring device is a device capable of monitoring an interface independent of the terminal device, and is mounted in the terminal device in the form of hardware or software. This terminal device may be a smart mobile terminal having a data processing function, such as a mobile phone or a tablet, or may be a fixed terminal device or a server having a data processing function.
[0025] In this embodiment, the terminal device to which the interface monitoring device belongs includes at least an output module 110 , a processor 120 , a memory 130 and a communication module 140 .
[0026] The memory 130 stores an operating system and an interface monitoring program. The interface monitoring device stores information in the memory 130, such as the responded interface data request, the analyzed data request, the obtained operation information of different dimensions, the corresponding multidimensional fusion index by the multidimensional fusion processing performed on the operation information, and the interface health check information generated by matching the multidimensional fusion index with a preset health fusion index. The output module 110 may be a display, etc. The communication module 140 may include a WIFI module, a mobile communication module, a Bluetooth module, etc. Communication with an external device or server is performed via the communication module 140.
[0027] Now, when the interface monitoring program in the memory 130 is executed by the processor, the following steps are realized: The data request is parsed to obtain different dimensions of operational information. A multi-dimensional fusion process is performed on the operation information to obtain a corresponding multi-dimensional fusion index. The multi-dimensional fusion index is compared with a pre-defined health fusion index to generate health check information of the interface.
[0028] Furthermore, when the interface monitoring program in memory 130 is executed by the processor, the following steps are also performed. The driving information is compressed to obtain feature estimates. A weighting calculation is performed on the feature estimates to obtain corresponding optimal weight values. The optimal weight values are fused according to a preset fusion algorithm to obtain the multi-dimensional fusion index.
[0029] Furthermore, when the interface monitoring program in memory 130 is executed by the processor, the following steps are also performed. Detect whether the multidimensional fusion index matches the health fusion index. If the multi-dimension fusion index is consistent with the health fusion index, it is declared that the interface is in a normal state. If the multidimensional fusion index does not match the health fusion index, a risk level of the interface is determined.
[0030] Furthermore, when the interface monitoring program in memory 130 is executed by the processor, the following steps are also performed. The driving information is inputted into a preset data correction model to obtain simulation data after deviations are corrected, and the data correction model is obtained based on a preset historical data request.
[0031] Furthermore, when the interface monitoring program in memory 130 is executed by the processor, the following steps are also performed. The historical data requests are a training set. Create a correction model for the initial data. The training set is input into the correction model of the initial data and deviations are fitted to obtain the data correction model.
[0032] Furthermore, when the interface monitoring program in memory 130 is executed by the processor, the following steps are also performed. Features are extracted in the training set to obtain feature values of interfaces of different dimensions. The interface feature values are fused to generate the health fusion index.
[0033] Furthermore, when the interface monitoring program in memory 130 is executed by the processor, the following steps are also performed. A visualization interface is pre-configured to display one or more of the multi-dimensional fusion indexes, driving information, and health check information.
[0034] In this embodiment, the data request of the interface is specifically responded to, the data request is analyzed to obtain operation information of different dimensions, the operation information is subjected to multi-dimensional fusion processing to obtain corresponding multi-dimensional fusion indexes, and the multi-dimensional fusion indexes are matched with a preset health fusion index to generate health diagnosis information of the interface. By multi-dimensionally fusing operation information of different dimensions of the interface, the technical problem that there are many API interfaces open to CGI applications and abnormal API interfaces cannot be timely detected can be solved, the accuracy of interface monitoring can be improved, and the security of the Web server can be further improved. Based on the proposal of the present invention, starting from the interface risk rules existing in the information security of the computer field, a health fusion index based on the data request of the historical interface is constructed, and the validity of the interface monitoring method proposed by the present invention is verified by the health fusion index. That is, the accuracy of interface monitoring is obviously improved by the method of the present invention.
[0035] The embodiment of the present method is proposed based on the above-mentioned architecture of the terminal device, but is not limited to the above-mentioned architecture.
[0036] Please refer to Fig. 2. Fig. 2 is a flow chart of a first exemplary embodiment of an interface monitoring method according to the present invention. The interface monitoring method includes the following steps:
[0037] In step S210, the interface data request is responded to.
[0038] The execution subject of the method of this embodiment may be a kind of interface monitoring device, or may be a monitoring terminal device or server for the interface. This embodiment will be described by taking an interface monitoring device as an example. The interface monitoring device may be integrated into a terminal device such as a server, smartphone, or tablet having a data processing function.
[0039] In the embodiment of the present invention, starting from the actual problem of detecting abnormal API interfaces, an interface monitoring method based on multiple element fusion is designed in accordance with the data processing capability of the multiple element fusion method, thereby solving the technical problem that there are many API interfaces open to CGI applications and abnormal API interfaces cannot be detected in a timely manner, improving the accuracy of interface monitoring, and further enhancing the security of Web servers.
[0040] Because CGI can provide many features that HTML cannot, it is possible to run external applications (or gateways) under a network server. For example, a program running on a web server is triggered by input from a user. CGI allows the user to interact with the server. For example, a user can fill or search a table on the network through CGI. Or, a user can shop or pay online through CGI.
[0041] Specifically, a request application is executed on the user terminal. A request trigger control, such as a button or a hyperlink, is set on the page of the request application. A user inputs a trigger command through an input device such as a touch screen, a button, or a trackball of the user terminal, so that the user terminal sends a data request to the Web application server. The data request may be a search request, a message request, an inquiry request, a message transfer request, etc. In this embodiment, one or more requests from one user terminal may be received, or requests from two or more user terminals may be received. The CGI application may also communicate with an external data source such as a database server through a data API interface to obtain data from the database server. Thus, the embodiment of the present application performs monitoring on an interface, particularly the security of the interface, based on the CGI application, thereby improving the accuracy of monitoring the interface and further improving the security of the Web server.
[0042] In step S220, the data request is parsed to obtain different dimensions of driving information.
[0043] Specifically, the aforementioned operation information includes one or more of the following: API interface feature code, request IP, request time, request parameters, access time, access speed, requesting user, request result, return data size, return data, failure rate, number of calls, and response code.
[0044] In step S230, a multi-dimensional fusion process is performed on the operation information to obtain a corresponding multi-dimensional fusion index.
[0045] Specifically, the operation information can be multi-dimensionally fused to synthesize the operation information to extract useful data, and obtain a multi-dimensional monitoring index. Here, the specific steps of multi-dimensionally fusion of the operation information are: compressing the operation information to obtain a feature estimation value, performing a weighting calculation on the feature estimation value to obtain a corresponding optimal weight value, and calculating the optimal weight value through a preset fusion algorithm to obtain a multi-dimensional fusion index.
[0046] In step S240, the multi-dimensional fusion index is compared with a preset health fusion index to generate health check information of the interface.
[0047] Specifically, one or more of the following items are multidimensionally integrated: the feature code of the API interface, the request IP, the request time, the request parameters, the access time, the access speed, the requesting user, the request result, the size of the returned data, the failure rate, the number of calls, and the response code, to obtain a multidimensional fusion index, and the current robustness of the interface is obtained by comparing the multidimensional fusion index with a pre-set health fusion index. Here, the health fusion index includes at least one or more health fusion indexes corresponding to different risk levels are provided.
[0048] Furthermore, in step S240, the step of matching the multi-dimension fusion index with a preset health fusion index to generate health examination information of the interface includes:
[0049] A visualization interface is set up in advance to display one or more of the multi-dimensional fusion indexes, driving information, and health check information.
[0050] Specifically, API interfaces are common in many business integrations, and are becoming an important part of the driving organization. Therefore, it is particularly important to ensure the normal operation of API interfaces. Over time, API usage in different dimensions, such as the number of calls, success rate, and delay, needs to be paid attention to. Therefore, in this embodiment, different options can be used to view API operation information from different dimensions, and API call information can be captured in real time.
[0051] In this embodiment, the following scheme is adopted: in response to a data request of an interface, the data request is analyzed to obtain operation information of different dimensions, multi-dimensional fusion processing is performed on the operation information to obtain corresponding multi-dimensional fusion indexes, and the multi-dimensional fusion indexes are matched with a preset health fusion index to generate health diagnosis information of the interface. By multi-dimensionally fusing operation information under different dimensions of an interface, the technical problem that there are many API interfaces open to CGI applications and abnormal API interfaces cannot be timely detected can be solved, the accuracy of monitoring the interface can be improved, and the security of the Web server can be further improved.
[0052] Please refer to Fig. 3. Fig. 3 is a flowchart of a second exemplary embodiment of the interface monitoring method according to the present invention. Based on the embodiment shown in Fig. 2, the step S230 of performing multi-dimensional fusion processing on the operation information and obtaining the corresponding multi-dimensional fusion index further includes the following steps:
[0053] In step S310, the driving information is compressed to obtain feature estimates.
[0054] Specifically, for an interface, the driving information of each dimension is continuous data or distributed data. In order to facilitate evaluation, in this embodiment, for driving information of different dimensions of the same interface, the features between the driving information are calculated, and each driving information is compressed into one feature estimation value, thereby reducing system costs and improving interface monitoring efficiency.
[0055] In step S320, a weighting calculation is performed on the feature estimates to obtain corresponding optimal weight values.
[0056] Specifically, the operation information includes one or more of the following: API interface feature code, request IP, request time, request parameters, access time, access speed, request user, request result, return data size and return data, failure rate, call count, and response code. Each operation information has a corresponding optimal weight value. Here, the weight calculation method includes, but is not limited to, the following classifications: The first classification (subjective weighting method) includes the AHP hierarchical method and the sequential graph method, that is, the weight is calculated using information on the relative magnitude of numerical values. The second classification (based on information amount) includes the entropy value method (entropy weighting method), that is, the weight is calculated using the magnitude of information amount, which is data entropy value information. The third classification (based on data variability) includes CRITIC, independence weighting, and information amount weighting, that is, the weight is calculated using the variability of data or the correlation between data. For the fourth category (information enrichment idea), it is factor analysis and principal component method, that is, based on the principle of information enrichment of data, the variance interpretation rate is used to calculate the weights, or the combined endowment method (integrated endowment method) is used to combine the above categories.
[0057] In step S330, the optimal weight values are fused according to a preset fusion algorithm to obtain the multi-dimensional fusion index.
[0058] Specifically, the fusion algorithm is used to fuse the optimal weight values, including but not limited to weighted average method, Kalman filtering, DS evidence theory, federated filter algorithm, fuzzy logic, and neural network, etc. Through fusion, the judgment result does not depend on the subjective judgment of humans, but has a strong mathematical theoretical basis, which improves the monitoring accuracy of the interface.
[0059] This embodiment specifically adopts a scheme including the steps of compressing the driving information to obtain a feature estimation value, performing weighting calculation on the feature estimation value to obtain a corresponding optimal weight value, and fusing the optimal weight value through a preset fusion algorithm to obtain the multi-dimensional fusion index. By performing weighting calculation on the feature estimation value, invalid driving information can be effectively identified and thinned out, and the efficiency of monitoring the interface can be further improved.
[0060] Please refer to Fig. 4. Fig. 4 is a flow chart of a third exemplary embodiment of the interface monitoring method according to the present invention. Based on the embodiment shown in Fig. 2, the step S240 of matching the multi-dimensional fusion index with a preset health fusion index to generate health diagnosis information of the interface further includes the following steps:
[0061] In step S410, it is detected whether the multi-dimensional fusion index matches the health fusion index.
[0062] Specifically, after obtaining the multidimensional fusion index, it is necessary to judge whether the multidimensional fusion index matches the health fusion index, and generate the current health diagnosis information of the interface. Here, the health status means the current real-time status of the interface. Employees can know the specific status of the interface through the health diagnosis information. The health diagnosis information includes, but is not limited to, whether the interface is at risk, the specific status of the risk, and the risk level.
[0063] In step S420, if the multi-dimension fusion index is consistent with the health fusion index, it is declared that the interface is in a normal state.
[0064] Specifically, if the multi-dimensional fusion index matches the health fusion index, it indicates that the currently monitored interface is in a normal state. Thus, after the browser transfers these pieces of information to a specific CGI program under the CGI directory of the server, the CGI program processes them in a predetermined manner in the server. For example, the information submitted by the user is stored in a specified file. Then, the CGI program sends information to the client indicating that the requested task has been completed.
[0065] In step S430, if the multi-dimension fusion index does not match the health fusion index, determine the risk level of the interface.
[0066] Specifically, the risk level is classified according to the degree of exceeding the range of the health fusion index. Here, the risk level is determined based on the history data. In this embodiment, different risk levels are classified according to the digital tag. For example, the case where the data is located within the security range or exceeds the security range by less than 5% belongs to the security level, the real-time API interface data exceeding the security range by 5% to 15% belongs to the first risk level, the real-time API interface data exceeding the security range by 15% to 30% belongs to the second risk level, and the real-time API interface data exceeding the security range by more than 30% belongs to the third risk level. In this way, the risk levels can be seen at a glance.
[0067] In addition, different levels of abnormality can be displayed with different colors to indicate the corresponding risk levels, which can help to control personnel costs and property losses at a low cost and reduce the cost of monitoring the interface.
[0068] Further, in step S430, if the multi-dimensional fusion index does not match the health fusion index, after determining the risk level of the interface, the method further includes step S440 of inputting the driving information into a preset data correction model to obtain simulation data after the deviation is corrected.
[0069] Specifically, a data correction model is input based on the driving information to be corrected, and simulation data after the deviation is corrected is obtained. Here, the data correction model builds a model of different dimensions based on the same data set by fitting the deviation between the simulation data and the actual data in a preset training set, and corrects the simulation value. Then, the bagging method and the stacking method are combined to integrate the modeling results of different models. Models built by algorithms of the same dimension are integrated by the bagging method, and models built by algorithms of different dimensions are integrated by the stacking method.
[0070] In this embodiment, the following scheme is adopted: detect whether the multi-dimensional fusion index is consistent with the health fusion index, and if the multi-dimensional fusion index is consistent with the health fusion index, declare that the interface is in a normal state; if the multi-dimensional fusion index is not consistent with the health fusion index, determine the risk level of the interface, and input the driving information into a preset data correction model to obtain simulation data after deviation correction, and the data correction model is obtained according to a preset history data request. By detecting whether the multi-dimensional fusion index is consistent with the health fusion index and correcting the driving information that is not consistent with the health fusion index, the timeliness of monitoring the interface can be improved.
[0071] Please refer to Fig. 5. Fig. 5 is a flow chart of a fourth exemplary embodiment of the interface monitoring method according to the present invention. Based on the embodiment shown in Fig. 4 above, before inputting the driving information into a preset data correction model to obtain simulation data after deviation is corrected, the method further includes the following steps:
[0072] In step S510, the predefined historical data requests are taken as a training set.
[0073] Specifically, a training set is created based on the historical data requests, where the training set may take the historical data requests as input and the corresponding actual data as output.
[0074] In step S520, a modified model of the initial data is created.
[0075] Specifically, the stacking method used in this embodiment has a two-layer structure, and incorporates the bagging method in the stacking method. Here, the first layer adopts two models, stepwise regression and linear regression. Input parameters need to be processed before training. The output results of these two models (i.e., the correction results of the simulation data of the two models) are weighted arithmetically averaged. The weighted average value is used as the input of the second layer model, and the second layer model is trained using the XGBoost algorithm, and the output of the second layer model is the final correction value of the analog data.
[0076] In step S530, the training set is input into the correction model of the initial data, and deviations are fitted to obtain the data correction model.
[0077] Specifically, by obtaining different dimensional operation information of the interface from multiple paths, training a data correction model to fit the deviation between the input and output data in the database, and using this deviation to realize accurate correction of the interface being operated. The embodiment of the present application can obtain relatively accurate actual data by processing the multi-dimensional operation information in a comprehensive manner, thereby realizing more accurate correction of the interface operation.
[0078] In this embodiment, the following scheme is adopted: the historical data requirements are used as a training set to create an initial data correction model, and the training set is input to the initial data correction model to fit the deviation to obtain the data correction model. By creating a data correction model and inputting operation information into the data correction model, the stability and efficiency of the interface monitoring process can be improved.
[0079] Please refer to Fig. 6. Fig. 6 is a flow chart of a fifth exemplary embodiment of the interface monitoring method according to the present invention. Based on the embodiment shown in Fig. 5, before matching the multi-dimensional fusion index with a preset health fusion index to generate health diagnosis information of the interface, the following steps are further included:
[0080] In step S610, features are extracted in the training set to obtain feature values of interfaces of different dimensions.
[0081] Specifically, the feature value of the interface includes, but is not limited to, one or more of the following: API interface feature code, request IP, request time, request parameter, access time, access speed, request user, request result, return data size and return data, failure rate, call count, and response code.Feature extraction methods include, but are not limited to, principal component analysis method, genetic algorithm-based feature extraction, tone symbiosis matrix method, Laws texture energy method, spatial autocorrelation function method, wave transform and wavelet packet transform method.
[0082] In step S620, the interface feature values are fused to generate the health fusion index.
[0083] Specifically, in order to improve the efficiency and accuracy of interface monitoring, make it easier for users to view, and also facilitate machine analysis and matching, the features of data requirements in a normal state are extracted in advance from the training set, and the feature values of interfaces of different dimensions are obtained to generate a health fusion index, thereby making the health fusion index rational and comprehensive and avoiding unity based on artificial settings.
[0084] This embodiment specifically adopts a scheme of obtaining the feature values of different dimensions of interfaces by extracting features in the training set, and fusing the feature values of the interfaces to generate the health fusion index. By extracting features in the training set in advance and generating the corresponding health fusion index, the comprehensiveness and completeness of interface monitoring can be improved.
[0085] In addition, the embodiment of the present application further proposes an interface monitoring device, which includes: a request response module for responding to data requests of the interface; a request analysis module for analyzing the data request to obtain different dimensions of operation information; an information fusion module for performing multi-dimensional fusion processing on the operation information to obtain a corresponding multi-dimensional fusion index; and an index matching module for matching the multi-dimensional fusion index with a preset health fusion index to generate health examination information of the interface.
[0086] In this embodiment, the principle and implementation of interface monitoring may be referred to in the above embodiments, and will not be described further here.
[0087] Furthermore, an embodiment of the present application proposes a terminal device including a memory, a processor and an interface monitoring program stored in the memory and executable on the processor, the interface monitoring program implementing the steps of the interface monitoring method as described above when executed by the processor.
[0088] When the interface monitoring program is executed by a processor, it adopts all the technical solutions of all the above-mentioned embodiments, and therefore has at least all the beneficial effects brought about by all the technical solutions of all the above-mentioned embodiments, and thus will not be described in further detail here.
[0089] Furthermore, an embodiment of the present application further proposes a computer-readable storage medium having stored thereon an interface monitoring program, which, when executed by a processor, implements the steps of the interface monitoring method as described above.
[0090] When executed by a processor, this interface monitoring program adopts all the technical solutions of all the above-mentioned embodiments, and therefore has at least all the beneficial effects brought about by all the technical solutions of all the above-mentioned embodiments, which will not be described in further detail here.
[0091] Compared with the prior art, the interface monitoring method, monitoring device, terminal device and storage medium proposed in the embodiments of the present application respond to the data request of the interface, analyze the data request to obtain operation information of different dimensions, perform multi-dimensional fusion processing on the operation information, obtain corresponding multi-dimensional fusion indexes, and compare the multi-dimensional fusion indexes with a preset health fusion index to generate health diagnosis information of the interface. In this way, by multi-dimensionally fusing operation information of different dimensions of the interface, the technical problem that there are many API interfaces open to CGI applications and abnormal API interfaces cannot be timely detected can be solved, the accuracy of interface monitoring can be improved, and the security of the Web server can be further improved. Based on the proposal of the present application, starting from the interface risk rules existing in the information security of the computer field, a health fusion index based on the data request of the historical interface is constructed, and the validity of the interface monitoring method proposed by the present invention is verified by the health fusion index. That is, the accuracy of interface monitoring is obviously improved by the method of the present invention.
[0092] As used herein, the terms "comprise," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that includes a set of elements includes not only those elements, but also other elements not expressly listed, or includes elements inherent to such process, method, article, or system. In the absence of further limitations, an element defined by the phrase "including one" does not exclude the presence of another identical element in the process, method, article, or system that includes that element.
[0093] The above-mentioned example numbers are for illustrative purposes only and do not represent the superiority or inferiority of the examples.
[0094] From the above description, it is clear to those skilled in the art that the methods of the above-mentioned embodiments can be realized by adding a necessary general-purpose hardware platform to the software, and of course, can also be realized by hardware alone. However, in many cases, the former is a better embodiment. Based on this understanding, the technical approach of the present application can be embodied essentially or in the form of a software product that contributes to the existing technology. This computer software product is stored in the above-mentioned storage medium (e.g., ROM / RAM, magnetic disk, optical disk) and includes several instructions so that one terminal device (which may be a mobile phone, a computer, a server, a control terminal, or a network device, etc.) executes the methods of each embodiment of the present application.
[0095] The above are merely optional embodiments of the present application, and do not limit the scope of the present application. Any equivalent structure or equivalent flow transformation made using the contents of the specification and drawings of the present application, or directly or indirectly applied to other related technical fields, is included in the scope of the claims of the present application.
Claims
1. A method for monitoring an interface, comprising: Responding to data requests from the interface; Parsing the data request to obtain different dimensions of operational information; performing a multi-dimensional fusion process on the operation information to obtain a corresponding multi-dimensional fusion index; and matching the multi-dimensional fusion index with a preset health fusion index to generate health diagnosis information of the interface; Here, the step of performing a multidimensional fusion process on the operation information to obtain a corresponding multidimensional fusion index includes: compressing the operational information to obtain feature estimates; performing a weighting calculation on the feature estimates to obtain corresponding optimal weight values; and fusing the optimal weight values through a preset fusion algorithm to obtain the multi-dimensional fusion index; Before the step of matching the multi-dimensional fusion index with a preset health fusion index to generate health diagnosis information of the interface, Using a preset extraction algorithm to extract features in the preset training set to obtain feature values of different dimensional interfaces; and fusing the feature values of the interfaces to generate the health fusion index; Wherein, the extraction algorithm includes at least one of a principal component analysis method and a feature extraction based on a genetic algorithm; In addition, the step of generating health check information of the interface by comparing the multidimensional fusion index with a preset health fusion index includes: Detecting whether the multidimensional fusion index matches the health fusion index; If the multi-dimension fusion index is consistent with the health fusion index, it is declared that the interface is in a normal state; If the multidimensional fusion index does not match the health fusion index, determining a risk level of the interface; and The method further includes inputting the driving information into a preset data correction model to obtain simulation data after deviation is corrected; The method of claim 1, wherein the data correction model is derived based on a pre-defined historical data request.
2. before the step of inputting the operation information into a preset data correction model to obtain simulation data after the deviation is corrected, said historical data requests being a training set; Creating a revised model of the initial data; and 2. The method of claim 1, further comprising inputting the training set into the correction model of the initial data to fit deviations to obtain the data correction model.
3. After the step of matching the multi-dimensional fusion index with a preset health fusion index to generate health diagnosis information of the interface, The interface monitoring method of claim 1, further comprising: displaying one or more of the multidimensional fusion indexes, driving information, and health check information by setting a visualization interface in advance.
4. An interface monitoring device, comprising: a request response module for responding to data requests of the interface; a request analysis module for analyzing the data request to obtain different dimensions of operation information; an information fusion module for performing multi-dimensional fusion processing on the operation information to obtain a corresponding multi-dimensional fusion index; An index matching module for matching the multi-dimensional fusion index with a preset health fusion index to generate health examination information of the interface; Here, the step of performing a multi-dimensional fusion process on the operation information to obtain a corresponding multi-dimensional fusion index includes: compressing the operational information to obtain feature estimates; performing a weighting calculation on the feature estimates to obtain corresponding optimal weight values; and fusing the optimal weight values through a preset fusion algorithm to obtain the multi-dimensional fusion index; Before the step of matching the multi-dimensional fusion index with a preset health fusion index to generate health diagnosis information of the interface, Using a preset extraction algorithm to extract features in the preset training set to obtain feature values of different dimensional interfaces; and fusing the feature values of the interfaces to generate the health fusion index; Wherein, the extraction algorithm includes at least one of a principal component analysis method and a feature extraction based on a genetic algorithm; In addition, the step of generating health check information of the interface by comparing the multidimensional fusion index with a preset health fusion index includes: Detecting whether the multidimensional fusion index matches the health fusion index; If the multi-dimension fusion index is consistent with the health fusion index, it is declared that the interface is in a normal state; If the multidimensional fusion index does not match the health fusion index, determining a risk level of the interface; and The method further includes inputting the driving information into a preset data correction model to obtain simulation data after deviation is corrected; The data correction model is derived based on pre-defined historical data requirements. An interface monitoring device comprising:
5. A terminal device, a memory, a processor, and an interface monitoring program stored in the memory and operable by the processor; A terminal device, characterized in that the interface monitoring program, when executed by the processor, realizes the steps of the interface monitoring method according to any one of claims 1 to 3.
6. 1. A computer-readable storage medium, comprising: The computer-readable storage medium stores an interface monitoring program; A computer-readable storage medium, which, when the interface monitoring program is executed by a processor, realizes the steps of the interface monitoring method according to any one of claims 1 to 3.
Citation Information
Patent Citations
Intelligent health management server, system and control method based on fusion model
CN105827731A
Data classification grading and data security monitoring method and system based on API traffic
CN113630419A
API (Application Programming Interface) security management method and device, equipment and medium
CN113961423A
Determining acceptable activity based on acceptable activity rules
JP2018503203A
Investment system interface with dedicated training networks
US20220327620A1