CN-116304360-B - Interface determining method and device, computer equipment and storage medium
Abstract
The invention discloses a method and a device for determining an interface, computer equipment and a storage medium. The method comprises the steps of determining an associated interface matched with a current calling interface according to service association degrees between the current calling interface and each interface, wherein the current calling interface and each interface are stored in the same system, the associated interface comprises an upstream interface and/or a downstream interface, determining target parameter association degrees between the current calling interface and the associated interface according to parameters of the current calling interface and parameters of the associated interface, wherein the parameters comprise input parameters and output parameters, determining coupling degrees between the current calling interface and the associated interface according to the service association degrees between the current calling interface and the associated interface and the target parameter association degrees, and determining the target interface from the associated interface according to at least one coupling degree matched with the current calling interface. By using the technical scheme of the invention, the appropriate interface can be rapidly and accurately determined.
Inventors
- DU LIGUO
- HUANG CHENG
Assignees
- 济南宇视智能科技有限公司
Dates
- Publication Date
- 20260508
- Application Date
- 20211220
Claims (9)
- 1. A method for determining an interface, comprising: Determining an associated interface matched with the current calling interface according to the service association degree between the current calling interface and each interface, wherein the current calling interface and each interface are stored in the same system, and the associated interface comprises an upstream interface and/or a downstream interface; determining a target parameter association degree between the current calling interface and the associated interface according to the parameters of the current calling interface and the parameters of the associated interface, wherein the parameters comprise an input parameter and an output parameter; according to the parameters of the current calling interface and the parameters of the associated interface, determining the target parameter association degree between the current calling interface and the associated interface comprises the following steps: Determining the matching degree between the parameters of the current calling interface and the parameters of the associated interface; Determining the user acceptance degree between the current calling interface and the associated interface; determining the reference times of other interfaces in the system to the parameters of the current calling interface or the parameters of the associated interfaces; calculating the target parameter association degree between the current calling interface and the association interface according to the matching degree, the user acceptance degree and the reference times; And determining the coupling degree between the current calling interface and the associated interface according to the service association degree and the target parameter association degree between the current calling interface and the associated interface, and determining the target interface from the associated interface according to at least one coupling degree matched with the current calling interface.
- 2. The method of claim 1, wherein determining a degree of matching between parameters of a currently invoked interface and parameters of an associated interface if the associated interface is an upstream interface comprises: Determining the matching degree between the interface input parameters of the current calling interface and the interface output parameters of the associated interface; determining the reference times of other interfaces in the system to the parameters of the current calling interface or the parameters of the associated interfaces, wherein the reference times comprise: Determining the reference times of other interfaces in the system to the interface output parameters of the associated interfaces; If the associated interface is a downstream interface, determining the matching degree between the parameters of the current calling interface and the parameters of the associated interface, including: determining the matching degree between the interface output parameters of the current calling interface and the interface input parameters of the associated interface; determining the reference times of other interfaces in the system to the parameters of the current calling interface or the parameters of the associated interfaces, wherein the reference times comprise: The number of references of other interfaces in the system to the interface output parameters of the currently invoked interface is determined.
- 3. The method of claim 1, wherein the user acceptance is determined based on at least one of the following user acceptance rating parameters: The number of user clicks when the associated interface is the historical target interface, the number of applications when the associated interface is the historical target interface, and the user score when the associated interface is the historical target interface.
- 4. The method of claim 1, wherein calculating the target parameter association between the current call interface and the associated interface based on the degree of matching, the degree of user acceptance, and the number of references comprises: For each parameter of the current calling interface, calculating products of the matching degree, the user acceptance degree and the reference times respectively, and taking the sum of the products as the correlation degree of the current parameter between the current calling interface and the correlation interface; and taking the current parameter association degree and the average value of the historical parameter association degree between the current calling interface and the associated interface in the historical time period as the target parameter association degree between the current calling interface and the associated interface.
- 5. The method of claim 1, wherein determining the degree of coupling between the current calling interface and the associated interface based on the degree of business association and the degree of target parameter association between the current calling interface and the associated interface comprises: And taking the sum of the product of the service association degree and the service association degree weight and the product of the target parameter association degree and the target parameter association degree weight as the coupling degree between the current calling interface and the association interface.
- 6. The method of claim 1, wherein determining the target interface from the associated interfaces based on at least one degree of coupling matching the current calling interface comprises: If the associated interface is determined to be an upstream interface and the coupling degree between the current calling interface and the associated interface meets the coupling degree condition, determining the associated interface as a target upstream interface; And if the associated interface is determined to be a downstream interface and the coupling degree between the current calling interface and the associated interface meets the coupling degree condition, determining the associated interface as a target downstream interface.
- 7. An interface determining apparatus, comprising: the service association degree determining module is used for determining an association interface matched with the current calling interface according to the service association degree between the current calling interface and each interface, wherein the current calling interface and each interface are stored in the same system, and the association interface comprises an upstream interface and/or a downstream interface; The target parameter association degree determining module is used for determining the target parameter association degree between the current calling interface and the associated interface according to the parameters of the current calling interface and the parameters of the associated interface, wherein the parameters comprise input parameters and output parameters; The target parameter association degree determining module comprises: The matching degree determining unit is used for determining the matching degree between the parameters of the current calling interface and the parameters of the associated interface; the user acceptance determining unit is used for determining the user acceptance between the current calling interface and the associated interface; the reference number determining unit is used for determining the reference number of other interfaces in the system to the parameters of the current calling interface or the parameters of the associated interfaces; the target parameter association degree calculating unit is used for calculating the target parameter association degree between the current calling interface and the associated interface according to the matching degree, the user acceptance degree and the reference times; And the target interface determining module is used for determining the coupling degree between the current calling interface and the associated interface according to the service association degree and the target parameter association degree between the current calling interface and the associated interface, and determining the target interface from the associated interfaces according to at least one coupling degree matched with the current calling interface.
- 8. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the method of determining an interface according to any of claims 1-6 when executing the program.
- 9. A storage medium containing computer executable instructions which, when executed by a computer processor, are for performing the method of determining an interface as claimed in any one of claims 1 to 6.
Description
Interface determining method and device, computer equipment and storage medium Technical Field The embodiment of the invention relates to the technical field of data processing, in particular to a method and a device for determining an interface, computer equipment and a storage medium. Background In the internet age, developers have provided a series of APIs (Application Programming Interface, application programming interfaces) for use by third parties through an open platform. However, the calling relationship between the APIs is complex, and it is difficult for a third party to determine an appropriate interface according to the service requirement of the third party. In the prior art, to recommend an appropriate interface to a third party, an API called by a similar item is generally determined as a recommendation API by searching for the similar item of the current item in the item library. Or by analyzing the current API call relationship, searching similar API call relationship in the database, and determining the recommended API. In the prior art, the two methods for determining the recommended APIs are used for determining the recommended APIs through item comparison, the recommended APIs are not accurately compared, the accuracy of the recommended APIs is not high, and a large number of stored reasonable API calling relations are required to be determined, so that the cost is high. Disclosure of Invention The embodiment of the invention provides a method, a device, computer equipment and a storage medium for determining an interface, so as to quickly and accurately determine a proper interface. In a first aspect, an embodiment of the present invention provides a method for determining an interface, where the method includes: Determining an associated interface matched with the current calling interface according to the service association degree between the current calling interface and each interface, wherein the current calling interface and each interface are stored in the same system, and the associated interface comprises an upstream interface and/or a downstream interface; determining a target parameter association degree between the current calling interface and the associated interface according to the parameters of the current calling interface and the parameters of the associated interface, wherein the parameters comprise an input parameter and an output parameter; And determining the coupling degree between the current calling interface and the associated interface according to the service association degree and the target parameter association degree between the current calling interface and the associated interface, and determining the target interface from the associated interface according to at least one coupling degree matched with the current calling interface. In a second aspect, an embodiment of the present invention further provides an apparatus for determining an interface, where the apparatus includes: the service association degree determining module is used for determining an association interface matched with the current calling interface according to the service association degree between the current calling interface and each interface, wherein the current calling interface and each interface are stored in the same system, and the association interface comprises an upstream interface and/or a downstream interface; The target parameter association degree determining module is used for determining the target parameter association degree between the current calling interface and the associated interface according to the parameters of the current calling interface and the parameters of the associated interface, wherein the parameters comprise input parameters and output parameters; And the target interface determining module is used for determining the coupling degree between the current calling interface and the associated interface according to the service association degree and the target parameter association degree between the current calling interface and the associated interface, and determining the target interface from the associated interfaces according to at least one coupling degree matched with the current calling interface. In a third aspect, an embodiment of the present invention further provides a computer device, including a memory, a processor, and a computer program stored in the memory and capable of running on the processor, where the processor implements a method for determining an interface according to any one of the embodiments of the present invention when the processor executes the program. In a fourth aspect, embodiments of the present invention also provide a storage medium containing computer-executable instructions, which when executed by a computer processor, are used to perform a method of determining an interface according to any of the embodiments of the present invention. According to the embodiment of the invention, the service associat