Similar interface recommendation method, device, equipment, storage medium and program product
By sharding and text similarity processing of the interface collection, combined with code logic processing, the problem of low accuracy of traditional interface recommendation is solved, fast and accurate interface recommendation is achieved, and development efficiency is improved.
Patent Information
- Application Number
- CN202410857590.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-28
- Publication Date
- 2024-09-10
- Estimated Expiration
- 2044-06-28
AI Technical Summary
The traditional interface recommendation method relies on text matching and manual annotation by developers, which results in low accuracy of recommendation results, increases unnecessary interface development work, and reduces development efficiency.
By sharding the current interface collection and using the text similarity algorithm for similarity processing, similar interface sets are determined and code logic is processed on them to obtain recommended similar interfaces and implement multiple similarity screening.
Quickly and accurately obtain the most similar interface to the interface to be matched, reducing unnecessary interface development work and improving development efficiency.
Smart Images

Figure CN118394334B
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a similar interface recommendation method, device, equipment, storage medium and program product. Background Art
[0002] As software projects continue to grow and become more complex, developers are faced with the need to reuse interfaces in existing code bases to improve development efficiency when implementing new features. For example, before a developer wants to develop an API (Application Programming Interface) to implement a certain function, they usually search the interface management platform with keywords through text matching, and then manually mark the interface descriptions one by one to see if they meet the existing development requirements. If they do, it is recommended to reuse the interface, otherwise, redevelopment is considered.
[0003] However, traditional interface recommendation methods generally rely on text matching and manual annotation by developers, which often cannot accurately understand the structure and semantics of the code, resulting in low accuracy and relevance of the recommendation results. Redevelopment is also required, which increases unnecessary interface development work and reduces development efficiency.
[0004] The above contents are only used to assist in understanding the technical solution of the present application and do not constitute an admission that the above contents are prior art. Summary of the invention
[0005] The main purpose of this application is to provide a similar interface recommendation method, device, equipment, storage medium and program product, aiming to solve the technical problem that the traditional interface recommendation method relies on text matching and manual annotation by developers, resulting in low accuracy of recommendation results, increasing unnecessary interface development work, and thus reducing development efficiency.
[0006] To achieve the above objectives, the present application proposes a similar interface recommendation method, the method comprising:
[0007] Performing sharding processing on the current interface set to obtain multiple sharding tasks of the current interface set;
[0008] Performing similarity processing on the current interface set according to the multiple sharding tasks by using a text similarity algorithm to obtain a similarity result of an interface pair corresponding to the interface to be matched;
[0009] Determine a similar interface set corresponding to the interface to be matched according to the interface pair similarity result;
[0010] Code logic processing is performed on the similar interface set to obtain a recommended similar interface in the current interface set that corresponds to the interface to be matched.
[0011] In one embodiment, the step of performing sharding processing on the current interface set to obtain multiple sharding tasks of the current interface set includes:
[0012] Get the system ID, application ID and interface protocol ID of each interface in the current interface set;
[0013] Based on the system ID, the application ID and the interface protocol ID, the current interface set is classified and aggregated according to a preset coding calculation rule to obtain a classification code;
[0014] The current interface set is distributedly coordinated according to the classification code through a distributed scheduling platform to obtain a plurality of sharding tasks corresponding to the current interface set.
[0015] In one embodiment, the step of performing similarity processing on the current interface set according to the multiple sharding tasks by using a text similarity algorithm to obtain similarity results of interface pairs corresponding to the interfaces to be matched includes:
[0016] Construct a JSON string of each interface according to the interface name and input and output parameters of each interface in the current interface set;
[0017] Performing single-thread processing on the current interface set according to the multiple sharding tasks;
[0018] Based on the JSON string, similarity processing is performed on the current interface set in a single-threaded processing process using a text similarity algorithm to obtain interface pair similarity results between each interface and the interface to be matched.
[0019] In one embodiment, the step of determining the similar interface set corresponding to the interface to be matched according to the interface pair similarity result includes:
[0020] Traversing the text similarity of each JSON string in the similarity result;
[0021] Determining whether the text similarity meets a preset similarity condition;
[0022] If the text similarity reaches the preset similarity condition, the interface corresponding to the preset similarity condition is used as the similar interface set corresponding to the interface to be matched.
[0023] In one embodiment, the step of performing code logic processing on the similar interface set to obtain a recommended similar interface in the current interface set corresponding to the interface to be matched includes:
[0024] Extracting a method call node of each interface in the similar interface set, wherein the method call node includes an interface attribute type, a target end attribute, and an attribute signature;
[0025] Convert the interface attribute type, the target end attribute and the attribute signature into a JSON array structure;
[0026] Based on the JSON array structure, determine the interface call logic text of the interface static call chain in the similar interface set;
[0027] The similar interface set is subjected to code logic processing according to the interface call logic text to obtain a recommended similar interface in the similar interface set corresponding to the interface to be matched.
[0028] In one embodiment, before the step of sharding the current interface set to obtain a plurality of sharding tasks for the current interface set, the method further comprises:
[0029] Extracting stock interfaces, and performing data preprocessing on the stock interfaces to obtain preprocessed interface data, wherein the preprocessed interface data includes interface semantics, interface name, interface parameters, and interface comments;
[0030] Performing vector integration on the interface semantics, the interface name, the interface parameters and the interface annotation to obtain interface vector features;
[0031] Inputting the interface vector features into a neural network model for training to obtain a vector similarity calculation model;
[0032] The current interface set is input into the vector similarity calculation model to obtain a recommended similar interface in the current interface set corresponding to the interface to be matched.
[0033] In addition, to achieve the above purpose, the present application also proposes a similar interface recommendation device, the device comprising:
[0034] A sharding processing module, used to perform sharding processing on the current interface set to obtain multiple sharding tasks of the current interface set;
[0035] A text similarity module, used to perform similarity processing on the current interface set according to the multiple sharding tasks through a text similarity algorithm to obtain a similarity result of an interface pair corresponding to the interface to be matched;
[0036] A similar interface set module, used to determine a similar interface set corresponding to the interface to be matched according to the interface pair similarity result;
[0037] The logic processing module is used to perform code logic processing on the similar interface set to obtain a recommended similar interface in the current interface set corresponding to the interface to be matched.
[0038] In addition, to achieve the above-mentioned purpose, the present application also proposes a similar interface recommendation device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, and the computer program is configured to implement the steps of the similar interface recommendation method described above.
[0039] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, which is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the similar interface recommendation method described above are implemented.
[0040] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the steps of the similar interface recommendation method described above are implemented.
[0041] One or more technical solutions proposed in this application have at least the following technical effects: this application first performs sharding processing on the current interface set to obtain multiple sharding tasks of the current interface set; then performs similarity processing on the current interface set according to the multiple sharding tasks through a text similarity algorithm to obtain interface pair similarity results corresponding to the interface to be matched; then determines the similar interface set corresponding to the interface to be matched based on the interface pair similarity results; finally, performs code logic processing on the similar interface set to obtain the recommended similar interface corresponding to the interface to be matched in the current interface set. Since this application first performs similarity processing on multiple sharding tasks of the current interface set and then performs code logic processing, through multiple similarity screening, the interface that is most similar to the interface to be matched can be quickly and accurately obtained, thereby reducing unnecessary interface development work and improving development efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0043] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0044] Figure 1 A flowchart of the first embodiment of the method for recommending a similar interface of the present application is provided;
[0045] Figure 2 A schematic diagram of the overall design process provided for Example 1 of the present application;
[0046] Figure 3 A flowchart diagram of the second embodiment of the method for recommending a similar interface of the present application;
[0047] Figure 4 A flowchart of the third embodiment of the method for recommending a similar interface of the present application is provided;
[0048] Figure 5 A schematic diagram of the call logic extraction process provided in Example 3 of the present application;
[0049] Figure 6 This is a schematic diagram of the module structure of a similar interface recommendation device according to an embodiment of the present application;
[0050] Figure 7 This is a schematic diagram of the device structure of the hardware operating environment involved in the similar interface recommendation method in the embodiment of the present application.
[0051] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0052] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.
[0053] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.
[0054] The existing similar interface search technology, whether it is keyword search based on text matching or manual annotation and identification by developers, has some shortcomings and deficiencies.
[0055] 1. Limitations of surface matching: Text matching methods are usually based on keyword searches, which may miss relevant interfaces due to synonyms or subtle differences in context. Text matching makes it difficult to understand the true intent and context of the code, and may recommend interfaces that are irrelevant to actual needs.
[0056] 2. Dependence on manual labeling: Methods that rely on manual labeling are limited by the professional level and subjective judgment of the annotators, which may introduce bias. Manual labeling is a time-consuming and costly process, and it is difficult to cover a large and constantly updated code base.
[0057] 3. Difficulty in updating and maintenance: With the development of technology and the continuous updating of code bases, maintaining and updating tag libraries requires continuous manpower investment. For emerging technologies and frameworks, text matching and manual annotation methods may be difficult to adapt quickly.
[0058] In summary, although the traditional similar interface search technology is simple, it has limitations in accuracy and performance. In order to solve the above problems, this application provides a solution that supports multi-protocol interfaces, including protocols HTTP / HTTPS / DUBBO / KAFKA / WEB SOCKECT, and supports interface protocols and code similarity matching to a certain extent. This solution can automatically classify and aggregate a large number of interfaces within the company based on dimensions such as system and protocol type, and then perform multiple similarity calculations and screening to obtain the most similar interface pairs for each interface, automatically generate similar interface reports regularly, and reconstruct and optimize the system interface after manual confirmation, thereby improving the reusability of the interface and controlling the disorderly growth of the interface.
[0059] It should be noted that the execution subject of this embodiment can be a computing service device with sharding processing, similarity processing and code logic processing functions, such as a personal computer, server, etc., or an electronic device capable of realizing the above functions, a similar interface recommendation device that executes the similar interface recommendation method of this application, etc., and this embodiment does not limit this. The following takes a similar interface recommendation device (referred to as the recommendation device) as an example to illustrate this embodiment and the following embodiments.
[0060] Based on this, the present application embodiment provides a similar interface recommendation method, referring to Figure 1 , Figure 1 A flowchart of the first embodiment of the similar interface recommendation method of the present application is provided.
[0061] In this embodiment, the similar interface recommendation method includes steps S10 to S40:
[0062] Step S10: Slice the current interface set to obtain multiple slice tasks of the current interface set.
[0063] It should be noted that the current interface set is a set of interfaces that are currently available for call or use in the existing code base during software development. An interface is a way for a system or software to provide access and interaction to external users or other systems. The current interface set may include various interfaces, such as network interfaces, API interfaces, user interfaces, etc., which are not limited in this embodiment.
[0064] It should be understood that the sharding tasks are multiple tasks obtained by classifying and processing the current interface set. By dividing the large task of the current interface set into multiple small sharding tasks and processing them in parallel on different servers, the processing capacity and efficiency of the recommendation device can be improved.
[0065] It is understandable that the specific implementation of the sharding process can be classified by interface category, for example, the current interface set can be divided into multiple categories of sharding tasks according to different functions of the interface, and then the multiple categories of sharding tasks are processed in parallel to improve the processing efficiency of the recommended device. Sharding can also be performed by interface ID, which is not limited in this embodiment.
[0066] Step S20: performing similarity processing on the current interface set according to the multiple sharding tasks by using a text similarity algorithm to obtain interface pair similarity results corresponding to the interfaces to be matched.
[0067] It should be noted that the text similarity algorithm is an algorithm used to measure the similarity between two texts of an interface, such as word vectorization algorithm, cosine similarity algorithm, Summer edit distance method, word form and word order combination method, Gregor edit distance algorithm, standard edit distance algorithm, etc. By comparing the contents of two texts of an interface, the correlation or similarity between the interfaces can be found.
[0068] It is understandable that the interface similarity result is obtained by measuring the similarity between two text segments of the interface through a text similarity algorithm. The result can be displayed based on the similarity percentage or based on the JOSN (JavaScript Object Notation) string composed of the interface name. This embodiment does not limit this.
[0069] Step S30: Determine a similar interface set corresponding to the interface to be matched according to the interface pair similarity result.
[0070] It should be noted that the similar interface set is a set of multiple interfaces in the current interface set that are most similar to the interface to be matched. This process can be determined based on the similarity ranking, for example, taking the top ranked interfaces as the similar interface set. It can also be determined based on other methods, which are not limited in this embodiment.
[0071] Step S40: performing code logic processing on the similar interface set to obtain a recommended similar interface in the current interface set corresponding to the interface to be matched.
[0072] It should be noted that the recommended similar interface is the interface in the current interface set that best matches the interface to be matched in terms of text similarity and code similarity.
[0073] It is understandable that the specific process of code logic processing can be logically matched according to the actual code of each interface; or a service call chain can be constructed to represent the code logic of the interface, and then similarity calculation can be performed; this embodiment does not limit this.
[0074] Furthermore, after determining the recommended similar interfaces corresponding to the interface to be matched, similar interface optimization reports can be generated according to different dimensions. For example, the classification of the system can be used as the classification basis, such as the approval system, collection system, etc. The approval system includes the main approval process, approval standard layer, approval business gateway, etc., and each system contains many API interfaces. Therefore, similar interface optimization reports can be generated according to different system dimensions as the classification basis.
[0075] For ease of understanding, refer to Figure 2 , Figure 2 The schematic diagram of the overall design process provided for the first embodiment of the present application. The basic logic of the similar interface recommendation method is: first classify the interfaces, then calculate the text similarity, then calculate the code similarity, and finally output a similar interface optimization report to determine the interface closest to the interface to be matched. Through the above method, similar interfaces can be discovered in a timely manner, thereby improving development efficiency, reducing unnecessary interface development work, shortening the development cycle, and speeding up the launch of new software development functions. It is very important for teams pursuing agile development and rapid iteration.
[0076] This embodiment provides a similar interface recommendation method, first of all, the current interface set is sliced, the large task of the current interface set is divided into multiple small slice tasks, and the tasks are processed in parallel on different servers, which can improve the processing capacity and efficiency of the recommendation device. Then, the text similarity algorithm is used to measure the similarity between the two texts of the interface in the current interface set according to the multiple slice tasks. By comparing the contents of the two texts of the interface, the correlation or similarity between the interfaces can be found, and the similarity results of the interface pairs corresponding to the interface to be matched are obtained. Then, the top-ranked interfaces are taken as the similar interface set. Finally, the actual code of the similar interface set is logically matched to obtain the recommended similar interface in the current interface set that is most consistent with the interface to be matched in terms of text similarity and code similarity. Since this embodiment first performs similarity processing on multiple slice tasks of the current interface set, and then performs code logic processing, the interface that is most similar to the interface to be matched can be quickly and accurately obtained through multiple similarity screening, thereby reducing unnecessary interface development work and improving development efficiency.
[0077] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar contents as those in the above-mentioned embodiment 1 can be referred to the above introduction, and will not be repeated in the following. Figure 3 , Figure 3 A flow chart of the second embodiment of the similar interface recommendation method of the present application is provided.
[0078] In this example, step S10 includes steps S11 to S13:
[0079] Step S11: Obtain the system ID, application ID and interface protocol ID of each interface in the current interface set.
[0080] It should be noted that the system ID is a unique identifier used to identify different systems. The system also has an interface, so the unique identifier can also be used to represent the ID of the system where the interface is located. The system ID can be a number, string, or other type of identifier, which is used to identify systems when exchanging information and transmitting data between systems.
[0081] It is understandable that the Application ID is used to identify a specific application, usually used to distinguish different applications or functional modules in the same system. The Interface Protocol ID is a unique identifier used to define and identify the interface communication protocol. In system integration and interface development, different interfaces may use different communication protocols, such as HTTP, REST, SOAP, etc. The Interface Protocol ID can be used to clearly specify the communication protocol used by the interface to ensure that both communicating parties can parse and process the interface communication data normally.
[0082] Therefore, different interfaces can be accurately represented through the gradually progressive IDs of the system ID, application ID, and interface protocol ID, ensuring the classification of each interface in the current interface set.
[0083] Step S12: Based on the system ID, the application ID and the interface protocol ID, the current interface set is classified and aggregated according to a preset coding calculation rule to obtain a classification code.
[0084] It should be noted that the preset coding calculation rule is a rule for classification aggregation that is pre-set in the recommended device. Specifically, the classification coding calculation formula is as follows: system ID * 10000 + application ID * 10 + interface protocol ID, so as to obtain the classification code, where the system ID is a four-digit positive integer, the application ID is a three-digit integer or letter, and the characters will be converted into ASCII code before processing, and the interface protocol IDs are HTTP, DUBBO, KAFKA, and WEBSCOCKET respectively.
[0085] Step S13: Distributed coordination is performed on the current interface set according to the classification code through a distributed scheduling platform to obtain a plurality of sharding tasks corresponding to the current interface set.
[0086] It should be noted that the distributed scheduling platform is a distributed scheduling tool, which is specially designed to solve the problem of high concurrency and large data volume job scheduling. The distributed scheduling platform can perform distributed coordination based on Zookeeper to ensure the consistency of task configuration and the correctness of task execution. Focusing on lightweight stateless tasks, Zookeeper can be used to record the status and sharding strategy of the interface to achieve distributed execution of the interface. By evenly distributing the shards of the job among multiple interfaces, tasks can be processed in parallel on different servers, thereby improving processing speed and efficiency.
[0087] In distributed computing and scheduling of distributed scheduling platforms, sharding is a data partitioning technology used to split a large task or data set into multiple small parts, which can be processed in parallel on different servers or nodes. Sharding is to improve the processing power and efficiency of the recommended device, and also help balance the load in a multi-node environment.
[0088] For example, to process 1 million interfaces, 10 application instances are used for processing. Assuming that the interface IDs are numbered from 1 to 1 million, the task can be divided into 10 shards. Shard N corresponds to processing cases where the remainder of the interface ID divided by 10 is N. Each application instance is responsible for processing a shard task according to load balancing. In this way, a large task can be divided into N small tasks and assigned to different nodes for processing to improve efficiency.
[0089] In this implementation, sharding processing can be triggered regularly through a distributed scheduling platform. First, interface classification and aggregation are performed, all interfaces in the current interface set are traversed, and a classification code is calculated for all interfaces. Then, the sharding processing task can be triggered regularly by a distributed scheduling platform customized based on the elsticJob framework, and the sharding is executed according to the classification code, which makes full use of the resources of multiple application instances and improves the availability of the system. If the sharding task fails, it can be retried. By classifying the interface first and then calculating the sharding scheduling, and recording the flow, the resources of multiple instances can be fully utilized, and repeated processing and omission processing can also be achieved.
[0090] In a feasible implementation, step S20 of this embodiment may include the steps of: constructing a JSON string for each interface according to the interface name and input and output parameters of each interface in the current interface set; performing single-threaded processing on the current interface set according to the multiple sharding tasks; based on the JSON string, performing similarity processing on the current interface set during single-threaded processing by a text similarity algorithm to obtain interface pair similarity results between each interface and the interface to be matched.
[0091] It should be noted that the interface name is the name of the interface, which is used to clearly describe the function and purpose of the interface.
[0092] It can be understood that the input and output parameters consist of input parameters (input parameters) and output parameters (output parameters) in the interface definition. Input parameters are the data or parameters passed into the interface when calling the interface, which are used for the execution of the interface; output parameters are the result data or parameters returned to the caller after the interface is executed.
[0093] It should be understood that the JSON string is a string that is constructed by the interface name and input and output parameters and conforms to the JSON format, which can easily transmit and parse interface-related information.
[0094] Specifically, during single-thread processing, each interface pair calculation is processed by a separate thread in the thread pool, and the same interface pair is not calculated repeatedly.
[0095] Exemplarily, the text similarity algorithm can be selected from four text similarity calculation algorithms: Xia Tian edit distance method, word form and word order combination method, Gregor edit distance algorithm, and standard edit distance algorithm. Generally speaking, the text structure of the interface protocol represented by the JSON string can be: {"name": "interface name", "input": "json structure of input parameters", "output": "json structure of output parameters"}, where the parameter is of object type, and multiple attributes can be sorted alphabetically according to the attribute name. According to the provided JSON string, it can be calculated according to the standard edit distance algorithm, which can be used to measure the similarity between two strings. It can be defined as the minimum number of editing operations required to convert one string into another string. The editing operation includes inserting, deleting, and replacing characters. The time complexity of the algorithm is O (m*n), where m and n are the lengths of the two strings respectively. This performance overhead depends largely on the length of the interface protocol. At this time, some optimization and improvement can be made. Since when filling the matrix, the value of the current cell needs to know the values of the previous row and the current row, the two-dimensional matrix can be compressed into two one-dimensional arrays, representing the current row and the previous row respectively. In this way, the time complexity can be reduced from O (M*N) to O (2*n). By using two one-dimensional arrays instead of two-dimensional arrays to compress the matrix, the space complexity is reduced, and unnecessary calculations are also reduced. For example, if the length difference between two strings is more than 20%, then there is no need to calculate and it is directly abandoned. This further reduces the similarity calculation process of the text similarity algorithm to improve the efficiency of similarity calculation.
[0096] For example, interface A extracts the JSON string consisting of the interface name and input and output parameters: {"name":"Query user information based on mobile phone number","input":"phone","output":"{"username":"zhangsan","phone":"11111112222","email":"1099999@qq.com"}"}.
[0097] Interface B extracts the JSON string consisting of the interface name and input and output parameters: {"name":"Query customer information based on mobile phone number","input":"phone","output":"{"username":"zhangsan","phone":"11111112222","email":"1099999@qq.com"}"}.
[0098] The similarity score between interface A and interface B is the result of the standard edit distance algorithm calculation of the two texts, which is in the score range of 0-1.
[0099] In this embodiment, the recommendation device can load the current interface set of the classification code to be processed from the database, traverse the current interface set, and construct the JSON string of each interface according to the interface name and input and output parameters of each interface in the current interface set; and perform single-threaded processing; then based on the JSON string, similarity processing is performed through the above-mentioned standard edit distance algorithm to obtain the interface pair similarity results between each interface and the interface to be matched. Therefore, text similarity calculation can be performed quickly and accurately based on the JSON string.
[0100] In another feasible implementation, step S30 of this embodiment may include the steps of: traversing the text similarity of each JSON string in the similarity result; determining whether the text similarity meets a preset similarity condition; if the text similarity meets the preset similarity condition, then using the interface corresponding to the preset similarity condition as the similar interface set corresponding to the interface to be matched.
[0101] It should be noted that text similarity is the degree of similarity in content between two JSON strings. Text similarity calculation can help developers quickly compare and identify differences between JSON strings.
[0102] It is understandable that the preset similarity condition is a condition preset in the recommendation device for determining a similar interface set. For example, the 10 most similar interfaces are retained as a similar interface set; or the interfaces that account for 80% of the least similar interfaces are excluded, and the remaining interfaces are used as a similar interface set; this embodiment does not limit this.
[0103] In this embodiment, for each interface in the current interface set, the text similarity between the interface name and the text composed of the input and output parameters can be calculated in pairs with other interfaces under the corresponding classification, and the 10 most similar interfaces are retained. In the calculation process, the interfaces are calculated in pairs, and the two interface sets used for comparing and calculating similarity are called interface pairs. For example, if you want to find the 10 most similar interfaces among 100 interfaces, you need to calculate the similarity between interface A and the other 100 interfaces respectively, record the 10 scores and interfaces with the highest similarity scores, and traverse the calculation process. If the similarity score of this interface pair is higher than the 10th similarity score, it is replaced, otherwise it is directly discarded and the next one is processed. Finally, the 10 interfaces with the highest similarity scores are obtained as a similar interface set to reduce the data of subsequent code logic processing and improve the efficiency of code logic processing.
[0104] The sharding process of this embodiment can be triggered regularly by the distributed scheduling platform. First, interface classification aggregation is performed, all interfaces of the current interface set are traversed, and the classification code is calculated for all interfaces. Then the sharding processing task can be triggered regularly by the distributed scheduling platform customized based on the elsticJob framework, and the sharding is performed according to the classification code, which makes full use of the resources of multiple application instances and improves the availability of the system. If the sharding task fails, it can be retried. By classifying the interface first and then sharding the scheduling calculation, and recording the flow, it can not only make full use of the resources of multiple instances, but also repeat and omit processing. Furthermore, the recommendation device can load the current interface set of classification codes to be processed from the database, traverse the current interface set, and construct the JSON string of each interface according to the interface name and input and output parameters of each interface in the current interface set; and perform single-threaded processing; then based on the JSON string, similarity processing is performed through the above-mentioned standard edit distance algorithm to obtain the interface pair similarity results between each interface and the interface to be matched. Thereby, text similarity calculation can be performed quickly and accurately based on the JSON string. Furthermore, for each interface in the current interface set, the text similarity between the interface name and the text composed of the input and output parameters can be calculated in pairs with other interfaces in the corresponding category, and the 10 most similar interfaces are retained. In the calculation process, the interfaces are calculated in pairs, and the two interface sets used for comparison and calculation of similarity are called interface pairs. For example, to find the 10 most similar interfaces among 100 interfaces, it is necessary to calculate the similarity between interface A and the other 100 interfaces respectively, and record the 10 scores and interfaces with the highest similarity scores. During the traversal calculation process, if the similarity score of this interface pair is higher than the 10th similarity score, it is replaced, otherwise it is directly discarded and the next one is processed. Finally, the 10 interfaces with the highest similarity scores are obtained as a similar interface set to reduce the data of subsequent code logic processing and improve the efficiency of code logic processing.
[0105] Based on the first and second embodiments of the present application, in the third embodiment of the present application, the same or similar contents as those of the first and second embodiments can be referred to the above description, and will not be described in detail later. Figure 4 , Figure 4 This is a flow chart of the third embodiment of the similar interface recommendation method of this application.
[0106] In this example, step S40 includes steps S41 to S44:
[0107] Step S41: extracting the method call node of each interface in the similar interface set, wherein the method call node includes the interface attribute type, the target end attribute and the attribute signature.
[0108] It should be noted that a method call node is a code location or logic node that calls an interface in a program or system. In software development, an interface usually defines a set of operations or functions, and a method call node indicates the specific place in the code where the interface is called.
[0109] In addition, it should be noted that the interface attribute type is the data type or property of the attribute defined in the interface. In interface design, attributes usually include various data types, such as strings, numbers, Boolean values, etc., and may also include complex data types such as objects, arrays, and enumerations. The interface attribute type defines the data format and value range of the attribute.
[0110] Target attributes are attribute information that the receiver or target needs to process in interface communication. In the interface protocol, the format and content of data exchange are usually specified. The sender will send the data to the target in the specified format. The target parses the received data according to the protocol and extracts the target attributes for subsequent processing. Target attributes include information such as the received data content, attribute type, and attribute value.
[0111] Attribute signature is a unique identifier or signature information used to identify and verify interface attributes. Attribute signature is usually a value generated by hashing, encrypting or signing the interface attributes to ensure the integrity and security of the interface attributes. Interface attribute signature can prevent security issues such as data tampering and forgery, and ensure the security and reliability of interface communication.
[0112] Step S42: Convert the interface attribute type, the target end attribute and the attribute signature into a JSON array structure.
[0113] It should be noted that the JSON array structure is a data structure that uses arrays in the JSON (JavaScript Object Notation) format. JSON is a lightweight data exchange format that is often used for data exchange between the front-end and the back-end. The JSON array structure is a common data structure in JSON that is used to store multiple data items and arrange them in a specific order.
[0114] Step S43: Based on the JSON array structure, determine the interface call logic text of the interface static call chain in the similar interface set.
[0115] It should be noted that the interface call logic text of the interface static call chain is a text that describes the call relationship and call logic between interfaces. In software development, a system is usually composed of multiple interfaces, and there will be various complex associations and call logics between these interfaces. The interface static call chain is the interface call relationship that has been determined at compile time, and the interface call logic text is a text description of this relationship.
[0116] Step S44: performing code logic processing on the similar interface set according to the interface call logic text, and obtaining a recommended similar interface in the similar interface set corresponding to the interface to be matched.
[0117] In this embodiment, after all the 10 most similar interface tasks of calculating the interface based on text similarity are completed, the code similarity of the above interface pairs is calculated. Considering that the code logic includes a lot of irrelevant edge information and inconsistent variable names, a service call chain can be constructed to represent the code logic of the interface, and then the code complexity is calculated one by one, and finally the interface with the most similar interface protocol and code logic is obtained, thereby improving the efficiency of code logic processing.
[0118] For easier understanding, please refer to Figure 5 , Figure 5A schematic diagram of the call logic extraction process provided for the third embodiment of the present application. Since the code logic of the interface is more composed of various microservice calls in the middle platform microservice, it is possible to select the method call logic in the interface to represent the code logic to analyze the similarity of the code logic. First, the company's internal git code base can be traversed, and for each independently deployed program application, the code base and the code base of the dependent module are synchronously pulled to the local. The dependent module can be parsed from the pom file of the application, because the source code needs to be loaded to build the code syntax tree. Then you can get the list of code bases that need to be pulled, then download the code, and perform a series of optimization processes on it (including deleting duplicate classes, loading all classes, loading internal classes, loading public classes, loading configuration files, etc.); since the master branch is used uniformly for scanning and processing, the optimization of code base download is mainly achieved by using shallow clones, downloading only the most recently submitted codes, and not requiring the entire warehouse history; at the same time, multiple warehouse clones are processed in parallel, and the configuration of git is also adjusted to increase the number of concurrent connections and compression levels. Then, different types of interfaces are parsed according to the framework annotations, and the method body is traversed using a custom AST traverser to extract method call nodes. The method call nodes can be composed of the storage interface attribute type, target end attributes, and attribute signatures. The interface static call chain is obtained by querying the interface attribute signature of the API interface, and the method call set JSON strings corresponding to all interfaces involved in the call chain are combined into a JSON array structure. This is the text that ultimately represents the interface call logic. Finally, after extracting the call logic of each interface method, the text similarity algorithm is used to recalculate the interface pairs with very similar interface protocols, and finally the interface pairs with very similar interface protocols and interface logic can be obtained.
[0119] In a feasible implementation manner, before step S10 of this embodiment, the method may further include the steps of: extracting existing interfaces, and performing data preprocessing on the existing interfaces to obtain preprocessed interface data, wherein the preprocessed interface data includes interface semantics, interface name, interface parameters and interface annotations; performing vector integration on the interface semantics, the interface name, the interface parameters and the interface annotations to obtain interface vector features; inputting the interface vector features into a neural network model for training to obtain a vector similarity calculation model; inputting the current interface set into the vector similarity calculation model to obtain recommended similar interfaces in the current interface set corresponding to the interface to be matched.
[0120] It should be noted that stock interfaces are interfaces that already exist and are widely used in actual operation. These interfaces are usually defined and implemented in the early stages of system development and are used for data exchange, business processing or communication between different modules.
[0121] It can be understood that interface semantics is the meaning and role of the interface, that is, the functions and services provided by the interface. Through interface semantics, we can clearly understand the purpose and usage of the interface and ensure that the interface design meets the system requirements and overall architecture.
[0122] The interface name is the name of the interface, which is used to identify the identity and role of the interface in the system. The interface parameters are the data and information passed in or out when the interface is defined. The interface parameters include input parameters and output parameters, which are used to implement the data transmission and exchange of the interface function. The interface comment is a text description that explains and explains the interface in the code. The interface comment usually includes the basic information of the interface, parameter description, return value description, exception handling, etc.
[0123] It should be understood that the interface vector feature is a feature that converts interface text information into a vector representation.
[0124] It should be noted that the neural network model is a mathematical model that imitates the structure and function of biological neural networks and is used for machine learning. The neural network model consists of multiple neurons (nodes), which are interconnected through connections (weights) to form a complex network structure. The neural network model is used to capture and learn the complex relationship between vectors in order to better measure the similarity between them, and finally build a vector similarity calculation model to calculate the similarity between two interface vector features, thereby providing more accurate similarity calculation results.
[0125] In this embodiment, the recommendation device can extract all existing interfaces for data preprocessing, including text cleaning and semantic processing, and then try to integrate the semantics, interface names, parameters, and annotations into vector features, train the vector similarity calculation model, and cooperate with human participation in training enhancement to calculate the similarity between the vector features of two interfaces, thereby providing more accurate similarity calculation results.
[0126] Exemplarily, in order to help understand the implementation process of the similar interface recommendation method obtained by combining the above-mentioned embodiment 1 and embodiment 2 in this embodiment. In the process of software development, enterprises generally face the problems of code duplication and interface redundancy. The number of application program interfaces (APIs) has increased dramatically. When developers develop new functions, they often lack knowledge of existing interfaces, resulting in the development of a large number of similar or repeated interfaces, which not only increases the complexity of the system, but also reduces development efficiency and increases maintenance costs. In order to solve this problem, through the above-mentioned embodiments, the code base of all services within the enterprise can be analyzed first, and the structural features of the interface can be extracted using code syntax tree parsing technology, so that similar interfaces can be automatically identified and recommended to developers for reuse or integration. After the recommendation device system is implemented, it can be integrated with the existing continuous integration or continuous deployment (CI / CD) process of the enterprise to achieve automated interface recommendation. When a developer submits a new interface development request, the system will automatically check and recommend existing similar interfaces, including detailed information such as the interface function description, input and output parameters, etc. The developer can decide whether to reuse the existing interface or continue to develop a new interface based on this information. This can greatly improve development efficiency, reduce code duplication, and improve code quality. Developers can focus more on creating new features instead of wasting time on repetitive work. At the same time, it also promotes knowledge sharing and team collaboration. New members can quickly learn about the existing interface resources and business logic within the company through the system, accelerating their familiarity with the environment. In addition, over time, through the continuous collection of developer feedback and the self-learning of the system, the accuracy and coverage of similar interface recommended devices continue to improve, which can further enhance the flexibility and responsiveness of enterprise software development, and better support the rapid development of business and adaptation to market changes.
[0127] After all the 10 most similar interface tasks of the interface based on text similarity calculation have been completed, this embodiment starts to calculate the code similarity of the above interface pairs. Taking into account that the code logic includes a lot of insignificant edge information and inconsistent variable names, it is possible to build a service call chain to represent the code logic of the interface, and then calculate the code complexity one by one, and finally obtain the interface with the most similar interface protocol and code logic, thereby improving the efficiency of code logic processing. Furthermore, it is recommended that the device can extract all existing interfaces for data preprocessing, including text cleaning and semantic processing, and then try to integrate semantics, interface names, parameters, and annotations into vector features, train the vector similarity calculation model, and cooperate with manual participation in training enhancement to calculate the similarity between the vector features of two interfaces, thereby providing more accurate similarity calculation results.
[0128] It should be noted that the above examples are only used to understand the present application and do not constitute a limitation on the similar interface recommendation method of the present application. More simple transformations based on this technical concept are all within the protection scope of the present application.
[0129] This application also provides a similar interface recommendation device, please refer to Figure 6 , Figure 6 This is a schematic diagram of the module structure of the similar interface recommendation device according to an embodiment of the present application; the similar interface recommendation device comprises:
[0130] A sharding processing module 601 is used to perform sharding processing on the current interface set to obtain multiple sharding tasks of the current interface set;
[0131] A text similarity module 602 is used to perform similarity processing on the current interface set according to the multiple sharding tasks through a text similarity algorithm to obtain a similarity result of an interface pair corresponding to the interface to be matched;
[0132] A similar interface set module 603 is used to determine a similar interface set corresponding to the interface to be matched according to the interface pair similarity result;
[0133] The logic processing module 604 is used to perform code logic processing on the similar interface set to obtain a recommended similar interface in the current interface set corresponding to the interface to be matched.
[0134] The similar interface recommendation device provided by the present application adopts the similar interface recommendation method in the above embodiment, which can solve the technical problem that the traditional interface recommendation method relies on text matching and manual annotation by developers, resulting in low accuracy of recommendation results, adding unnecessary interface development work, and thus reducing development efficiency. Compared with the prior art, the beneficial effects of the similar interface recommendation device provided by the present application are the same as the beneficial effects of the similar interface recommendation method provided by the above embodiment, and the other technical features in the similar interface recommendation device are the same as the features disclosed in the above embodiment method, which will not be repeated here.
[0135] The present application provides a similar interface recommendation device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the similar interface recommendation method in the above-mentioned embodiment one.
[0136] Reference below Figure 7 , Figure 7The schematic diagram of the device structure of the hardware operating environment involved in the similar interface recommendation method in the embodiment of the present application shows a schematic diagram of the structure of the similar interface recommendation device suitable for implementing the embodiment of the present application. The similar interface recommendation device in the embodiment of the present application may include but is not limited to mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 7 The similar interface recommended device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0137] like Figure 7 As shown, the similar interface recommendation device may include a processing device 1001 (such as a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. In RAM1004, various programs and data required for the operation of the similar interface recommendation device are also stored. The processing device 1001, ROM1002 and RAM1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the similar interface recommendation device to communicate with other devices wirelessly or by wire to exchange data. Although the similar interface recommendation device with various systems is shown in the figure, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems can be implemented or have alternatively.
[0138] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.
[0139] The similar interface recommendation device provided by the present application adopts the similar interface recommendation method in the above embodiment, which can solve the technical problem that the traditional interface recommendation method relies on text matching and manual annotation by developers, resulting in low accuracy of recommendation results, adding unnecessary interface development work, and thus reducing development efficiency. Compared with the prior art, the beneficial effects of the similar interface recommendation device provided by the present application are the same as the beneficial effects of the similar interface recommendation method provided by the above embodiment, and the other technical features in the similar interface recommendation device are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.
[0140] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.
[0141] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
[0142] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer programs) stored thereon, and the computer-readable program instructions are used to execute the similar interface recommendation method in the above-mentioned embodiment.
[0143] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM: Random Access Memory), a read-only memory (ROM: Read Only Memory), an erasable programmable read-only memory (EPROM: Erasable Programmable Read Only Memory or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM: CD-Read Only Memory), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency: Radio Frequency), etc., or any suitable combination of the above.
[0144] The computer-readable storage medium may be included in the similar interface recommendation device; or may exist independently without being assembled into the similar interface recommendation device.
[0145] The above-mentioned computer-readable storage medium carries one or more programs. When the above-mentioned one or more programs are executed by the similar interface recommendation device, the similar interface recommendation device: performs sharding processing on the current interface set to obtain multiple sharding tasks of the current interface set; performs similarity processing on the current interface set according to the multiple sharding tasks through a text similarity algorithm to obtain interface pair similarity results corresponding to the interface to be matched; determines the similar interface set corresponding to the interface to be matched according to the interface pair similarity results; performs code logic processing on the similar interface set to obtain recommended similar interfaces in the current interface set corresponding to the interface to be matched.
[0146] Computer program code for performing the operations of the present application 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).
[0147] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the 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 square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square 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 square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart 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.
[0148] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.
[0149] The readable storage medium provided by the present application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned similar interface recommendation method, and can solve the technical problem that the traditional interface recommendation method relies on text matching and manual annotation by developers, resulting in low accuracy of recommendation results, adding unnecessary interface development work, and thus reducing development efficiency. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided by the present application are the same as the beneficial effects of the similar interface recommendation method provided by the above-mentioned embodiment, and will not be repeated here.
[0150] The present application also provides a computer program product, including a computer program, which implements the steps of the similar interface recommendation method as described above when executed by a processor.
[0151] The computer program product provided by the present application can solve the technical problem that the traditional interface recommendation method relies on text matching and manual annotation by developers, resulting in low accuracy of recommendation results, adding unnecessary interface development work, and thus reducing development efficiency. Compared with the prior art, the beneficial effects of the computer program product provided by the present application are the same as those of the similar interface recommendation method provided by the above embodiment, and will not be repeated here.
[0152] The above descriptions are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect applications in other related technical fields are included in the patent protection scope of the present application.
Claims
1. A similar interface recommendation method, It is characterized in that The method includes: Performing sharding processing on the current interface set to obtain multiple sharding tasks of the current interface set; Performing similarity processing on the current interface set according to the multiple sharding tasks by using a text similarity algorithm to obtain a similarity result of an interface pair corresponding to the interface to be matched; Determine a similar interface set corresponding to the interface to be matched according to the interface pair similarity result; Performing code logic processing on the similar interface set to obtain a recommended similar interface in the current interface set corresponding to the interface to be matched; The step of performing code logic processing on the similar interface set to obtain a recommended similar interface in the current interface set corresponding to the interface to be matched includes: Extracting a method call node of each interface in the similar interface set, wherein the method call node includes an interface attribute type, a target end attribute, and an attribute signature; Convert the interface attribute type, the target end attribute and the attribute signature into a JSON array structure; Based on the JSON array structure, determine the interface call logic text of the interface static call chain in the similar interface set; The similar interface set is subjected to code logic processing according to the interface call logic text to obtain a recommended similar interface in the similar interface set corresponding to the interface to be matched.
2. The method according to claim 1, It is characterized in that The step of performing sharding processing on the current interface set to obtain multiple sharding tasks of the current interface set includes: Get the system ID, application ID and interface protocol ID of each interface in the current interface set; Based on the system ID, the application ID and the interface protocol ID, the current interface set is classified and aggregated according to a preset coding calculation rule to obtain a classification code; The current interface set is distributedly coordinated according to the classification code through a distributed scheduling platform to obtain a plurality of sharding tasks corresponding to the current interface set.
3. The method according to claim 1, It is characterized in that The step of performing similarity processing on the current interface set according to the multiple sharding tasks by using a text similarity algorithm to obtain similarity results of interface pairs corresponding to the interfaces to be matched includes: Construct a JSON string of each interface according to the interface name and input and output parameters of each interface in the current interface set; Performing single-thread processing on the current interface set according to the multiple sharding tasks; Based on the JSON string, similarity processing is performed on the current interface set in a single-threaded processing process using a text similarity algorithm to obtain interface pair similarity results between each interface and the interface to be matched.
4. The method according to claim 3, It is characterized in that The step of determining a similar interface set corresponding to the interface to be matched according to the interface pair similarity result comprises: Traversing the text similarity of each JSON string in the similarity result; Determining whether the text similarity meets a preset similarity condition; If the text similarity reaches the preset similarity condition, the interface corresponding to the preset similarity condition is used as the similar interface set corresponding to the interface to be matched.
5. The method according to any one of claims 1 to 4, It is characterized in that Before the step of performing sharding processing on the current interface set to obtain a plurality of sharding tasks of the current interface set, the method further comprises: Extracting stock interfaces, and performing data preprocessing on the stock interfaces to obtain preprocessed interface data, wherein the preprocessed interface data includes interface semantics, interface name, interface parameters, and interface comments; Performing vector integration on the interface semantics, the interface name, the interface parameters and the interface annotation to obtain interface vector features; Inputting the interface vector features into a neural network model for training to obtain a vector similarity calculation model; The current interface set is input into the vector similarity calculation model to obtain a recommended similar interface in the current interface set corresponding to the interface to be matched.
6. A similar interface recommendation device, It is characterized in that The device comprises: A sharding processing module, used to perform sharding processing on the current interface set to obtain multiple sharding tasks of the current interface set; A text similarity module, used to perform similarity processing on the current interface set according to the multiple sharding tasks through a text similarity algorithm to obtain a similarity result of an interface pair corresponding to the interface to be matched; A similar interface set module, used to determine a similar interface set corresponding to the interface to be matched according to the interface pair similarity result; A logic processing module, used to perform code logic processing on the similar interface set to obtain a recommended similar interface in the current interface set corresponding to the interface to be matched; Among them, the logic processing module is also used to extract the method call nodes of each interface in the similar interface set, and the method call nodes include interface attribute type, target end attribute and attribute signature; convert the interface attribute type, the target end attribute and the attribute signature into a JSON array structure; based on the JSON array structure, determine the interface call logic text of the static call chain of the interface in the similar interface set; perform code logic processing on the similar interface set according to the interface call logic text, and obtain the recommended similar interface in the similar interface set corresponding to the interface to be matched.
7. A similar interface recommended device, It is characterized in that The device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the similar interface recommendation method according to any one of claims 1 to 5.
8. A storage medium, It is characterized in that The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the similar interface recommendation method according to any one of claims 1 to 5 are implemented.
9. A computer program product, It is characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the steps of the similar interface recommendation method according to any one of claims 1 to 5 are implemented.
