API interface labeling method, apparatus, electronic device, storage medium, and computer program

The API interface labeling method semantically analyzes and labels API interfaces using a trained model, addressing maintenance and operation challenges, and improving management efficiency and security.

JP2026055774APending Publication Date: 2026-03-31BEIJING VOLCANO ENGINE TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Filing Date
2025-07-03
Publication Date
2026-03-31

AI Technical Summary

Technical Problem

Conventional API interfaces are difficult to maintain and operate due to lack of clear functional and naming information, increasing operation and security protection costs.

Method used

An API interface labeling method that utilizes a target model trained on interface information and function description data to semantically analyze and label API interfaces, providing functional and naming information.

Benefits of technology

Enables easy management and utilization of API interfaces, reducing maintenance and operation costs while enhancing network security by intelligently identifying and labeling API functions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2026055774000001_ABST
    Figure 2026055774000001_ABST
Patent Text Reader

Abstract

The present invention provides methods, apparatus, electronic devices, storage media, and products for labeling API interfaces. [Solution] The method includes obtaining API interface information in API interface access traffic data, inputting the API interface information into a target model trained on first training data including first training interface information, corresponding first function description information and / or first interface name information, and obtaining first information regarding the API interface information output by the target model. The first information includes at least one of the API interface function description information and interface name information. The method also includes labeling the API interface based on the first information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the technical field of computers, and particularly to a method, apparatus, electronic device, storage medium, and product for labeling an API interface.

Background Art

[0002] An API (Application Program Interface) is an interface through which an application provides services externally, and data and functions can be shared among different applications, services, or modules. However, the recorded information of conventional API interfaces often makes it difficult to directly determine the role or function of the API interface, increasing the difficulty of maintenance and operation, as well as the operation cost and security protection cost.

Summary of the Invention

[0003] In view of this situation, an object of the present disclosure is to provide a method, apparatus, electronic device, storage medium, and product for labeling an API interface that can at least to some extent solve technical problems such as the increasing difficulty of maintaining and operating API interfaces in related technologies, as well as the increasing operation cost and security protection cost. [[ID=No. 21]]

[0004] Based on the above object, a first aspect of the present disclosure is obtaining API interface information in API interface access traffic data, and inputting the API interface information into a target model trained based on first training data including first training interface information, corresponding first function description information, and / or first interface name information, and obtaining first information regarding the API interface information output by the target model, where the first information includes at least one of the function description information and interface name information of the API interface, and A method for labeling an API interface is provided, which includes labeling the API interface based on the first information.

[0005] The second phase of this disclosure is, A module for obtaining API interface information in API interface access traffic data, A model module for inputting the API interface information into a target model trained based on first training data including first training interface information and corresponding first function description information and / or first interface name information, and for obtaining first information relating to the API interface information output by the target model, wherein the first information is a model module including at least one of the function description information and interface name information of the API interface, The present invention provides an API interface leveling device comprising a leveling module for labeling the API interface based on the first information described above.

[0006] A third aspect of this disclosure provides an electronic device comprising memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the program is executed by the processor, the method described in the first aspect is realized.

[0007] A fourth aspect of this disclosure provides a non-transient, computer-readable storage medium that stores computer instructions for causing the computer to perform the method described in the first aspect.

[0008] According to the same inventive concept, a fifth aspect of exemplary embodiments of the present disclosure provides a computer program product that, when executed on a computer, includes computer program instructions causing the computer to perform the method described in the first aspect.

[0009] As can be seen from the above, the API interface labeling method, apparatus, electronic device, storage medium, and product relating to this disclosure can determine the functional description information and interface name information of an API interface by semantically understanding the interface information of the API interface, label the API interface, enable users to easily use and manage it, and apply it to various network security scenarios. [Brief explanation of the drawing]

[0010] To more clearly illustrate the embodiments of this disclosure or the prior art solutions, the following briefly describes the accompanying drawings necessary for describing the embodiments or the prior art, although it will be apparent to those skilled in the art that other accompanying drawings can be obtained from these drawings without requiring any creative ingenuity. [Figure 1] Figure 1 is an exemplary flowchart illustrating a labeling method for an API interface according to an embodiment of this disclosure. [Figure 2] Figure 2 is a schematic diagram showing a labeling method for an API interface according to an embodiment of this disclosure. [Figure 3] Figure 3 is a schematic diagram showing an exemplary apparatus according to an embodiment of this disclosure. [Figure 4] Figure 4 is a schematic diagram showing the hardware configuration of an exemplary computer system according to the present disclosure. [Modes for carrying out the invention]

[0011] To further clarify the purpose, solutions, and benefits of this disclosure, the following describes the disclosure in more detail, combining specific embodiments with reference to the accompanying drawings.

[0012] It should be noted that, unless otherwise defined, technical or scientific terms used in the embodiments of this disclosure should have the ordinary meanings understood by a person ordinarily skilled in the art to which this disclosure belongs. Terms such as “first,” “second,” etc., used in the embodiments of this disclosure do not indicate order, number, or importance, but are used solely to distinguish different components. Terms such as “equip,” or “include,” are intended to mean that the element or item appearing before it covers the elements or items and their equivalents listed after it, and do not exclude other elements or items. Terms such as “connect,” or “join,” are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. Terms such as “up,” “down,” “left,” and “right” are used solely to indicate relative positional relationships. If the absolute position of the described object is changed, the relative positional relationships may also change accordingly.

[0013] Before using the technical solutions of this disclosure in each embodiment of this disclosure, please understand that it is necessary to notify the user in an appropriate manner about the type of personal information relating to this disclosure, the scope of use, and the scenarios in which it may be used, and to obtain the user's consent.

[0014] For example, by sending the provided information to the user in response to receiving a voluntary request from the user, the acquisition and use of the user's personal information is made clear to the user that it is necessary for the operation that the user is requesting to perform. Therefore, the user can voluntarily choose whether or not to provide personal information to electronic devices, applications, servers, or software or hardware such as storage media that perform the operation of the technical means related to this disclosure, based on the provided information.

[0015] In a preferred exemplary embodiment, in response to receiving a voluntary request from the user, the information can be sent to the user, for example, in the form of a pop-up window, where the information can be presented in text format. Furthermore, the pop-up window may also carry selection controls for the user to choose whether to "agree" or "disagree" to providing personal information to the electronic device.

[0016] The process for notifying and obtaining user authentication described above is merely illustrative and does not limit the embodiments of this disclosure. It should be understood that other forms that comply with other relevant laws and regulations may also be applicable to the embodiments of this disclosure.

[0017] Please understand that the data related to this technology (including, but not limited to, the data itself, or the acquisition or use of the data) must comply with the requirements of relevant laws and regulations.

[0018] To further clarify the purpose, solutions, and advantages of the embodiments of this disclosure, the principles and spirit of this disclosure are described below with reference to several exemplary embodiments. It should be understood that these embodiments are provided solely to enable those skilled in the art to better understand and, consequently, implement this disclosure, and are not intended to limit the scope of this disclosure in any way. Rather, these embodiments are provided to make this disclosure more thorough and complete, and to fully convey the scope of this disclosure to those skilled in the art.

[0019] In this specification, the number of any elements in the accompanying drawings is for illustrative purposes only, not limiting, and all naming conventions are for distinguishing purposes only and do not imply any limiting meaning. The principles and spirit of this disclosure will be described in detail below with reference to several exemplary embodiments thereof.

[0020] An API (application program interface, application interface) refers to a series of functions for different applications to communicate with each other, share data, and be integrated in an orderly manner regarding an operating unit, an application, or an operating system. Its main purpose is to enable application developers to call the functions of a series of routines without considering the underlying source code or understanding the details of its internal operation mechanism. With the diversification and complexity of applications developing and applications being updated repeatedly very frequently, the application interface is also repeated very frequently. By managing the API interface, it is possible to automatically discover or manually maintain the maintenance information of the API interface. However, currently, the maintenance information of the API interface usually only records the path, request method, and parameters of the application interface, and users cannot know the role or function of the application interface. In fact, for one domain name, there are often hundreds or thousands of application interfaces, so the maintenance and operation of the API interface become very difficult, the operation cost and security protection cost also increase, and the maintenance efficiency and operation efficiency also decrease. How to reduce the maintenance difficulty and operation difficulty of the API interface, reduce the operation cost and security protection cost, and improve the maintenance efficiency and operation efficiency, etc., has become an urgent matter to be solved.

[0021] Referring to FIG. 1, FIG. 1 is an exemplary flowchart showing a labeling method for an API interface according to an embodiment of the present disclosure. The labeling method for an API interface according to an embodiment of the present disclosure can be arranged on the terminal or server side. In FIG. 1, the labeling 100 of the API interface can further include the following steps.

[0022] In step S110, API interface information in API interface access traffic data is obtained.

[0023] Here, the API interface access traffic data refers to the recorded data regarding the access to the API interface, including data such as the number of requests, frequency, source, response time, etc. For example, the number of requests refers to the number of times a specific API interface is called in a day, and the response time may refer to the average time it takes for the API interface to process the request and return a response. The acquisition of access traffic data can usually be done by acquiring the access traffic data in the target system or target system cluster and capturing the usage status of the API interface by methods such as logging and traffic detection tools. Here, logging includes the API gateway or server recording the detailed information of each request, such as the request time, response time, request method (GET, POST, etc.), client-side IP address, etc. The access traffic data may be fused log stream data from multiple sources or access logs backed up in a database, and is not limited here.

[0024] The API interface information may refer to various descriptions and metadata regarding the API interface, such as the interface path (Endpoint) for defining the target location of the API interface request and the call method (HTTP method) for specifying the interaction method with the API interface including general methods such as GET, POST, PUT, DELETE, etc. The request parameters refer to the input data expected to be received by the API interface, which may be query string parameters, path parameters, or data of the request entity. The API interface information may also include information such as the response format, status code, version control, authentication and authorization, rate limiting, documentation and examples, error handling, etc.

[0025] In step S120, the API interface information is input to a target model trained on first training data including first interface information and corresponding first function description information and / or first interface name information, and first information is obtained that includes at least one of the function description information and interface name information of the API interface information output by the target model.

[0026] Here, the target model may refer to a model for determining the functional description and / or naming information of a corresponding API interface by extracting information and performing semantic analysis based on API interface information. The first information may refer to the key information of an identifiable or descriptive API interface, the functional description information may refer to a description of the API interface function, and the interface naming information may refer to a naming identifier of the API interface, such as a descriptive name or path.

[0027] Specifically, a large amount of labeled API interface information and corresponding interface function description information and / or interface naming description information is collected as first training data, and an initial model is trained to obtain a target model that outputs corresponding API function description information and / or naming information based on the input API interface information. During the training of the target model, a corresponding output result can be generated based on the first interface information in the first training data (for example, obtained based on the API interface configuration information), i.e., function description information and / or interface naming information can be output. By comparing this output result with the actual first function description information and / or first interface naming information, the parameters of the target model can be adjusted to minimize the cross-entropy loss between the output result and the actual first function description information and / or first interface naming information, thereby obtaining a trained target model.

[0028] In some embodiments, the API interface information is input to a target model, and first information relating to the API interface information output by the target model is obtained. The aforementioned target model performs semantic analysis on the interface path and call method within the API interface information to obtain a first analysis result, This includes determining the first information based on the first analysis results.

[0029] Here, the interface path can refer to the path portion of the API interface URL (Uniform Resource Locator) that specifies the target resource or set of resources for the request. The interface path is usually appended to the protocol (e.g., HTTP / HTTPS) and domain name to identify a specific resource or service. The invocation method can refer to the method of the HTTP request that specifies the type of operation the client wants to perform. Common HTTP methods include GET, POST, PUT, DELETE, and PATCH. Specifically, GET is used to request the retrieval of resource information; POST is used to send data to the server and is usually used to create a new resource; PUT is used to update a resource and is usually used to replace the entire resource; DELETE is used to delete a resource; and PATCH is used to update a part of a resource. Semantic analysis can refer to determining the function and use of an API interface by understanding and interpreting the meaning of the content related to the API interface information, such as the interface path and invocation method. For example, if the API interface information includes the interface path: / products and the invocation method: GET, the target model performs semantic analysis, and the first analysis result is input to obtain the product information interface. In this case, the function description information within the first information may be the "List of Products to Obtain". In this way, the function of the API interface can be automatically identified, allowing users to manage and utilize the API interface more effectively, contributing to reduced work costs and improved work efficiency.

[0030] Specifically, if the API interface information includes the interface path and the calling method, the target model can perform semantic analysis on the entire API interface information to obtain a first analysis result. Referring to Figure 2, Figure 2 is a schematic diagram showing an API interface labeling method according to an embodiment of this disclosure. In Figure 2, after obtaining the API interface information, it can be determined whether or not the API interface information includes the interface path and the calling method. If it does, semantic analysis is performed based on the interface path and the calling method; if it does not, the process can be terminated or the API interface information can be obtained again. Furthermore, for example, as shown in S210 of Figure 2, it is also possible to determine whether or not the API interface information includes only the interface path and the calling method. If the API interface information includes only the interface path and the calling method, only an overall semantic analysis of the API interface information is required, and there is no need to locally analyze other parameters. If the API interface information does not include only the interface path and the calling method, it indicates that there are other key parameters that require semantic analysis in order to more accurately determine the functionality of the API interface.

[0031] In some embodiments, the API interface information is input to a target model, and first information relating to the API interface information output by the target model is obtained. The API interface information is aggregated and folded to obtain the folding parameters of the API interface information. In response to the determination that the API interface information includes the folding parameters, the target model performs semantic analysis on the interface path, the calling method, and the folding parameters to obtain a second analysis result. This includes determining the first information based on the first analysis result or the second analysis result.

[0032] Here, by acquiring access traffic data and then aggregating and collapsing it, the meaning and role of the collapsing parameters in the access traffic data can be obtained. In this case, by performing semantic analysis on the interface path, call method, and collapsing parameters of the API interface information, a second analysis result can be obtained. Then, the final first information is determined from the first or second analysis result.

[0033] API interface information can be aggregated and folded. Specifically, field parameters and corresponding field values ​​in the access traffic data can be obtained, and the field parameters can be folded and identified based on the corresponding field values ​​to obtain the interface access path and interface access parameters stored in the field parameters. Interface folding information can then be obtained based on the interface access path and interface access parameters. Access traffic data includes multiple field parameters, and the field parameters can be folded and identified based on the corresponding field values. That is, the role of the field parameter can be inferred based on the content of the corresponding field value, for example, what kind of information the field parameter is used to store, and interface folding information such as the interface access path and interface access parameters stored in the field parameters can be obtained by folding field parameters with the same role. Consequently, the domain name can be obtained, that is, basic API interface information can be obtained based on the combination of the domain name, interface access path, and interface access parameters.

[0034] In some embodiments, the first analysis result has a first confidence level, the second analysis result has a second confidence level, and the first confidence level is less than the confidence threshold. Determining the first information based on the first analysis result or the second analysis result, In response to the determination that the second confidence level is equal to or greater than the confidence threshold, the second analysis result is determined to be the first information. Alternatively, in response to the determination that the second confidence level is less than the confidence threshold and greater than or equal to the first confidence level, the second analysis result is determined to be the first information. Alternatively, the method includes determining the first analysis result as the first information in response to the determination that the first confidence level is greater than the second confidence level.

[0035] Here, if the first confidence level of the first analysis result is greater than or equal to the confidence threshold, the first analysis result can be directly determined as the first information without performing subsequent tasks such as further analysis of folding parameters or query parameters. If the first confidence level of the first analysis result is less than the confidence threshold, further analysis of folding parameters or query parameters is necessary to improve the accuracy of the semantic analysis of the API interface information. In Figure 2, if the API interface information includes not only the interface path and calling method but also folding parameters, semantic analysis is performed by combining the folding parameters, interface path, and calling method, for example, as shown in S220 in Figure 2. This allows for the determination of the role and function of the API interface and the acquisition of a second analysis result of more accurate interface function description information. In this case, if the second confidence level of the second analysis result is greater than or equal to the confidence threshold, the second analysis result can be directly determined as the first information without performing subsequent semantic analysis of query parameters. If the second confidence level of the second analysis result is less than the confidence threshold, the confidence levels of both the first and second analysis results are less than the confidence threshold, and the analysis result with the higher confidence level can be determined as the first information. For example, if the result of the first analysis is greater than the result of the second analysis, the result of the first analysis is determined to be the primary information. If the result of the first analysis is less than or equal to the result of the second analysis, the result of the second analysis is determined to be the primary information.

[0036] As can be seen, the API interface labeling method described in this embodiment obtains API interface information such as the interface path, calling method, and folding parameters in the access traffic data, and then obtains function description information and interface name information by semantically interpreting the API interface information. The interface name information is summarized and described as a readable role and name based on the interface function description information in order to obtain the interface name information of the API interface. In this way, the function of the API interface is shown more intuitively, the convenience of work is further improved, and users can easily use and manage it.

[0037] In some embodiments, the API interface information is input to a target model, and first information relating to the API interface information output by the target model is obtained. In response to the determination that the API interface information also includes query parameters, the target model performs semantic analysis on the interface path, the calling method, the folding parameters, and the query parameters to obtain a third analysis result. This includes determining the first information based on the first analysis result, the second analysis result, or the third analysis result.

[0038] Here, the query parameter refers to the query string portion of a URL, which may, for example, be a query string consisting of a series of key-value pairs following a question mark (?) in a URL, where key-value pairs are connected by equals signs (=) and multiple key-value pairs are separated by ampersands (&). If the API interface information also includes query parameters, a third analysis result can be obtained by further semantic analysis combining the interface path, calling method, folding parameters, and query parameters to further improve the accuracy of semantic analysis. The final first information is then determined from the first, second, or third analysis results.

[0039] In some embodiments, the first analysis result has a first confidence level, the second analysis result has a second confidence level, the third analysis result has a third confidence level, and the first and second confidence levels are less than the confidence threshold. Determining the first information based on the first analysis result, the second analysis result, or the third analysis result is: In response to the determination that the third confidence level is equal to or greater than the confidence threshold, the third analysis result is determined to be the first information, Alternatively, in response to the determination that the third confidence level is less than the confidence threshold, the analysis result corresponding to the highest confidence level among the first confidence level, the second confidence level, or the third confidence level is determined as the first information. Alternatively, the third analysis result is determined to be the first information in response to the determination that the third confidence level is less than the confidence threshold and that the third confidence level is equal to both the first confidence level and the second confidence level.

[0040] If the third confidence information is above a predetermined threshold, the subsequent task is not executed, and the current third identification result is determined to be the interface function description information and / or interface name information of the interface resource.

[0041] Here, if the second confidence level of the second analysis result is greater than or equal to the confidence threshold, the second analysis result can be directly determined as the first information without performing subsequent tasks such as further analyzing the query parameters. If the second confidence level of the second analysis result is less than the confidence threshold, the query parameters can be further analyzed to improve the accuracy of the semantic analysis of the API interface information. In Figure 2, if the API interface information also includes query parameters, semantic analysis can be performed by combining the query parameters, folding parameters, interface path, and calling method, for example, as shown in S230 of Figure 2. This determines the role and function of the API interface and yields a third analysis result with more accurate interface function description information. In this case, if the third confidence level of the third analysis result is greater than or equal to the confidence threshold, the third analysis result can be directly determined as the first information without performing subsequent semantic analysis of the query parameters. If the third confidence level of the third analysis result is less than the confidence threshold, the confidence levels of the first, second, and third analysis results are all less than the confidence threshold, and the analysis result with the higher confidence level can be determined as the first information. For example, if the first confidence level is greater than the second and third confidence levels, the first analysis result corresponding to the first confidence level is determined as the first information; if the second confidence level is greater than the first and third confidence levels, the second analysis result corresponding to the second confidence level is determined as the first information; and if the third confidence level is greater than the first and second confidence levels, the third analysis result corresponding to the third confidence level is determined as the first information. If the first, second, and third confidence levels are all equal, the third analysis result can be determined as the first information.

[0042] In some embodiments, method 100 is To obtain second information by correcting the first information, The API interface information and the second information are determined to be positive training samples, and the API interface information and the first information are determined to be negative training samples. This may also include training the target model using the positive training sample and the negative training sample as second training data, thereby updating the target model.

[0043] Here, during the training and application of the target model, the generated first information can be further processed to obtain second information, for example, by correcting the first information. If interface function description information and / or interface name information that does not meet the requirements or is inaccurate appears, the interface function description information and / or interface name information that does not meet the requirements can be used as a negative sample, and the corrected second information can be used as a positive sample. Then, by using the negative and positive samples to adjust the parameters and network of the target model and further training it, the target model can be tuned and its accuracy can be continuously improved.

[0044] In some embodiments, method 100 is Detecting the aforementioned first information based on pre-set rules, The process may also include updating the first information by correcting the target information in the first information in response to detecting that the first information includes target information relating to the pre-set rules.

[0045] Here, the pre-configured rules may include allowing or disallowing labeling descriptions for API interfaces. Specifically, in order to prevent misidentification of interface name information, the first information can be detected and corrected based on pre-configured rules (for example, by using a pre-trained first model), and the process of identifying and generating the first information can be determined and corrected by the detection of the first model so that the generated first information satisfies the pre-configured rules.

[0046] In step S130, the API interface is labeled based on the first information.

[0047] Here, labeling an API interface may refer to adding or classifying labels based on the API interface's basic attributes and functional description (e.g., first information), and may also mean naming the API interface (i.e., writing the API interface's function and role into its name information) to facilitate management and identification. Specifically, corresponding labels or names can be given to API interfaces based on first information to help users quickly locate and understand the API's function, use cases, and limitations. For example, if an API interface is used for user authentication, it may be labeled "Authentication" or "Secure," or a functional description such as authentication may be added to its name. If an API interface is used for data querying, it may be labeled "Query" or "Read," or a functional description such as query may be added to its name. The above labeling and / or naming are merely examples, and labeling and / or naming may include more descriptions; they are not limited to this specification. These labels or names can effectively organize and search API resources, improving development efficiency and maintainability. This helps optimize API interface performance, management resource utilization, and guaranteed security, and understands API usage trends.

[0048] As can be seen, the method according to the embodiments of this disclosure can automatically label the functional and naming information of API interface resources by intelligently semantically analyzing API interface information and rapidly and accurately extracting key descriptions, thereby significantly improving the management efficiency and security of network security products such as web application firewalls. This function not only simplifies the classification and identification of API interface resources but also enhances the detection and protection of API interface traffic, enabling network security products to respond more intelligently to the increasingly complex threat environment and ensure the safe and stable operation of web applications.

[0049] The methods of the embodiments of this disclosure may be performed by a single device, such as a computer or server. The methods of the embodiments may also be applied to a distributed scenario consisting of multiple devices that cooperate with each other. In such a distributed scenario, one of these multiple devices may perform only one or more steps of the methods of the embodiments of this disclosure, and these multiple devices interact with each other to perform the methods described above.

[0050] The above describes some embodiments of the present disclosure. Other embodiments are included in the appended claims. In some cases, the operations or procedures described in the claims can be performed in a different order than those in the embodiments above to achieve the desired results. Furthermore, the processes depicted in the drawings do not necessarily require a specific order or sequence shown to achieve the desired results. In some embodiments, multitasking and parallel processing may or may be advantageous.

[0051] Based on the same inventive concept and corresponding to the above-described optional embodiment method, the present disclosure further provides an API interface leveling device. Referring to Figure 3, the API interface leveling device is A module for obtaining API interface information in API interface access traffic data, The API interface information is input to a target model trained on first training data including first interface information and corresponding first function description information and / or first interface name information, and a model module is used to obtain first information output by the target model, which includes at least one of the API interface function description information and interface name information relating to the API interface information. The system includes a leveling module for labeling the API interface based on the first information.

[0052] Based on the same inventive concept and corresponding to the above-described optional embodiment method, the present disclosure further provides an electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the program is executed by the processor, the electronic device implements the API interface labeling method described in any one of the above embodiments.

[0053] Figure 4 is a schematic diagram showing a more specific electronic device hardware configuration according to this embodiment. The device may include a processor 1010, a memory 1020, an input / output interface 1030, a communication interface 1040, and a bus 1050. Here, the processor 1010, the memory 1020, the input / output interface 1030, and the communication interface 1040 communicate with each other within the device via the bus 1050.

[0054] 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 by executing the associated program, the technical means according to the embodiment of this specification can be realized.

[0055] Memory 1020 can be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage device, dynamic storage device, etc. Memory 1020 can store the operating system and other applications, and when the technical means according to the embodiment herein are implemented by software or firmware, the relevant program code is stored in memory 1020 and called and executed by processor 1010.

[0056] The input / output interface 1030 is used to connect input / output modules to enable information input and output. The input / output modules are arranged as components in a device (not shown) and can also be externally connected to the device to provide corresponding functions. Examples of input devices include keyboards, mice, touchscreens, microphones, and various sensors, while examples of output devices include displays, speakers, vibrators, and indicators.

[0057] The communication interface 1040 is used to connect a communication module (not shown) to enable communication interaction between this device and other devices. Here, the communication module can communicate via wired means (e.g., USB, network cable, etc.) or wireless means (e.g., mobile network, Wi-Fi, Bluetooth, etc.).

[0058] Bus 1050 provides a path for transmitting information between each component of the device (e.g., processor 1010, memory 1020, input / output interface 1030, communication interface 1040).

[0059] Although the above-described device represents only the processor 1010, memory 1020, input / output interface 1030, communication interface 1040, and bus 1050, in certain embodiments the device may include other components necessary for normal operation. Furthermore, those skilled in the art will understand that the above-described device may include only the components necessary to implement the embodiments specified herein, rather than all of the illustrated components.

[0060] The electronic devices of the above embodiments are used to implement the corresponding API interface labeling method of any of the above embodiments and have the beneficial effects of the corresponding method embodiments, but this specification avoids repeating explanations.

[0061] Based on the same inventive concept and corresponding to any of the embodiments described above, the present disclosure further provides a non-transient, computer-readable storage medium that stores computer instructions for causing a computer to execute the API interface labeling method described in any of the embodiments described above.

[0062] The computer-readable media of this embodiment include volatile and non-volatile media, and removable and non-removable media can store information by any method or technique. The information may be computer-readable instructions, data structures, program modules, or other data. Computer storage media are for storing computer-accessible information and 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 technologies, compact disc read-only memory (CD-ROM), digital multipurpose disc (DVD), or other optical storage devices, magnetic cartridge tapes, magnetic tapes, magnetic disks, or other magnetic storage devices, or any other non-portable media.

[0063] The computer instructions stored in the storage medium of the above embodiments cause the computer to execute the API interface labeling method described in any of the above embodiments, and have the beneficial effects of the corresponding method embodiments, but this specification will not repeat redundant explanations.

[0064] Based on the same inventive concept, and corresponding to the data processing method described in any of the embodiments described above, the present disclosure further provides a computer program product including computer program instructions. In some embodiments, the computer program instructions are executable by one or more processors of the computer to cause the computer and / or the processor to perform the API interface labeling method. Corresponding to the execution body corresponding to each step of each embodiment of the API interface labeling method, the processor that performs the corresponding step may belong to the corresponding execution body.

[0065] The computer program product of the above embodiment is used to cause the computer and / or the processor to execute the API interface labeling method described in any of the above embodiments, and has the beneficial effects of the corresponding method embodiment, but this specification avoids repeating explanations.

[0066] Those skilled in the art will know that embodiments of the present disclosure can be implemented as systems, methods, or computer program products. Accordingly, the present disclosure can be implemented specifically as complete hardware, complete software (including firmware, resident software, microcode, etc.), or a combination of hardware and software (collectively referred to herein as “circuits,” “modules,” or “systems”). Furthermore, in some embodiments, the present disclosure can also be implemented as computer program products on one or more computer-readable media containing computer-readable program code.

[0067] Any combination of one or more computer-readable media may be used. Computer-readable media may be computer-readable signal media or computer-readable storage media. Computer-readable storage media include, but are not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any combination thereof. More specific (non-exclusive) examples of computer-readable storage media include, for example, electrical connections with one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the above. In this specification, computer-readable storage media may be any tangible media containing or storing programs that can be used in combination with instruction execution systems, apparatus, or devices.

[0068] A computer-readable signal medium may include an information signal carrying computer-readable program code, propagated in the baseband or as part of a carrier. Such propagated information signals can take various forms and include, but are not limited to, electromagnetic signals, optical signals, or any suitable combination thereof. The computer-readable signal medium may be any computer-readable medium other than a computer-readable storage medium. The computer-readable signal medium can transmit, propagate, or transmit programs used by, or in combination with, instruction execution systems, apparatus, or devices.

[0069] Program code contained in a computer-readable medium can be transmitted using any suitable medium, which includes, but is not limited to, wireless, wire, fiber optic cable, RF, or any suitable combination thereof.

[0070] Computer program code for performing the operations disclosed herein may be written in one or more programming languages, or a combination thereof. These programming languages ​​include object-oriented programming languages ​​such as Java, Smalltalk, and C++, as well as traditional procedural programming languages ​​such as C or similar languages. The program code may run entirely on a user computer, partially on a user computer, as a standalone software package, partially on a user computer and partially on a remote computer, or entirely on a remote computer or server. Where a remote computer is involved, it may be connected to the user computer via any type of network, including a local area network (LAN) or wide area network (WAN), or it may be connected to an external computer (for example, via the Internet using an Internet service provider).

[0071] It should be understood that each block in a flowchart and / or block diagram, and any combination thereof, may be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby generating a device that produces a device that performs the functions / operations specified in the blocks of the flowchart and / or block diagram, which are executed by the computer or other programmable data processing device.

[0072] Furthermore, these computer program instructions can be stored in a computer-readable medium that enables a computer or other programmable data processing device to operate in a specific manner, thereby generating a product that includes an instruction device that performs the functions / operations specified in the blocks of a flowchart and / or block diagram.

[0073] Computer program instructions can also be loaded into a computer, another programmable data processing device, or another device to execute a series of operational steps on the computer, another programmable data processing device, or another device to generate a process performed by the computer, thereby enabling instructions executed on the computer or another programmable device to provide a process that performs the functions / operations specified in the blocks of a flowchart and / or block diagram.

[0074] Furthermore, although the operations of the methods of this disclosure are depicted in a specific order in the accompanying drawings, it is not required or implied that the operations must be performed in that specific order, or that all of the indicated operations must be performed to achieve the desired result. Rather, the steps depicted in the flowchart may be performed in a different order. Additionally or alternatively, certain steps may be omitted, multiple steps may be combined and performed as a single step, and / or a single step may be broken down and performed as multiple steps.

[0075] The flowcharts and block diagrams in the drawings illustrate the architectures, functions, and operations that can be realized according to the systems, methods, and computer program products in various embodiments of this disclosure. Here, each block in the flowchart or block diagram may represent a module, program segment, or portion of code containing at least one executable instruction for realizing a given logic function. Note that in some embodiments as a switch, the functions represented within a block may occur in a different order than shown in the drawings. For example, two blocks shown consecutively may actually be executed substantially in parallel, or in reverse order depending on the functions involved. Note that each block in the block diagram and / or flowchart, as well as combinations of blocks in the block diagram and / or flowchart, may be realized in a dedicated hardware-based system that performs a given function or operation, or in a combination of dedicated hardware and computer instructions.

[0076] While the detailed description above mentions several modules or units of the device for performing the operation, it should be noted that this distinction is not mandatory. In fact, according to embodiments of the present invention, the features and functions of two or more modules or units described above can be embodied by a single module or unit. Conversely, the features and functions of one module or unit described above may be further divided to be embodied by multiple modules or units.

[0077] Any discussion of the embodiments described above is merely illustrative and does not implicitly mean that the scope of this disclosure (including the claims) is limited to these examples. In the spirit of this disclosure, the technical features of the embodiments described above or different embodiments may be combined, and the procedures may be performed in any order. For the sake of brevity, various variations exist of the different aspects of the embodiments of this disclosure described herein. These points should be understood by those ordinary in the art.

[0078] Furthermore, in order to simplify the explanation and discussion and to avoid making the embodiments of this disclosure difficult to understand, well-known power / ground connections to integrated circuit (IC) chips and other components may or may not be shown in the accompanying drawings provided. In addition, to avoid making the embodiments of this disclosure difficult to understand, devices may be shown in the form of block diagrams. The details of the embodiments relating to the devices shown in these block diagrams take into account the fact that they are largely dependent on the platform on which the embodiments of this disclosure are carried out (i.e., these details should be within the understanding of those skilled in the art). Where certain details (e.g., circuits) are described to illustrate exemplary embodiments of this disclosure, it will be obvious to those skilled in the art that embodiments of this disclosure can be carried out without these specific details or with variations of these specific details. Accordingly, these descriptions should be considered illustrative rather than restrictive.

[0079] While this disclosure has been described in conjunction with specific embodiments thereof, many substitutions, modifications, and variations of these embodiments will be apparent to those skilled in the art based on the foregoing description. For example, other memory architectures (e.g., dynamic RAM (DRAM)) can be used with the embodiments discussed.

[0080] The embodiments of this disclosure are intended to cover all substitutions, modifications, and variations that fall within the broad scope of the appended claims. Accordingly, any omissions, modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the embodiments of this disclosure shall be covered by this disclosure.

Claims

1. A method for labeling API interfaces, To obtain API interface information in the access traffic data of the API interface, The API interface information is input to a target model trained based on first training data including first interface information and corresponding first function description information and / or first interface name information, and first information relating to the API interface information output by the target model is obtained, wherein the first information includes at least one of the API interface function description information and interface name information. Based on the first information, the following is performed: method.

2. Inputting the aforementioned API interface information into the target model and obtaining the first information relating to the aforementioned API interface information output by the target model is: The target model performs semantic analysis on the interface path and calling method within the API interface information to obtain a first analysis result, This includes determining the first information based on the first analysis results, The method according to claim 1.

3. Inputting the aforementioned API interface information into the target model and obtaining the first information relating to the aforementioned API interface information output by the target model is: The API interface information is aggregated and folded to obtain the folding parameters of the API interface information. In response to the determination that the API interface information includes the folding parameters, the target model performs semantic analysis on the interface path, the calling method, and the folding parameters to obtain a second analysis result. This includes determining the first information based on the first analysis result or the second analysis result, The method according to claim 2.

4. If the first analysis result has a first confidence level, the second analysis result has a second confidence level, and the first confidence level is less than the confidence threshold, Determining the first information based on the first analysis result or the second analysis result is In response to the determination that the second confidence level is equal to or greater than the confidence threshold, the second analysis result is determined to be the first information, or In response to the determination that the second confidence level is less than the confidence threshold and greater than or equal to the first confidence level, the second analysis result is determined to be the first information, or This includes determining the first analysis result as the first information in response to the determination that the first confidence level is greater than the second confidence level, The method according to claim 3.

5. Inputting the aforementioned API interface information into the target model and obtaining the first information relating to the aforementioned API interface information output by the target model is: In response to the determination that the API interface information also includes query parameters, the target model performs semantic analysis on the interface path, the calling method, the folding parameters, and the query parameters to obtain a third analysis result. This includes determining the first information based on the first analysis result, the second analysis result, or the third analysis result, The method according to claim 3.

6. If the first analysis result has a first confidence level, the second analysis result has a second confidence level, the third analysis result has a third confidence level, and the first and second confidence levels are less than the confidence threshold, Determining the first information based on the first analysis result, the second analysis result, or the third analysis result is: In response to the determination that the third confidence level is equal to or greater than the confidence threshold, the third analysis result is determined to be the first information, or In response to the determination that the third confidence level is less than the confidence threshold, the analysis result corresponding to the highest confidence level among the first confidence level, the second confidence level, or the third confidence level is determined as the first information, or The process includes determining the third analysis result as the first information in response to the determination that the third confidence level is less than the confidence threshold and that the third confidence level is equal to both the first and second confidence levels. The method according to claim 5.

7. The first information is corrected to obtain the second information, The API interface information and the second information are determined to be used as positive training samples, and the API interface information and the first information are determined to be used as negative training samples. The process further includes training the target model using the positive training sample and the negative training sample as second training data, thereby updating the target model. The method according to claim 1.

8. The first information is detected based on pre-set rules, The process further includes, in response to detecting that the first information contains target information relating to the pre-set rules, correcting the target information in the first information and updating the first information, The method according to claim 1.

9. A module for obtaining API interface information in API interface access traffic data, A model module for inputting the API interface information into a target model trained based on first training data including first training interface information and corresponding first function description information and / or first interface name information, and for obtaining first information relating to the API interface information output by the target model, wherein the first information is a model module including at least one of the API interface function description information and interface name information, A leveling module for labeling the API interface based on the first information, comprising, API interface leveling device.

10. The system comprises memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the computer program is executed by the processor, the method according to any one of claims 1 to 8 is realized. electronic equipment.

11. A computer instruction for causing a computer to perform the method according to any one of claims 1 to 8 is stored. A non-transient, computer-readable storage medium.

12. When executed on a computer, the computer program instructions include causing the computer to perform the method according to any one of claims 1 to 8. A computer program characterized by the following features.