CN105354327A - Interface API recommendation method and system based on massive data analysis - Google Patents

Interface API recommendation method and system based on massive data analysis Download PDF

Info

Publication number
CN105354327A
CN105354327A CN201510834997.5A CN201510834997A CN105354327A CN 105354327 A CN105354327 A CN 105354327A CN 201510834997 A CN201510834997 A CN 201510834997A CN 105354327 A CN105354327 A CN 105354327A
Authority
CN
China
Prior art keywords
api
app
apis
frequency
obtaining
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201510834997.5A
Other languages
Chinese (zh)
Inventor
陈湘萍
黄信娴
温诗华
王珂
钟静雯
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sun Yat Sen University
Original Assignee
Sun Yat Sen University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sun Yat Sen University filed Critical Sun Yat Sen University
Priority to CN201510834997.5A priority Critical patent/CN105354327A/en
Publication of CN105354327A publication Critical patent/CN105354327A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/28Databases characterised by their database models, e.g. relational or object models
    • G06F16/284Relational databases
    • G06F16/285Clustering or classification
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/951Indexing; Web crawling techniques

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses an interface API recommendation method and system based on massive data analysis, wherein the method comprises the following steps: obtaining data information of APPs in an APP set, and classifying the APPs in the APP set according to functions; obtaining APIs of various kinds of APPs according to the data information, and processing the APIs in a classified manner so as to obtain universal APIs and characteristic APIs; obtaining the recommendation levels of the APIs according to the use condition information and the use frequencies of the APIs; constructing an API frequently-used combined table according to the frequency that two APIs appear in the APPs; and recommending the corresponding APIs to users according to the recommendation levels of the APIs and the API frequently-used combined table. By means of the embodiment provided in the invention, more required APIs can be recommended to the users; and thus, the use experience of the users is further improved.

Description

Interface API recommendation method and system based on big data analysis
Technical Field
The invention relates to the technical field of data processing, in particular to an interface API recommendation method and system based on big data analysis.
Background
Programming with an API may enable a developer to gain access to a set of routines without having to access source code or understand internal working details. This can greatly improve the developer's work efficiency, so more and more developers are beginning to use a wide variety of APIs in the programming process to simplify their work. This has also led to the emergence of more new APIs. The number of APIs has risen dramatically such that developers have difficulty selecting an API. Therefore, a plurality of scientific researchers are stimulated to research the recommendation algorithm of the API.
The existing API recommendation algorithm mainly aims at the webAPI released on an open platform and Mashup service calling the webAPI. Some API recommendations are made based on the usage history of the user and the reputation degree of the API itself, and some API recommendations are made based on the service similarity. But fewer API recommendations are directed to APIs that are not open platforms and are made by analyzing the effects of the actual application of APIs to APPs. At the same time, less research in this area has taken into account the problem of dynamic recommendations.
For the development and programming, an API recommendation technology that is most widely applied at present integrates a syntax prompt function in a development environment, and performs interface recommendation based on a prefix by judging a code being input. The function analyzes through the source code to obtain a syntax tree; by parsing this syntax tree, the structure of the class (including the class name and its list of members) is known. After entering the characters "-", "(" etc.), the code completion function is activated, the type is determined from the previous word or words, and a list of prompts is provided.
Disclosure of Invention
The invention aims to overcome the defects of the prior art, and provides an interface API recommendation method and system based on big data analysis, which can effectively improve the accuracy of API recommendation.
In order to solve the technical problem, an embodiment of the present invention provides an interface API recommendation method based on big data analysis, where the method includes:
acquiring data information of each APP in the APP set, and classifying the APPs in the APP set according to functions;
obtaining APIs of various APPs according to the data information, classifying the APIs to obtain a general API and a characteristic API;
acquiring the recommendation degree of the API according to the use condition information of the API and the use frequency of the API;
constructing an API common combination table according to the frequency of two APIs appearing in the APP;
and recommending the corresponding API to the user according to the API recommendation degree and the API common combination table.
Preferably, the data information includes a name, a description, a tag, a source code, a score, and a download amount of the APP;
categorizing the APP in the APP set according to function, including:
acquiring the name, description and label of the APP;
extracting functional keywords of the APP according to the name, description and label of the APP;
and classifying the APP according to the functional keywords of the APP.
Preferably, the classifying the API to obtain a general API and a feature API includes:
obtaining the use frequency of the API on the various APPs and the reverse file frequency in the various APPs;
obtaining the use weight of the API according to the multiplication of the use frequency and the reverse file frequency;
judging whether the use weight is larger than a threshold value;
if yes, the API is a general API, and if not, the API is a characteristic API.
Preferably, the obtaining the recommendation degree of the API according to the usage information of the API and the usage frequency of the API includes:
acquiring the use condition information of the API;
obtaining the frequency of the API used by the APP in the APP set and the frequency of the API used by the APP in each type of APP;
and acquiring the recommendation degree of the API according to the use condition information and the use frequency.
Preferably, the frequency of the common occurrence of the general API and the characteristic API constructs an API common combination table, including:
constructing a directed graph G (V, E) according to the frequency of two APIs (application program interfaces) in the same APP;
traversing the directed graph G by adopting a depth-first search method;
and constructing an API common combination table according to the result of traversing the directed graph.
Where V denotes a set of all APIs, and E denotes a set of cases where two APIs appear in one APP at the same time.
Correspondingly, the embodiment of the invention also provides an interface API recommendation system based on big data analysis, which comprises:
a classification module: the method comprises the steps of obtaining data information of each APP in the APP set, and classifying the APPs in the APP set according to functions;
an API acquisition module: the API is used for obtaining various APPs according to the data information, classifying the APIs and obtaining a general API and a characteristic API;
a recommendation degree obtaining module: the recommendation degree of the API is obtained according to the use condition information of the API and the use frequency of the API;
a combination table construction module: the method is used for constructing an API common combination table according to the frequency of two APIs appearing in the APP;
a recommendation degree obtaining module: acquiring the recommendation degree of the API according to the total occurrence times of the API and the use frequency of the API;
preferably, the data information includes a name, a description, a tag, a source code, a score, and a download amount of the APP;
the classification module comprises:
an information acquisition unit: the name, description and label of the APP are obtained;
a keyword extraction unit: extracting functional keywords of the APP according to the name, description and label of the APP;
a classification unit: and classifying the APP according to the functional keywords of the APP.
Preferably, the classifying the API to obtain a general API and a feature API includes:
obtaining the use frequency of the API on the various APPs and the reverse file frequency in the various APPs;
obtaining the use weight of the API according to the multiplication of the use frequency and the reverse file frequency;
judging whether the use weight is larger than a threshold value;
if yes, the API is a general API, and if not, the API is a characteristic API.
Preferably, the recommendation degree obtaining module includes:
an information acquisition unit: the service condition information is used for acquiring the API;
a use frequency acquisition unit: the method comprises the steps of obtaining the frequency of the API used by the APP in the APP set and the frequency of the API used by the APP in each type of APP;
a recommendation degree acquisition unit: and obtaining the recommendation degree of the API according to the use condition information and the use frequency.
Preferably, the combination table building module includes:
a directed graph construction unit: the method comprises the steps of constructing a directed graph G (V, E) according to the frequency of two APIs appearing in the same APP;
traversing unit: traversing the directed graph G by adopting a depth-first search method;
a combination table construction unit: and the method is used for constructing the API common combination table according to the result of traversing the directed graph.
Where V denotes a set of all APIs, and E denotes a set of cases where two APIs appear in one APP at the same time.
By implementing the embodiment of the invention, more APIs required by the user can be recommended to the user, and the use experience of the user is further improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a flow chart of an interface API recommendation method based on big data analysis according to an embodiment of the present invention;
FIG. 2 is a schematic flow chart illustrating obtaining API recommendation according to an embodiment of the present invention;
FIG. 3 is a flowchart illustrating a big data analysis-based interface API recommendation method according to another embodiment of the present invention;
fig. 4 is a schematic structural composition diagram of an interface API recommendation system based on big data analysis according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Fig. 1 is a schematic flowchart of an interface API recommendation method based on big data analysis according to an embodiment of the present invention, and as shown in fig. 1, the method includes:
s11: acquiring data information of the APP in the APP set, and classifying the APPs in the APP set according to functions;
s12: acquiring APIs of various APPs according to the data information, classifying the APIs, and acquiring a general API and a characteristic API;
s13: acquiring the recommendation degree of the API according to the use condition information of the API and the use frequency of the API;
s14: constructing an API common combination table according to the frequency of two APIs appearing in the APP;
s15: and recommending the corresponding API to the user according to the API recommendation degree and the API common combination table.
Further explanation of S11 is:
the method comprises the steps that APP data information in an APP set is obtained, wherein the APP data information comprises names, descriptions, labels, source codes, scores (comments) and download amount of APPs; classifying the APPs in the APP set, extracting names, descriptions and labels of the APPs in the APP data information, extracting vocabularies which describe or describe functions of the APPs from the APP data information, taking the functional vocabularies as keywords for classifying the APPs, and classifying the APPs according to the keywords, such as game class, chat class, video class and the like.
Sorting the sorted APPs after sorting; by obtaining the score (comment) and the download amount of the APP, if the APP is a comment, the grades are set according to the quality of the comment, and are respectively excellent, good, passing and failing, wherein the excellent is 9-10 points, the good is 7-9 points, the passing is 6-7 points, and the failing is 0-6 points; the scores are converted into ten-degree scores in a unified way; all scores are normalized, in this embodiment, a Max-Min normalization method is adopted to perform processing, and a normalization processing result U is obtainediWherein, the processing formula is as follows:
U i = X i - X M i n X M a x - X M i n ;
wherein, XiIs the score of the ith APP, XMinIs the least scoring of this category of APP, XMaxIs the largest scoring in this category of APPs.
According to the downloading amount of the classified APP, the downloading amount is processed by adopting a normalization method, in the embodiment, the Max-Min normalization method is adopted for processing, and a normalization result D is obtainediWherein, the formula is as follows:
D i = S i - S M i n S M a x - S M i n ;
wherein S isiIs the download amount, S, of the ith APPMinIs the least downloaded amount of APP in this category, SMaxThe downloading amount in the classification APP is the largest.
According to the normalization result, carrying out comprehensive weighting combination to obtain a combination result, and sequencing the APP according to the size of the combination result, wherein the comprehensive weighting combination formula is as follows:
Ai=αUi+βDi
wherein A isiThe result is a combined weighted sum, α and β are weights, and α + β is equal to 1, in this embodiment, α is equal to 0.3, and β is equal to 0.7.
Further explanation of S12 is:
obtaining the source code of the APP according to the S11, analyzing the source code, obtaining the API of the APP, counting the use average rate and the reverse file frequency of the API in the APP set and various APPs, and classifying the API by adopting a TF-IDF algorithm, wherein the TF-IDF algorithm company is as follows:
TF-IDF is equal to the average rate multiplied by the reverse file frequency;
obtaining a TF-IDF result, comparing the TF-IDF result with a preset threshold value, wherein the preset threshold value is 0.1, and judging whether the use weight is greater than the threshold value; if yes, the API is a general API, and if not, the API is a characteristic API. The APIs are divided into general APIs and characteristic APIs of the APP sets and general APIs and characteristic APIs of various APPs.
Step S13 is further explained:
fig. 2 is a schematic flow chart of obtaining API recommendation according to an embodiment of the present invention, and S13 is further described with reference to fig. 2:
s131: acquiring the use condition information of the API;
s132: obtaining the frequency of the API used by the APP in the APP set and the frequency of the API used by the APP in various APPs;
s133: and acquiring the recommendation degree of the API according to the use condition information and the use frequency.
Wherein, S131 is further explained:
by collecting the user's rating and usage of the API on an open webAPI; normalizing the scores to obtain a result EiNormalizing the usage to obtain a result FiIn this embodiment, a Max-Min normalization method is adopted for processing; and comprehensively weighting the normalization results, namely:
B=αEi+βFi
wherein, BiThe result is a combined weighted sum, α and β are weights, and α + β is equal to 1, in this embodiment, α is equal to 0.3, and β is equal to 0.7.
Wherein, S132 is further explained:
obtaining the total number N of the use of each API in the APP set by the APP in a statistical mannerjAnd the total number of times N that each API is used by APP in various types of APPn(ii) a Acquiring the number M of APPs in the APP set and the number V of APPs in various APPs in a statistical mode; that is, the frequency of the API used by the APP in the APP set is P1
P 1 = N j M , j = 1 , 2 , 3 , ...
That is, the API is used by APP in various APPs2
P 2 = N n V , n = 1 , 2 , 3 , ... .
Wherein, S133 is further explained:
in S12, if the API is the general API, the recommendation degree R:
R=B+P1+φP2
wherein, 0.3, ═ 0.5, ═ 0.2;
if the general API does not have the use condition information, the recommendation degree R:
wherein,γ=0.4。
if the API is a feature API, the recommendation degree R:
R=ηB+κP1+λP2
wherein η is 0.3, κ is 0.4, and λ is 0.3;
if the feature API does not have the use condition information, the recommendation degree R:
R=νP1+τP2
wherein ν is 0.6 and τ is 0.4.
Further explanation of S14 is:
the method adopts a statistical mode to obtain the frequency of two different APIs appearing on the same APP source code and is constructed withG ═ V, E }, where V denotes the set of all APIs, E denotes the set of cases where two APIs appear simultaneously in one APP, and whenever the ith and jth APIs appear simultaneously in one APP, the weight E of the edge between the two APIsijAnd EjiBoth are increased by 1;
traversing the directed graph G by adopting a depth-first search method, and preferentially selecting E when selecting the next access pointijA point comparable to E, wherein EijRepresenting the weight of an edge between the current access node i and the next node j to be accessed, and e representing the average value of the weights of the edges passing through in the traversal;
in one depth-first search, if the number of accessed points of the terminal point (before backtracking) is greater than 1 each time, calculating the variance between the weight and the average value of each edge, and if the variance is less than a certain value (0.05), the accessed APIs can be considered to form a common combination, and the common combination is added into an API common combination table.
Further explanation of S15 is:
recommending a corresponding API to a user according to the API recommendation degree and an API common combination table, wherein when the user inputs a corresponding function word or source code for retrieval, the corresponding API is obtained according to the function word or the source code, the user is recommended according to the recommendation degree of the corresponding API and the common combination table, specifically, the API with the front recommendation degree is recommended to the user, the combination relation of the API with the front recommendation degree in the common combination table is called according to the API with the front recommendation degree, and the API which is frequently and simultaneously appeared and used is recommended; or automatically detecting the use habits of the user, recommending an API with high relevance and recommendation degree with the use habits of the user and a common combined API which frequently appears simultaneously with the API.
Fig. 3 is a schematic flowchart of an interface API recommendation method based on big data analysis according to another embodiment of the present invention, and as shown in fig. 3, the method includes:
s301: acquiring APP data information in the APP set, and classifying the APPs in the APP set according to functions;
s302: acquiring APIs of various APPs according to the data information, classifying the APIs, and acquiring a general API and a characteristic API;
s303: acquiring the use condition information of the API;
s304: obtaining the frequency of the API used by the APP in the APP set and the frequency of the API used by the APP in various APPs;
s305: acquiring the recommendation degree of the API according to the use condition information and the use frequency;
s306: constructing an API common combination table according to the frequency of two APIs appearing in the APP;
s307: and recommending the corresponding API to the user according to the API recommendation degree and the API common combination table.
Further explanation of S301 is:
the method comprises the steps that APP data information in an APP set is obtained, wherein the APP data information comprises names, descriptions, labels, source codes, scores (comments) and download amount of APPs; classifying the APPs in the APP set, extracting names, descriptions and labels of the APPs in the APP data information, extracting vocabularies which describe or describe functions of the APPs from the APP data information, taking the functional vocabularies as keywords for classifying the APPs, and classifying the APPs according to the keywords, such as game class, chat class, video class and the like.
Sorting the sorted APPs after sorting; by obtaining the score (comment) and the download amount of the APP, if the APP is a comment, the grades are set according to the quality of the comment, and are respectively excellent, good, passing and failing, wherein the excellent is 9-10 points, the good is 7-9 points, the passing is 6-7 points, and the failing is 0-6 points; the scores are converted into ten-degree scores in a unified way; all scores are normalized, in this embodiment, a Max-Min normalization method is adopted to perform processing, and a normalization processing result U is obtainediWherein, the processing formula is as follows:
U i = X i - X M i n X M a x - X M i n ;
wherein, XiIs the score of the ith APP, XMinIs the least scoring of this category of APP, XMaxIs the largest scoring in this category of APPs.
According to the downloading amount of the classified APP, the downloading amount is processed by adopting a normalization method, in the embodiment, the Max-Min normalization method is adopted for processing, and a normalization result D is obtainediWherein, the formula is as follows:
D i = S i - S M i n S M a x - S M i n ;
wherein S isiIs the download amount, S, of the ith APPMinIs the least downloaded amount of APP in this category, SMaxThe downloading amount in the classification APP is the largest.
According to the normalization result, carrying out comprehensive weighting combination to obtain a combination result, and sequencing the APP according to the size of the combination result, wherein the comprehensive weighting combination formula is as follows:
Ai=αUi+βDi
wherein A isiThe result is a combined weighted sum, α and β are weights, and α + β is equal to 1, in this embodiment, α is equal to 0.3, and β is equal to 0.7.
Further explanation of S302 is:
obtaining the source code of the APP according to the S11, analyzing the source code, obtaining the API of the APP, counting the use average rate and the reverse file frequency of the API in the APP set and various APPs, and classifying the API by adopting a TF-IDF algorithm, wherein the TF-IDF algorithm company is as follows:
TF-IDF is equal to the average rate multiplied by the reverse file frequency;
obtaining a TF-IDF result, comparing the TF-IDF result with a preset threshold value, wherein the preset threshold value is 0.1, and judging whether the use weight is greater than the threshold value; if yes, the API is a general API, and if not, the API is a characteristic API. The APIs are divided into general APIs and characteristic APIs of the APP sets and general APIs and characteristic APIs of various APPs.
Further explanation of S303 is:
by collecting the user's rating and usage of the API on an open webAPI; normalizing the scores to obtain a result EiNormalizing the usage to obtain a result FiIn this embodiment, Max-Min normalization method is adoptedCarrying out treatment; and comprehensively weighting the normalization results, namely:
B=αEi+βFi
wherein, BiThe result is a combined weighted sum, α and β are weights, and α + β is equal to 1, in this embodiment, α is equal to 0.3, and β is equal to 0.7.
Further explanation of S304 is:
obtaining the total number N of the use of each API in the APP set by the APP in a statistical mannerjAnd the total number of times N that each API is used by APP in various types of APPn(ii) a Acquiring the number M of APPs in the APP set and the number V of APPs in various APPs in a statistical mode; that is, the frequency of the API used by the APP in the APP set is P1
P 1 = N j M , j = 1 , 2 , 3 , ...
That is, the API is used by APP in various APPs2
P 2 = N n V , n = 1 , 2 , 3 , ... .
Further explanation of S305 is:
according to the above S302, if the API is the general API, the recommendation degree R:
R=B+P1+φP2
wherein, 0.3, ═ 0.5, ═ 0.2;
if the general API does not have the use condition information, the recommendation degree R:
wherein,γ=0.4。
if the API is a feature API, the recommendation degree R:
R=ηB+κP1+λP2
wherein η is 0.3, κ is 0.4, and λ is 0.3;
if the feature API does not have the use condition information, the recommendation degree R:
R=νP1+τP2
wherein ν is 0.6 and τ is 0.4.
Further explanation of S306 is:
acquiring the frequency of two different APIs (application program interfaces) on the same APP source code in a statistical mode, and constructing a directed graph G (V, E), wherein V represents a set of all APIs, E represents a set of the condition that the two APIs simultaneously appear in one APP, and when the ith API and the jth API simultaneously appear in one APP, the weight E of an edge between the two APIs is obtainedijAnd EjiBoth are increased by 1;
traversing the directed graph G by adopting a depth-first search method, and preferentially selecting E when selecting the next access pointijA point comparable to E, wherein EijIndicating current access node i and lowerA weight of an edge between nodes j to be accessed, e represents an average value of weights of edges passed in the traversal;
in one depth-first search, if the number of accessed points of the terminal point (before backtracking) is greater than 1 each time, calculating the variance between the weight and the average value of each edge, and if the variance is less than a certain value (0.05), the accessed APIs can be considered to form a common combination, and the common combination is added into an API common combination table.
Further explanation is made on S307:
recommending a corresponding API to a user according to the API recommendation degree and an API common combination table, wherein when the user inputs a corresponding function word or source code for retrieval, the corresponding API is obtained according to the function word or the source code, the user is recommended according to the recommendation degree of the corresponding API and the common combination table, specifically, the API with the front recommendation degree is recommended to the user, the combination relation of the API with the front recommendation degree in the common combination table is called according to the API with the front recommendation degree, and the API which is frequently and simultaneously appeared and used is recommended; or automatically detecting the use habits of the user, recommending an API with high relevance and recommendation degree with the use habits of the user and a common combined API which frequently appears simultaneously with the API.
Fig. 4 is a schematic structural composition diagram of an interface API recommendation system based on big data analysis according to an embodiment of the present invention, and as shown in fig. 4, the system includes:
a classification module: the method comprises the steps of obtaining data information of each APP in the APP set, and classifying the APPs in the APP set according to functions;
an API acquisition module: the API is used for acquiring various APPs according to the data information, classifying the APIs, and acquiring a general API and a characteristic API;
a recommendation degree obtaining module: the method comprises the steps of obtaining recommendation degree of the API according to the use condition information of the API and the use frequency of the API;
a combination table construction module: the method is used for constructing an API common combination table according to the frequency of two APIs appearing in the APP;
a recommendation degree obtaining module: acquiring the recommendation degree of the API according to the total occurrence times of the API and the use frequency of the API;
preferably, the data information includes the name, description, tag, source code, rating and download amount of the APP;
a classification module comprising:
an information acquisition unit: obtaining the name, description and label of APP;
a keyword extraction unit: extracting functional keywords of the APP according to the name, description and label of the APP;
a classification unit: and classifying the APP according to the functional keywords of the APP.
Preferably, classifying the APIs to obtain a generic API and a feature API includes:
acquiring the use frequency of the API on various APPs and the reverse file frequency of the API in various APPs;
acquiring the use weight of the API according to the multiplication of the use frequency and the reverse file frequency;
judging whether the use weight is larger than a threshold value;
if yes, the API is a general API, and if not, the API is a characteristic API.
Preferably, the recommendation degree obtaining module includes:
an information acquisition unit: the API service condition information is used for acquiring the API service condition information;
a use frequency acquisition unit: the method is used for acquiring the frequency of the API used by the APP in the APP set and the frequency of the API used by the APP in various APPs;
a recommendation degree acquisition unit: and the method is used for acquiring the recommendation degree of the API according to the use condition information and the use frequency.
Preferably, the combined table building block comprises:
a directed graph construction unit: the method comprises the steps of constructing a directed graph G (V, E) according to the frequency of two APIs appearing in the same APP;
traversing unit: the method is used for traversing the directed graph G by adopting a depth-first search method;
a combination table construction unit: and the method is used for constructing the API common combination table according to the result of the directed graph.
Where V denotes a set of all APIs, and E denotes a set of cases where two APIs appear in one APP at the same time.
Specifically, the working principle of the system related function module according to the embodiment of the present invention may refer to the related description of the method embodiment, and is not described herein again.
By implementing the embodiment of the invention, more APIs required by the user can be recommended to the user, and the use experience of the user is further improved.
Those skilled in the art will appreciate that all or part of the steps in the methods of the above embodiments may be implemented by associated hardware instructed by a program, which may be stored in a computer-readable storage medium, and the storage medium may include: a Read Only Memory (ROM), a Random Access Memory (RAM), a magnetic or optical disk, or the like.
In addition, the interface API recommendation method and system based on big data analysis provided by the embodiment of the present invention are introduced in detail, and a specific example is applied in the present disclosure to explain the principle and the implementation of the present invention, and the description of the above embodiment is only used to help understanding the method and the core idea of the present invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (10)

1. An interface API recommendation method based on big data analysis is characterized by comprising the following steps:
acquiring data information of the APP in the APP set, and classifying the APPs in the APP set according to functions;
obtaining APIs of various APPs according to the data information, classifying the APIs to obtain a general API and a characteristic API;
acquiring the recommendation degree of the API according to the use condition information of the API and the use frequency of the API;
constructing an API common combination table according to the frequency of two APIs appearing in the APP;
and recommending the corresponding API to the user according to the API recommendation degree and the API common combination table.
2. The interface API recommendation method of claim 1, wherein the data information includes a name, description, tag, source code, rating, and download size of the APP;
categorizing the APP in the APP set according to function, including:
acquiring the name, description and label of the APP;
extracting functional keywords of the APP according to the name, description and label of the APP;
and classifying the APP according to the functional keywords of the APP.
3. The interface API recommendation method according to claim 1, wherein said classifying said APIs to obtain a generic API and a feature API comprises:
obtaining the use frequency of the API on the various APPs and the reverse file frequency in the various APPs;
obtaining the use weight of the API according to the multiplication of the use frequency and the reverse file frequency;
judging whether the use weight is larger than a threshold value;
if yes, the API is a general API, and if not, the API is a characteristic API.
4. The interface API recommendation method according to claim 1, wherein said obtaining the recommendation degree of the API according to the API usage information and the API usage frequency comprises:
acquiring the use condition information of the API;
obtaining the frequency of the API used by the APP in the APP set and the frequency of the API used by the APP in each type of APP;
and acquiring the recommendation degree of the API according to the use condition information and the use frequency.
5. The interface API recommendation method according to claim 1, wherein the frequency of the common occurrence of the generic API and the feature API constructs an API common combination table, comprising:
constructing a directed graph G (V, E) according to the frequency of two APIs (application program interfaces) in the same APP;
traversing the directed graph G by adopting a depth-first search method;
and constructing an API common combination table according to the result of traversing the directed graph.
Where V denotes a set of all APIs, and E denotes a set of cases where two APIs appear in one APP at the same time.
6. An interface API recommendation system based on big data analysis, the system comprising:
a classification module: the method comprises the steps of obtaining data information of each APP in the APP set, and classifying the APPs in the APP set according to functions;
an API acquisition module: the API is used for obtaining various APPs according to the data information, classifying the APIs and obtaining a general API and a characteristic API;
a recommendation degree obtaining module: the recommendation degree of the API is obtained according to the use condition information of the API and the use frequency of the API;
a combination table construction module: the method is used for constructing an API common combination table according to the frequency of two APIs appearing in the APP;
a recommendation module: and recommending the corresponding API to the user according to the API recommendation degree and the API common combination table.
7. The interface API recommendation system of claim 6, wherein the data information includes a name, description, label, source code, rating, and download size of the APP;
the classification module comprises:
an information acquisition unit: the name, description and label of the APP are obtained;
a keyword extraction unit: extracting functional keywords of the APP according to the name, description and label of the APP;
a classification unit: and classifying the APP according to the functional keywords of the APP.
8. The interface API recommendation system according to claim 6, wherein said classifying said APIs to obtain a generic API and a feature API comprises:
obtaining the use frequency of the API on the various APPs and the reverse file frequency in the various APPs;
obtaining the use weight of the API according to the multiplication of the use frequency and the reverse file frequency;
judging whether the use weight is larger than a threshold value;
if yes, the API is a general API, and if not, the API is a characteristic API.
9. The API recommendation system of claim 6, wherein the recommendation degree obtaining module comprises:
an information acquisition unit: the service condition information is used for acquiring the API;
a use frequency acquisition unit: the method comprises the steps of obtaining the frequency of the API used by the APP in the APP set and the frequency of the API used by the APP in each type of APP;
a recommendation degree acquisition unit: and obtaining the recommendation degree of the API according to the use condition information and the use frequency.
10. The interface API recommendation system of claim 6, wherein the composition table construction module comprises:
a directed graph construction unit: the method comprises the steps of constructing a directed graph G (V, E) according to the frequency of two APIs appearing in the same APP;
traversing unit: traversing the directed graph G by adopting a depth-first search method;
a combination table construction unit: and the method is used for constructing the API common combination table according to the result of traversing the directed graph.
Where V denotes a set of all APIs, and E denotes a set of cases where two APIs appear in one APP at the same time.
CN201510834997.5A 2015-11-26 2015-11-26 Interface API recommendation method and system based on massive data analysis Pending CN105354327A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510834997.5A CN105354327A (en) 2015-11-26 2015-11-26 Interface API recommendation method and system based on massive data analysis

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510834997.5A CN105354327A (en) 2015-11-26 2015-11-26 Interface API recommendation method and system based on massive data analysis

Publications (1)

Publication Number Publication Date
CN105354327A true CN105354327A (en) 2016-02-24

Family

ID=55330299

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510834997.5A Pending CN105354327A (en) 2015-11-26 2015-11-26 Interface API recommendation method and system based on massive data analysis

Country Status (1)

Country Link
CN (1) CN105354327A (en)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105893348A (en) * 2016-03-30 2016-08-24 乐视控股(北京)有限公司 Corpus acquiring method and device
CN107479879A (en) * 2017-07-28 2017-12-15 扬州大学 The API and its use recommendation method that a kind of software-oriented function is safeguarded
CN107767237A (en) * 2017-11-15 2018-03-06 中国联合网络通信集团有限公司 A kind of sorting technique and categorizing system of networking products function
CN108875014A (en) * 2018-06-20 2018-11-23 大国创新智能科技(东莞)有限公司 Accurate item recommendation method and robot system based on big data and artificial intelligence
CN109144498A (en) * 2018-07-16 2019-01-04 山东师范大学 A kind of the API auto recommending method and device of object-oriented instantiation task
CN110008390A (en) * 2019-02-27 2019-07-12 深圳壹账通智能科技有限公司 Appraisal procedure, device, computer equipment and the storage medium of application program
CN110309040A (en) * 2019-06-11 2019-10-08 东南大学 A kind of API recommendation results appraisal procedure based on function similarity
CN111026538A (en) * 2019-12-26 2020-04-17 北京蓦然认知科技有限公司 APP ecosystem establishing and using method and device
CN113051444A (en) * 2021-04-30 2021-06-29 中国银行股份有限公司 Method and device for automatically distributing content classification categories
CN114741429A (en) * 2022-04-20 2022-07-12 西安电子科技大学 Web API (application program interface) associated pattern mining method based on graph neural network

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5748974A (en) * 1994-12-13 1998-05-05 International Business Machines Corporation Multimodal natural language interface for cross-application tasks
CN101957968A (en) * 2010-08-31 2011-01-26 南京财经大学 Online transaction service aggregation method based on Hadoop
CN102331929A (en) * 2011-06-27 2012-01-25 武汉大学 Service classification and recommendation method based on service combination history
CN104156467A (en) * 2014-08-22 2014-11-19 北京智谷睿拓技术服务有限公司 API recommendation method and API recommendation device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5748974A (en) * 1994-12-13 1998-05-05 International Business Machines Corporation Multimodal natural language interface for cross-application tasks
CN101957968A (en) * 2010-08-31 2011-01-26 南京财经大学 Online transaction service aggregation method based on Hadoop
CN102331929A (en) * 2011-06-27 2012-01-25 武汉大学 Service classification and recommendation method based on service combination history
CN104156467A (en) * 2014-08-22 2014-11-19 北京智谷睿拓技术服务有限公司 API recommendation method and API recommendation device

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105893348A (en) * 2016-03-30 2016-08-24 乐视控股(北京)有限公司 Corpus acquiring method and device
CN107479879B (en) * 2017-07-28 2021-09-14 扬州大学 API for software function maintenance and use recommendation method thereof
CN107479879A (en) * 2017-07-28 2017-12-15 扬州大学 The API and its use recommendation method that a kind of software-oriented function is safeguarded
CN107767237A (en) * 2017-11-15 2018-03-06 中国联合网络通信集团有限公司 A kind of sorting technique and categorizing system of networking products function
CN108875014A (en) * 2018-06-20 2018-11-23 大国创新智能科技(东莞)有限公司 Accurate item recommendation method and robot system based on big data and artificial intelligence
CN109144498A (en) * 2018-07-16 2019-01-04 山东师范大学 A kind of the API auto recommending method and device of object-oriented instantiation task
CN109144498B (en) * 2018-07-16 2021-12-03 山东师范大学 API automatic recommendation method and device for object instantiation-oriented tasks
CN110008390A (en) * 2019-02-27 2019-07-12 深圳壹账通智能科技有限公司 Appraisal procedure, device, computer equipment and the storage medium of application program
CN110309040A (en) * 2019-06-11 2019-10-08 东南大学 A kind of API recommendation results appraisal procedure based on function similarity
CN110309040B (en) * 2019-06-11 2024-01-12 东南大学 API recommendation result evaluation method based on functional similarity
CN111026538A (en) * 2019-12-26 2020-04-17 北京蓦然认知科技有限公司 APP ecosystem establishing and using method and device
CN111026538B (en) * 2019-12-26 2023-04-14 杭州蓦然认知科技有限公司 APP ecosystem establishing and using method and device
CN113051444A (en) * 2021-04-30 2021-06-29 中国银行股份有限公司 Method and device for automatically distributing content classification categories
CN114741429A (en) * 2022-04-20 2022-07-12 西安电子科技大学 Web API (application program interface) associated pattern mining method based on graph neural network

Similar Documents

Publication Publication Date Title
CN105354327A (en) Interface API recommendation method and system based on massive data analysis
CN109522556B (en) Intention recognition method and device
US11663411B2 (en) Ontology expansion using entity-association rules and abstract relations
US10437867B2 (en) Scenario generating apparatus and computer program therefor
US10095685B2 (en) Phrase pair collecting apparatus and computer program therefor
CN107391493B (en) Public opinion information extraction method and device, terminal equipment and storage medium
CN106919661B (en) Emotion type identification method and related device
CN111310476B (en) Public opinion monitoring method and system using aspect-based emotion analysis method
US20160155058A1 (en) Non-factoid question-answering system and method
CN111767716B (en) Method and device for determining enterprise multi-level industry information and computer equipment
CN107102993B (en) User appeal analysis method and device
US10417338B2 (en) External resource identification
US20160328657A1 (en) Complex predicate template collecting apparatus and computer program therefor
CN109271524B (en) Entity linking method in knowledge base question-answering system
WO2017198031A1 (en) Semantic parsing method and apparatus
CN110334268B (en) Block chain project hot word generation method and device
CN111259660A (en) Method, device and equipment for extracting keywords based on text pairs and storage medium
RU2738335C1 (en) Method and system for classifying and filtering prohibited content in a network
CN112527958A (en) User behavior tendency identification method, device, equipment and storage medium
CN110619212B (en) Character string-based malicious software identification method, system and related device
CN112036705A (en) Quality inspection result data acquisition method, device and equipment
CN108153728B (en) Keyword determination method and device
Jedrzejewski et al. Opinion mining and social networks: A promising match
CN109753646B (en) Article attribute identification method and electronic equipment
CN109960730A (en) A kind of short text classification method, device and equipment based on feature extension

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20160224

RJ01 Rejection of invention patent application after publication