Method and related device for discovering interface resources
By aggregating and identifying access traffic data, and automatically discovering and managing interface resources, the problem of timely discovering and managing frequent iterations of APIs is solved, and security protection and management efficiency is improved.
Patent Information
- Application Number
- CN202410606802.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-15
- Publication Date
- 2024-12-31
- Estimated Expiration
- 2044-05-15
AI Technical Summary
The existing technology is difficult to detect and manage frequently iterative application program interfaces (APIs) in a timely manner, especially within security departments and business departments, resulting in increased security protection and management difficulties.
By obtaining access traffic data, aggregating it based on field parameters, identifying interface information, and managing interface resource information, thereby realizing automatic discovery and management.
Helps enterprises to obtain new interface resource information in a timely manner, ensure their security protection and management, and improve the credibility and efficiency of interface resources.
Smart Images

Figure CN118368236B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, and in particular to a method for discovering interface resources and related devices. Background Art
[0002] This section is intended to provide a background or context to the embodiments of the disclosure that are recited in the claims. No description herein is admitted to be prior art by inclusion in this section.
[0003] API (application program interface) is the most frequently used tool for inter-process communication and inter-service communication in computer communication.
[0004] As applications become increasingly complex and Internet applications are updated frequently, the iteration of application programming interfaces (APIs) becomes very frequent, making it difficult for the security department to obtain the latest list of application programming interfaces in a timely manner for security protection. It is also difficult for the business department to obtain all application programming interfaces in a timely manner for management, especially the application programming interfaces temporarily used in the testing phase and the application programming interfaces developed and used by business personnel for maintenance or ease of use. This makes it difficult for the security department or the business department to discover and manage new application programming interfaces in a timely manner. Summary of the invention
[0005] In view of this, the purpose of the present disclosure is to provide a method for discovering interface resources and related devices, which at least solve one of the technical problems in the related art to a certain extent.
[0006] Based on the above purpose, the first aspect of the exemplary embodiment of the present disclosure provides a method for discovering interface resources, including:
[0007] Get access traffic data;
[0008] Aggregate the access traffic data based on field parameters in the access traffic data to obtain interface aggregation information;
[0009] Identify the interface aggregation information and obtain interface resource information in the interface aggregation information;
[0010] The interface resource information is managed.
[0011] In some embodiments, before aggregating the access traffic data based on the field parameters in the access traffic data, the method further includes:
[0012] Determine whether there is second interface information in the access traffic data that is consistent with first interface information pre-set in the interface resource library;
[0013] If not, the access traffic data is aggregated.
[0014] In some embodiments, the aggregating the access traffic data based on the field parameters in the access traffic data to obtain the interface aggregation information includes:
[0015] Obtaining field parameters and corresponding field values in the access traffic data;
[0016] Folding and identifying the field parameters based on the field values corresponding to the field parameters, and obtaining the interface access path and interface access parameters stored in the field parameters;
[0017] The interface folding information is obtained based on the interface access path and the interface access parameter.
[0018] In some embodiments, folding and identifying the field parameter based on the field value corresponding to the field parameter, and acquiring the interface access path and interface access parameter stored in the field parameter, includes:
[0019] Obtaining field parameters in the access traffic data;
[0020] Determine whether the field parameter has a variable parameter;
[0021] In response to the absence of a variable parameter in the field parameter, folding the field parameter, identifying the field parameter based on a field value of the field parameter, and obtaining the interface access path and / or interface access parameter stored in the field parameter;
[0022] or,
[0023] In response to the presence of variable parameters in the field parameters, clustering is performed on the field parameters to obtain field parameter data clusters, and the interface access path and / or interface access parameter stored in the field parameters corresponding to the outliers is obtained;
[0024] Determine whether there are variable parameters in the field parameter data cluster;
[0025] In response to the absence of variable parameters in the field parameter data cluster, folding the field parameters in the field parameter data cluster to obtain the interface access path and / or interface access parameter stored in the field parameters of the field parameter data cluster;
[0026] In response to the presence of variable parameters in the field parameter data cluster, the field parameter data clusters whose number is less than a preset value are merged to obtain a first field parameter data cluster, the field parameter data clusters whose number is greater than or equal to the preset value are sampled to obtain a second field parameter data cluster, and the field parameters in the first field parameter data cluster and the second field parameter data cluster are folded to obtain interface access paths and / or interface access parameters for storing the field parameters of the first field parameter data cluster and the second field parameter data cluster.
[0027] In some embodiments, before clustering the field parameters to obtain field parameter data clusters, the method further includes:
[0028] The field parameters are pre-clustered according to the character length and the number of levels of the interface access path.
[0029] In some embodiments, clustering the field parameters includes:
[0030] Calculating the edit distance of the interface access path;
[0031] Based on the relationship between the edit distance and a preset edit distance, clustering processing is performed on the field parameters.
[0032] In some embodiments, the aggregating the access traffic data based on the field parameters in the access traffic data to obtain the interface aggregation information further includes:
[0033] Semantic understanding is performed on the interface folding information, and the interface aggregation information is obtained based on the semantic understanding result.
[0034] In some embodiments, the performing semantic understanding on the interface folding information and obtaining the interface aggregation information based on the semantic understanding result includes at least one of the following:
[0035] Acquire the interface access path, interface access parameters and hierarchical relationship in the interface folding information, perform semantic understanding on the interface folding information based on the interface access path, interface access parameters and hierarchical relationship, and obtain the interface aggregation information;
[0036] Acquire a folding parameter in the access traffic data corresponding to the interface folding information, and perform semantic understanding on the interface folding information based on the folding parameter to obtain the interface aggregation information;
[0037] Obtain the request parameters in the access traffic data corresponding to the interface folding information, perform semantic understanding on the interface folding information based on the request parameters, and obtain the interface aggregation information. Perform semantic understanding on the interface folding information based on the interface access path, interface access parameters, hierarchical relationship, folding parameters and request parameters to obtain the interface aggregation information.
[0038] In some embodiments, before identifying the interface aggregation information, the method further includes:
[0039] Marking the aggregated interface aggregation information;
[0040] In response to the number of the marked interface aggregation information being greater than a preset threshold, the interface aggregation information is identified using the target model.
[0041] In some embodiments, before managing the interface resource information, the method further includes:
[0042] Performing credibility calculation on the interface resource information based on a preset dimension;
[0043] In response to a credibility calculation result of the interface resource information satisfying a preset threshold, the interface resource information is added to a preset interface resource library.
[0044] Based on the same inventive concept, a second aspect of the exemplary embodiment of the present disclosure provides a device for discovering interface resources, including:
[0045] The acquisition module is configured to: acquire interface access data in the access traffic data;
[0046] The aggregation module is configured to: perform aggregation processing on the interface access data based on the interface information to obtain interface aggregation information;
[0047] An identification module is configured to: identify the interface aggregation information using a target model to obtain interface resources in the interface aggregation information;
[0048] The management module is configured to manage the interface resources.
[0049] Based on the same inventive concept, a third aspect of the exemplary embodiment of the present disclosure provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method described in the first aspect is implemented.
[0050] Based on the same inventive concept, a fourth aspect of the exemplary embodiments of the present disclosure provides a non-transitory computer-readable storage medium, wherein the non-transitory computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the method described in the first aspect.
[0051] Based on the same inventive concept, a fifth aspect of the exemplary embodiments of the present disclosure provides a computer program product, including computer program instructions. When the computer program instructions are executed on a computer, the computer executes the method described in the first aspect.
[0052] From the above description, it can be seen that the method and related equipment for discovering interface resources provided by the embodiments of the present disclosure, after obtaining the access traffic data, aggregate the access traffic data based on the field parameters in the access traffic data, thereby identifying the field parameters that may be used to store interface information, and then obtaining the interface information according to the field values corresponding to the field parameters; then the interface resource information is managed, thereby realizing automatic discovery and management of the interface resource information, which can help enterprises or business users to obtain the newly added interface resource information in a timely manner so as to realize the protection of the newly added interface resource information in a timely manner, as well as the management of the equipment to which the newly added interface resource information belongs. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] In order to more clearly illustrate the technical solutions in the present disclosure or related technologies, the drawings required for use in the embodiments or related technical descriptions are briefly introduced below. Obviously, the drawings described below are only embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0054] Figure 1 A schematic diagram showing an exemplary method according to an embodiment of the present disclosure is shown;
[0055] Figure 2 A schematic diagram showing an exemplary method according to an embodiment of the present disclosure is shown;
[0056] Figure 3 A schematic diagram showing an exemplary method according to an embodiment of the present disclosure is shown;
[0057] Figure 4 A schematic diagram showing an exemplary method according to an embodiment of the present disclosure is shown;
[0058] Figure 5 A schematic diagram showing an exemplary method according to an embodiment of the present disclosure is shown;
[0059] Figure 6 A schematic diagram showing an exemplary method according to an embodiment of the present disclosure is shown;
[0060] Figure 7 A schematic diagram showing an exemplary method according to an embodiment of the present disclosure is shown;
[0061] Figure 8 A schematic diagram showing an exemplary method according to an embodiment of the present disclosure is shown;
[0062] Fig. 9 A schematic diagram showing an exemplary device provided by an embodiment of the present disclosure is shown;
[0063] Fig.10 A schematic diagram of the hardware structure of an exemplary computer device provided in an embodiment of the present disclosure is shown. DETAILED DESCRIPTION
[0064] It is understandable that before using the technical solutions disclosed in the embodiments of this application, the type, scope of use, usage scenarios, etc. of the personal information involved in this application should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.
[0065] For example, in response to receiving an active request from a user, a prompt message is sent to the user to clearly prompt the user that the operation requested to be performed will require obtaining and using the user's personal information. Thus, the user can autonomously choose whether to provide personal information to software or hardware such as an electronic device, application, server, or storage medium that performs the operation of the technical solution of the present application according to the prompt message.
[0066] As an optional but non-limiting implementation, in response to receiving an active request from the user, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. In addition, the pop-up window may also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device.
[0067] It is understandable that the above notification and the process of obtaining user authorization are merely illustrative and do not constitute a limitation on the implementation method of the present application. Other methods that meet the relevant laws and regulations may also be applied to the implementation method of the present application.
[0068] It is understandable that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and relevant provisions.
[0069] In order to make the purpose, technical solutions and advantages of the present disclosure more clear, the principles and spirit of the present disclosure will be described with reference to several exemplary embodiments. It should be understood that these embodiments are provided only to enable those skilled in the art to better understand and implement the present disclosure, and are not intended to limit the scope of the present disclosure in any way. On the contrary, these embodiments are provided to make the present disclosure more thorough and complete, and to fully convey the scope of the present disclosure to those skilled in the art.
[0070] It should be understood herein that any number of elements in the drawings is for illustration rather than limitation, and any naming is only for distinction rather than having any limiting meaning.
[0071] It should be noted that, unless otherwise defined, the technical terms or scientific terms used in the embodiments of the present disclosure should be understood by people with ordinary skills in the field to which the present disclosure belongs. The "first", "second" and similar words used in the embodiments of the present disclosure do not represent any order, quantity or importance, but are only used to distinguish different components. "Including" or "comprising" and similar words mean that the elements or objects appearing in front of the word cover the elements or objects listed after the word and their equivalents, without excluding other elements or objects. "Connecting" or "connected" and similar words are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. "Up", "down", "left", "right" and the like are only used to indicate relative positional relationships. When the absolute position of the described object changes, the relative positional relationship may also change accordingly. The article "one" or "a" before an element does not exclude the existence of multiple such elements.
[0072] The principle and spirit of the present disclosure are explained in detail below with reference to several representative embodiments of the present disclosure.
[0073] API (application program interface) refers to a set of functions of an operating component, application or operating system that allows different applications to communicate with each other, share data, and integrate in an orderly manner. Its main purpose is to allow application developers to call a set of routine functions without considering the underlying source code or understanding the details of its internal working mechanism.
[0074] As described in the background art, due to the increasing number and variety of applications, the increasing complexity of application programs, and the frequent iteration and update of application programs, the iteration of application program interfaces is very frequent, making it difficult to discover and manage new application program interfaces in a timely manner.
[0075] In order to solve the above problems, the present disclosure provides a method for discovering interface resources, such as Figure 1 As shown, including:
[0076] Step S101, obtaining access traffic data.
[0077] In this embodiment, access traffic data in the target system or target system cluster may be collected. Figure 6 As shown, the access traffic data may be log stream data integrated from multiple sources, or access logs backed up in a database, which is not limited in this embodiment.
[0078] Step S103: Aggregate the access traffic data based on field parameters in the access traffic data to obtain interface aggregation information.
[0079] Since access traffic data may include interface access data as well as non-interface access data, it is difficult to automatically identify; and even if it is interface access data, since there are a large number of field parameters in the interface access data, different interface access data may use different field parameters to store interface information, and it is impossible to automatically identify it. Among them, the interface information may include domain name, interface access path, interface access parameters, etc.
[0080] In this embodiment, the access traffic data can be aggregated based on the field parameters in the access traffic data, so as to fold and identify the field information of the access traffic data, identify the field parameters that may be used to store the interface information, and then obtain the interface information according to the field values corresponding to the field parameters, and obtain the interface aggregation information. Among them, the access traffic data can be aggregated using all the field parameters such as the request path, request method, request parameters, call time, response code, etc. in the access traffic data, so as to identify the field parameters that may belong to the interface information.
[0081] Step S105: Identify the interface aggregation information and obtain interface resource information in the interface aggregation information.
[0082] After obtaining the interface aggregation information, the interface information in the interface aggregation information may be identified to obtain the API interface resource information, wherein the API interface resource information may include the API interface.
[0083] Step S107: managing the interface resource information.
[0084] After obtaining the API interface resources, you can manage the API interface resources.
[0085] In this embodiment, after obtaining the access traffic data, the access traffic data is aggregated based on the field parameters in the access traffic data, so as to identify the field parameters that may be used to store interface information, and then obtain the interface information according to the field values corresponding to the field parameters; the aggregated interface aggregation information is then identified to obtain the interface resource information, and then the interface resource information is managed, thereby realizing automatic discovery and management of the interface resource information, which can help enterprises or business users to obtain the newly added interface resource information in a timely manner so as to realize the protection of the newly added interface resource information in a timely manner, as well as the management of the equipment to which the newly added interface resource information belongs.
[0086] In some embodiments, before aggregating the access traffic data based on the field parameters in the access traffic data, the method further includes:
[0087] Step S201, determining whether there is second interface information in the access traffic data that is consistent with first interface information pre-set in an interface resource library.
[0088] Step S203: if not, aggregate the access traffic data; if yes, there is no need to process the access traffic data.
[0089] After obtaining the access traffic data, if the access traffic data contains managed interface information, the corresponding interface information in the access traffic data can be directly identified, and there will be no newly added interface resource information in the access traffic data, and there is no need to process the access traffic data. If the access traffic data does not contain managed interface information, there may be newly added interface resource information in the access traffic data, or there may be no interface information, that is, it does not belong to interface access data, so such access traffic data needs further aggregation processing.
[0090] Therefore, in this embodiment, the interface information in the access flow data can be judged first to determine whether the second interface information exists in the access flow data and whether the second interface information already exists in the pre-set interface resource library, that is, to determine whether the access flow data is the managed interface information. If so, there is no need to perform subsequent processing on the access flow data; if not, the access flow data is aggregated.
[0091] In some embodiments, the step S103 of aggregating the access traffic data based on the field parameters in the access traffic data to obtain interface aggregation information includes:
[0092] Step S301, obtaining field parameters and corresponding field values in the access traffic data.
[0093] In this embodiment, the access traffic data includes multiple field parameters. In this application, all field parameters and corresponding values in the access traffic data are obtained for processing, so as to identify field parameters that may be used to store interface access paths and interface access parameters.
[0094] Step S303: fold and identify the field parameters based on the field values corresponding to the field parameters, and obtain the interface access path and interface access parameters stored in the field parameters.
[0095] In this embodiment, the field parameters are folded and identified based on the field values corresponding to each field parameter, that is, the function of the field parameter is inferred based on the content of the field value corresponding to the field parameter, that is, what kind of information the field parameter is used to store, and field parameters with the same function are folded to identify interface information such as interface access paths and interface access parameters stored in the field parameters.
[0096] Step S305: obtaining the interface folding information based on the interface access path and the interface access parameter.
[0097] After obtaining interface information such as the interface access path and interface access parameters, the domain name can be further obtained, and basic API interface information can be obtained based on the combination of the domain name, interface access path and interface access parameters.
[0098] Among them, Figure 2 As shown, the step S303 of folding and identifying the field parameter based on the field value corresponding to the field parameter, and obtaining the interface access path and interface access parameter stored in the field parameter includes:
[0099] Step S401, obtaining field parameters in the access traffic data.
[0100] For access traffic data for which no managed interface information exists, the access traffic data is first parsed and sampled to obtain field parameters therein.
[0101] Step S403, determining whether there are variable parameters in the field parameters. Step S405, in response to the field parameters not having variable parameters, folding the field parameters, identifying the field parameters based on the field values of the field parameters, and obtaining the interface access path and / or interface access parameters stored in the field parameters.
[0102] In this embodiment, if the field parameters are all immutable, that is, the field values corresponding to the field parameters are all the same type of information, it means that the field parameters are fixed. Therefore, the field parameters can be folded and identified, so as to identify the interface access path and / or interface access parameters stored in the field parameters as interface resource information and store them in the preset interface resource library, i.e., the asset library.
[0103] In this embodiment, it is determined whether there are obviously no variable parameters in the field parameters. If so, it means that the parameters of each field are consistent, and the corresponding interface information is consistent. After rule folding, the corresponding interface information is output.
[0104] Step S407, in response to the existence of variable parameters in the field parameters, clustering is performed on the field parameters to obtain field parameter data clusters, and the interface access path and / or interface access parameter stored in the field parameters corresponding to the outliers is obtained.
[0105] In this embodiment, if the field parameters include both variable parameters and immutable parameters, the field parameters are converted into word vectors, and clustering is performed based on the word vectors to obtain field parameter data clusters.
[0106] During the clustering process, the field parameters corresponding to the outliers are processed separately, and the interface access paths and / or interface access parameters therein are obtained and output to the asset library.
[0107] Step S409, determining whether there are variable parameters in the field parameter data cluster.
[0108] Step S411: In response to the fact that there are no variable parameters in the field parameters of the field parameter data cluster, the field parameters in the field parameter data cluster are folded to obtain the interface access path and / or interface access parameters stored in the field parameters of the field parameter data cluster. Step S413: In response to the fact that there are variable parameters in the field parameters of the field parameter data cluster, the field parameter data clusters whose number is less than a preset value are merged to obtain a first field parameter data cluster, the field parameter data clusters whose number is greater than or equal to the preset value are sampled to obtain a second field parameter data cluster, and the field parameters in the first field parameter data cluster and the second field parameter data cluster are folded to obtain the interface access path and / or interface access parameters stored in the field parameters of the first field parameter data cluster and the second field parameter data cluster.
[0109] If there are variable parameters in the field parameter data cluster, the smaller clusters are merged, the larger clusters are sampled, and the sampled larger clusters and the merged smaller clusters are input into the value model for folding, and the interface access path and / or interface access parameters are output into the asset library.
[0110] The above process is repeatedly performed to fold, cluster and identify each field parameter in the access traffic data, thereby identifying the field parameters and interface information that may be used to store the interface information in the access traffic data.
[0111] In some embodiments, Figure 3 As shown, before clustering the field parameters to obtain field parameter data clusters, the process further includes: pre-clustering the field parameters according to the character length and the number of levels of the interface access path.
[0112] In this embodiment, since a normal interface access path will not be too long, if it is too long, it is necessary to pre-cluster the field parameters corresponding to the interface access path based on the character length and the number of levels of the interface access path, so as to delete a part of the path.
[0113] In some embodiments, clustering the field parameters includes:
[0114] Step S501: Calculate the edit distance of the interface access path.
[0115] Edit distance is a method to measure the difference between two strings. It represents the minimum number of editing operations required to transform one string into another.
[0116] Step S503: clustering the field parameters based on the relationship between the edit distance and a preset edit distance.
[0117] In some embodiments, the interface information includes an interface access path; the step S103 of aggregating the interface access data based on the interface information to obtain interface aggregation information includes:
[0118] Semantic understanding is performed on the interface folding information, and the interface aggregation information is obtained based on the semantic understanding result.
[0119] The performing semantic understanding on the interface folding information and obtaining the interface aggregation information based on the semantic understanding result includes at least one of the following:
[0120] Acquire the interface access path, interface access parameters and hierarchical relationship of the interface folding information, perform semantic understanding on the interface folding information based on the interface access path, interface access parameters and hierarchical relationship, and obtain the interface aggregation information;
[0121] Acquire a path folding parameter in the interface folding information, and perform semantic understanding on the interface folding information based on the path folding parameter to obtain the interface aggregation information;
[0122] Acquire request parameters in the interface folding information, perform semantic understanding on the interface folding information based on the request parameters, and obtain the interface aggregation information;
[0123] The interface folding information is semantically understood based on the interface access path, interface access parameters, hierarchical relationship, folding parameters and request parameters to obtain the interface aggregation information.
[0124] like Figure 4 , Figure 5 As shown, the semantic understanding process includes:
[0125] Step S601, before semantic recognition of the interface folding information, first determine the task type, that is, determine whether the interface access path and interface access parameters in the interface folding information are information with clear meanings. If yes, execute step S603; otherwise, execute step S605.
[0126] Step S603, the overall semantic understanding of the interface folding information can be directly performed based on the interface access path, interface access parameters and hierarchical relationship in the interface folding information, so as to determine the meaning, function, etc. of the interface folding information. In this embodiment, the interface access path, interface access parameters and hierarchical relationship in the interface folding information can be understood based on the pre-trained target model, so as to determine the meaning, function, etc. of the basic API interface information of the interface folding information.
[0127] Step S605, determining whether there is a request parameter (query parameter) in the access flow data corresponding to the interface folding information. If yes, executing step S607.
[0128] Step S607, further determine whether the folding parameter is included. If yes, execute step S609; otherwise, execute step S611.
[0129] Step S609, based on the target model, semantic understanding is performed based on request parameters, semantic understanding is performed based on folding parameters, and overall semantic understanding is performed based on interface access paths, interface access parameters, and hierarchical relationships, so as to obtain a semantic understanding result.
[0130] Step S611, semantic understanding is performed on the folding parameters based on the pre-trained target model, and a semantic understanding result is obtained.
[0131] In this embodiment, through semantic understanding, the interface folding information, that is, the meaning, function and other information of the basic API interface, can be identified, which is equivalent to obtaining the complete API interface information.
[0132] In some embodiments, before identifying the interface aggregation information, the method further includes:
[0133] Step S701: Mark the aggregated interface aggregation information.
[0134] Step S703: in response to the number of the marked interface aggregation information being greater than a preset threshold, the interface aggregation information is identified using the target model.
[0135] In this embodiment, when the interface aggregation information appears for the first time, such as Figure 8 As shown, the interface information in the interface aggregation information can be marked as being discovered. When the interface aggregation information accumulates to a number that meets a preset threshold, such as Figure 6 As shown, the target model is then used to identify the parameters of the API interface resource information in the interface aggregation information, thereby obtaining the API interface resource information. In some embodiments, the target model can be used to identify the interface aggregation information, thereby obtaining the interface resource information in the interface aggregation information. Figure 7 As shown, the model can be constructed first, and the model can be trained using the interface information marked with the interface resource information, and then the trained model can be used to identify the interface aggregation information after parameter folding and semantic understanding to obtain the interface resource information therein.
[0136] After obtaining the interface resource information, the interface resource information is evaluated. If it meets expectations, it can be directly output for interface resource management. At the same time, the parameters of the target model are adjusted based on the evaluation results to improve the accuracy of the target model in identifying the interface resource information.
[0137] In some embodiments, before managing the interface resource information, the method further includes:
[0138] Step S801: Calculate the credibility of the interface resource information based on a preset dimension.
[0139] Among them, the preset dimensions can include mining parameters, IP, request and interception status. Among them, mining parameters refers to continuing to discover whether there are other parameters in the access traffic, including the number of times a parameter appears, the number of times a certain type of parameter appears, the number of times the parameter value is empty, the proportion of parameter appearances (i.e., the number of parameters / the number of API calls), the proportion of parameter data types (i.e., the number of times a certain data type of parameter appears / the number of times the parameter appears), and the proportion of empty parameter values (i.e., the proportion of empty parameter values / the number of times the parameter appears); IP represents the request information for accessing data on the interface, the number of encyclopedia IPs, and the proportion of IP calls within the time string (i.e., the number of IPs / the number of API calls); request refers to the content of the request response, including the number of responses and the proportion of return-to-source responses; interception status refers to whether the interface resource has been rejected for management, including the number of interceptions and the proportion of interceptions.
[0140] Step S803: in response to the credibility calculation result of the interface resource information meeting a preset threshold, the interface resource is added to a preset interface resource library.
[0141] The credibility calculation results include:
[0142] Field parameter credibility schema_score = (w1*f1+w2*f2+w3*f3....+wn*fn) / (w1+w2+..+wn)*100;
[0143] Credibility calculation result api_score = (m1*schema_score_1+m2*schema_score_2+..mn*schema_score_n) / (m1+m2+..+mn)*100.
[0144] f1, f2, etc. are feature values, w1, w2, etc. are the weights of each feature value, schema_score_1, schema_score_2, etc. are the credibility scores of each field parameter, and m1, m2, etc. are the weight scores of each field parameter.
[0145] Among them, when calculating the credibility of field parameters, it can be obtained based on one or more characteristic values such as log information, field parameter information, IP information, UA information, request response information, interception status information, etc.
[0146] Log information may include the number of API calls.
[0147] Field parameter information may include: the number of field parameter occurrences, the number of occurrences of a certain type of field parameter, the number of times the field parameter value is empty, the proportion of field parameter occurrences (number of field parameter occurrences / number of API calls), the proportion of occurrences of a certain type of field parameter (number of occurrences of a certain type of field parameter / number of field parameter occurrences), the proportion of times the field parameter value is empty (number of times the field parameter value is empty / number of field parameter occurrences), etc.
[0148] IP information may include the number of IPs, the proportion of IP calls within the time window (number of IPs / number of API calls), etc.
[0149] UA information may include the number of UAs, the proportion of UA calls within the time window (number of UAs / number of API calls), etc.
[0150] The request response information may include responses to different preset times and the proportion of responses to different preset times back to the source (response to different preset times / API call times), etc.
[0151] The interception status information may include the number of interceptions and the interception ratio (number of interceptions / number of API calls).
[0152] It should be noted that the method of the embodiment of the present disclosure can be performed by a single device, such as a computer or a server. The method of the present embodiment can also be applied in a distributed scenario and completed by multiple devices cooperating with each other. In the case of such a distributed scenario, one of the multiple devices can only perform one or more steps in the method of the embodiment of the present disclosure, and the multiple devices will interact with each other to complete the described method.
[0153] It should be noted that the above describes some embodiments of the present disclosure. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the above embodiments and still achieve the desired results. In addition, the processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0154] Based on the same inventive concept, corresponding to any of the above-mentioned embodiment methods, the present disclosure also provides a data processing device.
[0155] refer to Fig. 9 , the device for discovering interface resources includes:
[0156] The acquisition module 11 is configured to: acquire access flow data;
[0157] The aggregation module 13 is configured to: perform aggregation processing on the access traffic data based on the field parameters in the access traffic data to obtain interface aggregation information;
[0158] The identification module 15 is configured to: identify the interface aggregation information and obtain the interface resource information in the interface aggregation information;
[0159] The management module 17 is configured to manage the interface resource information.
[0160] In some embodiments, before aggregating the access traffic data based on the field parameters in the access traffic data, the device is further configured to:
[0161] Determine whether there is second interface information in the access traffic data that is consistent with first interface information pre-set in the interface resource library;
[0162] If not, the access traffic data is aggregated.
[0163] In some embodiments, the aggregating the access traffic data based on the field parameters in the access traffic data to obtain the interface aggregation information includes:
[0164] Obtaining field parameters and corresponding field values in the access traffic data;
[0165] Folding and identifying the field parameters based on the field values corresponding to the field parameters, and obtaining the interface access path and interface access parameters stored in the field parameters;
[0166] The interface folding information is obtained based on the interface access path and the interface access parameter.
[0167] In some embodiments, folding and identifying the field parameter based on the field value corresponding to the field parameter, and acquiring the interface access path and interface access parameter stored in the field parameter, includes:
[0168] Obtaining field parameters in the access traffic data;
[0169] Determine whether the field parameter has a variable parameter;
[0170] In response to the absence of a variable parameter in the field parameter, folding the field parameter, identifying the field parameter based on a field value of the field parameter, and obtaining the interface access path and / or interface access parameter stored in the field parameter;
[0171] or,
[0172] In response to the presence of variable parameters in the field parameters, clustering is performed on the field parameters to obtain field parameter data clusters, and the interface access path and / or interface access parameter stored in the field parameters corresponding to the outliers is obtained;
[0173] Determine whether there are variable parameters in the field parameter data cluster;
[0174] In response to the absence of variable parameters in the field parameter data cluster, folding the field parameters in the field parameter data cluster to obtain the interface access path and / or interface access parameter stored in the field parameters of the field parameter data cluster;
[0175] In response to the presence of variable parameters in the field parameter data cluster, the field parameter data clusters whose number is less than a preset value are merged to obtain a first field parameter data cluster, the field parameter data clusters whose number is greater than or equal to the preset value are sampled to obtain a second field parameter data cluster, and the field parameters in the first field parameter data cluster and the second field parameter data cluster are folded to obtain interface access paths and / or interface access parameters for storing the field parameters of the first field parameter data cluster and the second field parameter data cluster.
[0176] In some embodiments, before clustering the field parameters to obtain field parameter data clusters, the device is further configured to:
[0177] The field parameters are pre-clustered according to the character length and the number of levels of the interface access path.
[0178] In some embodiments, clustering the field parameters includes:
[0179] Calculating the edit distance of the interface access path;
[0180] Based on the relationship between the edit distance and a preset edit distance, clustering processing is performed on the field parameters.
[0181] In some embodiments, the aggregating the access traffic data based on the field parameters in the access traffic data to obtain the interface aggregation information further includes:
[0182] Semantic understanding is performed on the interface folding information, and the interface aggregation information is obtained based on the semantic understanding result.
[0183] In some embodiments, the performing semantic understanding on the interface folding information and obtaining the interface aggregation information based on the semantic understanding result includes at least one of the following:
[0184] Acquire the interface access path, interface access parameters and hierarchical relationship in the interface folding information, perform semantic understanding on the interface folding information based on the interface access path, interface access parameters and hierarchical relationship, and obtain the interface aggregation information;
[0185] Acquire a folding parameter in the access traffic data corresponding to the interface folding information, and perform semantic understanding on the interface folding information based on the folding parameter to obtain the interface aggregation information;
[0186] Obtain the request parameters in the access traffic data corresponding to the interface folding information, perform semantic understanding on the interface folding information based on the request parameters, and obtain the interface aggregation information. Perform semantic understanding on the interface folding information based on the interface access path, interface access parameters, hierarchical relationship, folding parameters and request parameters to obtain the interface aggregation information.
[0187] In some embodiments, before identifying the interface aggregation information, the apparatus is further configured to:
[0188] Marking the aggregated interface aggregation information;
[0189] In response to the number of the marked interface aggregation information being greater than a preset threshold, the interface aggregation information is identified using the target model.
[0190] In some embodiments, before managing the interface resource information, the apparatus is further configured to:
[0191] Performing credibility calculation on the interface resource information based on a preset dimension;
[0192] In response to a credibility calculation result of the interface resource information satisfying a preset threshold, the interface resource information is added to a preset interface resource library.
[0193] For the convenience of description, the above device is described by dividing it into various modules according to its functions. Of course, when implementing the present disclosure, the functions of each module can be implemented in the same or multiple software and / or hardware.
[0194] The device of the above embodiment is used to implement the corresponding data processing method in any of the above embodiments, and has the beneficial effects of the corresponding method embodiment, which will not be described in detail here.
[0195] Based on the same inventive concept, corresponding to any of the above-mentioned embodiments and methods, the present disclosure also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the data processing method described in any of the above embodiments is implemented.
[0196] Fig.10 A more specific schematic diagram of the hardware structure of an electronic device provided in this embodiment is shown, and the device may include: a processor 1010, a memory 1020, an input / output interface 1030, a communication interface 1040, and a bus 1050. The processor 1010, the memory 1020, the input / output interface 1030, and the communication interface 1040 are connected to each other through the bus 1050 in the device.
[0197] The processor 1010 can be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this specification.
[0198] The memory 1020 may be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage device, dynamic storage device, etc. The memory 1020 may store an operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented by software or firmware, the relevant program codes are stored in the memory 1020 and are called and executed by the processor 1010.
[0199] The input / output interface 1030 is used to connect the input / output module to realize information input and output. The input / output module can be configured in the device as a component (not shown in the figure), or it can be externally connected to the device to provide corresponding functions. The input device may include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output device may include a display, a speaker, a vibrator, an indicator light, etc.
[0200] The communication interface 1040 is used to connect a communication module (not shown) to realize communication interaction between the device and other devices. The communication module can realize communication through a wired mode (such as USB, network cable, etc.) or a wireless mode (such as mobile network, WIFI, Bluetooth, etc.).
[0201] The bus 1050 includes a path that transmits information between the various components of the device (eg, the processor 1010, the memory 1020, the input / output interface 1030, and the communication interface 1040).
[0202] It should be noted that, although the above device only shows the processor 1010, the memory 1020, the input / output interface 1030, the communication interface 1040 and the bus 1050, in the specific implementation process, the device may also include other components necessary for normal operation. In addition, it can be understood by those skilled in the art that the above device may also only include the components necessary for implementing the embodiments of the present specification, and does not necessarily include all the components shown in the figure.
[0203] The electronic device of the above embodiment is used to implement the corresponding data processing method in any of the above embodiments, and has the beneficial effects of the corresponding method embodiment, which will not be described in detail here.
[0204] Based on the same inventive concept, corresponding to any of the above-mentioned embodiment methods, the present disclosure also provides a non-transitory computer-readable storage medium, wherein the non-transitory computer-readable storage medium stores computer instructions, and the computer instructions are used to enable the computer to execute the data processing method described in any of the above embodiments.
[0205] The computer-readable medium of this embodiment includes permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, read-only compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device.
[0206] The above-mentioned non-transitory computer-readable storage medium can be any available medium or data storage device that can be accessed by a computer, including but not limited to magnetic storage (such as floppy disks, hard disks, magnetic tapes, magneto-optical disks (MO), etc.), optical storage (such as CD, DVD, BD, HVD, etc.), and semiconductor storage (such as ROM, EPROM, EEPROM, non-volatile memory (NAND FLASH), solid-state drive (SSD)), etc.
[0207] The computer instructions stored in the storage medium of the above embodiment are used to enable the computer to execute the data processing method described in any embodiment in the above exemplary method part, and have the beneficial effects of the corresponding method embodiment, which will not be repeated here.
[0208] Based on the same inventive concept, corresponding to the data processing method described in any of the above embodiments, the present disclosure also provides a computer program product, which includes computer program instructions. In some embodiments, the computer program instructions can be executed by one or more processors of a computer so that the computer and / or the processor execute the data processing method. Corresponding to the execution subject corresponding to each step in each embodiment of the data processing method, the processor that executes the corresponding step may belong to the corresponding execution subject.
[0209] The computer program product of the above embodiment is used to enable the computer and / or the processor to execute the data processing method described in any of the above embodiments, and has the beneficial effects of the corresponding method embodiments, which will not be repeated here.
[0210] Those skilled in the art will appreciate that the embodiments of the present disclosure may be implemented as a system, method, or computer program product. Therefore, the present disclosure may be specifically implemented in the following forms, namely: complete hardware, complete software (including firmware, resident software, microcode, etc.), or a combination of hardware and software, generally referred to herein as a "circuit," "module," or "system." In addition, in some embodiments, the present disclosure may also be implemented in the form of a computer program product in one or more computer-readable media, which contains computer-readable program code.
[0211] Any combination of one or more computer-readable media may be used. A computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium. A computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive examples) of computer-readable storage media may include, for example: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this document, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device.
[0212] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, which carry computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0213] The program code embodied on the computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
[0214] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0215] It should be understood that each box in the flowchart and / or block diagram and the combination of boxes in the flowchart and / or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer or other programmable data processing device to produce a machine, and these computer program instructions are executed by a computer or other programmable data processing device to produce a device that implements the functions / operations specified in the boxes in the flowchart and / or block diagram.
[0216] These computer program instructions may also be stored in a computer-readable medium that enables a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable medium produce a product that includes an instruction device that implements the functions / operations specified in the blocks in the flowchart and / or block diagram.
[0217] Computer program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operational steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby enabling the instructions executed on the computer or other programmable device to provide a process for implementing the functions / operations specified in the blocks in the flowchart and / or block diagram.
[0218] In addition, although the operations of the disclosed method are described in a particular order in the accompanying drawings, this does not require or imply that the operations must be performed in this particular order, or that all the operations shown must be performed to achieve the desired results. On the contrary, the steps depicted in the flow chart can be performed in a different order. Additionally or alternatively, some steps can be omitted, multiple steps can be combined into one step, and / or one step can be decomposed into multiple steps.
[0219] The flowchart and block diagram in the accompanying drawings illustrate the possible architecture, functions and operations of the system, method and computer program product according to various embodiments of the present application. Wherein, each box in the flowchart or block diagram can represent a module, a program segment, or a part of the code, and the above-mentioned module, program segment, or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, and the combination of boxes in the block diagram or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0220] It should be noted that, although several modules or units of the equipment for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present application, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into being embodied by multiple modules or units.
[0221] Those skilled in the art should understand that the discussion of any of the above embodiments is merely illustrative and is not intended to imply that the scope of the present application (including the claims) is limited to these examples. In line with the concept of the present application, the technical features in the above embodiments or different embodiments may be combined, the steps may be implemented in any order, and there are many other variations of the different aspects of the embodiments of the present application as described above, which are not provided in detail for the sake of simplicity.
[0222] In addition, to simplify the description and discussion, and in order not to make the embodiments of the present application difficult to understand, the known power supply / ground connection with the integrated circuit (IC) chip and other components may or may not be shown in the provided drawings. In addition, the device can be shown in the form of a block diagram to avoid making the embodiments of the present application difficult to understand, and this also takes into account the fact that the details of the implementation of these block diagram devices are highly dependent on the platform to be implemented in the embodiments of the present application (that is, these details should be fully within the scope of understanding of those skilled in the art). In the case of elaborating specific details (e.g., circuits) to describe exemplary embodiments of the present application, it is obvious to those skilled in the art that the embodiments of the present application can be implemented without these specific details or when these specific details are changed. Therefore, these descriptions should be considered to be illustrative rather than restrictive.
[0223] Although the present application has been described in conjunction with specific embodiments of the present application, many replacements, modifications and variations of these embodiments will be apparent to those skilled in the art from the foregoing description. For example, other memory architectures (e.g., dynamic RAM (DRAM)) may use the embodiments discussed.
[0224] The embodiments of the present application are intended to cover all such substitutions, modifications and variations that fall within the broad scope of the appended claims. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the embodiments of the present application should be included in the scope of protection of the present application.
[0225] Although the spirit and principle of the present disclosure have been described with reference to several specific embodiments, it should be understood that the present disclosure is not limited to the disclosed specific embodiments, and the division of various aspects does not mean that the features in these aspects cannot be combined to benefit, and such division is only for the convenience of expression. The present disclosure is intended to cover various modifications and equivalent arrangements included in the spirit and scope of the attached claims. The scope of the attached claims conforms to the broadest interpretation, thereby including all such modifications and equivalent structures and functions.
Claims
1. A method for discovering interface resources, comprising: Get access traffic data; Aggregating the access traffic data based on the field parameters in the access traffic data to obtain interface aggregation information includes: obtaining the field parameters and corresponding field values in the access traffic data; folding and identifying the field parameters based on the field values corresponding to the field parameters to obtain the interface access path and interface access parameters stored in the field parameters; and obtaining interface folding information based on the interface access path and the interface access parameters; Identify the interface aggregation information and obtain interface resource information in the interface aggregation information; Managing the interface resource information; The folding and identifying the field parameter based on the field value corresponding to the field parameter, and obtaining the interface access path and interface access parameter stored in the field parameter, includes: In response to the existence of variable parameters in the field parameter data cluster, the field parameter data clusters whose number is less than a preset value are merged to obtain a first field parameter data cluster, the field parameter data clusters whose number is greater than or equal to the preset value are sampled to obtain a second field parameter data cluster, and the field parameters in the first field parameter data cluster and the second field parameter data cluster are folded to obtain interface access paths and / or interface access parameters for storing the field parameters of the first field parameter data cluster and the second field parameter data cluster; the field parameter data cluster is obtained by clustering the field parameters in response to the existence of variable parameters in the field parameters.
2. The method according to claim 1, wherein: Before the aggregating the access traffic data based on the field parameters in the access traffic data, the method further includes: Determine whether there is second interface information in the access traffic data that is consistent with first interface information pre-set in the interface resource library; If not, the access traffic data is aggregated.
3. The method according to claim 1, wherein: The folding and identifying the field parameter based on the field value corresponding to the field parameter, and obtaining the interface access path and interface access parameter stored in the field parameter, includes: Obtaining field parameters in the access traffic data; Determine whether the field parameter has a variable parameter; In response to the absence of a variable parameter in the field parameter, folding the field parameter, identifying the field parameter based on a field value of the field parameter, and obtaining the interface access path and / or interface access parameter stored in the field parameter; or, In response to the presence of variable parameters in the field parameters, clustering is performed on the field parameters to obtain field parameter data clusters, and the interface access path and / or interface access parameter stored in the field parameters corresponding to the outliers is obtained; Determine whether there are variable parameters in the field parameter data cluster; In response to the absence of variable parameters in the field parameter data cluster, the field parameters in the field parameter data cluster are folded to obtain the interface access path and / or interface access parameters stored in the field parameters of the field parameter data cluster.
4. The method according to claim 3, wherein: Before clustering the field parameters to obtain field parameter data clusters, the method further includes: The field parameters are pre-clustered according to the character length and the number of levels of the interface access path.
5. The method according to claim 4, wherein: The clustering process of the field parameters includes: Calculating the edit distance of the interface access path; Based on the relationship between the edit distance and a preset edit distance, clustering processing is performed on the field parameters.
6. The method according to claim 1, wherein: The aggregating the access traffic data based on the field parameters in the access traffic data to obtain interface aggregation information further includes: Semantic understanding is performed on the interface folding information, and the interface aggregation information is obtained based on the semantic understanding result.
7. The method according to claim 6, wherein: The performing semantic understanding on the interface folding information and obtaining the interface aggregation information based on the semantic understanding result includes at least one of the following: Acquire the interface access path, interface access parameters and hierarchical relationship in the interface folding information, perform semantic understanding on the interface folding information based on the interface access path, interface access parameters and hierarchical relationship, and obtain the interface aggregation information; Acquire a folding parameter in the access traffic data corresponding to the interface folding information, and perform semantic understanding on the interface folding information based on the folding parameter to obtain the interface aggregation information; Obtain the request parameters in the access traffic data corresponding to the interface folding information, perform semantic understanding on the interface folding information based on the request parameters, and obtain the interface aggregation information. Perform semantic understanding on the interface folding information based on the interface access path, interface access parameters, hierarchical relationship, folding parameters and request parameters to obtain the interface aggregation information.
8. The method according to claim 1, wherein: Before identifying the interface aggregation information, the method further includes: Marking the aggregated interface aggregation information; In response to the number of the marked interface aggregation information being greater than a preset threshold, the interface aggregation information is identified using a target model.
9. The method according to claim 1, wherein: Before managing the interface resource information, the method further includes: Performing credibility calculation on the interface resource information based on a preset dimension; In response to a credibility calculation result of the interface resource information satisfying a preset threshold, the interface resource information is added to a preset interface resource library.
10. A device for discovering interface resources, comprising: The acquisition module is configured to: acquire access flow data; The aggregation module is configured to: perform aggregation processing on the access traffic data based on the field parameters in the access traffic data to obtain interface aggregation information, including: obtaining the field parameters and corresponding field values in the access traffic data; folding and identifying the field parameters based on the field values corresponding to the field parameters to obtain the interface access path and interface access parameters stored in the field parameters; and obtaining interface folding information based on the interface access path and the interface access parameters; An identification module is configured to: identify the interface aggregation information and obtain interface resource information in the interface aggregation information; A management module, configured to: manage the interface resource information; Wherein, the aggregation module is further configured as follows: In response to the existence of variable parameters in the field parameter data cluster, the field parameter data clusters whose number is less than a preset value are merged to obtain a first field parameter data cluster, the field parameter data clusters whose number is greater than or equal to the preset value are sampled to obtain a second field parameter data cluster, and the field parameters in the first field parameter data cluster and the second field parameter data cluster are folded to obtain interface access paths and / or interface access parameters for storing the field parameters of the first field parameter data cluster and the second field parameter data cluster; the field parameter data cluster is obtained by clustering the field parameters in response to the existence of variable parameters in the field parameters.
11. An electronic device, characterized in that: The method comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method according to any one of claims 1 to 9 is implemented.
12. A non-transitory computer-readable storage medium, characterized in that: The non-transitory computer-readable storage medium stores computer instructions, and the computer instructions are used to cause a computer to execute the method according to any one of claims 1 to 9.
13. A computer program product, characterized in that The method comprises computer program instructions, which, when executed on a computer, cause the computer to execute the method according to any one of claims 1 to 9.
Citation Information
Patent Citations
API collaborative identification method and device, electronic equipment, medium and product
CN115208801A
Method and device for identifying application program interface (API)
CN115242434A
API asset management method and device, electronic equipment and storage medium
CN116170331A
API asset identification method and device, equipment and storage medium
CN117421640A
API identification method and device, electronic equipment and storage medium
CN117786656A