Interface recommendation method and device, equipment, medium and program product

By extracting business requirements documents in sentences and abstracts, combined with the classification and keyword matching of interface documents, the problems of low efficiency and insufficient accuracy of business requirements document matching service interfaces in the existing technology are solved, and efficient and accurate interface recommendations are achieved.

CN119621008APending Publication Date: 2025-03-14INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411791991.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-06
Publication Date
2025-03-14

AI Technical Summary

Technical Problem

In the prior art, the low efficiency and insufficient accuracy of the service interface for business demand document matching is mainly due to the large number of interfaces and the deviation of technical personnel in understanding the required documents.

Method used

By segmenting and summarizing the business demand documents, combining preset multiple interface documents, they are divided into the corresponding service set according to the service category of each interface, and keywords are determined, and service interfaces that meet the needs are matched based on these keywords.

Benefits of technology

It realizes the accurate identification of service categories corresponding to business demand documents and intelligent matching of interface recommendations, and improves the efficiency and accuracy of service demand documents matching service interfaces.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119621008A_ABST
    Figure CN119621008A_ABST
Patent Text Reader

Abstract

The invention provides an interface recommendation method and device, equipment, a medium and a program product, and relates to the field of big data. The method comprises the steps of performing sentence segmentation on a business demand document, performing abstract extraction on a sentence segmentation result of the business demand document based on a plurality of preset interface documents to obtain a business demand document abstract, and dividing each interface document into a corresponding service set under each classification level according to a service category to which each interface belongs under a plurality of classification levels. Determining a keyword of each service set under each classification level, and determining a service category corresponding to the business demand document and a corresponding recommendation interface based on the keyword of the business demand document abstract, the keyword of each service set and the keyword of each interface document; according to the method, accurate identification of the service category corresponding to the business demand document and intelligent matching of the recommendation interface are realized, and the efficiency and accuracy of matching the service interface of the business demand document are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of big data, and in particular to an interface recommendation method, device, equipment, medium and program product. Background Art

[0002] A business requirements document (BRD) is an essential component of any new project launch. It details the project's requirements and development goals. With the continuous advancement of technology, many business requirements scenarios have been implemented by encapsulating them into corresponding service interfaces. This modular design makes the development process more efficient and flexible.

[0003] Currently, a large number of service interfaces are available for technical personnel to use, covering a wide range of business scenarios. Upon receiving a business requirements document, technical personnel must first understand and refine the specific requirements outlined in the document. They then search and match the service interfaces that meet these requirements from a vast library of interfaces.

[0004] However, the existing service interface matching process requires technicians to expend considerable time and effort searching and comparing each interface individually due to the sheer number of interfaces. Furthermore, different technicians may have different understandings of business requirements documents, leading to subjective differences in interface selection. Consequently, matching service interfaces with business requirements documents is inefficient and lacks accuracy. Summary of the Invention

[0005] The present application provides an interface recommendation method, apparatus, device, medium and program product for solving the technical problems of low efficiency and insufficient accuracy in matching business requirement documents with service interfaces.

[0006] In a first aspect, the present application provides an interface recommendation method, comprising:

[0007] Sentence-segmenting the business requirement document, and extracting a summary of the sentence-segmenting results of the business requirement document based on a plurality of preset interface documents to obtain a summary of the business requirement document;

[0008] According to the service category to which each interface belongs at multiple classification levels, each interface document is divided into a service set corresponding to each classification level, and keywords of each service set at each classification level are determined;

[0009] Based on the keywords of the business requirement document summary, the keywords of each service set, and the keywords of each interface document, the service category corresponding to the business requirement document and the corresponding recommended interface are determined.

[0010] In a second aspect, the present application provides an interface recommendation device, comprising:

[0011] Processing module, used to segment business requirement documents;

[0012] A determination module, configured to extract a summary of the sentence segmentation results of the business requirement document based on a plurality of preset interface documents to obtain a summary of the business requirement document;

[0013] The processing module is further configured to classify each interface document into a corresponding service set at each classification level according to the service category to which each interface belongs at multiple classification levels;

[0014] The determination module is further configured to determine keywords for each service set at each classification level;

[0015] The determination module is further configured to determine the service category and the corresponding recommended interface corresponding to the business requirement document based on the keywords of the business requirement document summary, the keywords of each service set, and the keywords of each interface document.

[0016] In a third aspect, an embodiment of the present application provides an interface recommendation device, comprising: a memory, a processor;

[0017] The memory stores computer-executable instructions;

[0018] The processor executes the computer-executable instructions stored in the memory, so that the processor executes the above first aspect and / or various possible implementations of the first aspect.

[0019] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, they are used to implement the first aspect above and / or various possible implementation methods of the first aspect.

[0020] In a fifth aspect, an embodiment of the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the above first aspect and / or various possible implementation methods of the first aspect.

[0021] The interface recommendation method provided in the present application obtains a summary of the business requirement document by segmenting the business requirement document and extracting a summary of the segmentation results of the business requirement document based on multiple preset interface documents. According to the service category to which each interface belongs at multiple classification levels, each interface document is divided into a corresponding service set at each classification level, and keywords of each service set at each classification level are determined. Based on the keywords of the business requirement document summary, the keywords of each service set and the keywords of each interface document, the service category corresponding to the business requirement document and the corresponding recommended interface are determined. This method realizes the accurate identification of the service category corresponding to the business requirement document and the intelligent matching of the recommended interface, thereby improving the efficiency and accuracy of matching the business requirement document with the service interface. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] 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.

[0023] Figure 1 A flowchart of the recommended interface method provided for this application;

[0024] Figure 2 A schematic diagram of the structure of the interface recommendation device provided in this application;

[0025] Figure 3 This is a schematic diagram of the recommended device structure for the interface provided in this application.

[0026] The above drawings illustrate specific embodiments of the present application, which will be described in more detail below. These drawings and the textual description are not intended to limit the scope of the present application in any way, but rather to illustrate the concepts of the present application to those skilled in the art by reference to specific embodiments. DETAILED DESCRIPTION

[0027] Exemplary embodiments will be described in detail herein, with examples illustrated in the accompanying drawings. In the following description, when referring to the drawings, identical numerals in different figures represent identical or similar elements, unless otherwise indicated. The embodiments described in the following exemplary embodiments are not intended to represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.

[0028] It should be noted that the interface recommendation method, device, equipment, medium and program product provided in this application can be used in the big data field or the financial technology field, and can also be used in any field other than the big data field or the financial technology field. This application does not limit the application field of the interface recommendation method, device, equipment, medium and program product.

[0029] Business requirements documents (BRDs) play a crucial role when launching new projects. They not only comprehensively outline the project's requirements but also clearly define the development goals. With the rapid advancement of technology, the implementation of business requirements is increasingly shifting towards modularization, encapsulating them into service interfaces to support project development efficiently and flexibly.

[0030] Currently, technical personnel have access to a vast library of service interfaces covering a wide range of business scenarios. When receiving a business requirements document, their primary task is to thoroughly understand and accurately extract the specific requirements from the document. They then search and match the service interfaces that best meet these requirements.

[0031] However, in the current matching process, technicians are faced with a large number of interfaces, which makes the search and comparison process time-consuming and labor-intensive. In addition, technicians may have different understandings of business requirement documents, which affects their judgment when selecting interfaces, resulting in low matching efficiency and insufficient accuracy.

[0032] In response to the above problems, the interface recommendation method provided by this application forms a summary of the business requirement document by carefully segmenting the business requirement document and extracting the summary in combination with the preset interface document. Subsequently, the interface documents are orderly classified into various service sets according to the service categories of the interfaces at different classification levels, and the keywords of each set are clarified. On this basis, by comparing the keywords of the business requirement document summary, service set and interface document, the service category and recommended interface corresponding to the business requirement are accurately locked, thereby realizing the accurate identification of service categories and intelligent interface recommendation, and improving the efficiency and accuracy of matching business requirements with service interfaces.

[0033] The following specific embodiments describe in detail the technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.

[0034] Figure 1 This is a flow chart of the interface recommendation method provided by this application. The execution subject of this embodiment is, for example, an interface recommendation system. Figure 1 As shown, the method includes:

[0035] S101: Segment the business requirement document, and extract a summary of the segmented results of the business requirement document based on a plurality of preset interface documents to obtain a summary of the business requirement document.

[0036] Among them, the business requirement document is used to indicate a document provided by the business department of an enterprise when establishing a project, which describes the demand scenario and development goals.

[0037] The preset multiple interface documents are, for example, multiple API (Application Programming Interface) service interfaces.

[0038] The business requirements document summary is used to indicate the business requirements of the business requirements document. The business requirements document summary concisely and clearly summarizes the key information of the business requirements, including the functions to be implemented, performance indicators, interface requirements, etc.

[0039] First, the business requirement document is sentence-processed, that is, the business requirement document is broken down into a series of independent and clear sentences. Then, by comparing the sentences in the business requirement document with the content of the interface document, the business requirements that are directly related to the interface or need to be implemented through the interface can be identified. Finally, combined with the understanding of the business requirement document sentences and the interface document, the core points of the business requirements are extracted to form a summary of the business requirement document.

[0040] S102: According to the service category to which each interface belongs at multiple classification levels, each interface document is divided into corresponding service sets at each classification level, and keywords of each service set at each classification level are determined.

[0041] First, determine the service classification of each interface at different levels. Divide the interfaces into major categories based on business areas or service areas, which provides an overview of the macro scope of the interface; subdivide the interfaces into medium categories based on functional modules or sub-service characteristics, which helps to deeply understand the specific functions and scope of the interface. Interface classification includes but is not limited to major categories and medium categories. For example, an interface may be classified into the "User Management" major category because it involves user information processing, and subdivided into the "User Information Management" medium category because it specifically performs user information update operations.

[0042] Next, each interface document is categorized into a corresponding service set based on the previously determined service category. This ensures that each interface can be assigned to its service category, thereby forming multiple sets of interfaces corresponding to each classification level. The interfaces within each set of interfaces corresponding to each classification level share the same service characteristics.

[0043] Finally, to improve the identifiability and retrieval efficiency of service collections, keywords were assigned to service collections at each classification level. These keywords were carefully selected to accurately summarize the subject matter and content of the service collection, whether it is a broad description of the domain at the macro level or a detailed description of the functionality at the mid-level.

[0044] S103: Determine the service category and the recommended interface corresponding to the business requirement document based on the keywords of the business requirement document summary, the keywords of each service set, and the keywords of each interface document.

[0045] First, use the keywords in the business requirements document summary to preliminarily identify the service category. Keywords in the business requirements document summary are often directly related to the core business requirements described in the document, allowing for quick identification of the service category. By comparing the keywords in the business requirements document summary with the keywords in each service collection, you can preliminarily determine the major or medium category of the service to which the business requirements document corresponds.

[0046] Next, the keywords for each service set refine the theme and content of the service set, providing a more accurate understanding of the specific business functions and modules covered by each service set. By matching the keywords in the business requirements document with the keywords of each service set, we can determine the service set to which the business requirements document is most likely to belong, further narrowing the scope of service categories.

[0047] Finally, we use the keywords in each interface document to precisely match business requirements. The keywords in the interface document describe key information such as the interface's functionality and input and output parameters in detail, and serve as the direct basis for determining recommended interfaces. By comparing the requirements in the business requirements document with the keywords in the interface document, we can filter out interfaces that meet business requirements and recommend them as interfaces, ensuring a high degree of alignment between business requirements and recommended interfaces.

[0048] The interface recommendation method provided in this embodiment obtains a summary of the business requirement document by segmenting the business requirement document and extracting a summary of the segmented results of the business requirement document based on multiple preset interface documents. According to the service category to which each interface belongs at multiple classification levels, each interface document is divided into a corresponding service set at each classification level, and keywords of each service set at each classification level are determined. Based on the keywords of the business requirement document summary, the keywords of each service set and the keywords of each interface document, the service category corresponding to the business requirement document and the corresponding recommended interface are determined. This method realizes the accurate identification of the service category corresponding to the business requirement document and the intelligent matching of the recommended interface, thereby improving the efficiency and accuracy of matching the business requirement document with the service interface.

[0049] In one possible implementation, a unified keyword extraction method is used to describe the sentences in the business requirement document summary, service set, interface document, and sentence segmentation results. The specific method is as follows:

[0050] Segment the target document and perform part-of-speech tagging on the segmentation results. Use words with preset parts of speech in the segmentation results as candidate keywords. The target document is a business requirements document summary, a service collection, an interface document, or a sentence in the segmentation results.

[0051] Construct a candidate keyword graph, where the nodes in the candidate keyword graph are candidate keywords, and the edges between the nodes are the co-occurrence relationships between the candidate keywords;

[0052] Initialize the influence score of each node in the candidate keyword graph;

[0053] For the first node, the influence score of the first node is determined based on the influence score of the second node connected to the first node, the correlation between the first node and the second node, the correlation between the second node and the third node that can be reached from the second node, the word frequency-inverse document frequency of the first node, and the word frequency-inverse document frequency of the third node. This step is repeated until the preset convergence condition is reached to obtain the influence score of each node, and the candidate keywords corresponding to the first number of nodes ranked from high to low in terms of influence scores are determined as the keywords of the target document.

[0054] First, the target document is segmented and tagged with parts of speech. Segmentation is the process of cutting a continuous text string into independent, meaningful words, while part-of-speech tagging is the process of assigning an appropriate part-of-speech tag to each word, such as nouns, verbs, and proper words. Part-of-speech tags help understand the grammatical function and semantic role of each word in the document. For the target document, whether it is a business requirements document summary, a service collection, an interface document, or a sentence in the sentence segmentation result, such processing is required. During the processing, stop words are filtered out, and words with specified parts of speech, such as nouns, verbs, and proper words, are retained as candidate keywords.

[0055] Next, a candidate keyword graph is constructed. In the candidate keyword graph, each node represents a candidate keyword, and the edges between nodes represent the co-occurrence relationships between candidate keywords. Co-occurrence relationships are typically determined based on a preset window size. That is, if the positions of two words in the document are no more than this window size apart, then an edge exists between them. In this way, the target document can be converted into a graph model.

[0056] Next, the influence score of each node in the candidate keyword graph is initialized. This score is used to measure the importance of each candidate keyword in the document. To calculate this score, iteratively considers information such as the influence scores of other nodes connected to each node, the correlation between nodes, and the node's Term Frequency-Inverse Document Frequency (TF-IDF). TF-IDF is the product of term frequency and inverse document frequency. It combines the frequency of a word's occurrence in a document with its distribution in the business requirements document corpus to accurately reflect the importance of a word.

[0057] During the iterative calculation process, the influence score of the first node is determined based on information such as the influence score of the second node connected to the first node, the correlation between the first and second nodes, the correlation between the second node and the third node reachable from the second node, the TF-IDF of the first node, and the TF-IDF of the third node. This process is repeated until a preset convergence condition is reached. The convergence condition can usually be set to the error rate between any two nodes being less than a given limit.

[0058] Finally, all the words are sorted by score, and the top n words with the highest scores are selected as the keywords of the target document. These keywords will be able to accurately reflect the theme and content of the document.

[0059] The influence score of the first node The calculation formula is:

[0060]

[0061] in, is the damping coefficient, usually taken as 0.85; is the first node; is the second node; is the third node; Represents the first node All connected nodes; Indicates that from the second node Start from all nodes that can be reached; Represents the first node and the second node ; Represents the second node and the third node ; is the term frequency minus the inverse document frequency of the first node; is the term frequency minus the inverse document frequency of the third node; is the influence score of the first node; The influence score of the second node.

[0062] In a possible implementation, a summary of the sentence segmentation results of the business requirement document is extracted based on a plurality of preset interface documents to obtain a summary of the business requirement document, including:

[0063] For each interface document, perform summary extraction based on the sentence segmentation results and the interface document to obtain the summary sentence corresponding to the interface document;

[0064] Based on the summary sentences corresponding to each interface document, a summary score of each sentence in the sentence segmentation result is determined, and a summary of the business requirement document is determined from the sentence segmentation result based on the summary score.

[0065] For each interface document, a summary is extracted based on the sentence segmentation results and the interface document to obtain a summary sentence corresponding to the interface document, including:

[0066] Add the sentences in the sentence segmentation results to the candidate sentence set and set the summary sentence set to empty;

[0067] Determine a first total number of words in the candidate sentence set and a second total number of words of the keywords of the interface document included in the candidate sentence set; determine a new summary sentence based on the similarity between each candidate sentence in the candidate sentence set and the interface document, the similarity between each candidate sentence and each summary sentence in the summary sentence set, the first total number of words, and the second total number of words; delete the new summary sentence from the candidate sentence set; and add the new summary sentence to the summary sentence set; repeat this step a second number of times; and determine the summary sentences in the obtained summary sentence set as the summary sentences corresponding to the interface document.

[0068] It is understandable that in order to extract the summary of the business requirement document based on multiple preset interface documents, the business requirement document is firstly segmented. Then, for each interface document, a summary is extracted based on the interface document content and the segmented results of the business requirement document.

[0069] To determine which sentences should be selected as summary sentences, a candidate sentence set is constructed based on the sentences in the business requirements document segmentation results, and an empty summary sentence set is initialized. The similarity between the candidate sentences and the interface document, the similarity between the candidate sentences and the selected summary sentences, the total number of words in the candidate sentences, and the total number of words containing interface document keywords are considered. Based on these factors, appropriate sentences are gradually selected from the candidate sentence set and added to the summary sentence set until a second number of times is reached (the second number is a preset number, for example, 20 times). In this way, the summary sentence corresponding to the interface document is obtained.

[0070] The method for determining the summary sentence corresponding to the interface document is (Keyword Maximum Marginal Relevance, maximum marginal relevance) algorithm, The calculation formula of the algorithm is:

[0071]

[0072] in, is the set of candidate sentences; S is the set of summary sentences; is the set of candidate sentences that are not used as summary sentences; For interface documentation; Include interface documents in the candidate sentence set The total number of keywords, that is, the second total number of words; is the total number of words in the candidate sentence set, that is, the first total number of words; A set of candidate sentences Middle candidate sentences; is the first sentence in the summary sentence set S summary sentences; is the first sentence in the candidate sentence set candidate sentences and interface documentation similarity; For the candidate sentences and the first Similarity of the abstract sentences.

[0073] Next, based on the corresponding summary sentences in the interface document, a summary score is assigned to each sentence in the sentence segmentation results. Finally, based on these summary scores, the business requirements document summary is determined from the sentence segmentation results in the business requirements document. This ensures that the summary is consistent with the core content of the business requirements document and closely related to the pre-defined interface document.

[0074] In a possible implementation, a method for calculating the similarity between two texts is specifically described, including:

[0075] Obtaining a plurality of first words of a first text and a plurality of second words of a second text, wherein the first text is a candidate sentence and the second text is an interface document, or the first text is a candidate sentence and the second text is a summary sentence, the plurality of first words are words obtained by removing stop words from a word segmentation result of the first text, and the plurality of second words are words obtained by removing stop words from a word segmentation result of the first text;

[0076] Determine the influence scores of the other words in the plurality of first words except the candidate keywords of the first text based on the influence scores of the non-keywords in the candidate keywords of the first text; determine the influence scores of the other words in the plurality of second words except the candidate keywords of the second text based on the influence scores of the non-keywords in the candidate keywords of the second text;

[0077] The similarity between the first text and the second text is determined based on the similarity between each first word and each second word, the influence score of each first word, the influence score of each second word, the number of first words, and the number of second words.

[0078] First, we need to extract vocabulary from two texts. These two texts are the first text (candidate sentence) and the second text (which can be an interface document or summary sentence). By segmenting these two texts and removing stop words, we can obtain multiple first words and multiple second words.

[0079] Next, in order to calculate the similarity between multiple first words and multiple second words, their influence scores need to be considered. For each candidate keyword in the text, according to the influence score The influence score of a candidate keyword is determined by the following calculation formula. For each text's other words besides the candidate keywords, a strategy is needed to determine their influence scores. This paper adopts a smoothing method, using the average of the influence scores of non-keywords in the candidate keywords as the influence score for the other words.

[0080] Finally, the similarity between the two texts is determined based on the similarity between each first and second word, the influence score of each word, and the number of words. This similarity calculation not only considers the direct similarity between words, but also incorporates the influence score of each word, thereby accurately reflecting the semantic relationship between the two texts.

[0081] The similarity calculation formula between each first word and each second word is:

[0082]

[0083] in, For each first word; For each second word.

[0084] The calculation formula for the influence score of each first word is: (The calculation formula for the influence score of each second word is similar)

[0085]

[0086] in, is the first word in the first text; is the candidate keyword of the first text; other words among the plurality of first words except the candidate keywords of the first text; is a keyword among the candidate keywords of the first text; is a non-keyword among the candidate keywords of the first text; is the number of candidate keywords in the first text; is the number of keywords in the candidate keywords of the first text.

[0087] The formula for calculating the similarity between the first text and the second text is:

[0088]

[0089] in, is the first text; is the second text; The first words of the first text; for each second word of the second text; is the number of the first word; is the number of the second word.

[0090] In one possible implementation, determining the service category and the recommended interface corresponding to the business requirement document based on the keywords of the business requirement document summary, the keywords of each service set, and the keywords of each interface document includes:

[0091] The highest level among multiple classification levels is used as the target level;

[0092] Based on the keywords of the business requirement document summary and the keywords of each service set at the target level, determine the similarity between the business requirement document summary and each service set at the target level, determine the service classification corresponding to the service set with the highest similarity as the service classification at the target level corresponding to the business requirement document, use the next level of the target level as the new target level, and repeat this step to obtain the service categories at each classification level corresponding to the business requirement document;

[0093] Based on the keywords of the business requirement document summary and the keywords of each candidate interface document in multiple candidate interface documents, the similarity between the business requirement document summary and each candidate interface document is determined, and the interfaces corresponding to the third number of candidate interface documents ranked with the highest similarity from high to low are determined as the recommended interfaces corresponding to the business requirement document, wherein the candidate interface documents are the interface documents in the service set corresponding to the lowest level service category of the business requirement document.

[0094] As can be understood, first determine the highest level among multiple classification levels as the target level for processing. Starting from the highest level, gradually refine the service classification of business requirements.

[0095] Next, the keywords in the business requirements document summary are compared with the keywords in each service set at the target level, and the similarity between them is calculated. This identifies the service set that best matches the business requirements and thus determines the service classification for the business requirements at the current target level. After completing this step, the target level is lowered by one level, and the above process is repeated until all classification levels have been traversed, resulting in the service categories for each level in the business requirements document.

[0096] In addition, to recommend suitable interfaces for a business requirements document, similarity is calculated between keywords in the business requirements document summary and keywords in multiple candidate interface documents. Candidate interface documents specifically refer to interface documents in the service set corresponding to the lowest-level service category in the business requirements document. Based on the similarity, the interfaces corresponding to the third most similar candidate interface documents are selected as recommended interfaces for the business requirements document. This process selects the interfaces that best align with the business requirements from the numerous interfaces.

[0097] In a possible implementation, the similarity between the business requirement document summary and the service set, or the similarity between the business requirement document summary and the candidate interface documents, includes:

[0098] Performing maximum similarity matching on the keywords of the third text and the keywords of the fourth text according to a greedy selection method to obtain a first index keyword corresponding to the third text and a second index keyword corresponding to the fourth text, wherein the third text is a business requirement document summary and the fourth text is a service set, or the third text is a business requirement document summary and the fourth text is a candidate interface document;

[0099] The similarity between the third text and the fourth text is determined based on the first index keyword, the second index keyword, the influence score of the first index keyword, and the influence score of the second index keyword.

[0100] For example, the third text is , the fourth text is , the keywords of the third text are , is the number of keywords in the third text, and the keywords in the fourth text are , The number of keywords in the fourth text.

[0101] The keywords of the third text and the keywords of the fourth text are matched with each other by maximum similarity according to the greedy selection method. The specific steps are as follows:

[0102] Use a matrix represents the similarity between the keywords of the third text and the keywords of the fourth text, where Indicates the third text Keywords and the fourth text Similarity of keywords.

[0103]

[0104] Filter out the matrix middle The keyword of the third text and the keyword of the fourth text corresponding to the element with the largest value are added to the index keyword corresponding to the third text and the index keyword corresponding to the fourth text respectively. Remove the elements in the row and column, and repeat the above steps until the matrix There is no element in the result, and finally, the first index keyword corresponding to the third text is obtained. , the second index keyword corresponding to the fourth text .

[0105] The influence score of the first index keyword is , the influence score of the second index keyword is .

[0106] The first index keyword weighted text matrix is ​​expressed as:

[0107]

[0108] The second index keyword weighted text matrix is ​​expressed as:

[0109]

[0110] First, the first index keyword weighted text matrix Perform orthogonal triangular decomposition to obtain the orthogonal matrix X, then calculate ,right The result is orthogonal triangular decomposition to obtain the first index keyword weighted text matrix and the second index keyword weighted text matrix The difference matrix .

[0111] The similarity calculation formula between the third text and the fourth text is:

[0112]

[0113] in, is the difference matrix No. Rank Elements of a column.

[0114] Figure 2 The schematic diagram of the interface recommended device provided by this application is as follows: Figure 2 As shown, the interface recommendation device 200 provided in this embodiment includes:

[0115] Processing module 201, for sentence segmentation of the business requirement document;

[0116] Determining module 202, configured to extract a summary of the sentence segmentation results of the business requirement document based on a plurality of preset interface documents to obtain a summary of the business requirement document;

[0117] The processing module 201 is further configured to classify each interface document into a corresponding service set at each classification level according to the service category to which each interface belongs at multiple classification levels;

[0118] The determination module 202 is further configured to determine keywords for each service set at each classification level;

[0119] The determination module 202 is further configured to determine the service category and the corresponding recommended interface corresponding to the business requirement document based on the keywords of the business requirement document summary, the keywords of each service set, and the keywords of each interface document.

[0120] In a possible implementation, the processing module 201 is further configured to segment the target document and perform part-of-speech tagging on the segmentation results;

[0121] The determination module 202 is further configured to use words with preset parts of speech in the word segmentation results as candidate keywords, where the target document is a business requirement document summary, or a service set, or an interface document, or a sentence in the sentence segmentation results;

[0122] The processing module 201 is further configured to construct a candidate keyword graph, wherein the nodes in the candidate keyword graph are candidate keywords, and the edges between the nodes are co-occurrence relationships between the candidate keywords;

[0123] The processing module 201 is also used to initialize the influence score of each node in the candidate keyword graph;

[0124] The determination module 202 is also used to determine the influence score of the first node based on the influence score of the second node connected to the first node, the correlation between the first node and the second node, the correlation between the second node and the third node that can be reached from the second node, the word frequency-inverse document frequency of the first node, and the word frequency-inverse document frequency of the third node. This step is repeated until the preset convergence condition is reached to obtain the influence score of each node, and the candidate keywords corresponding to the first number of nodes ranked from high to low in terms of influence scores are determined as the keywords of the target document.

[0125] In a possible implementation, the determination module 202 is further configured to extract a summary of each interface document based on the sentence segmentation results and the interface document to obtain a summary sentence corresponding to the interface document;

[0126] The determination module 202 is further configured to determine a summary score of each sentence in the sentence segmentation results based on the summary sentences corresponding to each interface document, and determine a summary of the business requirement document from the sentence segmentation results based on the summary score.

[0127] In a possible implementation, the processing module 201 is further configured to add sentences in the sentence segmentation result to the candidate sentence set and set the summary sentence set to be empty;

[0128] The determination module 202 is further configured to determine a first total number of words in the candidate sentence set and a second total number of words of the keywords of the interface document contained in the candidate sentence set, determine a new summary sentence based on the similarity between each candidate sentence in the candidate sentence set and the interface document, the similarity between each candidate sentence and each summary sentence in the summary sentence set, the first total number of words, and the second total number of words, delete the new summary sentence from the candidate sentence set, and add the new summary sentence to the summary sentence set, repeat this step a second number of times, and determine the summary sentence in the obtained summary sentence set as the summary sentence corresponding to the interface document.

[0129] In a possible implementation, the apparatus further includes: an acquisition module 203;

[0130] The acquisition module 203 is further configured to acquire a plurality of first words from a first text and a plurality of second words from a second text, wherein the first text is a candidate sentence and the second text is an interface document, or the first text is a candidate sentence and the second text is a summary sentence, the plurality of first words are words obtained by removing stop words from a word segmentation result of the first text, and the plurality of second words are words obtained by removing stop words from a word segmentation result of the first text;

[0131] The determination module 202 is further configured to determine the influence scores of the other words in the plurality of first words excluding the candidate keywords of the first text based on the influence scores of the non-keywords in the candidate keywords of the first text, and to determine the influence scores of the other words in the plurality of second words excluding the candidate keywords of the second text based on the influence scores of the non-keywords in the candidate keywords of the second text;

[0132] The determination module 202 is further configured to determine the similarity between the first text and the second text based on the similarity between each first word and each second word, the influence score of each first word, the influence score of each second word, the number of first words, and the number of second words.

[0133] In a possible implementation, the determination module 202 is further configured to use the highest level among the multiple classification levels as the target level;

[0134] The determination module 202 is further configured to determine the similarity between the business requirement document summary and the service sets at the target level based on the keywords of the business requirement document summary and the keywords of the service sets at the target level, determine the service classification corresponding to the service set with the highest similarity as the service classification at the target level corresponding to the business requirement document, set the level below the target level as the new target level, and repeat this step to obtain the service categories at each classification level corresponding to the business requirement document;

[0135] Determination module 202 is also used to determine the similarity between the business requirement document summary and each candidate interface document based on the keywords of the business requirement document summary and the keywords of each candidate interface document in multiple candidate interface documents, and determine the interfaces corresponding to the third number of candidate interface documents ranked in order of similarity as the recommended interfaces corresponding to the business requirement document, wherein the candidate interface documents are interface documents in the service set corresponding to the lowest level service category of the business requirement document.

[0136] In one possible implementation, the determination module 202 is further configured to perform maximum similarity matching on the keywords of the third text and the keywords of the fourth text according to a greedy selection method to obtain a first index keyword corresponding to the third text and a second index keyword corresponding to the fourth text, wherein the third text is a business requirement document summary and the fourth text is a service set, or the third text is a business requirement document summary and the fourth text is a candidate interface document;

[0137] The determination module 202 is further configured to determine the similarity between the third text and the fourth text based on the first index keyword, the second index keyword, the influence score of the first index keyword, and the influence score of the second index keyword.

[0138] The interface recommendation device provided in this embodiment can execute the method provided in the above method embodiment. Its implementation principle and technical effects are similar and will not be described in detail in this embodiment.

[0139] Figure 3 This is a schematic diagram of the recommended device structure for the interface provided in this application. Figure 3 As shown, the electronic device 300 provided in this embodiment includes: at least one processor 301 and a memory 302. Optionally, the device 300 also includes a communication component 303. The processor 301, the memory 302 and the communication component 303 are connected via a bus 304.

[0140] During the specific implementation process, at least one processor 301 executes the computer-executable instructions stored in the memory 302, so that the at least one processor 301 performs the above method.

[0141] The specific implementation process of the processor 301 can be found in the above method embodiment. Its implementation principle and technical effects are similar and will not be repeated here in this embodiment.

[0142] In the above embodiments, it should be understood that the processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASICs), etc. A general-purpose processor may be a microprocessor or any conventional processor. The steps of the method disclosed in the present invention may be directly executed by a hardware processor or by a combination of hardware and software modules within the processor.

[0143] The memory may include random access memory (RAM) and may also include non-volatile memory (NVM), such as at least one disk storage.

[0144] A bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus. Buses can be categorized as address buses, data buses, and control buses. For ease of illustration, the buses in the drawings of this application are not limited to just one bus or just one type of bus.

[0145] The present application also provides a computer program product, including a computer program, which implements the above method when executed by a processor.

[0146] The present application also provides a computer-readable storage medium, in which computer-executable instructions are stored. When a processor executes the computer-executable instructions, the above method is implemented.

[0147] The readable storage medium may be implemented by any type of volatile or non-volatile memory device, or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The readable storage medium may be any available medium that can be accessed by a general-purpose or special-purpose computer.

[0148] An exemplary readable storage medium is coupled to a processor so that the processor can read information from the readable storage medium and write information to the readable storage medium. Of course, the readable storage medium can also be an integral part of the processor. The processor and the readable storage medium can be located in an application specific integrated circuit (ASIC). Of course, the processor and the readable storage medium can also exist in the device as discrete components.

[0149] The division of units is merely a logical functional division; actual implementations may employ alternative divisions, such as combining or integrating multiple units or components into another system, or omitting or disabling certain features. Furthermore, any direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection between devices or units, either through an interface, electrical, mechanical, or other means.

[0150] Units described as separate components may or may not be physically separate, and components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.

[0151] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0152] If a function is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the portion that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the various embodiments of the method of the present invention. The aforementioned storage medium includes various media that can store program code, such as USB flash drives, mobile hard drives, read-only memories (ROMs), random access memories (RAMs), magnetic disks, or optical disks.

[0153] Those skilled in the art will appreciate that all or part of the steps in the above-described method embodiments can be implemented using hardware associated with program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.

[0154] It should be noted that for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that this application is not limited by the order of the actions described, because according to this application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in this specification are all optional embodiments, and the actions and modules involved are not necessarily required by this application.

[0155] It should be further noted that, although the various steps in the flowchart are shown in sequence as indicated by the arrows, these steps are not necessarily performed in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps may be performed in other orders. Moreover, at least a portion of the steps in the flowchart may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily performed at the same time, but may be performed at different times. The execution order of these sub-steps or stages is not necessarily to be performed in sequence, but may be performed in turn or alternately with other steps or at least a portion of the sub-steps or stages of other steps.

[0156] It should be understood that the above-described device embodiments are merely illustrative, and the device of the present application may also be implemented in other ways. For example, the division of units / modules in the above-described embodiments is merely a logical functional division, and actual implementations may employ other division methods. For example, multiple units, modules, or components may be combined or integrated into another system, or some features may be omitted or not implemented.

[0157] In addition, unless otherwise specified, the functional units / modules in the various embodiments of the present application may be integrated into a single unit / module, each unit / module may exist physically separately, or two or more units / modules may be integrated together. The aforementioned integrated units / modules may be implemented in the form of hardware or software program modules.

[0158] If an integrated unit / module is implemented in hardware, the hardware may be digital circuits, analog circuits, etc. The physical implementation of the hardware structure includes, but is not limited to, transistors, memristors, etc. Unless otherwise specified, the processor may be any appropriate hardware processor, such as a CPU, GPU, FPGA, DSP, and ASIC. Unless otherwise specified, the storage unit may be any appropriate magnetic storage medium or magneto-optical storage medium, such as resistive random access memory (RRAM), dynamic random access memory (DRAM), static random access memory (SRAM), enhanced dynamic random access memory (EDRAM), high-bandwidth memory (HBM), hybrid memory cube (HMC), etc.

[0159] If the integrated unit / module is implemented in the form of a software program module and sold or used as an independent product, it can be stored in a computer-readable memory. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a memory and includes a number of instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the various embodiments of the present application. The aforementioned memory includes: U disk, read-only memory (ROM), random access memory (RAM), mobile hard disk, magnetic disk, or optical disk, etc., various media that can store program code.

[0160] In the above embodiments, the description of each embodiment has its own emphasis. For parts not described in detail in a particular embodiment, please refer to the relevant description of other embodiments. The technical features of the above embodiments can be combined in any way. To keep the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0161] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present application that follow the general principles of the present application and include common knowledge or customary techniques in the art not disclosed herein. The description and examples are to be considered as exemplary only, and the true scope and spirit of the present application are indicated by the following claims.

[0162] It should be understood that the present application is not limited to the exact structure described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.

Claims

1. An interface recommendation method, characterized in that: include: Sentence the business requirement document, and extract a summary of the sentence segmentation results of the business requirement document based on a plurality of preset interface documents to obtain a summary of the business requirement document; According to the service category to which each interface belongs at multiple classification levels, each of the interface documents is divided into a service set corresponding to each classification level, and a keyword of each service set at each classification level is determined; Based on the keywords of the business requirement document summary, the keywords of each service set and the keywords of each interface document, the service category corresponding to the business requirement document and the corresponding recommended interface are determined.

2. The method according to claim 1, characterized in that Also includes: Segmenting the target document and performing part-of-speech tagging on the segmentation results, and using words with preset parts of speech in the segmentation results as candidate keywords, wherein the target document is the business requirement document summary, or the service set, or the interface document, or a sentence in the segmentation results; Constructing a candidate keyword graph, wherein nodes in the candidate keyword graph are candidate keywords, and edges between nodes are co-occurrence relationships between candidate keywords; Initializing the influence score of each node in the candidate keyword graph; For the first node, the influence score of the first node is determined based on the influence score of the second node connected to the first node, the correlation between the first node and the second node, the correlation between the second node and a third node that can be reached from the second node, the term frequency-inverse document frequency of the first node, and the term frequency-inverse document frequency of the third node. This step is repeated until a preset convergence condition is reached to obtain the influence score of each node, and the candidate keywords corresponding to the first number of nodes ranked in order from high to low in terms of influence scores are determined as the keywords of the target document.

3. The method according to claim 2, characterized in that The extracting summary of the sentence results of the business requirement document based on the preset multiple interface documents to obtain the business requirement document summary includes: For each interface document, extract a summary based on the sentence segmentation result and the interface document to obtain a summary sentence corresponding to the interface document; Based on the summary sentences corresponding to each interface document, a summary score of each sentence in the sentence segmentation result is determined, and based on the summary score, a summary of the business requirement document is determined from the sentence segmentation result.

4. The method according to claim 3, characterized in that For each interface document, extracting a summary based on the sentence segmentation result and the interface document to obtain a summary sentence corresponding to the interface document includes: Add the sentences in the sentence segmentation result to the candidate sentence set, and set the summary sentence set to empty; Determine a first total number of words in the candidate sentence set and a second total number of words of the keywords of the interface document included in the candidate sentence set, determine a new summary sentence based on the similarity between each candidate sentence in the candidate sentence set and the interface document, the similarity between each candidate sentence and each summary sentence in the summary sentence set, the first total number of words, and the second total number of words, delete the new summary sentence from the candidate sentence set, add the new summary sentence to the summary sentence set, repeat this step a second number of times, and determine the summary sentence in the obtained summary sentence set as the summary sentence corresponding to the interface document.

5. The method according to claim 4, characterized in that Also includes: Acquire a plurality of first words of a first text and a plurality of second words of a second text, wherein the first text is the candidate sentence and the second text is the interface document, or the first text is the candidate sentence and the second text is the summary sentence, the plurality of first words are words obtained by removing stop words from the word segmentation result of the first text, and the plurality of second words are words obtained by removing stop words from the word segmentation result of the first text; Determine the influence scores of the other words in the plurality of first words except the candidate keywords of the first text based on the influence scores of the non-keywords in the candidate keywords of the first text, and determine the influence scores of the other words in the plurality of second words except the candidate keywords of the second text based on the influence scores of the non-keywords in the candidate keywords of the second text; The similarity between the first text and the second text is determined based on the similarity between each of the first words and each of the second words, the influence score of each of the first words, the influence score of each of the second words, the number of the first words, and the number of the second words.

6. The method according to claim 2, characterized in that The determining, based on the keywords of the business requirement document summary, the keywords of each service set, and the keywords of each interface document, the service category corresponding to the business requirement document and the corresponding recommended interface includes: taking the highest level among the plurality of classification levels as the target level; Determine the similarity between the business requirement document summary and the service sets at the target level based on the keywords of the business requirement document summary and the keywords of the service sets at the target level, determine the service classification corresponding to the service set with the highest similarity as the service classification at the target level corresponding to the business requirement document, take the next level of the target level as the new target level, and repeat this step to obtain the service categories at each classification level corresponding to the business requirement document; Based on the keywords of the business requirement document summary and the keywords of each candidate interface document in a plurality of candidate interface documents, the similarity between the business requirement document summary and each of the candidate interface documents is determined, and the interfaces corresponding to the third number of candidate interface documents ranked in descending order of similarity are determined as the recommended interfaces corresponding to the business requirement document, wherein the candidate interface documents are interface documents in the service set corresponding to the lowest level service category of the business requirement document.

7. The method according to claim 6, characterized in that Also includes: Performing maximum similarity matching on the keywords of the third text and the keywords of the fourth text according to a greedy selection method to obtain a first index keyword corresponding to the third text and a second index keyword corresponding to the fourth text, wherein the third text is the summary of the business requirement document and the fourth text is the service set, or the third text is the summary of the business requirement document and the fourth text is the candidate interface document; The similarity between the third text and the fourth text is determined based on the first index keyword, the second index keyword, the influence score of the first index keyword, and the influence score of the second index keyword.

8. An interface recommendation device, characterized in that: include: The processing module is used to segment the business requirement document into sentences; A determination module, configured to extract a summary of the sentence segmentation results of the business requirement document based on a plurality of preset interface documents to obtain a summary of the business requirement document; The processing module is further used to classify each of the interface documents into corresponding service sets at each classification level according to the service category to which each interface belongs at multiple classification levels; The determination module is further used to determine the keywords of each service set at each classification level; The determination module is further used to determine the service category and the corresponding recommended interface corresponding to the business requirement document based on the keywords of the business requirement document summary, the keywords of each service set and the keywords of each interface document.

9. An electronic device, characterized in that: include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement the method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 7 when executed by a processor.

11. A computer program product, characterized in that The invention comprises a computer program, which implements the method according to any one of claims 1 to 7 when being executed by a processor.

Citation Information

Cited By

  • Deep learning-based data structured application program interface recommendation method

    CN120196749A